-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Feat] Add DINO on MMDetection 3.x #9149
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
Merged
Merged
Conversation
This file contains hidden or 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 was referenced Oct 27, 2022
Closed
jshilong
reviewed
Oct 31, 2022
jshilong
reviewed
Oct 31, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
jshilong
reviewed
Nov 2, 2022
|
…add-dino-3.x # Conflicts: # mmdet/models/dense_heads/deformable_detr_head.py # mmdet/models/dense_heads/detr_head.py # mmdet/models/detectors/base_detr.py # mmdet/models/detectors/deformable_detr.py # mmdet/models/detectors/detr.py # mmdet/models/layers/transformer/deformable_detr_transformer.py # mmdet/models/layers/transformer/detr_transformer.py
The merge has been finished. The inference mAP of DINO_4s_12e on the new codebase has been aligned. @jshilong |
Li-Qingyun
commented
Dec 12, 2022
jshilong
reviewed
Dec 14, 2022
jshilong
approved these changes
Dec 15, 2022
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.
LGTM
RangiLyu
approved these changes
Dec 19, 2022
jshilong
pushed a commit
that referenced
this pull request
Jan 19, 2023
* feat: add config of DINO_4s_R50_50e * feat: add detector file of DINO * feat: add head file of DINO * fix: align the inference results * fix: align the loss * refactor: move decoder to layers * small modifications to resolve recent conversations * refactor: rewrite device manner and other small modifications * refactor: refactor multiple mode of pre_decoder * doc: complementary the docstring of dino.py * refactor & doc: refactor DINOHead and add some docstring of the dino_head.py * fix & doc: fix bugs and add docs of dino_transformer.py * refactor: rewrite CdnQueryGenerator * refactor: refactor CdnQueryGenerator. * refactor: modify cdn * refactor: rewrite and add docstring to CdnQueryGenerator.generate_dn_bbox_query * doc: fix return format * doc: add docstring of CdnQueryGenerator * feat: add 91-cls configs of detr and deformable detr * refactor: rewrite generate_dn_mask * refactor: rewrite collate_dn_queries * fix & doc: fix bug of get_dn_target and add some docstring * doc: write docstring of DINOHead * feat: add configs of R50-24e and R50-36e * fix: align loss * fix: delete original __call__ of CdnQueryGenerator * fix: add init of query_embedding * fix: fix typo of dino config * fix: move convert_coordinate_to_encoding and modify num_query->num_queries num_key->num_keys * resolve the conversations * delete some TODO * add yapf diasble to layers/__init__.py * fix unit test * commit modification in pr of DINO * fix data format from nbc to bnc in detr and deformable-detr * fix 'gen_encoder_output_proposals' for two-stage deformable-detr * fix 'gen_encoder_output_proposals' for two-stage deformable-detr * set 'batch_first' to True in deformable attention * fix error * fix ut * add assert for batch_first * remove all 91cls-related codes * doc: add loss_by_feat comment * modify pre_decoder of DeformableDETR * delete useless comments * refactor: change to BNC data flow for DINO * ut: add unit test of DINO * add README.md of dino * fix wrong box_noise_scale doc * fix __init__.py of layer Co-authored-by: KeiChiTse <xqz20@mails.tsinghua.edu.cn>
A
|
yumion
pushed a commit
to yumion/mmdetection
that referenced
this pull request
Jan 31, 2024
* feat: add config of DINO_4s_R50_50e * feat: add detector file of DINO * feat: add head file of DINO * fix: align the inference results * fix: align the loss * refactor: move decoder to layers * small modifications to resolve recent conversations * refactor: rewrite device manner and other small modifications * refactor: refactor multiple mode of pre_decoder * doc: complementary the docstring of dino.py * refactor & doc: refactor DINOHead and add some docstring of the dino_head.py * fix & doc: fix bugs and add docs of dino_transformer.py * refactor: rewrite CdnQueryGenerator * refactor: refactor CdnQueryGenerator. * refactor: modify cdn * refactor: rewrite and add docstring to CdnQueryGenerator.generate_dn_bbox_query * doc: fix return format * doc: add docstring of CdnQueryGenerator * feat: add 91-cls configs of detr and deformable detr * refactor: rewrite generate_dn_mask * refactor: rewrite collate_dn_queries * fix & doc: fix bug of get_dn_target and add some docstring * doc: write docstring of DINOHead * feat: add configs of R50-24e and R50-36e * fix: align loss * fix: delete original __call__ of CdnQueryGenerator * fix: add init of query_embedding * fix: fix typo of dino config * fix: move convert_coordinate_to_encoding and modify num_query->num_queries num_key->num_keys * resolve the conversations * delete some TODO * add yapf diasble to layers/__init__.py * fix unit test * commit modification in pr of DINO * fix data format from nbc to bnc in detr and deformable-detr * fix 'gen_encoder_output_proposals' for two-stage deformable-detr * fix 'gen_encoder_output_proposals' for two-stage deformable-detr * set 'batch_first' to True in deformable attention * fix error * fix ut * add assert for batch_first * remove all 91cls-related codes * doc: add loss_by_feat comment * modify pre_decoder of DeformableDETR * delete useless comments * refactor: change to BNC data flow for DINO * ut: add unit test of DINO * add README.md of dino * fix wrong box_noise_scale doc * fix __init__.py of layer Co-authored-by: KeiChiTse <xqz20@mails.tsinghua.edu.cn>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Implement the results in the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection" with mmdetection. The original code has released.
Remark
For DINO implementation, our procedure includes three steps:
Add DINO on mmdetection 2.x [W 8000 IP]: Add DINO on MMDetection 2.x #8362 (Already finished!)
Design refactor scheme, refactor DETR-like models on mmdetection 3.x. [Refactor]: Refactor DETR and Deformable DETR #8763 (Finished and merged!)
Add(refactor) DINO on mmdetection 3.x [Feat] Add DINO on MMDetection 3.x #9149 (Coming soon)
Besides, there are also brother PRs #8544, #9405, #8533, #9252 of two algorithms (Condition DETR and DAB DETR) developed in parallel.
I'm a student contributor in GitLink Code Camp. And this is my first experience of contributing a PR to the open source community. I'm trying hard to make DINO available in mmdetection as soon as possible.
If your project allows to use mmdetection2.x, you can refer to #8362 for the version that has been finished but not merged.