-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Refactor DAB-DETR in MMDetection 3.x #9252
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
Refactor DAB-DETR in MMDetection 3.x #9252
Conversation
Hi !@KeiChiTse, any plans about Anchor DETR? |
Hi,thank you for your attention,we will fisrt support Condational DETR、DAB DETR and DINO,then Group DETR and deformable dab is at second position. Now we have met some difficulty to align with original repo, we will try our best.As Row-Column Attention is not commonly used,we may not officially support it at very soon. |
Thanks for your reply! |
[Update]Fixed error after refactoring and finished aligning loss and inference results compared to 2.x version! The code is ready for training. |
Guess my partner had done his job haha. Thank you anyway! |
Please merge the refactor-detr first and resolve all conflicts |
b2c5339
to
d11d684
Compare
LGTM |
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
[Update]Ready to be merged... |
* resolve refactor conflict w.o. pre-commit hooks * fixed error and finished alignment * supprot 91 cls and remove batch_first * delete iter_update, keep return intermediate * delete posHW * substitute 'num_query' to 'num_queries' * change 'gen_sineembed_for_position' to 'convert_coordinate_to_encoding' * resolve extra comments * fix error * fix error * fix data path * support 91 cls temporarily * resolve extra comments * fix num_keys, num_feats * delete reg_branches in decoder_inputs_dict * fix docstring * fix docstring * 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 91 cls * modify pre_decoder of DeformableDETR * delete useless comments * bnc data flow w.o. merge detr and def-detr * assert batch first flag in conditional attention, fix error * add unit test for dab-detr * fix doc * disable yapf hook * move conditional attention to trm/layers * fix name and add doc * fix doc * add loss_and_predict for head * fix doc and typehint * fix doc and typehint * modify batch first assert for attention * change Dab to DAB * rename file and function * make dab-detr head inherit conditional detr head * fix doc * fix doc Co-authored-by: QingyunLi <[email protected]>
* resolve refactor conflict w.o. pre-commit hooks * fixed error and finished alignment * supprot 91 cls and remove batch_first * delete iter_update, keep return intermediate * delete posHW * substitute 'num_query' to 'num_queries' * change 'gen_sineembed_for_position' to 'convert_coordinate_to_encoding' * resolve extra comments * fix error * fix error * fix data path * support 91 cls temporarily * resolve extra comments * fix num_keys, num_feats * delete reg_branches in decoder_inputs_dict * fix docstring * fix docstring * 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 91 cls * modify pre_decoder of DeformableDETR * delete useless comments * bnc data flow w.o. merge detr and def-detr * assert batch first flag in conditional attention, fix error * add unit test for dab-detr * fix doc * disable yapf hook * move conditional attention to trm/layers * fix name and add doc * fix doc * add loss_and_predict for head * fix doc and typehint * fix doc and typehint * modify batch first assert for attention * change Dab to DAB * rename file and function * make dab-detr head inherit conditional detr head * fix doc * fix doc Co-authored-by: QingyunLi <[email protected]>
Motivation
This PR resolves several confilcits and rearrange the code structure based on PR #8811. Comparing to PR #8533 for 2.x, this PR aims to refactor DAB-DETR in MMDetection 3.x.
I'm working together with @jshilong, @Li-Qingyun, and @LYMDLUT to refactor the DETR-like algorithms in MMDetection 3.x, using a more lightweight and easy-to-read code style.
Details can be refered to in brother PRs #9149, #8362, #8763, #8544, #9248, feel free to contact me and give your advice!