{"id":28034873,"url":"https://github.com/bhoja1234/yolo-onnxruntime-cpp","last_synced_at":"2026-04-20T19:31:11.397Z","repository":{"id":291693191,"uuid":"978459447","full_name":"Bhoja1234/yolo-onnxruntime-cpp","owner":"Bhoja1234","description":"Cpp-based onnx deployment, supporting yolo and unsupervised models","archived":false,"fork":false,"pushed_at":"2025-05-06T03:37:35.000Z","size":23371,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T04:19:00.277Z","etag":null,"topics":["anomalib","cpp","onnx","onnxruntime","opencv","yolo"],"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/Bhoja1234.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}},"created_at":"2025-05-06T02:51:55.000Z","updated_at":"2025-05-06T03:37:38.000Z","dependencies_parsed_at":"2025-05-11T12:00:27.012Z","dependency_job_id":null,"html_url":"https://github.com/Bhoja1234/yolo-onnxruntime-cpp","commit_stats":null,"previous_names":["bhoja1234/yolo-onnxruntime-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhoja1234%2Fyolo-onnxruntime-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhoja1234%2Fyolo-onnxruntime-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhoja1234%2Fyolo-onnxruntime-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhoja1234%2Fyolo-onnxruntime-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bhoja1234","download_url":"https://codeload.github.com/Bhoja1234/yolo-onnxruntime-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253561121,"owners_count":21927767,"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":["anomalib","cpp","onnx","onnxruntime","opencv","yolo"],"created_at":"2025-05-11T12:00:24.639Z","updated_at":"2026-04-20T19:31:11.391Z","avatar_url":"https://github.com/Bhoja1234.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yolo-onnxruntime-cpp\n基于Onnxruntime的Yolo模型部署，无监督模型部署\n支持检测、分割、分类、关键点检测、无监督模型\n\n## 环境\n- Opencv 4.x\n- Onnxruntime 1.9\n- CUDA 12.5\n- OS: windows11 x64（x86不支持CUDA）\n\n## 配置\n需要配置好opencv和onnxruntime环境\n\n## 使用说明\n以检测模型为例：\n```cpp\nDetectTest(){\n    DCSP_CORE* yoloDetector = new DCSP_CORE;\n    yoloDetector-\u003eclasses = { \"person\" }; \n    DL_INIT_PARAM params;\n    params.ModelPath = \"./models/yolov8n.onnx\";\n    params.rectConfidenceThreshold = 0.5;\n    params.iouThreshold = 0.5;\n    params.imgSize = { 640, 640 };\n    params.modelType = YOLO_DETECT;\n\n    ...\n\n    yoloDetector-\u003eCreateSession(params);\n    Detector(yoloDetector);\n}\n```\n\n\n1. 指定模型检测类别：yoloDetector-\u003eclasses = { \"person\" };写几个就检测几个。例如检测模型类别0表示\"person\"，类别1表示\"bicycle\", 类别2表示\"car\"...大括号里面只写\"person\"，其他检测类别就会被过滤；大括号里面写两个字符串，就会只检测前两个。\n2. 指定模型路径：params.ModelPath\n3. 具体图片路径需要在Detector()中设置\n\n\n## 运行\n在`main(){}`中，选择自己需要的模式，运行 `源.cpp`即可，自动检测GPU，没有GPU默认使用CPU\n```cpp\nmain(){\n...\n    //DetectTest();  // 检测\n    //ClsTest();  // 分类\n    SegmentTest();  //分割\n    //KeypointTest();  // 关键点检测\n    //UnsuperviedTest();  //无监督\n...\n}\n```\n\n## 效果\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"result_img/result_det.jpg\"\u003e\u003cimg src=\"result_img/result_det.jpg\" style=\"width:40%; height:40%;\"/\u003e\u003c/a\u003e\n    \u003ca href=\"result_img/result_seg.jpg\"\u003e\u003cimg src=\"result_img/result_seg.jpg\" style=\"width:40%; height:40%;\"/\u003e\u003c/a\u003e\n    \u003ca href=\"result_img/result_keypoint.jpg\"\u003e\u003cimg src=\"result_img/result_keypoint.jpg\" style=\"width:40%; height:40%;\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhoja1234%2Fyolo-onnxruntime-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhoja1234%2Fyolo-onnxruntime-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhoja1234%2Fyolo-onnxruntime-cpp/lists"}