Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added documentation for integration/deployment of models on TI Edge AI - #25403

Open
nijil-ti wants to merge 20 commits into
ultralytics:mainfrom
nijil-ti:ti_edge_ai
Open

Added documentation for integration/deployment of models on TI Edge AI#25403
nijil-ti wants to merge 20 commits into
ultralytics:mainfrom
nijil-ti:ti_edge_ai

Conversation

@nijil-ti

@nijil-ti nijil-ti commented Jul 24, 2026

Copy link
Copy Markdown

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

  • Adds a new docs/en/integrations/ti-edge-ai.md integration guide.
  • Documents TI Edge AI, TIDL Tools, TIDL Runner, Model Hub resources, supported devices, and deployment concepts.
  • Provides workflows for ONNX export, static shape preparation, TIDL compilation, evaluation, and on-device inference.
  • Includes command examples for compiling and evaluating models on TI J784S4 devices.
  • Covers supported YOLO26, YOLO11, and YOLOv8 models, use cases, recommended workflows, and FAQs.

🎯 Purpose & Impact

  • Helps users deploy YOLO models to low-power, industrial, automotive, and robotics-focused TI MPU platforms.
  • Improves discoverability of TI Edge AI deployment resources and tooling.
  • Provides a practical starting point for moving trained Ultralytics models from .pt checkpoints to hardware-optimized TI artifacts.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

All Contributors have signed the CLA. ✅

@UltralyticsAssistant UltralyticsAssistant added documentation Improvements or additions to documentation embedded Pertaining to IOT, low-power or edge devices such as Jetson, Rasberry Pi etc. exports Model exports (ONNX, TensorRT, TFLite, etc.) labels Jul 24, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @nijil-ti, thank you for submitting a ultralytics/ultralytics 🚀 PR! To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/ultralytics main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

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 UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 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

Comment thread docs/en/integrations/ti-edge-ai.md
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
@nijil-ti

Copy link
Copy Markdown
Author

I have read the CLA Document and I sign the CLA

@glenn-jocher

Copy link
Copy Markdown
Member

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=ti

As written, this page documents an entirely external toolchain: every step sends the user to edgeai-tidlrunner, prepare_model.py and a HuggingFace page, and nothing in ultralytics changes. That is a much weaker integration than TI deserves, and it is the kind of page that goes stale silently because no CI exercises it.

A ti export would slot into the existing machinery: add the row to export_formats() in ultralytics/engine/exporter.py, add an export_ti method (ONNX export + static-shape fixing + TIDL compile, which is what prepare_model.py already does), and wire a TIDL backend into ultralytics/nn/autobackend.py so YOLO("model_ti_model/") runs inference. Then the docs page documents something we own and test, and the workflow collapses to two commands. Happy to point you at the closest existing template to copy — RKNN and DEEPX are both good models for this.

If the docs page lands first, these need fixing:

  1. The page is orphaned. It is not registered in mkdocs.yml nav, nor listed in docs/en/integrations/index.md, so nothing links to it and it will not appear in the site navigation.
  2. The YOLO26 mAP row is wrong. The table lists 57.5 – 66.0; published YOLO26 detection is 40.9–57.5 mAP on COCO across n–x. 57.5 is the top of the real range, listed as the bottom. The YOLOv8 row also has "COCO trained" in the mAP column instead of a number.
  3. Broken anchor. The FAQ links [Step 2](#step-2--compile-and-evaluate-with-tidl-runner), but that heading is "### Step 3 — Compile and Evaluate with TIDL Runner" — the anchor does not resolve.
  4. "two-step pipeline" is followed by three numbered steps.

Still marked draft, so I have left it open. Ping me when you would like a review of either path.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ambitious-octopus ambitious-octopus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@nijil-ti
nijil-ti marked this pull request as ready for review September 8, 2026 05:59
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md

@UltralyticsAssistant UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 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
  • ⚠️ HIGH docs/en/integrations/ti-edge-ai.md:94 This is not a valid copy-paste command: the spaces around < model > make the shell treat < and > as stdin/stdout redirections, while --config_path receives 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:25 This edgeai-modelhub repository 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:113 For a custom-trained model, changing only model_path is insufficient. TI's sample configs also define the dataset, preprocessing, post-processing, and COCO label mapping; leaving those values unchanged makes infer/evaluate use 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:57 The YOLOv8 row lists only n, m, but its 37.3 – 53.9 range includes YOLOv8x (53.9); the TI model page reports 37.3 for n and 50.2 for m, with s/l/x listed separately. Either list all variants represented by the range or change the range to 37.3 – 50.2. (huggingface.co)

Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md Outdated
Comment thread docs/en/integrations/ti-edge-ai.md Outdated

@UltralyticsAssistant UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 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:79 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](https://github.co…
  • 💡 MEDIUM docs/en/integrations/ti-edge-ai.md:85 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 c…
  • 💡 MEDIUM docs/en/integrations/ti-edge-ai.md:116 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.


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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation embedded Pertaining to IOT, low-power or edge devices such as Jetson, Rasberry Pi etc. exports Model exports (ONNX, TensorRT, TFLite, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants