yolov5 icon indicating copy to clipboard operation
yolov5 copied to clipboard

New Feature: added cmd line arg for saving only positives

Open GarbageHaus opened this issue 9 months ago β€’ 3 comments

Added a simple command line argument (default False) where if set to true, only the images and videos which contain a positive identification are saved to the output. Currently outputting the images/video in detect.py is all or nothing. This addition prevents creating duplicate files which contain no detections, while allowing for positive detections to be saved. Location in code is not extremely efficient, but is present at that location for readability and minimal intrusiveness.

I have read the CLA Document and I sign the CLA

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Introducing a new option to save only positive detections in YOLOv5 πŸ“Έβœ…

πŸ“Š Key Changes

  • Added a new flag savepositives to the detection script. This allows users to choose to save only images or videos that contain positive detections (detections that the model is confident about).

🎯 Purpose & Impact

  • Efficiency Boost: This change helps save storage space and makes it easier for users to review positive detections by not saving images or videos without any detections. πŸš€
  • User-Friendly: It enhances the usability of YOLOv5 for various projects, especially those where users are only interested in instances where the model finds something of interest. πŸŽ‰
  • Potential Impact: This addition could significantly benefit users running detection tasks in resource-constrained environments or dealing with large datasets where filtering out no-detection outputs manually would be impractical. πŸ“ˆ

GarbageHaus avatar May 12 '24 23:05 GarbageHaus

All Contributors have signed the CLA. βœ…
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar May 12 '24 23:05 github-actions[bot]

Please accept the CLA with a new comment with:

I have read the CLA Document and I sign the CLA

glenn-jocher avatar May 13 '24 09:05 glenn-jocher

I have read the CLA Document and I sign the CLA

GarbageHaus avatar May 15 '24 04:05 GarbageHaus