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

Fix OpenVINO export #11666

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Fix OpenVINO export #11666

merged 3 commits into from
Jun 6, 2023

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 6, 2023

Resolves #11645

🤖 Generated by Copilot at 8705789

Summary

🆕🐛🎨

This pull request improves the compatibility and readability of the export.py file for exporting YOLOv5 models to OpenVINO format. It updates the OpenVINO package and API usage, and fixes some export command and regex syntax.

Sing, O Muse, of the skillful coder who updated export.py
To match the latest OpenVINO, the swift and powerful package
That transforms the models of machine learning with its API
And makes them run on diverse devices, from cloud to edge.

Walkthrough

  • Update OpenVINO export function to use new package and API (link)

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Update to OpenVINO model export process for better compatibility and simplicity.

📊 Key Changes

  • Updated the minimum required version of openvino-dev to 2022.3.
  • Switched from openvino.inference_engine to openvino.runtime, aligning with OpenVINO's new API.
  • Used openvino.tools.mo module for model conversion, replacing the previous subprocess call to the Model Optimizer CLI.
  • Simplified export file path handling and file naming for clarity and consistency.
  • Performed export and serialization using the new OpenVINO Python API directly within the Python script.

🎯 Purpose & Impact

  • 🚀 Up-to-date Requirements: Ensures compatibility with the latest OpenVINO tools and practices.
  • 💡 API Utilization: Adopts the latest OpenVINO Python API for a more integrated and potentially more reliable export process.
  • Simplified Process: Reduces the complexity of commands and environment handling for exporting models.
  • 📁 File Handling Improvements: Enhances the file path management leading to fewer errors and a more standardized output.
  • Users can expect a smoother and potentially faster export experience with the added benefit of keeping up with current OpenVINO standards.

glenn-jocher and others added 3 commits June 6, 2023 14:35
Resolves #11645

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit 89c3040 into master Jun 6, 2023
@glenn-jocher glenn-jocher deleted the openvino branch June 6, 2023 12:48
NagatoYuki0943 added a commit to NagatoYuki0943/yolov5-ultralytics that referenced this pull request Jun 7, 2023
bandakopi pushed a commit to irajcode/yolov5 that referenced this pull request Jul 20, 2023
* Fix OpenVINO export

Resolves ultralytics#11645

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

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

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

* Update export.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pleb631 pushed a commit to pleb631/yolov5 that referenced this pull request Jan 6, 2024
* Fix OpenVINO export

Resolves ultralytics#11645

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

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

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

* Update export.py

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

---------

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

export model to openvino gives a issue
1 participant