1. 28 Sep, 2022 1 commit
    • Nicolas Hug's avatar
      Remove deprecated APIs for 0.14 (#6258) · 7b8a6db7
      Nicolas Hug authored
      
      
      * Remove Kinetics400 class
      
      * Remove '2007-test' in VOC
      
      * Remove some MobileNet layer classes
      
      * Remove torchvision/models/segmentation/segmentation.py
      
      * Remove some MultiScaleRoIAlign methods
      
      * Remove torchvision/transforms/_functional_video.py
      
      * Remove torchvision/transforms/_transforms_video.py
      
      * Remove resample parameter in transforms
      
      * Remove 'range' parameter
      
      * Remove 'fill_value' parameter in transforms
      
      * Revert to original warning for C++ models - looks like we should still keep them around?
      
      * pre-commit
      
      * Fix docs
      
      * Remove test/test_transforms_video.py
      
      * Some fixes
      
      * Remove more tests
      
      * Revert changes to C++ models
      
      * Add back _transforms_video and change warning message
      
      * Change back the warning message, and will change the warning message on separate PR
      Co-authored-by: default avatarYosuaMichael <yosuamichaelm@gmail.com>
      Co-authored-by: default avatarYosua Michael Maranatha <yosuamichael@fb.com>
      7b8a6db7
  2. 01 Aug, 2022 1 commit
    • Vasilis Vryniotis's avatar
      Add registration mechanism for models (#6333) · 0a919dbb
      Vasilis Vryniotis authored
      * Model registration mechanism.
      
      * Add overwrite options to the dataset prototype registration mechanism.
      
      * Adding example models.
      
      * Fix module filtering
      
      * Fix linter
      
      * Fix docs
      
      * Make name optional if same as model builder
      
      * Apply updates from code-review.
      
      * fix minor bug
      
      * Adding getter for model weight enum
      
      * Support both strings and callables on get_model_weight.
      
      * linter fixes
      
      * Fixing mypy.
      
      * Renaming `get_model_weight` to `get_model_weights`
      
      * Registering all classification models.
      
      * Registering all video models.
      
      * Registering all detection models.
      
      * Registering all optical flow models.
      
      * Fixing mypy.
      
      * Registering all segmentation models.
      
      * Registering all quantization models.
      
      * Fixing linter
      
      * Registering all prototype depth perception models.
      
      * Adding tests and updating existing tests.
      
      * Fix linters
      
      * Fix tests.
      
      * Add beta annotation on docs.
      
      * Fix tests.
      
      * Apply changes from code-review.
      
      * Adding documentation.
      
      * Fix docs.
      0a919dbb
  3. 22 Jul, 2022 1 commit
  4. 18 May, 2022 1 commit
    • 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
  5. 17 May, 2022 1 commit
  6. 12 May, 2022 1 commit
    • Vasilis Vryniotis's avatar
      Reinstate and deprecate `model_urls` and `quant_model_urls` (#5992) · e722e9c7
      Vasilis Vryniotis authored
      
      
      * Reinstate and deprecate `model_urls` and `quant_model_urls`
      
      * Apply suggestions from code review
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      
      * Move todo location
      
      * Add alexnet
      
      * Add densenet
      
      * Add efficientnet
      
      * Add googlenet.
      
      * Add inception.
      
      * Add mobilenetv3
      
      * Add regnet
      
      * Add resnet
      
      * Add shufflenetv2
      
      * Fix linter
      
      * Add squeezenet
      
      * Add vgg
      
      * Add vit
      
      * Add quantized googlenet
      
      * Add quantized inceptionv3
      
      * Add quantized mobilenet_v3
      
      * Add quantized resnet
      
      * Add quantized shufflenetv2
      
      * Fix incorrect imports
      
      * Add faster_rcnn
      
      * Add fcos
      
      * Add keypoint rcnn
      
      * Add mask rcnn
      
      * Add retinanet
      
      * Add ssd
      
      * Add ssdlite
      
      * Add deeplabv3
      
      * Add fcn
      
      * Add lraspp.
      
      * Add video resnet
      
      * Removing weights for shufflenetv2_x1.5 and shufflenetv2_x2.0
      
      * Update the comments
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      e722e9c7
  7. 27 Apr, 2022 1 commit
  8. 22 Apr, 2022 1 commit
    • Vasilis Vryniotis's avatar
      Restructuring metrics meta-data (#5859) · 6f016dd9
      Vasilis Vryniotis authored
      * Restructuring metrics meta-data for detection, segmentation and optical flow.
      
      * Renaming acc to pixel_acc for segmentation
      
      * Restructure video meta-data.
      
      * Restructure classification and quantization meta-data.
      
      * Fix tests.
      
      * Fix documentation
      6f016dd9
  9. 21 Apr, 2022 2 commits
  10. 22 Mar, 2022 1 commit
    • Vasilis Vryniotis's avatar
      Port Multi-weight support from prototype to main (#5618) · 11bd2eaa
      Vasilis Vryniotis authored
      
      
      * Moving basefiles outside of prototype and porting Alexnet, ConvNext, Densenet and EfficientNet.
      
      * Porting googlenet
      
      * Porting inception
      
      * Porting mnasnet
      
      * Porting mobilenetv2
      
      * Porting mobilenetv3
      
      * Porting regnet
      
      * Porting resnet
      
      * Porting shufflenetv2
      
      * Porting squeezenet
      
      * Porting vgg
      
      * Porting vit
      
      * Fix docstrings
      
      * Fixing imports
      
      * Adding missing import
      
      * Fix mobilenet imports
      
      * Fix tests
      
      * Fix prototype tests
      
      * Exclude get_weight from models on test
      
      * Fix init files
      
      * Porting googlenet
      
      * Porting inception
      
      * porting mobilenetv2
      
      * porting mobilenetv3
      
      * porting resnet
      
      * porting shufflenetv2
      
      * Fix test and linter
      
      * Fixing docs.
      
      * Porting Detection models (#5617)
      
      * fix inits
      
      * fix docs
      
      * Port faster_rcnn
      
      * Port fcos
      
      * Port keypoint_rcnn
      
      * Port mask_rcnn
      
      * Port retinanet
      
      * Port ssd
      
      * Port ssdlite
      
      * Fix linter
      
      * Fixing tests
      
      * Fixing tests
      
      * Fixing vgg test
      
      * Porting Optical Flow, Segmentation, Video models (#5619)
      
      * Porting raft
      
      * Porting video resnet
      
      * Porting deeplabv3
      
      * Porting fcn and lraspp
      
      * Fixing the tests and linter
      
      * Porting docs, examples, tutorials and galleries (#5620)
      
      * Fix examples, tutorials and gallery
      
      * Update gallery/plot_optical_flow.py
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      
      * Fix import
      
      * Revert hardcoded normalization
      
      * fix uncommitted changes
      
      * Fix bug
      
      * Fix more bugs
      
      * Making resize optional for segmentation
      
      * Fixing preset
      
      * Fix mypy
      
      * Fixing documentation strings
      
      * Fix flake8
      
      * minor refactoring
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      
      * Resolve conflict
      
      * Porting model tests (#5622)
      
      * Porting tests
      
      * Remove unnecessary variable
      
      * Fix linter
      
      * Move prototype to extended tests
      
      * Fix download models job
      
      * Update CI on Multiweight branch to use the new weight download approach (#5628)
      
      * port Pad to prototype transforms (#5621)
      
      * port Pad to prototype transforms
      
      * use literal
      
      * Bump up LibTorchvision version number for Podspec to release Cocoapods (#5624)
      Co-authored-by: default avatarAnton Thomma <anton@pri.co.nz>
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      
      * pre-download model weights in CI docs build (#5625)
      
      * pre-download model weights in CI docs build
      
      * move changes into template
      
      * change docs image
      
      * Regenerated config.yml
      Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
      Co-authored-by: default avatarAnton Thomma <11010310+thommaa@users.noreply.github.com>
      Co-authored-by: default avatarAnton Thomma <anton@pri.co.nz>
      
      * Porting reference scripts and updating presets (#5629)
      
      * Making _preset.py classes
      
      * Remove support of targets on presets.
      
      * Rewriting the video preset
      
      * Adding tests to check that the bundled transforms are JIT scriptable
      
      * Rename all presets from *Eval to *Inference
      
      * Minor refactoring
      
      * Remove --prototype and --pretrained from reference scripts
      
      * remove  pretained_backbone refs
      
      * Corrections and simplifications
      
      * Fixing bug
      
      * Fixing linter
      
      * Fix flake8
      
      * restore documentation example
      
      * minor fixes
      
      * fix optical flow missing param
      
      * Fixing commands
      
      * Adding weights_backbone support in detection and segmentation
      
      * Updating the commands for InceptionV3
      
      * Setting `weights_backbone` to its fully BC value (#5653)
      
      * Replace default `weights_backbone=None` with its BC values.
      
      * Fixing tests
      
      * Fix linter
      
      * Update docs.
      
      * Update preprocessing on reference scripts.
      
      * Change qat/ptq to their full values.
      
      * Refactoring preprocessing
      
      * Fix video preset
      
      * No initialization on VGG if pretrained
      
      * Fix warning messages for backbone utils.
      
      * Adding star to all preset constructors.
      
      * Fix mypy.
      Co-authored-by: default avatarNicolas Hug <contact@nicolas-hug.com>
      Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
      Co-authored-by: default avatarAnton Thomma <11010310+thommaa@users.noreply.github.com>
      Co-authored-by: default avatarAnton Thomma <anton@pri.co.nz>
      11bd2eaa
  11. 15 Mar, 2022 1 commit
  12. 25 Feb, 2022 1 commit
  13. 08 Feb, 2022 1 commit
  14. 16 Dec, 2021 1 commit
  15. 09 Dec, 2021 1 commit
  16. 28 Oct, 2021 1 commit
  17. 25 Oct, 2021 1 commit
  18. 13 Oct, 2021 1 commit
  19. 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
  20. 30 Sep, 2021 1 commit
    • Vasilis Vryniotis's avatar
      Moving common layers to ops (#4504) · f7498350
      Vasilis Vryniotis authored
      * Moving _make_divisible to utils.
      
      * Replace the old ConvBNReLU and ConvBNActivation layers
      
      * Fix minor bug.
      
      * Moving SE layer to ops.
      
      * Adding deprecation warnings on old layers.
      
      * Apply changes to regnets.
      f7498350
  21. 22 Jun, 2021 1 commit
  22. 28 Apr, 2021 1 commit
  23. 26 Feb, 2021 1 commit
  24. 27 Jan, 2021 1 commit
    • Vasilis Vryniotis's avatar
      Add MobileNetV3 architecture for Segmentation (#3276) · e2db2edd
      Vasilis Vryniotis authored
      * Making _segm_resnet() generic and reusable.
      
      * Adding fcn and deeplabv3 directly on mobilenetv3 backbone.
      
      * Adding tests for segmentation models.
      
      * Rename is_strided with _is_cn.
      
      * Add dilation support on MobileNetV3 for Segmentation.
      
      * Add Lite R-ASPP with MobileNetV3 backbone.
      
      * Add pretrained model weights.
      
      * Removing model fcn_mobilenet_v3_large.
      
      * Adding docs and imports.
      
      * Fixing typo and readme.
      e2db2edd
  25. 22 Jan, 2021 1 commit
  26. 14 Jan, 2021 1 commit
    • Vasilis Vryniotis's avatar
      Add MobileNetV3 architecture for Classification (#3252) · 7bf6e7b1
      Vasilis Vryniotis authored
      * Add MobileNetV3 Architecture in TorchVision (#3182)
      
      * Adding implementation of network architecture
      
      * Adding rmsprop support on the train.py
      
      * Adding auto-augment and random-erase in the training scripts.
      
      * Adding support for reduced tail on MobileNetV3.
      
      * Tagging blocks with comments.
      
      * Adding documentation, pre-trained model URL and a minor refactoring.
      
      * Handling better untrained supported models.
      7bf6e7b1
  27. 17 Dec, 2020 1 commit
  28. 23 Oct, 2020 1 commit
    • F-G Fernandez's avatar
      Added annotation typing to mobilenet (#2862) · d4cd0bed
      F-G Fernandez authored
      * style: Added annotation typing for mmobilenet
      
      * fix: Fixed type hinting of adaptive pooling
      
      * refactor: Removed un-necessary import
      
      * fix: Fixed constructor typing
      
      * fix: Fixed list typing
      d4cd0bed
  29. 29 May, 2020 1 commit
  30. 13 Feb, 2020 1 commit
    • talcs's avatar
      replaced mean on dimensions 2,3 by adaptive_avg_pooling2d (#1838) · 1e27b533
      talcs authored
      * replaced mean on dimensions 2,3 by adaptive_avg_pooling2d with destination of 1, to remove hardcoded dimension ordering
      
      * replaced reshape command by torch.squeeze after global_avg_pool2d, which is cleaner
      
      * reshape rather than squeeze for BS=1
      
      * remove import torch
      1e27b533
  31. 30 Nov, 2019 1 commit
    • driazati's avatar
      Add tests for results in script vs eager mode (#1430) · 227027d5
      driazati authored
      * Add tests for results in script vs eager mode
      
      This copies some logic from `test_jit.py` to check that a TorchScript'ed
      model's outputs are the same as outputs from the model in eager mode.
      
      To support differences in TorchScript / eager mode outputs, an
      `unwrapper` function can be provided per-model.
      
      * Fix inception, use PYTORCH_TEST_WITH_SLOW
      
      * Update
      
      * Remove assertNestedTensorObjectsEqual
      
      * Add PYTORCH_TEST_WITH_SLOW to CircleCI config
      
      * Add MaskRCNN unwrapper
      
      * fix prec args
      
      * Remove CI changes
      
      * update
      
      * Update
      
      * remove expect changes
      
      * Fix tolerance bug
      
      * Fix breakages
      
      * Fix quantized resnet
      
      * Fix merge errors and simplify code
      
      * DeepLabV3 has been fixed
      
      * Temporarily disable jit compilation
      227027d5
  32. 26 Oct, 2019 1 commit
    • raghuramank100's avatar
      Quantizable resnet and mobilenet models (#1471) · b4cb5765
      raghuramank100 authored
      * add quantized models
      
      * Modify mobilenet.py documentation and clean up comments
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Move fuse_model method to QuantizableInvertedResidual and clean up args documentation
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Restore relu settings to default in resnet.py
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix missing return in forward
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix missing return in forwards
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Change pretrained -> pretrained_float_models
      Replace InvertedResidual with block
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Update tests to follow similar structure to test_models.py, allowing for modular testing
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Replace forward method with simple function assignment
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix error in arguments for resnet18
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * pretrained_float_model argument missing for mobilenet
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * reference script for quantization aware training and post training quantization
      
      * reference script for quantization aware training and post training quantization
      
      * set pretrained_float_model as False and explicitly provide float model
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Address review comments:
      1. Replace forward with _forward
      2. Use pretrained models in reference train/eval script
      3. Modify test to skip if fbgemm is not supported
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix lint errors.
      Use _forward for common code between float and quantized models
      Clean up linting for reference train scripts
      Test over all quantizable models
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Update default values for args in quantization/train.py
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Update models to conform to new API with quantize argument
      Remove apex in training script, add post training quant as an option
      Add support for separate calibration data set.
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix minor errors in train_quantization.py
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Remove duplicate file
      
      * Bugfix
      
      * Minor improvements on the models
      
      * Expose print_freq to evaluate
      
      * Minor improvements on train_quantization.py
      
      * Ensure that quantized models are created and run on the specified backends
      Fix errors in test only mode
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Add model urls
      
      * Fix errors in quantized model tests.
      Speedup creation of random quantized model by removing histogram observers
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Move setting qengine prior to convert.
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix lint error
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Add readme.md
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Readme.md
      
      Summary:
      
      Test Plan:
      
      Reviewers:
      
      Subscribers:
      
      Tasks:
      
      Tags:
      
      * Fix lint
      b4cb5765
  33. 02 Jul, 2019 1 commit
    • yaysummeriscoming's avatar
      Fixed width multiplier (#1005) · 8350645b
      yaysummeriscoming authored
      * Fixed width multiplier
      
      Layer channels are now rounded to a multiple of 8, as per the official tensorflow implementation.  I found this fix when looking through: https://github.com/d-li14/mobilenetv2.pytorch
      
      * Channel multiple now a user configurable option
      
      The official tensorflow slim mobilenet v2 implementation rounds the number of channels in each layer to a multiple of 8.  This is now user configurable - 1 turns off rounding
      
      * Fixed whitespace error
      
      Fixed error: ./torchvision/models/mobilenet.py:152:1: W293 blank line contains whitespace
      8350645b
  34. 07 Jun, 2019 1 commit
  35. 19 May, 2019 1 commit
  36. 02 Apr, 2019 1 commit
  37. 28 Mar, 2019 1 commit
    • Francisco Massa's avatar
      Add MobileNet V2 (#818) · a61803f0
      Francisco Massa authored
      * Add MobileNet V2
      
      * Remove redundant functions and make tests pass
      
      * Simplify a bit the implementation
      
      * Reuse ConvBNReLU more often
      
      * Remove input_size and minor changes
      
      * Py2 fix
      a61803f0