1. 27 Nov, 2020 2 commits
  2. 26 Nov, 2020 1 commit
  3. 20 Nov, 2020 2 commits
    • 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
  4. 19 Nov, 2020 3 commits
  5. 18 Nov, 2020 2 commits
    • Vasilis Vryniotis's avatar
      8c281757
    • 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
  6. 16 Nov, 2020 5 commits
  7. 10 Nov, 2020 2 commits
  8. 09 Nov, 2020 5 commits
  9. 06 Nov, 2020 5 commits
  10. 04 Nov, 2020 1 commit
    • peterjc123's avatar
      Make read_file and write_file accept unicode strings on Windows (#2949) · f5c0bfa5
      peterjc123 authored
      * Make read_file accept unicode strings on Windows
      
      * More fixes
      
      * Remove definitions from source files
      
      * Move string definitions to header
      
      * Add checks
      
      * Fix comments
      
      * Update macro
      
      * Fix comments
      
      * Fix lint
      
      * include windows header
      
      * Change func signature in header
      
      * Use from_blob
      
      * Fix fread calls
      
      * Fix clang format
      
      * Fix missing return
      
      * Avoid copy
      f5c0bfa5
  11. 03 Nov, 2020 2 commits
  12. 02 Nov, 2020 1 commit
  13. 30 Oct, 2020 9 commits
    • Bruno Korbar's avatar
      [videoAPI] minor example and documentation changes (#2821) · 36daee3f
      Bruno Korbar authored
      
      
      * Modified the example to conform with the new DICT return.
      
      * adding better stream documentation to examples
      
      * Clearing up some documentation as a result of a feedback
      
      * Formatting mostly
      
      * Addressing Victor's comments.
      
      * addressing fmassas comments
      
      * remove unnecessary tab
      Co-authored-by: default avatarBruno Korbar <korbar@vggdev9.vggdev.cluster>
      Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
      36daee3f
    • Vasilis Vryniotis's avatar
      PSROIPool + Dispatcher + Autocast + Code Cleanup (#2926) · b93d5ee2
      Vasilis Vryniotis authored
      * Fixing types.
      
      * Dispatcher + Autocast.
      
      * + Autograd.
      
      * Formating.
      
      * Clean up and refactor PSROIPool implementation:
      - Remove primitive const declaration from method names.
      - Using references when possible.
      - Fix variable naming.
      
      * Restore include headers.
      
      * New line at end of file.
      
      * Resolving conflict, final cleanup, ordering method consistently across files.
      b93d5ee2
    • Vasilis Vryniotis's avatar
      ROIPool + Dispatcher + Autocast + Code Cleanup (#2922) · 0125a7dc
      Vasilis Vryniotis authored
      * Fixing types.
      
      * Dispatcher + Autocast.
      
      * + Autograd.
      
      * Formating.
      
      * Fixing return casting with autocast.
      
      * Clean up and refactor ROIPool implementation:
      - Remove primitive const declaration from method names.
      - Using references when possible.
      
      * Restore include headers.
      
      * New line at end of file.
      0125a7dc
    • Vasilis Vryniotis's avatar
      ROIAlign code cleanup (#2906) · f0c92d85
      Vasilis Vryniotis authored
      * Clean up and refactor ROIAlign implementation:
      - Remove primitive const declaration from method names.
      - Passing as const ref instead of value where possible.
      - Remove unnecessary headers.
      
      * Adding back include for cpu.
      
      * Restore include headers.
      f0c92d85
    • Vasilis Vryniotis's avatar
      PSROIAlign + Dispatcher + Autocast + Code Cleanup (#2928) · b06e43d6
      Vasilis Vryniotis authored
      * Fixing types.
      
      * Dispatcher + Autocast.
      
      * + Autograd.
      
      * Clean up and refactor PSROIAlign implementation:
      - Remove primitive const declaration from method names.
      - Using references when possible.
      - Sync naming of internal methods with other ops.
      
      * Restoring names of internal methods to avoid conflicts.
      
      * Restore include headers.
      b06e43d6
    • Vasilis Vryniotis's avatar
      DeformConv code cleanup (#2905) · 0e5aee46
      Vasilis Vryniotis authored
      * Clean up and refactor DeformConv implementation:
      - Remove primitive const declaration from method names.
      - Passing as const ref instead of value where possible.
      - Aligning method names between cpu and cuda.
      
      * Adding newline.
      
      * Adding back include for cpu.
      
      * Restoring method names of private methods to avoid conflicts.
      
      * Restore include headers.
      0e5aee46
    • Vasilis Vryniotis's avatar
      [BC-breaking] Change default eps value of FrozenBN (#2933) · 45e027c7
      Vasilis Vryniotis authored
      * Change default eps value of FrozenBN.
      
      * Update the unit-tests.`
      
      * Update the expected values.
      
      * Revert the expected value and use original eps=0 value for flaky tests.
      
      * Post init change of eps.
      
      * Styles.
      45e027c7
    • Vasilis Vryniotis's avatar
      NMS code cleanup (#2907) · 455cd57c
      Vasilis Vryniotis authored
      * Clean up and refactor ROIAlign implementation:
      - Remove primitive const declaration from method names.
      - Remove unnecessary headers.
      - Aligning method names between cpu and cuda.
      
      * Adding back include for cpu.
      
      * Restoring method names of private methods to avoid conflicts.
      
      * Restore include headers.
      455cd57c
    • vfdev's avatar
      Fixes #2932 (#2937) · c9d9e67e
      vfdev authored
      - Replaced tuple creation by one acceptable by majority of compilers
      c9d9e67e