-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Add Universal Segmentation class + mapping #20766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Universal Segmentation class + mapping #20766
Conversation
|
I think the error message is pretty clear on what to do. The model would also need to be added to the doc page of maskformer if we go through with this. I'm not convinced we should however. While adding a new auto-model API could make sense (I'd wait to have more than one model though), renaming the model class a year after the model has been released is not something we should do (the same way we keep |
alaradirik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! Looks good to me but some files still need editing, which cause some tests to fail.
Could you update the references to the deprecated model and output classes in maskformer.mdx, configuration_maskformer.py, image_processing_maskformer.py, test_feature_extraction_maskformer.py, test_modeling_maskformer.py, and update check_repo.py?
|
The documentation is not available anymore as the PR was closed or merged. |
|
I'm unsure why you keep changing more of the |
| ("detr", "DetrForSegmentation"), | ||
| ("maskformer", "MaskFormerForInstanceSegmentation"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally all models in this mapping should be called ForUniversalSegmentation, but we can keep the name if you prefer so
|
@sgugger I'll keep the old names, but add them to the same (new) mapping. |
sgugger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating!
… add_get_encoder_decoder_fsmt * 'main' of ssh://github.com/huggingface/transformers: (1433 commits) Add Universal Segmentation class + mapping (huggingface#20766) Stop calling expand_1d on newer TF versions (huggingface#20786) Fix object detection2 (huggingface#20798) [Pipeline] skip feature extraction test if in `IMAGE_PROCESSOR_MAPPING` (huggingface#20790) Recompile `apex` in `DeepSpeed` CI image (huggingface#20788) Move convert_to_rgb to image_transforms module (huggingface#20784) Generate: use `GenerationConfig` as the basis for `.generate()` parametrization (huggingface#20388) Install video dependency for pipeline CI (huggingface#20777) Fixing object detection with `layoutlm` (huggingface#20776) [Pipeline] fix failing bloom `pipeline` test (huggingface#20778) Patch for FlanT5-XXL 8bit support (huggingface#20760) Install vision for TF pipeline tests (huggingface#20771) Even more validation. (huggingface#20762) Add Swin backbone (huggingface#20769) Install `torch-tensorrt 1.3.0` for DeepSpeed CI (huggingface#20764) Replaces xxx_required with requires_backends (huggingface#20715) [CI-Test] Fixes but also skips the mT5 tests (huggingface#20755) Fix attribute error problem (huggingface#20765) [Tests] Improve test_attention_outputs (huggingface#20701) Fix missing `()` in some usage of `is_flaky` (huggingface#20749) ...
What does this PR do?
This PR adds the
AutoModelForUniversalSegmentationclass and corresponding mapping. Models that can be added to this mapping include DETR, MaskFormer, Mask2Former and OneFormer.To do:
@sgugger for some reason make fixup complains: