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

[Feature] Support DDOD: Disentangle Your Dense Object Detector(ACM MM2021 oral) #7279

Merged
merged 49 commits into from
May 24, 2022

Conversation

Irvingao
Copy link
Contributor

@Irvingao Irvingao commented Feb 28, 2022

Disentangle Your Dense Object Detector

Disentangle Your Dense Object Detector

Abstract

Deep learning-based dense object detectors have achieved great success in the past few years and have been applied to numerous multimedia applications such as video understanding. However, the current training pipeline for dense detectors is compromised to lots of conjunctions that may not hold. In this paper, we investigate three such important conjunctions: 1) only samples assigned as positive in classification head are used to train the regression head; 2) classification and regression share the same input feature and computational fields defined by the parallel head architecture; and 3) samples distributed in different feature pyramid layers are treated equally when computing the loss. We first carry out a series of pilot experiments to show disentangling such conjunctions can lead to persistent performance improvement. Then, based on these findings, we propose Disentangled Dense Object Detector(DDOD), in which simple and effective disentanglement mechanisms are designed and integrated into the current state-of-the-art dense object detectors. Extensive experiments on MS COCO benchmark show that our approach can lead to 2.0 mAP, 2.4 mAP and 2.2 mAP absolute improvements on RetinaNet, FCOS, and ATSS baselines with negligible extra overhead. Notably, our best model reaches 55.0 mAP on the COCO test-dev set and 93.5 AP on the hard subset of WIDER FACE, achieving new state-of-the-art performance on these two competitive benchmarks. Code is available at https://github.com/zehuichen123/DDOD.

Results and Models

Model Backbone Style Lr schd Mem (GB) Inf time (fps) box AP Config Download
DDOD-ATSS ResNet50 pytorch 1x #TODO #TODO 41.6 config model | log

Citation

@inproceedings{chen2021disentangle,
title={Disentangle Your Dense Object Detector},
author={Chen, Zehui and Yang, Chenhongyi and Li, Qiaofei and Zhao, Feng and Zha, Zheng-Jun and Wu, Feng},
booktitle={Proceedings of the 29th ACM International Conference on Multimedia},
pages={4939--4948},
year={2021}
}

Checklist

It's the second PR of DDOD from PR#7227 , which changes branch from master to dev. Other changes are as follow:

  1. Rewrite README.md according to https://github.com/open-mmlab/mmdetection/blob/master/configs/retinanet/README.md#results-and-models.
  2. Rename config file as ddod_r50_fp16_1x_coco.py.
  3. Use _base _ to replace repeated code in the config file.
  4. Add diou calculation function to bbox_overlaps.
  5. add @torch.no_grad() to function.
  6. Modify DDODHead docs.

Log

Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.416
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1000 ] = 0.598
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=1000 ] = 0.452
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.240
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.450
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.546
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.596
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=300 ] = 0.596
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=1000 ] = 0.596
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=1000 ] = 0.390
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=1000 ] = 0.636
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=1000 ] = 0.753

2022-02-26 22:24:22,587 - mmdet - INFO - Exp name: ddod_r50_1x_coco_fp16.py
2022-02-26 22:24:22,588 - mmdet - INFO - Epoch(val) [12][625] bbox_mAP: 0.4160, bbox_mAP_50: 0.5980, bbox_mAP_75: 0.4520, bbox_mAP_s: 0.2400, bbox_mAP_m: 0.4500, bbox_mAP_l: 0.5460, bbox_mAP_copypaste: 0.416 0.598 0.452 0.240 0.450 0.546

configs/ddod/README.md Outdated Show resolved Hide resolved
configs/ddod/ddod_r50_1x_coco_fp16.py Outdated Show resolved Hide resolved
configs/ddod/ddod_r50_1x_coco_fp16.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_cost_assigner.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_cost_assigner.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_cost_assigner.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_cost_assigner.py Outdated Show resolved Hide resolved
mmdet/core/bbox/iou_calculators/iou2d_calculator.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
@chhluo chhluo self-requested a review February 28, 2022 13:07
configs/ddod/README.md Outdated Show resolved Hide resolved
@chhluo
Copy link
Collaborator

