Sense-X / Co-DETR

[ICCV 2023] DETRs with Collaborative Hybrid Assignments Training
MIT License
969 stars 105 forks source link

推理出来的特别多的检测框 #161

Open hbl843449791 opened 1 month ago

hbl843449791 commented 1 month ago

使用的配置文件是co_dino_5scale_vit_large_coco.py这个配置,test_cfg的配置我把score_thr设置为0.9仍然没什么用,推理出来的框有1000个,就是设置的max_per_img=1000,好像score_thr和nms没有发挥作用?

test_cfg=[
        dict(
            max_per_img=1000,
            nms=dict(type='soft_nms', iou_threshold=0.8)),
        dict(
            rpn=dict(
                nms_pre=8000,
                max_per_img=2000,
                nms=dict(type='nms', iou_threshold=0.9), 
                min_bbox_size=0),
            rcnn=dict(
                score_thr=0.9, 
                mask_thr_binary=0.5,
                nms=dict(type='soft_nms', iou_threshold=0.5),
                max_per_img=1000)),
        dict(
            nms_pre=1000,
            min_bbox_size=0,
            score_thr=0.9, 
            nms=dict(type='soft_nms', iou_threshold=0.6),
            max_per_img=100), 
        # soft-nms is also supported for rcnn testing
        # e.g., nms=dict(type='soft_nms', iou_threshold=0.5, min_score=0.05)
    ])
hbl843449791 commented 1 month ago
model = init_detector(cfg, checkpoint)
result = inference_detector(model, img)

这里result每个类别的框数都是几百个,但是置信度并不高

DC-hydrid commented 3 days ago

Hi,I met the same problem. Have you solved it?

model = init_detector(cfg, checkpoint)
result = inference_detector(model, img)

这里result每个类别的框数都是几百个,但是置信度并不高

model = init_detector(cfg, checkpoint)
result = inference_detector(model, img)

这里result每个类别的框数都是几百个,但是置信度并不高