Added documentation for integration/deployment of models on TI Edge AI - #25403
Added documentation for integration/deployment of models on TI Edge AI#25403nijil-ti wants to merge 20 commits into
Conversation
|
All Contributors have signed the CLA. ✅ |
|
👋 Hello @nijil-ti, thank you for submitting a
For more guidance, please refer to our Contributing Guide. This automated message confirms the initial review checklist; an Ultralytics engineer will assist with any follow-up questions. Don't hesitate to leave a comment if you need help. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
The guide has a clear deployment flow, but its primary model-preparation repository link is dead, the page is not discoverable through the docs navigation, and the FAQ compile link is broken.
💬 Posted 3 inline comments
|
I have read the CLA Document and I sign the CLA |
|
Thanks for putting this together, and welcome — a TI Edge AI integration is genuinely interesting to us. Direction first. The strongest version of this contribution is not a docs page. Every other silicon integration we ship — Rockchip RKNN, Sony IMX500, Axelera, DEEPX, Qualcomm QNN — is backed by a real export format in the package, so users get: model.export(format="ti")yolo export model=yolo26n.pt format=tiAs written, this page documents an entirely external toolchain: every step sends the user to A If the docs page lands first, these need fixing:
Still marked draft, so I have left it open. Ping me when you would like a review of either path. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ambitious-octopus
left a comment
There was a problem hiding this comment.
@nijil-ti, as discussed in our meeting today, we'll be following your updates here. Adding @lakshanthad as well, who will support with testing and benchmarking.
…as Instruments Edge AI
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 2
Made with ❤️ by Ultralytics Actions
Reviewed all three changed files. The navigation and FAQ-anchor issues from review 1 are addressed. Remaining issues are a dead Model Hub link, nonfunctional copy-paste commands, an overbroad TIDL support claim, an incomplete custom-model workflow, and an inconsistent YOLOv8 model table.
💬 Posted 5 inline comments
⚠️ HIGHdocs/en/integrations/ti-edge-ai.md:94This is not a valid copy-paste command: the spaces around< model >make the shell treat<and>as stdin/stdout redirections, while--config_pathreceives only/path/to/model/. The same malformed command is repeated on line 104. Use a concrete config filename such as/path/to/model/yolo26n_model_config.yaml, matching TI's documented syntax. (huggingface.co)- 💡 MEDIUM
docs/en/integrations/ti-edge-ai.md:25Thisedgeai-modelhubrepository link currently returns 404, so the documented Model Hub and clone workflow cannot be followed. The live TI Edge AI Hugging Face organization provides the YOLO model/config repositories; replace this link and the repeated references below with the maintained source. () - 💡 MEDIUM
docs/en/integrations/ti-edge-ai.md:43“Any” Ultralytics ONNX export is not guaranteed to compile or run through TIDL. TI documents a version-specific supported-operator set, static-shape requirements, and additional detection-model/post-processing configuration; unsupported layers may remain on ARM or prevent compilation. Scope this claim to supported/configured exports and document those prerequisites. (github.com) - 💡 MEDIUM
docs/en/integrations/ti-edge-ai.md:113For a custom-trained model, changing onlymodel_pathis insufficient. TI's sample configs also define the dataset, preprocessing, post-processing, and COCO label mapping; leaving those values unchanged makesinfer/evaluateuse the wrong data or decoding for a custom class set. Document which config fields must be regenerated or updated for the user's dataset and model outputs. ([huggingface.co](https://huggingface.co/TexasInstruments-EdgeAI/YOLO26-Detection/blob/main/yolo26n_model_config.… - 📝 LOW
docs/en/integrations/ti-edge-ai.md:57The YOLOv8 row lists onlyn, m, but its37.3 – 53.9range includes YOLOv8x (53.9); the TI model page reports 37.3 fornand 50.2 form, withs/l/xlisted separately. Either list all variants represented by the range or change the range to37.3 – 50.2. (huggingface.co)
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 3
Made with ❤️ by Ultralytics Actions
Review 3: the navigation and FAQ fixes, corrected commands and links, scoped support wording, custom-model configuration guidance, and YOLOv8 table correction from review 2 are present. Three deployment-documentation issues remain: the preparation step overstates what prepare_model.py does, the deployment step does not name the required TI ONNX Runtime provider, and setup does not require a compatible TIDL/SDK release. (github.com)
💬 Posted 3 inline comments
- 💡 MEDIUM
docs/en/integrations/ti-edge-ai.md:79This setup step points users at the movingedgeai-tidlrunnerbranch without requiring a TIDL/SDK version match. TI's documentation warns that compiled artifacts and target firmware must use compatible versions, so a user with an older board SDK can compile successfully on the PC and then fail during on-device initialization. Require selecting a compatible runner/TIDL release using the linked compatibility matrix instead of only saying to follow the setup guide. ([github.com](https://github.co… - 💡 MEDIUM
docs/en/integrations/ti-edge-ai.md:85prepare_model.pydoes not uniformly export a YOLO model to ONNX. For the documented YOLO26 workflow, the script downloads the pre-exported ONNX referenced by the.linkfile, fixes its shapes, and validates it; it does not convert a user's.ptcheckpoint. Following this wording for custom weights can leave users without an ONNX file. Describe this as downloading/preparing the TI-provided ONNX, and keep custom-model users on the Ultralytics ONNX export plus static-shape workflow. The same c… - 💡 MEDIUM
docs/en/integrations/ti-edge-ai.md:116The deployment step omits the runtime prerequisite required for TIDL offload. TI documents that upstream PyPIonnxruntimedoes not include the TIDL execution providers; deployment requires TI's ONNX Runtime fork/provider together with the compiled artifacts. As written, users can follow this step and get a provider-not-found error or CPU-only inference. Name the TI runtime/provider explicitly and link its setup instructions.
|
|
||
| ### Step 1 — Setup tidlrunner | ||
|
|
||
| Follow the [edgeai-tidlrunner](https://github.com/TexasInstruments/edgeai-tidlrunner) setup guide to install the CLI and configure the target device connection. |
There was a problem hiding this comment.
💡 MEDIUM: This setup step points users at the moving edgeai-tidlrunner branch without requiring a TIDL/SDK version match. TI's documentation warns that compiled artifacts and target firmware must use compatible versions, so a user with an older board SDK can compile successfully on the PC and then fail during on-device initialization. Require selecting a compatible runner/TIDL release using the linked compatibility matrix instead of only saying to follow the setup guide. (github.com)
|
|
||
| Download the model export script (prepare_model.py) and configuration files from the [TI Edge AI HuggingFace page](https://huggingface.co/TexasInstruments-EdgeAI/models), or clone the [TI Edge AI Model Hub](https://github.com/TexasInstruments/edgeai-modelhub).\ | ||
| Refer to the model specific `README.md` document to get more details on model export.\ | ||
| Run `prepare_model.py` for your chosen variant. The script handles the full preparation pipeline — it exports the YOLO model to ONNX, fixes dynamic shapes to static shapes, and validates the graph for TIDL compilation. Full setup instructions are in the Model Hub README. |
There was a problem hiding this comment.
💡 MEDIUM: prepare_model.py does not uniformly export a YOLO model to ONNX. For the documented YOLO26 workflow, the script downloads the pre-exported ONNX referenced by the .link file, fixes its shapes, and validates it; it does not convert a user's .pt checkpoint. Following this wording for custom weights can leave users without an ONNX file. Describe this as downloading/preparing the TI-provided ONNX, and keep custom-model users on the Ultralytics ONNX export plus static-shape workflow. The same claim is repeated in the FAQ on line 138. (github.com)
| 3. **Adapt** the [model YAML configuration](https://huggingface.co/TexasInstruments-EdgeAI/YOLO26-Detection/blob/main/yolo26n_model_config.yaml): set `session.model_path` to your ONNX file, `dataloader.name` and `dataloader.path` for your dataset, and `preprocess` plus `session.input_mean`/`session.input_scale` to match training. Match `postprocess` to the exported output layout and box decoding, and replace the COCO mapping in `metric.label_offset_pred` with your dataset's class IDs. | ||
| 4. **Compile** on PC for your target TI device with `tidlrunner-cli compile`, passing the per-model config YAML. | ||
| 5. **Infer** on your target TI device with `tidlrunner-cli infer`, passing the per-model config YAML to test that the inference is working correctly on device. | ||
| 6. **Deploy** on device through the ONNX Runtime APIs with TIDL Offfload (see [edgeai-tidl-tools](https://github.com/TexasInstruments/edgeai-tidl-tools) for more details). |
There was a problem hiding this comment.
💡 MEDIUM: The deployment step omits the runtime prerequisite required for TIDL offload. TI documents that upstream PyPI onnxruntime does not include the TIDL execution providers; deployment requires TI's ONNX Runtime fork/provider together with the compiled artifacts. As written, users can follow this step and get a provider-not-found error or CPU-only inference. Name the TI runtime/provider explicitly and link its setup instructions.
Added the documentation for deployment of ultralytics models on Texas Instrument edge ai hardware devices.
I have read the CLA Document and I sign the CLA
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Adds comprehensive documentation for deploying Ultralytics YOLO models on Texas Instruments Edge AI hardware using the TIDL runtime.
📊 Key Changes
docs/en/integrations/ti-edge-ai.mdintegration guide.🎯 Purpose & Impact
.ptcheckpoints to hardware-optimized TI artifacts.