Skip to content

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}

@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
@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.

5 participants