1. 10 Nov, 2023 1 commit
    • amyeroberts's avatar
      Normalize floating point cast (#27249) · ed115b34
      amyeroberts authored
      * Normalize image - cast input images to float32.
      
      This is done if the input image isn't of floating type. Issues can occur when do_rescale=False is set in an image processor. When this happens, the image passed to the call is of type uint8 becuase of the type casting that happens in resize because of the PIL image library. As the mean and std values are cast to match the image dtype, this can cause NaNs and infs to appear in the normalized image, as the floating values being used to divide the image are now set to 0.
      
      The reason the mean and std values are cast is because previously they were set as float32 by default. However, if the input image was of type float16, the normalization would result in the image being upcast to float32 too.
      
      * Add tests
      
      * Remove float32 cast
      ed115b34
  2. 11 Aug, 2023 1 commit
  3. 31 May, 2023 1 commit
  4. 30 Mar, 2023 1 commit
  5. 14 Mar, 2023 1 commit
  6. 07 Mar, 2023 1 commit
  7. 06 Feb, 2023 1 commit
    • Sylvain Gugger's avatar
      Update quality tooling for formatting (#21480) · 6f79d264
      Sylvain Gugger authored
      * Result of black 23.1
      
      * Update target to Python 3.7
      
      * Switch flake8 to ruff
      
      * Configure isort
      
      * Configure isort
      
      * Apply isort with line limit
      
      * Put the right black version
      
      * adapt black in check copies
      
      * Fix copies
      6f79d264
  8. 15 Dec, 2022 1 commit
  9. 08 Dec, 2022 1 commit
    • amyeroberts's avatar
      Fix donut image processor (#20625) · cf1b8c34
      amyeroberts authored
      * fix donut image processor
      
      * Update test values
      
      * Apply lower bound on resizing size
      
      * Add in missing size param
      
      * Resolve resize channel_dimension bug
      
      * Update src/transformers/image_transforms.py
      cf1b8c34
  10. 23 Nov, 2022 1 commit
  11. 18 Nov, 2022 1 commit
  12. 15 Nov, 2022 1 commit
  13. 19 Oct, 2022 1 commit
  14. 17 Oct, 2022 1 commit
  15. 12 Oct, 2022 1 commit