{"id":13439091,"url":"https://github.com/enazoe/yolo-tensorrt","last_synced_at":"2025-05-16T03:03:16.583Z","repository":{"id":37439965,"uuid":"231042905","full_name":"enazoe/yolo-tensorrt","owner":"enazoe","description":"TensorRT8.Support Yolov5n,s,m,l,x .darknet -\u003e tensorrt.  Yolov4  Yolov3 use raw darknet *.weights and *.cfg fils.  If the wrapper is useful to you,please Star it.","archived":false,"fork":false,"pushed_at":"2023-03-09T01:06:24.000Z","size":684,"stargazers_count":1196,"open_issues_count":101,"forks_count":315,"subscribers_count":31,"default_branch":"TRT8","last_synced_at":"2025-04-08T13:08:47.890Z","etag":null,"topics":["darknet","jetson","jetson-xavier-nx","l4t","weights","yolo-tensorrt","yolov3","yolov3-tiny","yolov4","yolov4-tiny","yolov5","yolov5l","yolov5m","yolov5s","yolov5x"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"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/enazoe.png","metadata":{"files":{"readme":"README.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}},"created_at":"2019-12-31T06:57:43.000Z","updated_at":"2025-03-28T08:56:48.000Z","dependencies_parsed_at":"2022-07-12T16:18:00.707Z","dependency_job_id":"0d374515-2245-438f-94ea-4ee5d6d549c2","html_url":"https://github.com/enazoe/yolo-tensorrt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enazoe%2Fyolo-tensorrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enazoe%2Fyolo-tensorrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enazoe%2Fyolo-tensorrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enazoe%2Fyolo-tensorrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enazoe","download_url":"https://codeload.github.com/enazoe/yolo-tensorrt/tar.gz/refs/heads/TRT8","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459083,"owners_count":22074604,"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":["darknet","jetson","jetson-xavier-nx","l4t","weights","yolo-tensorrt","yolov3","yolov3-tiny","yolov4","yolov4-tiny","yolov5","yolov5l","yolov5m","yolov5s","yolov5x"],"created_at":"2024-07-31T03:01:11.052Z","updated_at":"2025-05-16T03:03:11.574Z","avatar_url":"https://github.com/enazoe.png","language":"C++","funding_links":[],"categories":["C++","Lighter and Deployment Frameworks","Applications"],"sub_categories":[],"readme":"# Yolov5 Yolov4 Yolov3 TensorRT Implementation\n\n![GitHub stars](https://img.shields.io/github/stars/enazoe/yolo-tensorrt) ![GitHub forks](https://img.shields.io/github/forks/enazoe/yolo-tensorrt)  ![GitHub watchers](https://img.shields.io/github/watchers/enazoe/yolo-tensorrt)  [![Gitter](https://badges.gitter.im/yolo-tensorrt/community.svg)](https://gitter.im/yolo-tensorrt/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n__news:__ 2021.10.31:yolov5-v6.0 support\n\n![](./configs/result.jpg)\n## INTRODUCTION\n\nThe project is the encapsulation  of nvidia official yolo-tensorrt [implementation](https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps). And you must have the trained yolo model(__.weights__) and __.cfg__ file from the darknet (yolov3 \u0026 yolov4). For the [yolov5](https://github.com/ultralytics/yolov5) ,you should prepare the model file (yolov5s.yaml) and the trained weight file (yolov5s.pt) from pytorch.\n\n![](./configs/yolo-trt.png)\n\n- [x] yolov5n ,yolov5s , yolov5m , yolov5l , yolov5x ,yolov5-p6 [tutorial](yolov5_tutorial.md)\n- [x] yolov4 \n- [x] yolov3 \n\n## Features\n\n- [x] inequal net width and height\n- [x] batch inference\n- [x] support FP32,FP16,INT8\n- [ ] dynamic input size\n\n\n## PLATFORM \u0026 BENCHMARK\n\n- [x] windows 10\n- [x] ubuntu 18.04\n- [x] L4T (Jetson platform)\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eBENCHMARK\u003c/b\u003e\u003c/summary\u003e\n\n#### x86 (inference time)\n\n\n|  model  |  size   |  gpu   | fp32 | fp16 | INT8 |\n| :-----: | :-----: | :----: | :--: | :--: | :--: |\n| yolov5s | 640x640 | 1080ti | 8ms  |  /   | 7ms  |\n| yolov5m | 640x640 | 1080ti | 13ms |  /   | 11ms |\n| yolov5l | 640x640 | 1080ti | 20ms |  /   | 15ms |\n| yolov5x | 640x640 | 1080ti | 30ms |  /   | 23ms |\n#### Jetson NX with Jetpack4.4.1 (inference / detect time)\n\n|      model      |      size      |  gpu   | fp32 | fp16 | INT8 |\n| :-------------: | :----: | :--: | :--: | :--: | :--: |\n| yolov3 | 416x416 | nx | 105ms/120ms |  30ms/48ms  | 20ms/35ms |\n| yolov3-tiny | 416x416 | nx | 14ms/23ms  |  8ms/15ms   | 12ms/19ms  |\n| yolov4-tiny | 416x416 | nx | 13ms/23ms  |  7ms/16ms   | 7ms/15ms  |\n| yolov4 | 416x416 | nx | 111ms/125ms  |  55ms/65ms  | 47ms/57ms  |\n| yolov5s | 416x416 | nx | 47ms/88ms |  33ms/74ms   | 28ms/64ms |\n|   yolov5m   | 416x416 | nx | 110ms/145ms |  63ms/101ms   | 49ms/91ms |\n| yolov5l | 416x416 | nx | 205ms/242ms |  95ms/123ms   | 76ms/118ms |\n| yolov5x | 416x416 | nx | 351ms/405ms |  151ms/183ms   | 114ms/149ms |\n\n\n### ubuntu \n|      model      |      size      |  gpu   | fp32 | fp16 | INT8 |\n| :-------------: | :----: | :--: | :--: | :--: | :--: |\n| yolov4 | 416x416 | titanv | 11ms/17ms  |  8ms/15ms  | 7ms/14ms  |\n| yolov5s | 416x416 | titanv | 7ms/22ms |  5ms/20ms   | 5ms/18ms |\n|   yolov5m   | 416x416 | titanv | 9ms/23ms |  8ms/22ms   | 7ms/21ms |\n| yolov5l | 416x416 | titanv | 17ms/28ms |  11ms/23ms   | 11ms/24ms |\n| yolov5x | 416x416 | titanv | 25ms/40ms |  15ms/27ms   | 15ms/27ms |\n\u003c/details\u003e\n\n## WRAPPER\n\nPrepare the pretrained __.weights__ and __.cfg__ model. \n\n```c++\nDetector detector;\nConfig config;\n\nstd::vector\u003cBatchResult\u003e res;\ndetector.detect(vec_image, res)\n```\n\n## Build and use yolo-trt as DLL or SO libraries\n\n\n### windows10\n\n- dependency : TensorRT 7.1.3.4  , cuda 11.0 , cudnn 8.0  , opencv4 , vs2015\n- build:\n  \n    open MSVC _sln/sln.sln_ file \n    - dll project : the trt yolo detector dll\n    - demo project : test of the dll\n\n### ubuntu \u0026 L4T (jetson)\n\nThe project generate the __libdetector.so__ lib, and the sample code.\n**_If you want to use the libdetector.so lib in your own project,this [cmake file](https://github.com/enazoe/yolo-tensorrt/blob/master/scripts/CMakeLists.txt) perhaps could help you ._**\n\n\n```bash\ngit clone https://github.com/enazoe/yolo-tensorrt.git\ncd yolo-tensorrt/\nmkdir build\ncd build/\ncmake ..\nmake\n./yolo-trt\n```\n## API\n\n```c++\nstruct Config\n{\n\tstd::string file_model_cfg = \"configs/yolov4.cfg\";\n\n\tstd::string file_model_weights = \"configs/yolov4.weights\";\n\n\tfloat detect_thresh = 0.9;\n\n\tModelType net_type = YOLOV4;\n\n\tPrecision inference_precison = INT8;\n\t\n\tint gpu_id = 0;\n\n\tstd::string calibration_image_list_file_txt = \"configs/calibration_images.txt\";\n\n};\n\nclass API Detector\n{\npublic:\n\texplicit Detector();\n\t~Detector();\n\n\tvoid init(const Config \u0026config);\n\n\tvoid detect(const std::vector\u003ccv::Mat\u003e \u0026mat_image,std::vector\u003cBatchResult\u003e \u0026vec_batch_result);\n\nprivate:\n\tDetector(const Detector \u0026);\n\tconst Detector \u0026operator =(const Detector \u0026);\n\tclass Impl;\n\tImpl *_impl;\n};\n```\n\n## REFERENCE\n\n- https://github.com/wang-xinyu/tensorrtx/tree/master/yolov4\n- https://github.com/mj8ac/trt-yolo-app_win64\n- https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps\n\n## Contact\n\n微信关注公众号EigenVison，回复yolo获取交流群号\n\n\n\n![](./configs/qrcode.jpeg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenazoe%2Fyolo-tensorrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenazoe%2Fyolo-tensorrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenazoe%2Fyolo-tensorrt/lists"}