chhluo commented Feb 28, 2022

Please run pip install pre-commit to fix lint problem first, refer to https://pre-commit.com/. Do we need src/mmtrack ?

@hhaAndroid
Copy link
Collaborator

@Irvingao You can resolve conflicts before proceeding with further development.

@ZwwWayne
Copy link
Collaborator

Kindly ping @Irvingao to resolve the conflict. Furthermore, will there be any progress in the following weeks?

@chhluo
Copy link
Collaborator

chhluo commented May 3, 2022

Please solve the conflicts and rebase on the latest dev branch

.gitignore Outdated Show resolved Hide resolved
configs/_base_/datasets/coco_detection.py Outdated Show resolved Hide resolved
configs/_base_/datasets/coco_detection.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_cost_assigner.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_assigner.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_assigner.py Outdated Show resolved Hide resolved
mmdet/core/bbox/assigners/atss_assigner.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
mmdet/models/dense_heads/ddod_head.py Outdated Show resolved Hide resolved
@ZwwWayne ZwwWayne merged commit 151a803 into open-mmlab:dev May 24, 2022
ZwwWayne pushed a commit that referenced this pull request Jul 18, 2022
…2021 oral) (#7279)

* add ddod feature

* add ddod feature

* modify new

* [Feature] modify ddod code0225

* [Feature] modify ddod code0226

* [Feature] modify ddod code0228

* [Feature] modify ddod code0228#7279

* [Feature] modify ddod code0301

* [Feature] modify ddod code0301 test draft

* [Feature] modify ddod code0301 test

* [Feature] modify ddod code0301 extra

* [Feature] modify ddod code0301 delete src/mmtrack

* [Feature] modify ddod code0302

* [Feature] modify ddod code0302(2)

* [Feature] modify ddod code0303

* [Feature] modify ddod code0303(2)

* [Feature] modify ddod code0303(3)

* [Feature] modify ddod code0305

* [Feature] modify ddod code0305(2) delete diou

* [Feature] modify ddod code0305(3)

* modify ddod code0306

* [Feature] modify ddod code0307

* [Feature] modify ddod code0311

* [Feature] modify ddod code0311(2)

* [Feature] modify ddod code0313

* update

* [Feature] modify ddod code0319

* fix

* fix lint

* [Feature] modify ddod code0321

* update readme

* [0502] compute common vars at once for get_target

* [0504] update ddod conflicts

* [0518] seperate reg and cls loss and get_target compute

* [0518] merge ATSSCostAssigner to ATSSAssigner

* [0518] refine ATSSAssigner

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 3

* [0519] fix bugs

* update

* fix lr

* update weight

Co-authored-by: hha <1286304229@qq.com>
ZwwWayne pushed a commit to ZwwWayne/mmdetection that referenced this pull request Jul 19, 2022
…2021 oral) (open-mmlab#7279)

* add ddod feature

* add ddod feature

* modify new

* [Feature] modify ddod code0225

* [Feature] modify ddod code0226

* [Feature] modify ddod code0228

* [Feature] modify ddod code0228#7279

* [Feature] modify ddod code0301

* [Feature] modify ddod code0301 test draft

* [Feature] modify ddod code0301 test

* [Feature] modify ddod code0301 extra

* [Feature] modify ddod code0301 delete src/mmtrack

* [Feature] modify ddod code0302

* [Feature] modify ddod code0302(2)

* [Feature] modify ddod code0303

* [Feature] modify ddod code0303(2)

* [Feature] modify ddod code0303(3)

* [Feature] modify ddod code0305

* [Feature] modify ddod code0305(2) delete diou

* [Feature] modify ddod code0305(3)

* modify ddod code0306

* [Feature] modify ddod code0307

* [Feature] modify ddod code0311

* [Feature] modify ddod code0311(2)

* [Feature] modify ddod code0313

* update

* [Feature] modify ddod code0319

* fix

* fix lint

* [Feature] modify ddod code0321

* update readme

* [0502] compute common vars at once for get_target

* [0504] update ddod conflicts

* [0518] seperate reg and cls loss and get_target compute

* [0518] merge ATSSCostAssigner to ATSSAssigner

* [0518] refine ATSSAssigner

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 3

* [0519] fix bugs

* update

* fix lr

* update weight

Co-authored-by: hha <1286304229@qq.com>
ZwwWayne pushed a commit to ZwwWayne/mmdetection that referenced this pull request Jul 19, 2022
…2021 oral) (open-mmlab#7279)

* add ddod feature

* add ddod feature

* modify new

* [Feature] modify ddod code0225

* [Feature] modify ddod code0226

* [Feature] modify ddod code0228

* [Feature] modify ddod code0228#7279

* [Feature] modify ddod code0301

* [Feature] modify ddod code0301 test draft

* [Feature] modify ddod code0301 test

* [Feature] modify ddod code0301 extra

* [Feature] modify ddod code0301 delete src/mmtrack

* [Feature] modify ddod code0302

* [Feature] modify ddod code0302(2)

* [Feature] modify ddod code0303

* [Feature] modify ddod code0303(2)

* [Feature] modify ddod code0303(3)

* [Feature] modify ddod code0305

* [Feature] modify ddod code0305(2) delete diou

* [Feature] modify ddod code0305(3)

* modify ddod code0306

* [Feature] modify ddod code0307

* [Feature] modify ddod code0311

* [Feature] modify ddod code0311(2)

* [Feature] modify ddod code0313

* update

* [Feature] modify ddod code0319

* fix

* fix lint

* [Feature] modify ddod code0321

* update readme

* [0502] compute common vars at once for get_target

* [0504] update ddod conflicts

* [0518] seperate reg and cls loss and get_target compute

* [0518] merge ATSSCostAssigner to ATSSAssigner

* [0518] refine ATSSAssigner

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 3

* [0519] fix bugs

* update

* fix lr

* update weight

Co-authored-by: hha <1286304229@qq.com>
SakiRinn pushed a commit to SakiRinn/mmdetection-locount that referenced this pull request Mar 17, 2023
…2021 oral) (open-mmlab#7279)

* add ddod feature

* add ddod feature

* modify new

* [Feature] modify ddod code0225

* [Feature] modify ddod code0226

* [Feature] modify ddod code0228

* [Feature] modify ddod code0228#7279

* [Feature] modify ddod code0301

* [Feature] modify ddod code0301 test draft

* [Feature] modify ddod code0301 test

* [Feature] modify ddod code0301 extra

* [Feature] modify ddod code0301 delete src/mmtrack

* [Feature] modify ddod code0302

* [Feature] modify ddod code0302(2)

* [Feature] modify ddod code0303

* [Feature] modify ddod code0303(2)

* [Feature] modify ddod code0303(3)

* [Feature] modify ddod code0305

* [Feature] modify ddod code0305(2) delete diou

* [Feature] modify ddod code0305(3)

* modify ddod code0306

* [Feature] modify ddod code0307

* [Feature] modify ddod code0311

* [Feature] modify ddod code0311(2)

* [Feature] modify ddod code0313

* update

* [Feature] modify ddod code0319

* fix

* fix lint

* [Feature] modify ddod code0321

* update readme

* [0502] compute common vars at once for get_target

* [0504] update ddod conflicts

* [0518] seperate reg and cls loss and get_target compute

* [0518] merge ATSSCostAssigner to ATSSAssigner

* [0518] refine ATSSAssigner

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 2

* [0518] refine ATSSAssigner 3

* [0519] fix bugs

* update

* fix lr

* update weight

Co-authored-by: hha <1286304229@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants