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

Update restapi.py #7309

Merged
merged 8 commits into from
Apr 22, 2022
Merged

Update restapi.py #7309

merged 8 commits into from
Apr 22, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 6, 2022

Fix attempt for #7288 (comment)

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancement of image loading for YOLOv5 REST API endpoint.

πŸ“Š Key Changes

  • Removed direct read of the uploaded image file to bytes.
  • Added commented-out alternative Method 1 for reading the image using a context manager.
  • Implemented Method 2 involving direct read and conversion from bytes to an image.

🎯 Purpose & Impact

  • πŸ‘ Improves code maintainability by showing alternative approaches (though one is commented out).
  • πŸƒ Provides potentially more reliable image handling during upload before inference.
  • πŸ› οΈ Prepares for more flexibility in future updates due to clearer and more structured code.
  • βœ… Should have no direct impact on end-users but may improve stability and backend performance.

@glenn-jocher glenn-jocher linked an issue Apr 6, 2022 that may be closed by this pull request
2 tasks
@glenn-jocher glenn-jocher mentioned this pull request Apr 6, 2022
2 tasks
@glenn-jocher glenn-jocher self-assigned this Apr 22, 2022
@glenn-jocher glenn-jocher merged commit 404b4fe into master Apr 22, 2022
@glenn-jocher glenn-jocher deleted the update/restapi branch April 22, 2022 23:19
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update restapi.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

* Update restapi.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Update restapi.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

* Update restapi.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update restapi.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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.

Flask Memory Release Error
1 participant