1. 01 Dec, 2020 6 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
    • Francisco Massa's avatar
      Enable rtmp timeout in decoder (#3076) · 4eb9f660
      Francisco Massa authored
      
      
      Summary:
      * Link libav change into fbcode
      * Set rw_timeout value
      
      Differential Revision: D23412524
      
      fbshipit-source-id: 5755950be1b1b4c37cb0c3a69a8c875f8862a92c
      Co-authored-by: default avatarKeyun Tong <ktong@fb.com>
      4eb9f660
    • ProGamerGov's avatar
      Fix spelling mistake: orignal -> original (#3062) · 1b83f46c
      ProGamerGov authored
      
      
      * Fix spelling mistake: orignal -> original
      
      * Spelling fix: orignal -> original
      Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
      1b83f46c
  2. 30 Nov, 2020 3 commits
  3. 27 Nov, 2020 5 commits
  4. 26 Nov, 2020 2 commits
  5. 20 Nov, 2020 3 commits
    • Vasilis Vryniotis's avatar
      Refactor & enable JIT tests in all models and add warnings if skipped (#3033) · 4521f6d1
      Vasilis Vryniotis authored
      * Enable jit tests in all models and add warning if checkModule() tests are skipped.
      
      * Turning on JIT tests on CI.
      
      * Fixing broken unit-tests.
      
      * Refactoring and cleaning up duplicate code.
      4521f6d1
    • Alexey Demyanchuk's avatar
      Add explicit check for number of channels (#3013) · a51c49e4
      Alexey Demyanchuk authored
      
      
      * Add explicit check for number of channels
      
      Example why you need to check it:
      `M = torch.randint(low=0, high=2, size=(6, 64, 64), dtype = torch.float)`
      When you put this input through to_pil_image without mode argument, it converts to uint8 here:
      ```
      if pic.is_floating_point() and mode != 'F':
                  pic = pic.mul(255).byte()
      ```
      and change the mode to RGB here:
      ```
      if mode is None and npimg.dtype == np.uint8:
                  mode = 'RGB'
      ```
      Image.fromarray doesn't raise if provided with mode RGB and just cut number of channels from what you have to 3
      
      * Check number of channels before processing
      
      * Add test for invalid number of channels
      
      * Add explicit check for number of channels
      
      Example why you need to check it:
      `M = torch.randint(low=0, high=2, size=(6, 64, 64), dtype = torch.float)`
      When you put this input through to_pil_image without mode argument, it converts to uint8 here:
      ```
      if pic.is_floating_point() and mode != 'F':
                  pic = pic.mul(255).byte()
      ```
      and change the mode to RGB here:
      ```
      if mode is None and npimg.dtype == np.uint8:
                  mode = 'RGB'
      ```
      Image.fromarray doesn't raise if provided with mode RGB and just cut number of channels from what you have to 3
      
      * Check number of channels before processing
      
      * Add test for invalid number of channels
      
      * Put check after channel dim unsqueeze
      
      * Add test if error message is matching
      
      * Delete redundant code
      
      * Bug fix in checking for bad types
      Co-authored-by: default avatarDemyanchuk <demyanca@mh-hannover.local>
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      a51c49e4
    • Philip Meier's avatar
  6. 19 Nov, 2020 4 commits
  7. 18 Nov, 2020 4 commits
    • Vasilis Vryniotis's avatar
      8c281757
    • Zhiqiang Wang's avatar
      Adds Anchor tests with ground-truth outputs (#2983) · b18a4757
      Zhiqiang Wang authored
      * Add AnchorGenerator with ground-truth outputs
      
      * Minor fixes
      b18a4757
    • Aditya Oke's avatar
      fixes line count (#3019) · 4c112189
      Aditya Oke authored
      4c112189
    • Vasilis Vryniotis's avatar
      Support specifying output channels in io.image.read_image (#2988) · 4d6ba678
      Vasilis Vryniotis authored
      * Adding output channels implementation for pngs.
      
      * Adding tests for png.
      
      * Adding channels in the API and documentation.
      
      * Fixing formatting.
      
      * Refactoring test_image.py to remove huge grace_hopper_517x606.pth file from assets and reduce duplicate code. Moving jpeg assets used by encode and write unit-tests on their separate folders.
      
      * Adding output channels implementation for jpegs. Fix asset locations.
      
      * Add tests for JPEG, adding the channels in the API and documentation and adding checks for inputs.
      
      * Changing folder for unit-test.
      
      * Fixing windows flakiness, removing duplicate test.
      
      * Replacing components to channels.
      
      * Adding reference for supporting CMYK.
      
      * Minor changes: num_components to output_components, adding comments, fixing variable name etc.
      
      * Reverting output_components to num_components.
      
      * Replacing decoding with generic method on tests.
      
      * Palette converted to Gray.
      4d6ba678
  8. 16 Nov, 2020 6 commits
  9. 12 Nov, 2020 2 commits
  10. 10 Nov, 2020 3 commits
  11. 09 Nov, 2020 2 commits