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

Add results.save(save_dir='path', exist_ok=False) #9617

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 27, 2022

Partially resolves #9522

Signed-off-by: Glenn Jocher [email protected]

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Streamlining output directory management for saving and cropping operations in YOLOv5 detection results.

πŸ“Š Key Changes

  • Altered the save method by introducing an exist_ok parameter, controlling the overwrite behavior for existing directories.
  • Updated the crop method with a new exist_ok parameter to match the save method's behavior.

🎯 Purpose & Impact

  • πŸ’Ύ Enhanced Customization: Users now have more control over how the results are saved, particularly when dealing with existing directories.
  • πŸ”„ Consistency Across Methods: Both save and crop methods now share a similar interface for directory handling, making the API more uniform.
  • πŸ› οΈ Reduction of Default Overwrites: By default, directories won't be overwritten, reducing the risk of unintentional data loss or confusion.
  • πŸ€– Potential Automation Enhancements: With the explicit exist_ok parameter, automation scripts that leverage these methods can be more precise and safer.

@glenn-jocher glenn-jocher self-assigned this Sep 27, 2022
@glenn-jocher glenn-jocher merged commit 7314363 into master Sep 27, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch September 27, 2022 14:58
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.

I want to overwrite and save the analysis results
1 participant