-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Adding SegGPT #27735
Merged
Merged
Adding SegGPT #27735
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
fecf251
First commit
EduardoPach 2fbf69b
Improvements
EduardoPach 155e486
More improvements
EduardoPach 2de229a
Converted original checkpoint to HF checkpoint
EduardoPach b3d5049
Fix style
EduardoPach fe53c92
Fixed forward
EduardoPach 051b6c8
More improvements
EduardoPach 70d0290
More improvements
EduardoPach 951ac86
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 14b70a7
Remove asserts
EduardoPach dce5f4a
Merge branch 'adding-seggpt' of https://github.com/EduardoPach/transf…
EduardoPach 3c8e12a
Remove unnecessary attributes
EduardoPach 449fa80
Changed model name to camel case
EduardoPach 41e409b
Improve forward doc
EduardoPach 3e0a77a
Improve tests
EduardoPach b039594
More improvements
EduardoPach 5c604d4
Fix copies
EduardoPach 00c8bda
Fix doc
EduardoPach dfc48dd
Make SegGptImageProcessor more flexible
EduardoPach 4152a68
Added few-shot test
EduardoPach c04a177
Fix merge
NielsRogge acc58cc
Fix style
NielsRogge 8bb30d5
Update READMEs and docs
NielsRogge 6ec868b
Update READMEs
NielsRogge 88e8144
Make inputs required
NielsRogge 2a066e9
Add SegGptForImageSegmentation
NielsRogge 09187e0
Make tests pass
EduardoPach 5190205
Rename to out_indicies
EduardoPach bf0bab9
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach c38de07
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 52de2a7
Fixed naming convention
EduardoPach bebb958
Copying SegGptMlp from modeling_sam.py
EduardoPach 2c7c311
Some minor improvements
NielsRogge 75b2d90
Remove mlp_ratio
NielsRogge a612330
Fix docstrings
NielsRogge 74383a8
Fixed docstring match
932a01f
Objects defined before use
f54d036
Storing only patch_size and beta for SegGptLoss
b283608
removed _prepare_inputs method
0fcfbcf
Removed modified from headers
64d2a90
Renamed to output_indicies
559c5be
Removed unnecessary einsums
45ce96b
Update tests/models/seggpt/test_modeling_seggpt.py
EduardoPach 6f982aa
Update tests/models/seggpt/test_modeling_seggpt.py
EduardoPach c4d5c00
Update tests/models/seggpt/test_modeling_seggpt.py
EduardoPach 6bc0571
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 33c3f4d
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach a435033
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 798a7d3
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 3b443dc
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach e24c369
Fixing issues
bd0b552
Raise error as soon as possible
cca0937
More fixes
39e2767
3545672
Fix merge
NielsRogge 7228221
Fix merge
NielsRogge 6133e40
Added palette to SegGptImageProcessor
cf93d25
Merge branch 'adding-seggpt' of https://github.com/EduardoPach/transf…
1837324
Fixed typo
dc3cf80
Fixed shape typo
fc2304c
Added permute before doing palette to class mapping
b086384
Fixed style
0c9ad32
Fixed and added tests
beab961
Fixed docstrings
bd35b95
Matching SegFormer API for post_processing_semantic_segmentation
48d7fc3
Merge remote-tracking branch 'upstream/main' into adding-seggpt
3bcdf52
Fixed copies
900fac9
Fixed SegGptImageProcessor to handle both binary and RGB masks
abfc78a
Updated docstrings of SegGptImageProcessor
ba3f9cb
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 09cdd0e
Update docs/source/en/model_doc/seggpt.md
EduardoPach 690de06
Update src/transformers/models/seggpt/configuration_seggpt.py
EduardoPach 37fabe2
Update src/transformers/models/seggpt/convert_seggpt_to_hf.py
EduardoPach a2a45cd
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 59787c2
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach cf3c1da
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 706285f
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 755a7b5
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach c6257f5
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 041c400
Update tests/models/seggpt/test_image_processing_seggpt.py
EduardoPach 3ffecbc
Update tests/models/seggpt/test_modeling_seggpt.py
EduardoPach 2d1d77c
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 6354a60
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach f5e23c2
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach d347473
Object definitions above & fix style
9e35aa6
Renamed output_indices to intermediate_feature_indices
f6f068c
Removed unnecessary check on bool_masked_pos
a0cbe9b
Loss first in the outputs
f1dc953
Added validation for do_normalize
b8b1d5e
Improved SegGptImageProcessor and added new tests
d172ca0
Added comment
88db53f
Added docstrings to SegGptLoss
db06f21
Reimplemented ensemble condition logic in SegGptEncoder
5514650
Merge remote-tracking branch 'upstream/main' into adding-seggpt
7c4805e
Update src/transformers/models/seggpt/__init__.py
EduardoPach 6ad819b
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 9dab61f
Update src/transformers/models/seggpt/convert_seggpt_to_hf.py
EduardoPach 1b87260
Update src/transformers/models/seggpt/configuration_seggpt.py
EduardoPach c74ca80
Updated docstrings to use post_process_semantic_segmentation
e5f2c8c
Merge branch 'adding-seggpt' of https://github.com/EduardoPach/transf…
71dfbf2
Merge remote-tracking branch 'upstream/main' into adding-seggpt
af21937
Fixed typo on docstrings
62a82eb
moved pixel values test to test_image_processing_seggpt
4d425df
Merge remote-tracking branch 'upstream/main' into adding-seggpt
460f3fa
Addressed comments
f62b21e
Update src/transformers/models/seggpt/configuration_seggpt.py
EduardoPach 620381d
Update src/transformers/models/seggpt/image_processing_seggpt.py
EduardoPach 9999d0b
Update src/transformers/models/seggpt/configuration_seggpt.py
EduardoPach b73b21e
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 01c9f7e
Updated docstrings for SegGptLoss
c507557
Merge branch 'adding-seggpt' of https://github.com/EduardoPach/transf…
3373cbb
Address comments
f701039
Added SegGpt example to model docs
0e46681
Update src/transformers/models/seggpt/modeling_seggpt.py
EduardoPach 43f2d34
moved patchify and unpatchify
EduardoPach ebc96f4
Merge remote-tracking branch 'upstream/main' into adding-seggpt
EduardoPach 90f911d
Rename checkpoint
EduardoPach efb85d6
Renamed intermediate_features to intermediate_hidden_states for consi…
EduardoPach afeb9f2
Update src/transformers/models/seggpt/configuration_seggpt.py
EduardoPach 7e22958
Replaced post_process_masks for post_process_semantic_segmentation in…
EduardoPach 32dd142
Merge branch 'adding-seggpt' of https://github.com/EduardoPach/transf…
EduardoPach 05f0a85
Merge remote-tracking branch 'upstream/main' into adding-seggpt
EduardoPach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
More improvements
- Loading branch information
commit 051b6c8353da824c0cfdae7c9934aebd4826de82
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this true for all the checkpoints? Why not just load the original model and check the outputs there?
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.
There's only one model checkpoint I've added the expected results here as a pre-test writing step. Would you like me to remove this checks?