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 DiffusionDet Inference in Projects #9639

Merged
merged 22 commits into from
Jan 31, 2023

Conversation

BIGWangYuDong
Copy link
Collaborator

@BIGWangYuDong BIGWangYuDong commented Jan 16, 2023

Ready for the inference-time performance of DiffusionDet in MMDetection projects matches that in the original paper(repo)

Note:
During inference time, DiffusionDet will randomly create boxes, which may affect the results (AP).

If hard-setting seeds=0 before generating random boxes, the AP will be same:

# hard set seed=0 before generating random boxes
seed = 0
random.seed(seed)
# np.random.seed(seed)
torch.manual_seed(seed)
# torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)

...

noise_bboxes_raw = torch.randn(
    (self.num_proposals, 4),
    device=device)

...
repo mAP
DifussionDet (without any changing) 45.5
DifussionDet (hard set seed=0) 45.66
mmdet repo (hard set seed=0) 45.7
mmdet repo (random seed) 45.6~45.8

In addition, we give a script to convert DiffusionDet-resnet50 to MMDet version.

python projects/DiffusionDet/model_converters/diffusiondet_resnet_to_mmdet.py ${PATH_DOWNLOAD_FROM_DIFFUSIONDET} ${CONVERTED_SAVING_PATH}

configs/_base_/datasets/coco_detection.py Outdated Show resolved Hide resolved
mmdet/datasets/base_det_dataset.py Outdated Show resolved Hide resolved
@BIGWangYuDong BIGWangYuDong marked this pull request as ready for review January 18, 2023 00:51
@BIGWangYuDong BIGWangYuDong changed the title [WIP][Feature] Support DiffusionDet in Projects [Feature] Support DiffusionDet in Projects Jan 18, 2023
BIGWangYuDong and others added 4 commits January 18, 2023 10:51
…ls_crop-ms-480-800-450k_coco.py

Co-authored-by: Haian Huang(深度眸) <[email protected]>
…ls_crop-ms-480-800-450k_coco.py

Co-authored-by: Haian Huang(深度眸) <[email protected]>
@ZwwWayne ZwwWayne added this to the 3.0.0rc6 milestone Jan 29, 2023
@BIGWangYuDong BIGWangYuDong changed the title [Feature] Support DiffusionDet in Projects [Feature] Support DiffusionDet Inference in Projects Jan 30, 2023
projects/DiffusionDet/README.md Outdated Show resolved Hide resolved
projects/DiffusionDet/README.md Outdated Show resolved Hide resolved
@ZwwWayne ZwwWayne merged commit 83b8335 into open-mmlab:dev-3.x Jan 31, 2023
yumion pushed a commit to yumion/mmdetection that referenced this pull request Jan 31, 2024
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.

None yet

5 participants