1. 17 Dec, 2020 1 commit
  2. 16 Dec, 2020 1 commit
  3. 15 Dec, 2020 2 commits
  4. 14 Dec, 2020 2 commits
    • Vasilis Vryniotis's avatar
      Implement all AutoAugment transforms + Policies (#3123) · 83171d6a
      Vasilis Vryniotis authored
      
      
      * Invert Transform (#3104)
      
      * Adding invert operator.
      
      * Make use of the _assert_channels().
      
      * Update upper bound value.
      
      * Remove private doc from invert, create or reuse generic testing methods to avoid duplication of code in the tests. (#3106)
      
      * Create posterize transformation and refactor common methods to assist reuse. (#3108)
      
      * Implement the solarize transform. (#3112)
      
      * Implement the adjust_sharpness transform (#3114)
      
      * Adding functional operator for sharpness.
      
      * Adding transforms for sharpness.
      
      * Handling tiny images and adding a test.
      
      * Implement the autocontrast transform. (#3117)
      
      * Implement the equalize transform (#3119)
      
      * Implement the equalize transform.
      
      * Turn off deterministic for histogram.
      
      * Fixing test. (#3126)
      
      * Force ratio to be float to avoid numeric overflows on blend. (#3127)
      
      * Separate the tests of Adjust Sharpness from ColorJitter. (#3128)
      
      * Add AutoAugment Policies and main Transform (#3142)
      
      * Separate the tests of Adjust Sharpness from ColorJitter.
      
      * Initial implementation, not-jitable.
      
      * AutoAugment passing JIT.
      
      * Adding tests/docs, changing formatting.
      
      * Update test.
      
      * Fix formats
      
      * Fix documentation and imports.
      
      * Apply changes from code review:
      - Move the transformations outside of AutoAugment on a separate method.
      - Renamed degenerate method for sharpness for better clarity.
      
      * Update torchvision/transforms/functional.py
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      
      * Apply more changes from code review:
      - Add InterpolationMode parameter.
      - Move all declarations away from AutoAugment constructor and into the private method.
      
      * Update documentation.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarFrancisco Massa <fvsmassa@gmail.com>
      
      * Apply changes from code review:
      - Refactor code to eliminate as any to() and clamp() as possible.
      - Reuse methods where possible.
      - Apply speed ups.
      
      * Replacing pad.
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      Co-authored-by: default avatarFrancisco Massa <fvsmassa@gmail.com>
      83171d6a
    • Vasilis Vryniotis's avatar
      Removing VISION_API from backward() methods and adding an ops.h (#3163) · 4eab7a67
      Vasilis Vryniotis authored
      * Removing VISION_API from backward() methods and adding a ops.h
      
      * Fixing clang format.
      4eab7a67
  5. 12 Dec, 2020 2 commits
  6. 11 Dec, 2020 2 commits
  7. 10 Dec, 2020 3 commits
  8. 09 Dec, 2020 3 commits
  9. 08 Dec, 2020 3 commits
  10. 07 Dec, 2020 2 commits
  11. 05 Dec, 2020 1 commit
  12. 04 Dec, 2020 4 commits
  13. 03 Dec, 2020 4 commits
  14. 02 Dec, 2020 6 commits
    • Vasilis Vryniotis's avatar
      Check num of channels on adjust_* transformations (#3069) · 7f1a05a3
      Vasilis Vryniotis authored
      * Fixing upperbound value on tests and documentation.
      
      * Limit the number of channels on adjust_* transoforms.
      7f1a05a3
    • Vasilis Vryniotis's avatar
      Encapsulate and Standardise C++ Ops (#3097) · 0ebbb0ab
      Vasilis Vryniotis authored
      * Encapsulate and standardize deform_conv2d (#3074)
      
      * Rename files.
      
      * Standardizing method names.
      
      * Adding anonymous namespaces.
      
      * Applying C++ naming rules and alinging variable names across headers and cpp files.
      
      * Syncing names across implementations.
      
      * Rename deform_conv2d.h to deform_conv2d.cpp
      
      * Use header files:
      - Create header files for kernel implementation and remove definitions from vision_*.h files.
      - Eliminate unnecessary headers and ensure all cpp include their headers.
      
      * Change the naming convention for kernel implementations.
      
      * Remove the _param postfix from the variables and standardizing names.
      
      * Exposing public forward/backward methods to the C++ API and moving methods around to minimize git blame changes.
      
      * Encapsulate and standardize nms (#3081)
      
      * Syncing, where possible, the names of functions across devices.
      
      * Adding all internal functions in anonymous namespaces.
      
      * Renaming C++/CUDA kernel files and moving operator code from header to cpp file.
      
      * Create foreach cpp file a separate header file with "public" functions.
      
      * Removing unnecessary repeated includes.
      
      * Update CMakeLists.txt to include all headers.
      
      * Encapsulate and standardize ps_roi_align (#3082)
      
      * Renaming C++ files & methods according to recommended naming conventions and aligning them with Python's API.
      Syncing, where possible, the names of functions across devices.
      
      * Adding all internal functions in anonymous namespaces.
      
      * Renaming C++/CUDA kernel files and moving operator code from header to cpp file.
      
      * Create foreach cpp file a separate header file with "public" functions.
      
      * Removing unnecessary repeated includes.
      
      * Encapsulate and standardize ps_roi_pool (#3084)
      
      * Renaming C++ files & methods according to recommended naming conventions and aligning them with Python's API.
      
      * Adding all internal functions in anonymous namespaces.
      
      * Renaming C++/CUDA kernel files and moving operator code from header to cpp file.
      
      * Create foreach cpp file a separate header file with "public" functions.
      
      * Removing unnecessary repeated includes.
      
      * Encapsulate and standardize roi_align (#3085)
      
      * Renaming C++ files & methods according to recommended naming conventions and aligning them with Python's API.
      
      * Adding all internal functions in anonymous namespaces.
      
      * Renaming C++/CUDA kernel files and moving operator code from header to cpp file.
      
      * Create foreach cpp file a separate header file with "public" functions.
      
      * Removing unnecessary repeated includes.
      
      * Encapsulate and standardize roi_pool  (#3088)
      
      * Renaming C++ files & methods according to recommended naming conventions and aligning them with Python's API.
      
      * Adding all internal functions in anonymous namespaces.
      
      * Syncing variable names between the cpp files and their header files.
      
      * Renaming C++/CUDA kernel files and moving operator code from header to cpp file.
      
      * Create foreach cpp file a separate header file with "public" functions.
      
      * Removing unnecessary repeated includes.
      
      * Encapsulate and standardize new_empty_tensor_op (#3089)
      
      * Renaming C++ files & methods according to recommended naming conventions and aligning them with Python's API.
      
      * Create foreach cpp file a separate header file with "public" functions.
      
      * Adding all internal functions in anonymous namespaces.
      
      * Convert to const ref all possible parameters.
      
      * Removing unnecessary repeated includes.
      
      * Encapsulate and standardize C++ Ops - Clean up (#3094)
      
      * Removing unnecessary repeated includes.
      
      * Remove unnecessary vision_cpu.h, vision_cuda.h, autocast.h.
      
      * Fixing naming convention and correcting method names on macros.
      
      * Turn on clang formatter for cu files and fixing broken styles.
      
      * Replace "#ifndef ... #define ... #endif" with "#pragma once" on header files.
      
      * Adding operator methods in vision::ops namespace. (#3096)
      
      * Adding operator methods in vision::ops namespace.
      
      * Replace general.h with macros.h
      
      * Adding vision.h to the necessary cpp files.
      0ebbb0ab
    • Francisco Massa's avatar
      Miscellaneous linter fixes (#3095) · 8520f0be
      Francisco Massa authored
      Replace tabs with spaces, add newlines to files and replace whitelist with allowlist
      8520f0be
    • Francisco Massa's avatar
      Remove torchvision.io from test_utils.py (#3092) · a0e5bbea
      Francisco Massa authored
      For now this simplifies a few things for fbcode integration. We can add this back in the future
      a0e5bbea
    • Francisco Massa's avatar
      Remove noexcept from cuda_version (#3091) · ac288eaf
      Francisco Massa authored
      Operator registration of functions with noexcept doesn't work on some compilers, see https://github.com/pytorch/pytorch/issues/48667
      ac288eaf
    • Zhengyang Feng's avatar
      Fill color support for tensor affine transforms (#2904) · 21deb4d0
      Zhengyang Feng authored
      
      
      * Fill color support for tensor affine transforms
      
      * PEP fix
      
      * Docstring changes and float support
      
      * Docstring update for transforms and float type cast
      
      * Cast only for Tensor
      
      * Temporary patch for lack of Union type support, plus an extra unit test
      
      * More plausible bilinear filling for tensors
      
      * Keep things simple & New docstrings
      
      * Fix lint and other issues after merge
      
      * make it in one line
      
      * Docstring and some code modifications
      
      * More tests and corresponding changes for transoforms and docstring changes
      
      * Simplify test configs
      
      * Update test_functional_tensor.py
      
      * Update test_functional_tensor.py
      
      * Move assertions
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      21deb4d0
  15. 01 Dec, 2020 4 commits
    • Francisco Massa's avatar
      add UUID in LOG() in decoder (#3080) · df4003fd
      Francisco Massa authored
      * add UUID in LOG() in decoder
      
      * Fix lint
      
      * More lint
      df4003fd
    • Francisco Massa's avatar
      concatenate small tensors into big ones to reduce the use of shared f… (#1795) · 9fc6522d
      Francisco Massa authored
      * concatenate small tensors into big ones to reduce the use of shared file descriptor (#1694)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1694
      
      
      
      - PT dataloader forks worker process to speed up the fetching of dataset example.  The recommended way of multiprocess context is `forkserver` rather than `fork`.
      
      - Main process and worker processes will share the dataset class instance, which avoid duplicating the dataset and save memory. In this process, `ForkPickler(..).dumps(...)` will be called to serialize the objects, including objects within dataset instance recursively. `VideoClips` instance internally uses O(N) `torch.Tensor` to store per-video information, such as pts, and possible clips, where N is the No. of videos.
      
      - During dumping, each `torch.Tensor` will use one File Descriptor (FD). The OS default max limit of FD is 65K by using `ulimit -n` to query. The number of tensors in `VideoClips` often exceeds the limit.
      
      - To resolve this issue, we use a few big tensors by concatenating small tensors in the `__getstate__()` method, which will be called during pickling. This will only require O(1) tensors.
      
      - When this diff is landed, we can abondon D19173248
      
      In D19173397, in ClassyVision, we change the mp context from `fork` to `forkserver`, and finally can run the PT dataloader without hanging issues.
      
      Reviewed By: fmassa
      
      Differential Revision: D19179991
      
      fbshipit-source-id: c8716775c7c154aa33d93b25d112d2a59ea688a9
      
      * Try to fix Windows
      
      * Try fix Windows v2
      
      * Disable tests on Windows
      
      * Add back necessary part
      
      * Try fix OSX (and maybe Windows)
      
      * Fix
      
      * Try enabling Windows
      Co-authored-by: default avatarZhicheng Yan <zyan3@fb.com>
      9fc6522d
    • AdityaKhursale's avatar
      Fix: Improve the bounding boxes implementation (#3075) · d97825ea
      AdityaKhursale authored
      
      
      * Fix: Improve the bounding boxes implementation
      
      Use write_png instead of PIL in test_draw_boxes()
      Initialize txt_font only once
      
      * Remove channels permutation in test_draw_boxes
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      Co-authored-by: default avatarAditya Khursale <akhursale@nvidia.com>
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      d97825ea
    • Francisco Massa's avatar
      Add option to write audio to video file (#2304) · 1b00af38
      Francisco Massa authored
      
      
      * Add option to write audio to video file
      
      Summary:
      I was trying to use torchvision's `write_video` function and realized there was no option to add in the audio.
      
      Thus, this diff contains the changes necessary such that this is possible. This is my first time trying to contribute to this project, so be as harsh as you need!
      
      Reviewed By: fmassa
      
      Differential Revision: D21480083
      
      fbshipit-source-id: 2e11f2c8728d42f86c94068f75b843793d5a94aa
      
      * Fix typo
      
      * Try fix Windows
      
      * Disable test on Windows
      Co-authored-by: default avatarJoanna Bitton <jbitton@fb.com>
      1b00af38