基于yolov5的安全帽佩戴检测

上传者: xixixixixixixi21 | 上传时间: 2022-04-29 21:06:25 | 文件大小: 3.92MB | 文件类型: ZIP
本项目中使用的预训练模型为官方提供的 yolov5m.pt 来训练数据集,另外三种模型分别为:yolov5l.pt、yolov5s.pt、yolov5x.pt。可以更换预训练模型来训练数据集。 一:下载模型 二:将模型放入weights文件夹下(实际上可以放入任何位置,只需要做相应的路径更改) 三:更改 train.py 下预训练模型的路径以及对应模型cfg配置文件的对应位置 --weights 参数的 default 更改为:例如 weights/yolov5m.pt(使用命令行运行则直接 --weights 指定即可) --cfg 参数的 default 更改为:例如对应的 models/yolov5m.yaml(使用命令行运行则直接 --cfg 指定即可) **强调一点:**cfg 官方默认的 4 个 yaml 文件的配置为 coco 数据集的 80 个识别类别。如果你更换了预训练模型,yaml 里面的参数nc也需要修改为对应你自己项目的类别个数,例如本项目中 nc: 2。 四:命令行或者直接运行 train.py 训练 2:添加数据集 可

文件下载

资源详情

[{"title":"( 64 个子文件 3.92MB ) 基于yolov5的安全帽佩戴检测","children":[{"title":"YOLOV5_safetyHat-main","children":[{"title":"models","children":[{"title":"common.py <span style='color:#111;'> 9.98KB </span>","children":null,"spread":false},{"title":"yolo.py <span style='color:#111;'> 12.03KB </span>","children":null,"spread":false},{"title":"hub","children":[{"title":"yolov3-spp.yaml <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"yolov5-fpn.yaml <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"yolov5-panet.yaml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":true},{"title":"yolov5s.yaml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"yolov5x.yaml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"yolov5l.yaml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"export.py <span style='color:#111;'> 3.64KB </span>","children":null,"spread":false},{"title":"yolov5m.yaml <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"experimental.py <span style='color:#111;'> 5.73KB </span>","children":null,"spread":false}],"spread":true},{"title":"tutorial.ipynb <span style='color:#111;'> 381.32KB </span>","children":null,"spread":false},{"title":"data","children":[{"title":"coco.yaml <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"hyp.scratch.yaml <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"makeTxt.py <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"hyp.finetune.yaml <span style='color:#111;'> 884B </span>","children":null,"spread":false},{"title":"voc_label.py <span style='color:#111;'> 2.65KB </span>","children":null,"spread":false},{"title":"detectImg","children":[{"title":"1_104619.jpg <span style='color:#111;'> 127.79KB </span>","children":null,"spread":false},{"title":"bus.jpg <span style='color:#111;'> 476.01KB </span>","children":null,"spread":false},{"title":"zidane.jpg <span style='color:#111;'> 164.99KB </span>","children":null,"spread":false},{"title":"800px-The_British_Army_in_Britain%2C_1941_H10633.jpg <span style='color:#111;'> 74.21KB </span>","children":null,"spread":false},{"title":"4db.jpg <span style='color:#111;'> 155.45KB </span>","children":null,"spread":false},{"title":"328px-Sargent_-_Lord_Ribblesdale.jpg <span style='color:#111;'> 30.50KB </span>","children":null,"spread":false},{"title":"2015-08-12-1439398113-7421601-article001BBBA7A000004B0163_468x371.jpg <span style='color:#111;'> 35.26KB </span>","children":null,"spread":false},{"title":"55bb8a_b3aaf8276abb431e8a765c4fd30e74ea~mv2_d_2690_1793_s_2.jpg <span style='color:#111;'> 2.51MB </span>","children":null,"spread":false}],"spread":true},{"title":"voc.yaml <span style='color:#111;'> 756B </span>","children":null,"spread":false},{"title":"labels.cache <span style='color:#111;'> 43.17KB </span>","children":null,"spread":false},{"title":"coco128.yaml <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"hatPerson.yaml <span style='color:#111;'> 846B </span>","children":null,"spread":false},{"title":"scripts","children":[{"title":"get_coco.sh <span style='color:#111;'> 959B </span>","children":null,"spread":false},{"title":"get_voc.sh <span style='color:#111;'> 4.42KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"test.py <span style='color:#111;'> 15.54KB </span>","children":null,"spread":false},{"title":".github","children":[{"title":"ISSUE_TEMPLATE","children":[{"title":"feature-request.md <span style='color:#111;'> 737B </span>","children":null,"spread":false},{"title":"bug-report.md <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"question.md <span style='color:#111;'> 140B </span>","children":null,"spread":false}],"spread":true},{"title":"workflows","children":[{"title":"rebase.yml <span style='color:#111;'> 542B </span>","children":null,"spread":false},{"title":"greetings.yml <span style='color:#111;'> 4.40KB </span>","children":null,"spread":false},{"title":"ci-testing.yml <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"stale.yml <span style='color:#111;'> 852B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"train.py <span style='color:#111;'> 29.37KB </span>","children":null,"spread":false},{"title":"Dockerfile <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 34.30KB </span>","children":null,"spread":false},{"title":"detect.py <span style='color:#111;'> 7.88KB </span>","children":null,"spread":false},{"title":"requirements.txt <span style='color:#111;'> 598B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 3.88KB </span>","children":null,"spread":false},{"title":".dockerignore <span style='color:#111;'> 3.53KB </span>","children":null,"spread":false},{"title":"weights","children":[{"title":"download_weights.sh <span style='color:#111;'> 228B </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 5.34KB </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"loss.py <span style='color:#111;'> 8.24KB </span>","children":null,"spread":false},{"title":"plots.py <span style='color:#111;'> 15.58KB </span>","children":null,"spread":false},{"title":"metrics.py <span style='color:#111;'> 7.85KB </span>","children":null,"spread":false},{"title":"general.py <span style='color:#111;'> 17.77KB </span>","children":null,"spread":false},{"title":"datasets.py <span style='color:#111;'> 37.10KB </span>","children":null,"spread":false},{"title":"activations.py <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"autoanchor.py <span style='color:#111;'> 6.55KB </span>","children":null,"spread":false},{"title":"torch_utils.py <span style='color:#111;'> 9.38KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"google_app_engine","children":[{"title":"additional_requirements.txt <span style='color:#111;'> 105B </span>","children":null,"spread":false},{"title":"Dockerfile <span style='color:#111;'> 821B </span>","children":null,"spread":false},{"title":"app.yaml <span style='color:#111;'> 173B </span>","children":null,"spread":false}],"spread":false},{"title":"google_utils.py <span style='color:#111;'> 4.87KB </span>","children":null,"spread":false}],"spread":false},{"title":"hubconf.py <span style='color:#111;'> 3.90KB </span>","children":null,"spread":false},{"title":".gitattributes <span style='color:#111;'> 75B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明