{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "ultralytics-ultralytics--export-a-yolo-model-to-onnx-for-deployment",
 "repo": "ultralytics/ultralytics",
 "repo_url": "https://github.com/ultralytics/ultralytics",
 "repo_slug": "ultralytics-ultralytics",
 "title": "Export a YOLO model to ONNX for deployment",
 "page_title": "How to export a YOLO model to ONNX for deployment with Ultralytics",
 "summary": "Turn a trained YOLO model into an ONNX file you can run outside PyTorch.",
 "who": "An engineer deploying detection to a server or edge device.",
 "problem": "PyTorch checkpoints are awkward to ship to production runtimes.",
 "outcome": "An ONNX model file and its path.",
 "steps": [
  "Install with `pip install ultralytics`",
  "Load your trained model with YOLO",
  "Call model.export(format=\"onnx\"), which returns the path to the exported model",
  "Load the ONNX file in your deployment runtime"
 ],
 "agent_prompt": "Using ultralytics/ultralytics, load <my trained weights>, export them with model.export(format=\"onnx\"), and show me how to run the ONNX file on one image.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "This card is written from the ultralytics/ultralytics README, not from a test run by Deduped. Before you start, make sure you have Python 3.8 or newer with pip. Check the repo for newer instructions before you rely on these steps.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.8 or newer with pip (PyTorch is installed with the package requirements)",
  "A GPU is optional for prediction and recommended for training",
  "Images or video to run on, or a dataset config for training"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "platform",
   "notice": "AGPL-3.0 applies to deployments too; check the license before shipping a closed product."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ultralytics-ultralytics/export-a-yolo-model-to-onnx-for-deployment/",
 "md": "https://dedupedai.com/use-cases/ultralytics-ultralytics/export-a-yolo-model-to-onnx-for-deployment/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ultralytics-ultralytics--export-a-yolo-model-to-onnx-for-deployment.json",
 "api_version": "v1"
}
