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

Conf_thres and iou_thres #8615

Closed
1 task done
tdhooghe opened this issue Jul 18, 2022 · 5 comments
Closed
1 task done

Conf_thres and iou_thres #8615

tdhooghe opened this issue Jul 18, 2022 · 5 comments
Labels
question Further information is requested Stale

Comments

@tdhooghe
Copy link

Search before asking

Question

Hi Glenn, others,

I wondered how you arrived at a .25 conf_thres and .45 iou_thres for the detect.py and model_hub implementations. Did you by any chance do a study that I can look into?

Kind regards,

Additional

No response

@tdhooghe tdhooghe added the question Further information is requested label Jul 18, 2022
@glenn-jocher
Copy link
Member

@tdhooghe these are detection standard values across a few different tools, i.e. CoreML uses the same thresholds by default.

@tdhooghe
Copy link
Author

Thank you for your quick response! Could you maybe point me into the direction of which other tools use this threshold and why these values are accepted in general?

@creativesalam
Copy link

creativesalam commented Jul 19, 2022

@tdhooghe It depends on your application which values work better for you. Default might work for most people but it is not guaranteed that these values are better for all applications. E.g. I use conf_thres=0.6 in my current project because for my problem False Positive is very dangerous. Higher conf_thres will suppress false positive but at the cost of missing some detections and vice versa. It is up to you to decide what better suits to your business problem.

P.S. False positive can also be suppressed by adding more background images but it is just for your understanding. You can always tweak these values to get your desirable outcome.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 19, 2022

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.

Access additional YOLOv5 🚀 resources:

Access additional Ultralytics ⚡ resources:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!

@Alberto1404
Copy link

@tdhooghe It depends on your application which values work better for you. Default might work for most people but it is not guaranteed that these values are better for all applications. E.g. I use conf_thres=0.6 in my current project because for my problem False Positive is very dangerous. Higher conf_thres will suppress false positive but at the cost of missing some detections and vice versa. It is up to you to decide what better suits to your business problem.

P.S. False positive can also be suppressed by adding more background images but it is just for your understanding. You can always tweak these values to get your desirable outcome.

Hello @creativesalam . Let me know if I am wrong. This is an example training results I obtained for a custom dataset.

results
confusion_matrix
F1_curve
P_curve
PR_curve
R_curve
Based on these, what conf-thres and iou-thres should I use when running detect.py?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

4 participants