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

PyTorch Hub crops = results.crop() return values #3282

Merged
merged 2 commits into from
May 23, 2021

Conversation

yeric1789
Copy link
Contributor

@yeric1789 yeric1789 commented May 21, 2021

Made to work with other changes to common.py. See Loading cropped images and infered images

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced save_one_box function with optional saving and return crop feature.

πŸ“Š Key Changes

  • Added a save parameter to save_one_box function to control whether the image crop should be saved to disk.
  • Function now returns the cropped image regardless of the save parameter.

🎯 Purpose & Impact

  • πŸ” Allows for more flexibility by giving the option to either save or not save the cropped image.
  • πŸ”„ Users can now use the cropped image directly in their code if saving is not necessary, which can save I/O time and disk space.
  • πŸ–Ό This can be especially useful in scenarios where real-time processing is required, or when working with a large number of crops.

yeric1789 and others added 2 commits May 21, 2021 14:05
Made to work with other changes to common.py
@glenn-jocher glenn-jocher changed the title Changing save_one_box PyTorch Hub crops = results.crop() return values May 23, 2021
@glenn-jocher glenn-jocher merged commit a039b77 into ultralytics:master May 23, 2021
@glenn-jocher
Copy link
Member

@yeric1789 PR is merged. Thank you for your contributions!

Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
* Changing save_one_box 

Made to work with other changes to common.py

* PEP8 and single line BGR

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
(cherry picked from commit a039b77)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Changing save_one_box 

Made to work with other changes to common.py

* PEP8 and single line BGR

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
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.

None yet

2 participants