Co-DETR
Co-DETR copied to clipboard
推理出来的特别多的检测框
使用的配置文件是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)
])
model = init_detector(cfg, checkpoint)
result = inference_detector(model, img)
这里result每个类别的框数都是几百个,但是置信度并不高
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每个类别的框数都是几百个,但是置信度并不高
config里的test_cfg是一个list,分别对应detr head和多个辅助头的test setting。你这里显示的score_thr都是加到了辅助头的config,可以试试加到test_cfg[0]里