{"id":13641631,"url":"https://github.com/hpc203/yolov5-dnn-cpp-python","last_synced_at":"2025-04-20T11:31:25.946Z","repository":{"id":37281231,"uuid":"330319635","full_name":"hpc203/yolov5-dnn-cpp-python","owner":"hpc203","description":"用opencv的dnn模块做yolov5目标检测，包含C++和Python两个版本的程序","archived":false,"fork":false,"pushed_at":"2022-02-26T14:50:46.000Z","size":953,"stargazers_count":504,"open_issues_count":25,"forks_count":122,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-08-03T01:24:06.651Z","etag":null,"topics":["opencv","opencv-dnn","yolov5"],"latest_commit_sha":null,"homepage":"","language":"Python","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/hpc203.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}},"created_at":"2021-01-17T05:13:57.000Z","updated_at":"2024-07-28T08:40:55.000Z","dependencies_parsed_at":"2022-07-12T10:02:38.666Z","dependency_job_id":null,"html_url":"https://github.com/hpc203/yolov5-dnn-cpp-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpc203%2Fyolov5-dnn-cpp-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpc203%2Fyolov5-dnn-cpp-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpc203%2Fyolov5-dnn-cpp-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpc203%2Fyolov5-dnn-cpp-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hpc203","download_url":"https://codeload.github.com/hpc203/yolov5-dnn-cpp-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223827489,"owners_count":17209796,"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":["opencv","opencv-dnn","yolov5"],"created_at":"2024-08-02T01:01:22.474Z","updated_at":"2024-11-09T12:30:35.668Z","avatar_url":"https://github.com/hpc203.png","language":"Python","funding_links":[],"categories":["Other Versions of YOLO"],"sub_categories":[],"readme":"# yolov5-dnn-cpp-py\nyolov5s,yolov5l,yolov5m,yolov5x的onnx文件在百度云盘下载，\n链接：https://pan.baidu.com/s/1d67LUlOoPFQy0MV39gpJiw \n提取码：bayj \n\npython版本的主程序是main_yolov5.py，C++版本的主程序是main_yolo.cpp\n\n运行整套程序只需要安装opencv库(4.0以上版本的)，彻底摆脱对深度学习框架的依赖\n\n如果你想运行生成onnx文件的程序，那么就cd到convert-onnx文件夹，在百度云盘下载yolov5s,yolov5l,yolov5m,yolov5x的.pth文件放在该目录里，\n百度云盘链接: https://pan.baidu.com/s/1oIdwpp6kuasANMInTpHnrw  密码: m3n1\n\n这4个pth文件是从https://github.com/ultralytics/yolov5  的pth文件里抽取出参数，保存到顺序字典OrderedDict里，最后生成新的pth文件\n在convert-onnx文件夹里，我把4种yolov5的网络结构全都定义在.py文件里，这样便于读者直观的了解网络结构以及层与层的连接关系。\n下载完成pth文件后，运行convert_onnx.py就可以生成.onnx文件，这个程序需要依赖pytorch1.7.0框架，如果pytorch版本低了，程序运行会报错。\n因为在yolov5里有新的激活函数，旧版本pytorch可能不支持的\n\n在编写这套程序时，遇到的bug和解决办法，可以阅读我的csdn博客\nhttps://blog.csdn.net/nihate/article/details/112731327\n\n\n2022年2月26日，看到https://github.com/ultralytics/yolov5 在最近更新的v6.1版本的，\n我编写了分别使用OpenCV、ONNXRuntime部署yolov5-v6.1目标检测，包含C++和Python两个版本的程序。\n源码地址是： https://github.com/hpc203/yolov5-v6.1-opencv-onnxrun\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpc203%2Fyolov5-dnn-cpp-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpc203%2Fyolov5-dnn-cpp-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpc203%2Fyolov5-dnn-cpp-python/lists"}