{"id":13918156,"url":"https://github.com/emptysoal/TensorRT-YOLOv8-ByteTrack","last_synced_at":"2025-07-18T17:31:09.364Z","repository":{"id":203275544,"uuid":"709224877","full_name":"emptysoal/TensorRT-YOLOv8-ByteTrack","owner":"emptysoal","description":"An object tracking project with YOLOv8 and ByteTrack, speed up by C++ and TensorRT.","archived":false,"fork":false,"pushed_at":"2025-07-08T01:35:09.000Z","size":47514,"stargazers_count":187,"open_issues_count":2,"forks_count":26,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-08T03:08:41.326Z","etag":null,"topics":["bytetracker","object-detector","object-tracking","tensorrt","yolov8"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emptysoal.png","metadata":{"files":{"readme":"README-en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-10-24T09:28:36.000Z","updated_at":"2025-07-08T01:35:13.000Z","dependencies_parsed_at":"2024-08-28T09:37:02.288Z","dependency_job_id":"0bbdd692-c6af-424d-b6ac-8ae4440edce8","html_url":"https://github.com/emptysoal/TensorRT-YOLOv8-ByteTrack","commit_stats":null,"previous_names":["emptysoal/tensorrt-yolov8-bytetrack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emptysoal/TensorRT-YOLOv8-ByteTrack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptysoal%2FTensorRT-YOLOv8-ByteTrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptysoal%2FTensorRT-YOLOv8-ByteTrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptysoal%2FTensorRT-YOLOv8-ByteTrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptysoal%2FTensorRT-YOLOv8-ByteTrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emptysoal","download_url":"https://codeload.github.com/emptysoal/TensorRT-YOLOv8-ByteTrack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emptysoal%2FTensorRT-YOLOv8-ByteTrack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265801655,"owners_count":23830451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bytetracker","object-detector","object-tracking","tensorrt","yolov8"],"created_at":"2024-08-07T05:01:15.686Z","updated_at":"2025-07-18T17:31:07.629Z","avatar_url":"https://github.com/emptysoal.png","language":"C++","readme":"# TensorRT C++ api deploy YOLOv8 + ByteTrack\n\n- My other TensorRT project of YOLOv8 tasks: [YOLOv8 detection, key points, segmentation, tracking](https://github.com/emptysoal/TensorRT-YOLOv8)\n\n## Introduction\n\n- Based on `TensorRT-v8` , deploy `YOLOv8` + `ByteTrack` ;\n\n-  Support `Jetson` series, also `Linux x86_64`;\n\nMain work I have done:\n\n1. Refer to [tensorrtx](https://github.com/wang-xinyu/tensorrtx/tree/master/yolov8) ，model:  `.pth` -\u003e `.engine`,extract the inference part of the code, encapsulated into C++ classes, easy to call other projects ;\n2. Preprocessing replaced with my own CUDA programming preprocessing;\n3. Post-processing removed CUDA programming because it was not significantly faster in tests compared to CPU post-processing ;\n4. The post-processed NMS greatly reduces conf_thres hyperparameters due to the principle of `ByteTrack` tracking, which is very important ;\n5. `YOLOv8` inference compiles to a dynamic link library to decouple projects;\n6. Reference official [ByteTrack TensorRT deploy](https://github.com/ifzhang/ByteTrack/tree/main/deploy/TensorRT/cpp) , modify its interface to the `YOLO` detector;\n7. `ByteTrack` also compiles to a dynamic link library, further decoupling projects;\n8. Add category filtering function, you can set the category you want to track in `main.cpp` line 8 .\n\n## Effect\n\n![](./assets/effect.gif)\n\n# Environment\n\n1. Base requirements：\n\n- `TensorRT 8.0+`\n- `OpenCV 3.4.0+`\n\n2. My running environment on `Jetson Nano` is as follows:\n\n- The burned system image is `Jetpack 4.6.1`，original environment is as follows：\n\n| CUDA | cuDNN | TensorRT | OpenCV |\n| ---- | ----- | -------- | ------ |\n| 10.2 | 8.2   | 8.2.1    | 4.1.1  |\n\n- Install Eigen\n\n```bash\napt install libeigen3-dev\n```\n\n## Model conversion\n\nGet the serialized file of TensorRT, suffix.engine\n\n- First get the wts format model file, link: [yolov8s.wts](https://pan.baidu.com/s/16d_MqVlUxnjOhLxVyjQy8w) , code：gsqm\n- Then follow these steps:\n\n```bash\ncd {TensorRT-YOLOv8-ByteTrack}/tensorrtx-yolov8/\nmkdir build\ncd build\ncp {path/to/yolov8s.wts} .\ncmake ..\nmake\n./yolov8 -s yolov8s.wts yolov8s.engine s\n\ncd ../../\nmkdir yolo/engine\ncp tensorrtx-yolov8/build/yolov8s.engine yolo/engine\n```\n\n## Run tracking\n\n- Follow these steps\n\n```bash\nmkdir build\ncd build\ncmake ..\nmake\n./main ../videos/demo.mp4  # The path to your own video\n```\n\nThen the `result.mp4` will be in the build directory, is to track the effect of the video file \n\nIf you want the tracked video to play in real time, you can uncomment line 94 of main.cpp. \n\n# Reference\n\n- [tensorrtx](https://github.com/wang-xinyu/tensorrtx/tree/master/yolov8)\n\n- [ByteTrack](https://github.com/ifzhang/ByteTrack)\n\n","funding_links":[],"categories":["Lighter and Deployment Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptysoal%2FTensorRT-YOLOv8-ByteTrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femptysoal%2FTensorRT-YOLOv8-ByteTrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptysoal%2FTensorRT-YOLOv8-ByteTrack/lists"}