1. 25 Aug, 2023 1 commit
  2. 18 Aug, 2023 2 commits
  3. 02 Aug, 2023 1 commit
  4. 24 May, 2023 2 commits
  5. 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
  6. 18 Feb, 2022 1 commit
    • Vasilis Vryniotis's avatar
      Adding AugMix implementation (#5411) · 48a61df2
      Vasilis Vryniotis authored
      
      
      * Adding basic augmix implementation.
      
      * Finish the implementation.
      
      * Add tests and documentation.
      
      * Fix tests.
      
      * Simplify code.
      
      * Speed optimizations.
      
      * Per image weights instead of per batch.
      
      * Fix tests.
      
      * Update torchvision/transforms/autoaugment.py
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      
      * Changing the default severity value to get by default the same strength as RandAugment.
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      48a61df2
  7. 30 Sep, 2021 1 commit
  8. 06 Sep, 2021 1 commit
  9. 02 Sep, 2021 1 commit
  10. 10 May, 2021 1 commit
  11. 07 May, 2021 1 commit
  12. 28 Apr, 2021 1 commit
  13. 27 Apr, 2021 1 commit
  14. 22 Apr, 2021 1 commit
  15. 21 Apr, 2021 1 commit
  16. 20 Apr, 2021 1 commit
  17. 19 Apr, 2021 1 commit