Skip to content
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 ViTDet #25524

Merged
merged 10 commits into from
Aug 29, 2023
Merged

Add ViTDet #25524

merged 10 commits into from
Aug 29, 2023

Conversation

NielsRogge
Copy link
Contributor

@NielsRogge NielsRogge commented Aug 15, 2023

What does this PR do?

This PR adds part 1 of #25051, namely the ViTDet backbone, introduced in Exploring Plain Vision Transformer Backbones for Object Detection.

Note that this PR only adds the backbone, hence there are no compatible checkpoints with the backbone-only. Those can only be added once either VitMatte or Mask R-CNN are added, both of which use VitDet as backbone.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 15, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@amyeroberts amyeroberts left a 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 model!

Very nice and clean PR :) Mostly just nits. The diff on the toctree will need to be resolved before merging.

docs/source/en/_toctree.yml Outdated Show resolved Hide resolved
src/transformers/models/vitdet/modeling_vitdet.py Outdated Show resolved Hide resolved
src/transformers/models/vitdet/modeling_vitdet.py Outdated Show resolved Hide resolved
tests/models/vitdet/test_modeling_vitdet.py Outdated Show resolved Hide resolved
tests/models/vitdet/test_modeling_vitdet.py Outdated Show resolved Hide resolved
tests/models/vitdet/test_modeling_vitdet.py Outdated Show resolved Hide resolved
src/transformers/models/vitdet/modeling_vitdet.py Outdated Show resolved Hide resolved
src/transformers/models/vitdet/modeling_vitdet.py Outdated Show resolved Hide resolved
@NielsRogge
Copy link
Contributor Author

@amyeroberts thanks for your review, I've addressed all the comments

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for adding and iterating!

There's still an issue with the toctree diff which needs to be addressed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to resolve this. Once that's done we can merge in the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ydshieh who knows the fix for this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you discard the change in this file of this PR, rebase on main, adding back ViTDet entry to this file and run the style, it will be fine.

A fix #25661 is merged into main.

@amyeroberts amyeroberts merged commit 4c21da5 into huggingface:main Aug 29, 2023
3 checks passed
@NielsRogge NielsRogge mentioned this pull request Aug 29, 2023
2 tasks
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
* First draft

* Fix READMEs

* Update return_dict

* Add more tests

* Fix docstrings

* Address comments

* Address more comments

* Address more comments

* Address more comments, fix test

* Fix test
blbadger pushed a commit to blbadger/transformers that referenced this pull request Nov 8, 2023
* First draft

* Fix READMEs

* Update return_dict

* Add more tests

* Fix docstrings

* Address comments

* Address more comments

* Address more comments

* Address more comments, fix test

* Fix test
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 18, 2023
* First draft

* Fix READMEs

* Update return_dict

* Add more tests

* Fix docstrings

* Address comments

* Address more comments

* Address more comments

* Address more comments, fix test

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants