Skip to content

[Yolo12] Revert of the revert of the Yolo12 Sample #12163

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

daniil-lyakhov
Copy link
Contributor

@daniil-lyakhov daniil-lyakhov commented Jul 2, 2025

Summary

Follow up #12136
Revert of the revert #10156
The big gif is remote from the PR

CC: @kimishpatel

Copy link

pytorch-bot bot commented Jul 2, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12163

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 Cancelled Jobs, 5 Unrelated Failures

As of commit f7997a6 with merge base e6a0d53 (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 2, 2025
Copy link

github-actions bot commented Jul 2, 2025

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

…rch#10156)

### Summary
Ultralytics Yolo12 Detection sample to expand example models with the
detection task:

1) Export script to get executorch yolo model lowered to
OpenVINO/XNNPACK
2) Demo app which gets a model and a video as an input and outputs an
annotated video

Changes in the OpenVINO backend:
* OpenVINO repo branch is updated to support yolo12 models (Commit to
Openvino master WIP)
* Minor fixes in quantizer.py

### Test plan

#### Warning:
OpenCV should be installed in the environment.

OpenVINO:
```
./.ci/scripts/test_yolo12.sh  -model yolo12n -mode openvino -pt2e_quantize OFF -upload tmp_ov_run -video_path  path/to/mp4/file
```
XNNPACK:
```
./.ci/scripts/test_yolo12.sh  -model yolo12n -mode xnnpack -pt2e_quantize OFF -upload tmp_xnnpack_run -video_path  path/to/mp4/file
```

### Issues:

* Quantization does not work in both backends, issues WIP. Marked by
NonImplemented error by now
* OpenVINO is being build twice because it is not present in the
[executorch-config.cmake](https://github.com/pytorch/executorch/blob/main/tools/cmake/executorch-config.cmake)
file. Perhaps we could add the OpenVINO backend to the config file?


CC: @ynimmaga @suryasidd @alexsu52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-no-td CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants