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

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

Open
hbl843449791 opened this issue Aug 16, 2024 · 3 comments
Open

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

hbl843449791 opened this issue Aug 16, 2024 · 3 comments

Comments

@hbl843449791
Copy link

hbl843449791 commented Aug 16, 2024

使用的配置文件是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
Copy link
Author

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

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

@DC-hydrid
Copy link

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每个类别的框数都是几百个,但是置信度并不高

@TempleX98
Copy link
Collaborator

config里的test_cfg是一个list,分别对应detr head和多个辅助头的test setting。你这里显示的score_thr都是加到了辅助头的config,可以试试加到test_cfg[0]里

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

No branches or pull requests

3 participants