1. 23 Jun, 2022 5 commits
    • YosuaMichael's avatar
      32e63417
    • vfdev's avatar
      [proto] Improvements for functional API and tests (#6187) · 6155808f
      vfdev authored
      * Added base tests for rotate_image_tensor
      
      * Updated resize_image_tensor API and tests and fixed a bug with max_size
      
      * Refactored and modified private api for resize functional op
      
      * Fixed failures
      
      * More updates
      
      * Updated proto functional op: resize_image_*
      
      * Added max_size arg to resize_bounding_box and updated basic tests
      
      * Update functional.py
      
      * Reverted fill/center order for rotate
      Other nits
      6155808f
    • vfdev's avatar
      Refactored and modified private api for resize functional op (#6191) · aeafa912
      vfdev authored
      * Refactored and modified private api for resize functional op
      
      * Fixed failures
      
      * More updates
      
      * Fixed flake8
      aeafa912
    • vfdev's avatar
      a5536de9
    • YosuaMichael's avatar
      Add raft-stereo model to prototype/models (#6107) · 11caf37a
      YosuaMichael authored
      * Add rough raft-stereo implementation on prototype/models
      
      * Add standard raft_stereo builder, and modify context_encoder to be more similar with original implementation
      
      * Follow original implementation on pre-convolve context
      
      * Fix to make sure we can load original implementation weight and got same output
      
      * reusing component from raft
      
      * Make the raft_stereo_fast able to load original weight implementation
      
      * Format with ufmt and update some comment
      
      * Use raft FlowHead
      
      * clean up comments
      
      * Remove unnecessary import and use ufmt format
      
      * Add __all__ and more docs for RaftStereo class
      
      * Only accept param and not module for raft stereo builder
      
      * Cleanup comment
      
      * Adding typing to raft_stereo
      
      * Update some of raft code and reuse on raft stereo
      
      * Use bool instead of int
      
      * Make standard raft_stereo model jit scriptable
      
      * Make the function _make_out_layer using boolean with_block and init the block_layer with identity
      
      * Separate corr_block into two modules for pyramid and building corr features
      
      * Use tuple if input is not variable size, also remove default value if using List
      
      * Format using ufmt and update ConvGRU to not inherit from raft in order to satisfy both jit script and mypy
      
      * Change RaftStereo docs input type
      
      * Ufmt format raft
      
      * revert back convgru to see mypy errors, add test for jit and fx, make the model fx compatible
      
      * ufmt format
      
      * Specify device for new tensor, dont init module then overwrite and put if-else instead
      
      * Ignore mypy problem on override, put back num_iters on forward
      
      * Revert some effort to make it fx compatible but unnecessary now
      
      * refactor code and remove num_iters from RaftStereo constructor
      
      * Change to raft_stereo_realtime, and specify device directly for tensor creation
      
      * Add description for raft_stereo_realtime
      
      * Update the test for raft_stereo
      
      * Fix raft stereo prototype test to properly test jit script
      
      * Ufmt format
      
      * Test against expected file, change name from raft_stereo to raft_stereo_builder to prevent import error
      
      * Revert __init__.py changes
      
      * Add default value for non-list param on model builder
      
      * Add checking on out_with_block length, add more docs on the encoder
      
      * Use base instead of basic since it is more commonly used
      
      * rename expect file to base as well
      
      * rename on test
      
      * Revert the revert of __init__.py, also revert the adding default value to _raft_stereo to follow the standard pattern
      
      * ufmt format __init__.py
      11caf37a
  2. 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
  3. 11 Jun, 2022 1 commit
  4. 06 Jun, 2022 1 commit
  5. 30 May, 2022 1 commit
  6. 26 May, 2022 1 commit
  7. 25 May, 2022 1 commit
  8. 24 May, 2022 1 commit
  9. 23 May, 2022 3 commits
  10. 19 May, 2022 2 commits
  11. 18 May, 2022 2 commits
    • Nicolas Hug's avatar
      New schema for metrics in weights meta-data (#6047) · 2ec0e847
      Nicolas Hug authored
      * Classif models
      
      * Detection
      
      * Segmentation
      
      * quantization
      
      * Video
      
      * optical flow
      
      * tests
      
      * Fix docs
      
      * Fix Video dataset
      
      * Consistency for RAFT dataset names
      
      * use ImageNet-1K
      
      * Use COCO-val2017-VOC-labels for segmentation
      
      * formatting
      2ec0e847
    • Vasilis Vryniotis's avatar
      Document all remaining pre-trained weights (#6039) · b52f2331
      Vasilis Vryniotis authored
      * Adding docs for quantized models.
      
      * Adding docs for video models.
      
      * Adding docs for segmentation models.
      
      * Adding docs for optical flow models.
      
      * Adding docs for detection models.
      
      * Fix typo.
      
      * Make changes from code-review.
      b52f2331
  12. 17 May, 2022 3 commits
    • Vasilis Vryniotis's avatar
      Document all pre-trained Classification weights (#6036) · edb7bbbd
      Vasilis Vryniotis authored
      * Improving the auto-gen doc.
      
      * Adding details for AlexNet, ConvNext, DenseNet, EfficientNets, GoogLeNet and InceptionV3.
      
      * Fixing location of `_docs`
      
      * Adding docs in the remaining classification models.
      
      * Fix linter
      edb7bbbd
    • Philip Meier's avatar
      simplify OnlineResource.load (#5990) · b430ba68
      Philip Meier authored
      * simplify OnlineResource.load
      
      * [PoC] merge mock data preparation and loading
      
      * Revert "cache mock data based on config"
      
      This reverts commit 5ed6eedef74865e0baa746a375d5ec1f0ab1bde7.
      
      * Revert "[PoC] merge mock data preparation and loading"
      
      This reverts commit d62747962f9ed6a7b0b80849e7c971efabb5d3da.
      
      * remove preprocess returning a new path in favor of querying twice
      
      * address test comments
      
      * clarify comment
      
      * mypy
      
      * use builtin decompress utility
      b430ba68
    • Philip Meier's avatar
      Merge mock data preparation and dataset logic in prototype tests (#6010) · 08c8f0e0
      Philip Meier authored
      * merge mock data preparation and loading
      
      * address comments
      
      * fix extra file creation
      
      * remove tmp folder
      
      * inline images meta creation in coco mock data
      08c8f0e0
  13. 16 May, 2022 1 commit
  14. 12 May, 2022 1 commit
  15. 11 May, 2022 1 commit
  16. 09 May, 2022 5 commits
    • Yassine Alouini's avatar
      Distance IoU (#5786) · 1ae38297
      Yassine Alouini authored
      
      
      * [FEAT] Add distance IoU and distance IoU loss + some tests (WIP for tests).
      
      * [FIX] Remove URL from docstring + remove assert since it causes a big performance drop.
      
      * [FIX] eps isn't None.
      
      * [TEST] Update existing box dIoU test + add dIoU loss tests (inspired from cIoU ones).
      
      * [ENH] Some pre-commit fixes + remove print + mypy.
      
      * [ENH] Pass the device in the assertion for the dIoU loss test.
      
      * [FIX] Remove type hints from the dIoU box test.
      
      * [ENH] Refactor box and loss for dIoU functions + fix half tests.
      
      * [FIX] Precommits fix.
      
      * [ENH] Some improvement for the distance IoU tests thanks to code review.
      
      * [ENH] Upcast in distance boxes computation to avoid overflow.
      
      * [ENH] Revert the refactor of distance IoU loss back since it introduced a bug and can be slow.
      
      * Precommit fix.
      
      * [FIX] Few changes introduced by merge conflict.
      
      * Add code reference
      
      * Fix test
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      1ae38297
    • vfdev's avatar
      [proto] Added `center_crop_bounding_box` functional op (#5972) · 7d0d7fd7
      vfdev authored
      * [proto] Added `center_crop_bounding_box` functional op
      
      * Fixed mypy issue
      
      * Added one more test case
      
      * More test cases
      7d0d7fd7
    • vfdev's avatar
      [proto] Added functional `perspective_bounding_box/segmentation_mask` ops (#5888) · f079f5a5
      vfdev authored
      * Added functional `perspective_bounding_box`/`perspective_segmentation_mask` ops
      
      * Added more comments and added a code to assert denom != 0
      
      * Put larger r/a tolerence when matching bboxes
      f079f5a5
    • kylematoba's avatar
      Update transforms for PIL deprecation (#5898) · 423ddcd0
      kylematoba authored
      
      
      * Update transforms for PIL deprecation
      
      * Changes agreed at pytorch/vision#5898
      
      * black, sort constants, version check
      
      * Format tests
      
      * Square brackets
      
      * Update torchvision/transforms/_pil_constants.py
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      423ddcd0
    • YosuaMichael's avatar
      Adding resnext101 64x4d model (#5935) · 4c02f103
      YosuaMichael authored
      * Add resnext101_64x4d model definition
      
      * Add test for resnext101_64x4d
      
      * Add resnext101_64x4d weight
      
      * Update checkpoint to use EMA weigth
      
      * Add quantization model signature for resnext101_64x4d
      
      * Fix class name and update accuracy using 1 gpu and batch_size=1
      
      * Apply ufmt
      
      * Update the quantized weight and accuracy that we still keep the training log
      
      * Add quantized expect file
      
      * Update docs and fix acc1
      
      * Add recipe for quantized to PR
      
      * Update models.rst
      4c02f103
  17. 02 May, 2022 1 commit
  18. 28 Apr, 2022 4 commits
  19. 27 Apr, 2022 3 commits
    • Vasilis Vryniotis's avatar
    • Joao Gomes's avatar
      Add swin_t to slow list (#5902) · b53c91d0
      Joao Gomes authored
      
      
      * Add swin_t to slow list
      
      * apply ufmt
      
      * update expect for swin_t
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      b53c91d0
    • Hu Ye's avatar
      Adding Swin Transformer architecture (#5491) · e288f6ca
      Hu Ye authored
      
      
      * add swin transformer
      
      * Update swin_transformer.py
      
      * Update swin_transformer.py
      
      * fix lint
      
      * fix lint
      
      * refactor code
      
      * add swin_transformer
      
      * Update swin_transformer.py
      
      * fix bug
      
      * refactor code
      
      * fix lint
      
      * update init_weights
      
      * move shift_window into attention
      
      * refactor code
      
      * fix bug
      
      * Update swin_transformer.py
      
      * Update swin_transformer.py
      
      * fix lint
      
      * add patch_merge
      
      * fix bug
      
      * Update swin_transformer.py
      
      * Update swin_transformer.py
      
      * Update swin_transformer.py
      
      * refactor code
      
      * Update swin_transformer.py
      
      * refactor code
      
      * fix lint
      
      * refactor code
      
      * add swin_tiny
      
      * add swin_tiny.pkl
      
      * fix lint
      
      * Delete ModelTester.test_swin_tiny_expect.pkl
      
      * add swin_tiny
      
      * add
      
      * add Optional to bias
      
      * update init weights
      
      * update init_weights and add no weight decay
      
      * add no weight decay
      
      * add set_weight_decay
      
      * add set_weight_decay
      
      * fix lint
      
      * fix lint
      
      * add lr_cos_min
      
      * add other swin models
      
      * Update torchvision/models/swin_transformer.py
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      
      * refactor doc
      
      * Update utils.py
      
      * Update train.py
      
      * Update train.py
      
      * Update swin_transformer.py
      
      * update model builder
      
      * fix lint
      
      * add
      
      * Update torchvision/models/swin_transformer.py
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      
      * Update torchvision/models/swin_transformer.py
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      
      * update other model
      
      * simplify the model name just like ViT
      
      * add lr_cos_min
      
      * fix lint
      
      * fix lint
      
      * Update swin_transformer.py
      
      * Update swin_transformer.py
      
      * Update swin_transformer.py
      
      * Delete ModelTester.test_swin_tiny_expect.pkl
      
      * add swin_t
      
      * refactor code
      
      * Update train.py
      
      * add swin_s
      
      * ignore a error of mypy
      
      * Update swin_transformer.py
      
      * fix lint
      
      * add swin_b
      
      * add swin_l
      
      * refactor code
      
      * Update train.py
      
      * move relative_position_bias to __init__
      
      * fix formatting
      
      * Revert "fix formatting"
      
      This reverts commit 41faba232668f7ac4273a0cf632c0d0130c7ce9c.
      
      * Revert "move relative_position_bias to __init__"
      
      This reverts commit f0615440bf18617dc0e5dc4839bd5ed27e5ed010.
      
      * refactor code
      
      * Remove deprecated meta-data from `_COMMON_META`
      
      * fix linter
      
      * add pretrained weights for swin_t
      
      * fix format
      
      * apply ufmt
      
      * add documentation
      
      * update references README
      
      * adding new style docs
      
      * update pre-trained weights values
      
      * remove other variants
      
      * fix typo
      
      * Remove expect for the variants not yet supported
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      Co-authored-by: default avatarJoao Gomes <jdsgomes@fb.com>
      e288f6ca
  20. 26 Apr, 2022 2 commits