transformers/tests/pipelines
Arthur f143037789
Add automatic-mask-generation pipeline for Segment Anything Model (SAM) (#22840)
* cleanup

* updates

* more refactoring

* make style

* update inits

* support other inputs in base

* update based on review

Co-authored-by: Nicolas Patry <patry.nicolas@gmail.com>

* Update tests/pipelines/test_pipelines_automatic_mask_generation.py

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>

* update

* fixup

* TODO x and y to refactor, _h _w refactored here

* update docstring

* more nits

* style on these

* more doc fix

* rename variables

* update

* updates

* style

* update

* fix `_mask_to_rle_pytorch`

* styling

* fix ask to rle, wrong outputs

* add device arg

* update

* more updates, fix tets

* udpate

* update docstrings

* styling

* fixup

* add notebook on the docs

* update orginal sizes

* fix docstring

* updat condition on point_per-batch

* updates tests

* fix CI  test

* extend is required, append does not work!

* fixup

* fix CI tests

* whit pixels left

* address doc comments

* fix doc

* slow pipeline tests

* update auto init

* add revision

* make fixup

* update p!ipoeline tag when calling tests

* alphabeitcal order in inits

* fix copies

* last style nits

* Apply suggestions from code review

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* reformat docstring

* more reformat

* address most of the comments

* Update src/transformers/pipelines/mask_generation.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* final refactor

* Update src/transformers/models/sam/image_processing_sam.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* fixup and fix slow tests

* revert

---------

Co-authored-by: Nicolas Patry <patry.nicolas@gmail.com>
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
Co-authored-by: younesbelkada <younesbelkada@gmail.com>
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2023-04-20 19:27:24 +02:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_pipelines_audio_classification.py Update AudioClassificationPipelineTests::test_small_model_pt for PT 2.0.0 (#22023) 2023-03-08 13:56:47 +01:00
test_pipelines_automatic_speech_recognition.py Soft error whisper. (#22475) 2023-04-04 16:21:57 +02:00
test_pipelines_common.py Regression pipeline device (#22190) 2023-03-15 14:13:38 -04:00
test_pipelines_conversational.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_depth_estimation.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_document_question_answering.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_feature_extraction.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_fill_mask.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_image_classification.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_image_segmentation.py Really fix quality due to ruff release 2023-03-22 20:56:22 -04:00
test_pipelines_image_to_text.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_mask_generation.py Add automatic-mask-generation pipeline for Segment Anything Model (SAM) (#22840) 2023-04-20 19:27:24 +02:00
test_pipelines_object_detection.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_question_answering.py Don't use LayoutLMv2 and LayoutLMv3 in some pipeline tests (#22774) 2023-04-17 17:45:20 +02:00
test_pipelines_summarization.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_table_question_answering.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_text_classification.py Don't use LayoutLMv2 and LayoutLMv3 in some pipeline tests (#22774) 2023-04-17 17:45:20 +02:00
test_pipelines_text_generation.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_text2text_generation.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_token_classification.py Don't use LayoutLMv2 and LayoutLMv3 in some pipeline tests (#22774) 2023-04-17 17:45:20 +02:00
test_pipelines_translation.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_video_classification.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_visual_question_answering.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_zero_shot_audio_classification.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_zero_shot_image_classification.py 🔥py38 + torch 2 🔥🔥🔥🚀 (#22204) 2023-03-16 22:59:23 +01:00
test_pipelines_zero_shot_object_detection.py Mark pipeline tests to skip them easily (#21887) 2023-03-02 10:55:36 -05:00
test_pipelines_zero_shot.py Don't use LayoutLMv2 and LayoutLMv3 in some pipeline tests (#22774) 2023-04-17 17:45:20 +02:00