Files
HuggingFace_transformer/tests
Nicolas Patry 9e71d46455 Enable image-segmentation on AutoModelForSemanticSegmentation (#15647)
* 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.
2022-02-23 17:20:26 +01:00
..
2022-01-24 15:25:10 -05:00
2022-02-22 18:21:16 +01:00
2022-02-22 18:21:16 +01:00
2021-12-27 15:49:48 -08:00
2021-05-12 13:48:15 +05:30
2022-02-09 12:06:59 -05:00
2022-01-18 17:52:35 -05:00
2021-01-27 21:25:11 +03:00
2020-12-07 18:36:34 -05:00
2022-02-17 19:44:55 +01:00
2022-02-17 19:44:55 +01:00
2021-09-25 21:20:21 +02:00
2021-12-01 10:57:39 +05:30
2021-09-20 13:24:30 +02:00
2021-12-07 00:25:28 -05:00
2020-12-07 18:36:34 -05:00
2022-02-18 14:17:09 +01:00
2022-02-17 19:44:55 +01:00
2022-02-18 08:50:23 -05:00
2021-01-27 21:25:11 +03:00
2021-11-30 11:07:55 +01:00
2022-02-17 19:44:55 +01:00
2022-01-28 18:55:23 +01:00
2020-12-07 18:36:34 -05:00
2022-01-26 19:18:29 +01:00
2021-05-12 13:48:15 +05:30
2021-10-14 10:54:20 +02:00
2020-12-07 18:36:34 -05:00
2021-04-26 13:50:34 +02:00
2022-02-09 12:27:59 -05:00