1. 21 Sep, 2022 1 commit
  2. 28 Jul, 2022 1 commit
    • vfdev's avatar
      [proto] Ported all transforms to the new API (#6305) · 77c8c91c
      vfdev authored
      * [proto] Added few transforms tests, part 1 (#6262)
      
      * Added supported/unsupported data checks in the tests for cutmix/mixup
      
      * Added RandomRotation, RandomAffine transforms tests
      
      * Added tests for RandomZoomOut, Pad
      
      * Update test_prototype_transforms.py
      
      * Added RandomCrop transform and tests (#6271)
      
      * [proto] Added GaussianBlur transform and tests (#6273)
      
      * Added GaussianBlur transform and tests
      
      * Fixing code format
      
      * Copied correctness test
      
      * [proto] Added random color transforms and tests (#6275)
      
      * Added random color transforms and tests
      
      * Disable smoke test for RandomSolarize, RandomAdjustSharpness
      
      * Added RandomPerspective and tests (#6284)
      
      - replaced real image creation by mocks for other tests
      
      * Added more functional tests (#6285)
      
      * [proto] Added elastic transform and tests (#6295)
      
      * WIP [proto] Added functional elastic transform with tests
      
      * Added more functional tests
      
      * WIP on elastic op
      
      * Added elastic transform and tests
      
      * Added tests
      
      * Added tests for ElasticTransform
      
      * Try to format code as in https://github.com/pytorch/vision/pull/5106
      
      
      
      * Fixed bug in affine get_params test
      
      * Implemented RandomErase on PIL input as fallback to tensors (#6309)
      
      Added tests
      
      * Added image_size computation for BoundingBox.rotate if expand (#6319)
      
      * Added image_size computation for BoundingBox.rotate if expand
      
      * Added tests
      
      * Added erase_image_pil and eager/jit erase_image_tensor test (#6320)
      
      * Updates according to the review
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      77c8c91c
  3. 22 Jul, 2022 1 commit
  4. 11 Jul, 2022 1 commit
    • vfdev's avatar
      [proto] Added some transformations and fixed type hints (#6245) · 9effc4cd
      vfdev authored
      * Another attempt to add transforms
      
      * Fixed padding type hint
      
      * Fixed fill arg for pad and rotate, affine
      
      * code formatting and type hints for affine transformation
      
      * Fixed flake8
      
      * Updated tests to save and load transforms
      
      * Fixed code formatting issue
      
      * Fixed jit loading issue
      
      * Restored fill default value to None
      Updated code according to the review
      
      * Added tests for rotation, affine and zoom transforms
      
      * Put back commented code
      
      * Random erase bypass boxes and masks
      Go back with if-return/elif-return/else-return
      
      * Fixed acceptable and non-acceptable types for Cutmix/Mixup
      
      * Updated conditions for _BaseMixupCutmix
      9effc4cd
  5. 01 Jul, 2022 1 commit
  6. 13 Jun, 2022 1 commit
    • Lenz's avatar
      Added elastic transform in torchvision.transforms (#4938) · 9430be76
      Lenz authored
      
      
      * Added elastic augment
      
      * ufmt formatting
      
      * updated comments
      
      * fixed circular dependency issue and bare except error
      
      * Fixed three type checking errors in functional_tensor.py
      
      * ufmt formatted
      
      * changed elastic_deformation to a more common implementation
      
      Implementation uses alpha and sigma to control strength and smoothness of the displacement vectors in elastic_deformation instead of control_point_spacings and sigma.
      
      * ufmt formatting
      
      * Some performance updates
      
      Put random offset vectors to device before gaussian_blur is applied speeds it up 3-fold.
      
      * fixed type error
      
      * fixed again a type error
      
      * Update torchvision/transforms/functional_tensor.py
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      
      * Added some requested changes
      
      - pil image support similar to GaussianBlur
      - changed interpolation arg to InterpolationMode
      - added a wrapper in torchvision.transforms.functional.py that gets called by the class in transforms.py
      -renamed it to ElasticTransform
      - handled sigma = 0 case
      
      * added img docstring
      
      * added some tests
      
      * Updated tests and the code
      
      * Added the requested changes to the arguments of F.elastic_transform
      
      Added random_state and displacement as arguments to F.elastic_transform
      
      * fixed the type error
      
      * Fixed tests and docs
      
      * implemented requested changes
      
      Changes:
      1) alpha AND sigma OR displacement must be given as arguments to transforms.functional_tensor.elastic_transform instead of alpha AND sigma AND displacement
      2) displacements are accepted in transforms.functional.elastic_transform as np.array and torch.Tensor instead of only accepting torch.Tensor
      
      * ufmt formatting
      
      * trochscript error resolved
      
      replaced torch.from_numpy() to torch.Tensor() to make it compatible to torchscript
      
      * revert to torch.from_numpy()
      
      * updated argument checks and errors
      
      - In F.elastic_transform added check to see if both user inputs img and displacement are either of type PIL Image and ndarray or both of type tensor.
      - In F_t.elastic_transform added check if alpha and sigma are None if displacement is given or vice versa.
      
      * fixed seed error
      
      changed torch.seed to torch.manual_seed in F_t.elastic_transform
      
      * Reverted displacement type and other cosmetics
      
      * Other minor improvements
      
      * changed gaussian_blur filter size
      
      changed gaussian_blur filter size
      from
      4 * int(sigma) + 1
      to
      int(8 * sigma + 1)
      to make it consistent with ernestums implementation
      
      * resolved merge error
      
      * Revert "resolved merge error"
      
      This reverts commit 6a4a4e74ff4d078e2c2753d359185f9a81c415d0.
      
      * resolve merge error
      
      * ufmt formatted
      
      * ufmt formated once again..
      
      * fixed unsupported operand error
      
      * Update API and removed random_state from functional part
      
      * Added default values
      
      * Added ElasticTransform to gallery and updated the docstring
      
      * Updated gallery and added _log_api_usage_once
      BTW, matplotlib.pylab is deprecated
      
      * Updated gallery transforms code
      
      * Updates according to review
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      9430be76
  7. 16 May, 2022 1 commit
  8. 26 Apr, 2022 1 commit
  9. 25 Mar, 2022 1 commit
  10. 28 Feb, 2022 1 commit
    • Vasilis Vryniotis's avatar
      Replace get_image_size/num_channels with get_dimensions (#5487) · 095437aa
      Vasilis Vryniotis authored
      * Replace get_image_size/num_channels with get_image_dims
      
      * Reduce verbosity
      
      * Fix JIT-scriptability
      
      * Refactoring
      
      * More refactoring
      
      * Replace all _FP/_FT direct calls.
      
      * Remove usages of get_image_size and get_image_num_channels from code-base.
      
      * Fix JIT issues
      
      * Adding missing assertion.
      095437aa
  11. 15 Feb, 2022 1 commit
  12. 08 Feb, 2022 1 commit
  13. 24 Jan, 2022 1 commit
  14. 29 Nov, 2021 2 commits
    • Vasilis Vryniotis's avatar
      Fix bug on autocontrast when `min==max` (#4999) · 48b82c11
      Vasilis Vryniotis authored
      * Fix bug on autocontrast when `min==max`
      
      * Adding PIL vs TorchVision test for min==max
      48b82c11
    • puhuk's avatar
      Update functional_tensor.py (#4852) · 1c9ccb7b
      puhuk authored
      
      
      * Update functional_tensor.py
      
      To resolve issue #4818
      Add assert function and logic after checking bound of image
      
      * Update functional_tensor.py
      
      * Update test
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Fix linter
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      1c9ccb7b
  15. 28 Oct, 2021 1 commit
  16. 04 Oct, 2021 2 commits
    • Nicolas Hug's avatar
      Fix all outstanding flake8 issues (#4535) · b81d189d
      Nicolas Hug authored
      b81d189d
    • Philip Meier's avatar
      Add ufmt (usort + black) as code formatter (#4384) · 5f0edb97
      Philip Meier authored
      
      
      * add ufmt as code formatter
      
      * cleanup
      
      * quote ufmt requirement
      
      * split imports into more groups
      
      * regenerate circleci config
      
      * fix CI
      
      * clarify local testing utils section
      
      * use ufmt pre-commit hook
      
      * split relative imports into local category
      
      * Revert "split relative imports into local category"
      
      This reverts commit f2e224cde2008c56c9347c1f69746d39065cdd51.
      
      * pin black and usort dependencies
      
      * fix local test utils detection
      
      * fix ufmt rev
      
      * add reference utils to local category
      
      * fix usort config
      
      * remove custom categories sorting
      
      * Run pre-commit without fixing flake8
      
      * got a double import in merge
      Co-authored-by: default avatarNicolas Hug <nicolashug@fb.com>
      5f0edb97
  17. 27 Sep, 2021 1 commit
    • Loi Ly's avatar
      Added gray image support to `adjust_saturation` function (#4480) · f483e71b
      Loi Ly authored
      * update channels parameter to every calling to check_functional_vs_PIL_vs_scripted
      
      * update adjust_saturation
      
      * update docstrings for functional transformations
      
      * parametrize channels
      
      * update docstring of ColorJitter class
      
      * move channels to class's parameter
      
      * remove testing channels for geometric transforms
      
      * revert redundant changes
      
      * revert redundant changes
      
      * update grayscale test cases for randaugment, autoaugment, trivialaugment
      
      * update docstrings of randaugment, autoaugment, trivialaugment
      
      * update docstring of ColorJitter
      
      * fix adjust_hue's docstring
      
      * change test equal tolerance
      
      * refactor grayscale tests
      
      * make get_grayscale_test_image private
      f483e71b
  18. 24 Sep, 2021 2 commits
  19. 26 Aug, 2021 1 commit
  20. 04 Aug, 2021 1 commit
  21. 28 Jul, 2021 1 commit
  22. 27 Jul, 2021 1 commit
  23. 14 Jul, 2021 1 commit
  24. 07 Jun, 2021 3 commits
  25. 06 Jun, 2021 1 commit
  26. 05 Jun, 2021 1 commit
  27. 02 Jun, 2021 1 commit
  28. 25 May, 2021 1 commit
  29. 24 May, 2021 1 commit
  30. 19 May, 2021 1 commit
  31. 17 May, 2021 1 commit
  32. 13 May, 2021 1 commit
  33. 10 May, 2021 1 commit
    • vfdev's avatar
      Added antialias option to transforms.functional.resize (#3761) · b56f17ae
      vfdev authored
      * WIP Added antialias option to transforms.functional.resize
      
      * Updates according to the review
      
      * Excluded these C++ files for iOS build
      
      * Added support for mixed downsampling/upsampling
      
      * Fixed heap overflow caused by explicit loop unrolling
      
      * Applied PR review suggestions
      - used pytest parametrize instead unittest
      - cast to scalar_t ptr
      - removed interpolate aa files for ios/android keeping original cmake version
      b56f17ae
  34. 28 Apr, 2021 1 commit
    • Nicolas Hug's avatar
      [FBcode->GH] Parametrize test_perspective (#3748) (#3749) · 1b0bd0e3
      Nicolas Hug authored
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/3748
      
      This PR parametrizes the `perspective`-related tests, and avoids having deeply nested for-loops which will help debugging. "What" gets tested is left unchanged.
      
      The newly-introduced `cpu_and_gpu()` generator along with the `dont_collect` mark is a logic that allows to not run CPU tests on GPU machines (and vice versa).
      
      Reviewed By: fmassa
      
      Differential Revision: D27908299
      
      fbshipit-source-id: 24a10a89fe90ae0a9e62de4bc7e768a669ebf212
      1b0bd0e3
  35. 19 Apr, 2021 1 commit