Skip to content

Check conf_thres and iou_thres prior to use#10515

Merged
glenn-jocher merged 3 commits intoultralytics:masterfrom
developer0hye:patch-13
Dec 17, 2022
Merged

Check conf_thres and iou_thres prior to use#10515
glenn-jocher merged 3 commits intoultralytics:masterfrom
developer0hye:patch-13

Conversation

@developer0hye
Copy link
Copy Markdown
Contributor

@developer0hye developer0hye commented Dec 16, 2022

Why check conf_thres after the operation with it?

Signed-off-by: Yonghye Kwon developer.0hye@gmail.com

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced input validation in the non_max_suppression function of YOLOv5.

📊 Key Changes

  • Added input validation checks for conf_thres and iou_thres parameters at the beginning of the non_max_suppression function.
  • Removed redundant input validation further down in the function.

🎯 Purpose & Impact

  • Ensure Robustness: Validates that confidence and IoU threshold values are within the acceptable range (0 to 1) before proceeding with the function, preventing errors related to invalid parameter values. 🛡️
  • Code Clarity: Streamlines the code by placing checks at the beginning, which makes it easier to read and maintain. 🧹
  • User Experience: Helps users to quickly identify configuration mistakes by catching invalid values early, leading to potentially fewer runtime issues. 👩‍💻👨‍💻

developer0hye and others added 2 commits December 16, 2022 13:25
Why checks conf_thres after operation with it?

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye developer0hye changed the title Checks conf_thres and iou_thres at beign Check conf_thres and iou_thres at beign Dec 16, 2022
@glenn-jocher glenn-jocher changed the title Check conf_thres and iou_thres at beign Check conf_thres and iou_thres prior to use Dec 17, 2022
@glenn-jocher glenn-jocher merged commit b564c1f into ultralytics:master Dec 17, 2022
@glenn-jocher
Copy link
Copy Markdown
Member

@developer0hye good fix! PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐

@developer0hye developer0hye deleted the patch-13 branch December 17, 2022 11:10
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.

2 participants