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

Improved OpenVINO quantization code #12614

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

adrianboguszewski
Copy link
Contributor

@adrianboguszewski adrianboguszewski commented Jan 11, 2024

Small fixes + better code layout

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancement and simplification of OpenVINO export in YOLOv5.

πŸ“Š Key Changes

  • Updated the filename for OpenVINO export to include int8_ prefix when INT8 quantization is used.
  • Upgraded the required version of NNCF for post-training quantization to >= 2.5.0.
  • Streamlined the quantization code by removing redundant preprocessing function and directly incorporating preprocessing within the transformation function.
  • Fixed assertion to ensure input images are in UINT8 format for quantization preprocessing.

🎯 Purpose & Impact

  • πŸš€ Purpose: To improve the OpenVINO export functionality of YOLOv5 by making the output filenames more descriptive and ensuring compatibility with the latest post-training quantization tools.
  • πŸ“ˆ Impact: Users can now have clearer naming for models with INT8 quantization and benefit from newer quantization features with the updated NNCF requirement. The streamlined preprocessing should make the quantization process more efficient and less error-prone.
  • πŸ” Non-Expert Use: For users who are not familiar with machine learning quantization, the update means better performance and reliability when using YOLOv5 with OpenVINO, especially on systems that support INT8 operations.

@glenn-jocher
Copy link
Member

@adrianboguszewski hi there!

Thanks for your interest in contributing to the YOLOv5 project! πŸš€

For any code improvements, including enhancements to OpenVINO quantization, we welcome pull requests. Please ensure your changes are well-documented and tested for compatibility. Once you've submitted a PR, our team will review it and provide feedback or merge it if everything checks out.

Looking forward to seeing your contributions!

@glenn-jocher glenn-jocher merged commit de64179 into ultralytics:master Jan 12, 2024
@glenn-jocher
Copy link
Member

@adrianboguszewski PR merged! I checked the benchmarking CI and it looks like the new changes are working correctly :)

NagatoYuki0943 added a commit to NagatoYuki0943/yolov5-ultralytics that referenced this pull request Jan 12, 2024
Improved OpenVINO quantization code (ultralytics#12614)
@adrianboguszewski adrianboguszewski deleted the openvino_int8 branch January 12, 2024 10:30
pleb631 pushed a commit to pleb631/yolov5 that referenced this pull request Jan 14, 2024
* Improved OpenVINO quantization code

* Auto-format by Ultralytics actions

---------

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
(cherry picked from commit de64179)
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.

3 participants