1. 15 Sep, 2022 1 commit
    • amyeroberts's avatar
      Update image segmentation pipeline test (#18731) · 30a28f52
      amyeroberts authored
      * Updated test values
      
      The image segmentation pipeline tests - tests/pipelines/test_pipelines_image_segmentation.py - were failing after the merging of #1849  (49e44b21). This was due to the difference in rescaling. Previously the images were rescaled by `image = image / 255`. In the new commit, a `rescale` method was added, and images rescaled using `image = image * scale`. This was known to cause small differences in the processed images (see
      [PR comment](https://github.com/huggingface/transformers/pull/18499#discussion_r940347575)).
      
      Testing locally, changing the `rescale` method to divide by a scale factor (255) resulted in the tests passing. It was therefore decided the test values could be updated, as there was no logic difference between the commits.
      
      * Use double quotes, like previous example
      
      * Fix up
      30a28f52
  2. 11 Jul, 2022 2 commits
  3. 29 Jun, 2022 2 commits
  4. 09 Mar, 2022 1 commit
  5. 04 Mar, 2022 1 commit
  6. 03 Mar, 2022 1 commit
  7. 25 Feb, 2022 1 commit
  8. 23 Feb, 2022 2 commits
    • Lysandre Debut's avatar
      [Test refactor 1/5] Per-folder tests reorganization (#15725) · 29c10a41
      Lysandre Debut authored
      
      
      * Per-folder tests reorganization
      Co-authored-by: default avatarsgugger <sylvain.gugger@gmail.com>
      Co-authored-by: default avatarStas Bekman <stas@stason.org>
      29c10a41
    • Nicolas Patry's avatar
      Enable `image-segmentation` on `AutoModelForSemanticSegmentation` (#15647) · 9e71d464
      Nicolas Patry authored
      * Enabling Beit SegFormer to `image-segmentation`.
      
      * Fixing the score.
      
      * Fix import ?
      
      * Missing in type hint.
      
      * Multiple test fixes:
      
      - Add `raw_image` support. It should be the default IMHO since in Python
        world it doesn't make any sense to base64 encode the image (Sorry
        @mishig, didn't catch that in my review). I really think we should
        consider breaking BC here.
      - Add support for Segformer tiny test (needed
        `SegformerModelTester.get_config` to enable TinyConfig
        @NielsRogge)
      - Add the check that `batch_size` works correctly on that pipeline.
        Uncovered that it doesn't for Detr, which IMO is OK since images
        after `feature_extractor` don't have the same size. Comment should
        explain.
      
      * Type hint as a string.
      
      * Make fixup + update black.
      
      * torch+vision protections.
      
      * Don't use torchvision, use F.interpolate instead (no new dep).
      
      * Last fixes for Segformer.
      
      * Update test to reflect new image (which was broken)
      
      * Update tests.
      
      * Major BC modification:
      
      - Removed the string compressed PNG string, that's a job for users
      `transformers` stays in python land.
      - Removed the `score` for semantic segmentation. It has hardly a meaning
        on its own in this context.
      - Don't include the grayscale with logits for now (which could enable
        users to get a sense of confidence). Might be done later.
      - Don't include the surface of the mask (could be used for sorting by
        users, to filter out small masks). It's already calculable, and
        it's easier to add later, than to add now and break later if we need.
      
      * `make fixup`.
      
      * Small changes.
      
      * Rebase + doc fixup.
      9e71d464
  9. 16 Dec, 2021 1 commit
  10. 22 Nov, 2021 1 commit
  11. 01 Nov, 2021 1 commit
  12. 29 Oct, 2021 1 commit
  13. 12 Oct, 2021 1 commit
  14. 08 Oct, 2021 1 commit