{"id":50970271,"url":"https://github.com/farukalamai/jetson-yolo-cpp","last_synced_at":"2026-06-19T01:32:23.341Z","repository":{"id":365490723,"uuid":"1271403251","full_name":"farukalamai/jetson-yolo-cpp","owner":"farukalamai","description":"Real-time object detection, segmentation and tracking on NVIDIA Jetson using YOLO + TensorRT in C++","archived":false,"fork":false,"pushed_at":"2026-06-17T14:25:45.000Z","size":181,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T16:49:42.178Z","etag":null,"topics":["cpp","cuda","jetson","object-detection","tensorrt","yolo26"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farukalamai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-16T16:18:28.000Z","updated_at":"2026-06-17T15:48:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/farukalamai/jetson-yolo-cpp","commit_stats":null,"previous_names":["farukalamai/jetson-yolo-cpp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/farukalamai/jetson-yolo-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farukalamai%2Fjetson-yolo-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farukalamai%2Fjetson-yolo-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farukalamai%2Fjetson-yolo-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farukalamai%2Fjetson-yolo-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farukalamai","download_url":"https://codeload.github.com/farukalamai/jetson-yolo-cpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farukalamai%2Fjetson-yolo-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34514282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cuda","jetson","object-detection","tensorrt","yolo26"],"created_at":"2026-06-19T01:32:23.140Z","updated_at":"2026-06-19T01:32:23.314Z","avatar_url":"https://github.com/farukalamai.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jetson-yolo-cpp\n\nReal-time object detection, segmentation and tracking on NVIDIA Jetson using YOLO + TensorRT in C++. Supports detection and instance segmentation modes. Drop in any YOLO ONNX model, plug in a camera, and run — natively or via Docker.\n\n---\n\n## Requirements\n\n- NVIDIA Jetson Orin NX (JetPack 6.2+)\n- USB or CSI camera\n- YOLO ONNX model\n\n---\n\n## Quick Start\n\n### 1. Clone the repo\n\n```bash\ngit clone https://github.com/faruk/jetson-yolo-cpp.git\ncd jetson-yolo-cpp\n```\n\n### 2. Install dependencies\n\n```bash\nsudo apt install -y cmake libeigen3-dev libspdlog-dev libyaml-cpp-dev\n```\n\nSee [SETUP_DEPENDENCIES.md](SETUP_DEPENDENCIES.md) for the full setup guide including Docker.\n\n### 3. Download a YOLO model\n\nExport an ONNX model using the Ultralytics package:\n\n```bash\npip install ultralytics\n\n# Detection model\nyolo export model=yolo26s.pt format=onnx imgsz=640\nmv yolo26s.onnx models/\n\n# Segmentation model (adds pixel masks)\nyolo export model=yolo26s-seg.pt format=onnx imgsz=640\nmv yolo26s-seg.onnx models/\n```\n\nAvailable variants: `yolo26n`, `yolo26s`, `yolo26m`, `yolo26l` — each has a `-seg` variant for segmentation.\n\n### 4. Build the TensorRT engine\n\nRun once per model per device. Takes 5–15 minutes.\n\n```bash\n/usr/src/tensorrt/bin/trtexec \\\n    --onnx=models/yolo26s.onnx \\\n    --saveEngine=models/engines/yolo26s.engine \\\n    --fp16 \\\n    --memPoolSize=workspace:4096M \\\n    --iterations=10 \\\n    --warmUp=500\n```\n\nOr use the helper script:\n\n```bash\n./scripts/build_engine.sh models/yolo26s.onnx\n```\n\n### 5. Configure\n\nEdit `config.yaml` to match your camera and model:\n\n```yaml\ncamera:\n  device: \"/dev/video0\"\n  width: 1920\n  height: 1080\n\nmodel:\n  mode: \"detection\"          # \"detection\" or \"segmentation\"\n  engine_path: \"models/engines/yolo26s.engine\"\n```\n\nSwitch to segmentation by changing mode and pointing to a `-seg` engine:\n\n```yaml\nmodel:\n  mode: \"segmentation\"\n  engine_path: \"models/engines/yolo26s-seg.engine\"\n```\n\n### 6. Build\n\n```bash\ncmake -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build --parallel 8\n```\n\n---\n\n## Run\n\n### Test first (recommended)\n\nRun the test tool to verify camera, model and tracker are working before going to production:\n\n```bash\n./build/test_detection config.yaml\n```\n\nTerminal output:\n\n```\nCamFPS      InferenceFPS  Detections  Tracks    New IDs\n----------------------------------------------------------------------\n  \u003e\u003e New track: ID#1 ID#2  -\u003e saved: snapshots/frame_45_ID#1_ID#2_.png\n28.4        47.8          2           2\n  \u003e\u003e New track: ID#4       -\u003e saved: snapshots/frame_120_ID#4_.png\n27.9        47.6          3           3\n```\n\n- **CamFPS** — full pipeline speed (camera + inference + tracking)\n- **InferenceFPS** — YOLO model speed only\n- Every new track ID triggers an annotated PNG snapshot saved to `snapshots/`\n- In segmentation mode, snapshots include pixel masks drawn over detected objects\n\nStop with `Ctrl+C`.\n\n### Production (native)\n\n```bash\n./build/jetson-yolo-cpp config.yaml\n```\n\nRuns headless — detects and tracks continuously, logs to terminal and `logs/app.log`. Stop with `Ctrl+C`.\n\n### Production (Docker)\n\n```bash\ndocker compose -f docker/docker-compose.yml build\ndocker compose -f docker/docker-compose.yml up\n```\n\n---\n\n## Acknowledgements\n\n- **[YOLOs-CPP-TensorRT](https://github.com/Geekgineer/YOLOs-CPP-TensorRT)** — C++ TensorRT inference library for YOLO v5–v26\n- **[motcpp](https://github.com/Geekgineer/motcpp)** — C++ multi-object tracking (ByteTrack and others)\n- **[Ultralytics YOLO](https://github.com/ultralytics/ultralytics)** — YOLO model family\n- **[spdlog](https://github.com/gabime/spdlog)** — fast C++ logging\n- **[yaml-cpp](https://github.com/jbeder/yaml-cpp)** — YAML configuration parsing\n- **[OpenCV](https://opencv.org)** — camera capture and image I/O\n- **[Eigen](https://eigen.tuxfamily.org)** — linear algebra for the tracker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarukalamai%2Fjetson-yolo-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarukalamai%2Fjetson-yolo-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarukalamai%2Fjetson-yolo-cpp/lists"}