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 #2967

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Update restapi.py #2967

merged 1 commit into from
Apr 28, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 28, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved Flask API for YOLOv5 model inference.

πŸ“Š Key Changes

  • Simplified the inference results return statement in the predict function.
  • Removed the unnecessary .autoshape() call during model loading.
  • Minor comment and string formatting improvements for clarity and consistency.

🎯 Purpose & Impact

  • πŸš€ Increases code readability and efficiency by streamlining the process of generating inference results.
  • ✨ Enhances the maintainability of the Flask API codebase with clearer comments and descriptions.
  • πŸ” Users benefit from a cleaner API for custom deployments and potentially faster inference with the suggestion to reduce the input size.

@glenn-jocher
Copy link
Member Author

@kalenmike small updates to the REST API. .autoshape() no longer needed (applied by default in current code).

@glenn-jocher glenn-jocher merged commit 2c7c075 into master Apr 28, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-4 branch April 28, 2021 15:50
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
danny-schwartz7 pushed a commit to danny-schwartz7/yolov5 that referenced this pull request May 22, 2021
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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

1 participant