当前位置:网站首页>Yolov5 creates and trains its own data set to realize mask wearing detection
Yolov5 creates and trains its own data set to realize mask wearing detection
2022-07-03 10:24:00 【Shenzhen University of technology affiliated middle school open】
Yolov5 Create and train your own data sets , Realize mask wearing detection
Be careful
- Need to be ahead of time Anaconda Set up well yolov5 Environment , There is no explanation here .
Data sets
Mask identification data set download
Download this file 
After downloading, you can extract . Although mixed together , But that's okay .
Data set preprocessing
Go to Roboflow Create an account 
Add workspace 
Select public 
Create a new project 
Fill in the name casually 
Upload the data set we downloaded 


Don't worry about him 
Wait for the upload to finish 

End upload 








export 
Note that export TXT Under the YOLO v5 PyTorch This option , download zip Format .
Get ready to train
These three files are required 
train and valid Folders are placed in and yolov5 In the same directory 

modify data.yaml
0 Change it to no-mask( Don't wear a mask ),1 Change it to mask( Wear a mask )

hold data.yaml Put it in yolov5 Of data Under the folder 
Start training
stay anaconda Execute... In a virtual environment , Notice to change to your corresponding path .
python train.py --data data.yaml

End of training
Can be in yolo Find the model file after training under the path of 
Test model file
add --weights Parameters can be detected by selecting the corresponding model file .
python detect.py --weights runs/exp/weights/best.pt
Detection effect



Reference material
https://blog.csdn.net/lynxzong/article/details/86647805
https://blog.csdn.net/sinat_28371057/article/details/120598220
https://github.com/ultralytics/yolov5
https://zhuanlan.zhihu.com/p/269587479
https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
https://public.roboflow.com/
https://codeantenna.com/a/FtLN7QmRtk
http://www.jishudaxue.com/cblog/python/9489.html
https://github.com/ultralytics/yolov5/issues/5086‘
https://www.jb51.net/article/211043.htm
https://blog.csdn.net/qq_36756866/article/details/109111065
https://blog.csdn.net/HJZ11/article/details/109838775
边栏推荐
- Leetcode - 1670 design front, middle and rear queues (Design - two double ended queues)
- Toolbutton property settings
- Numpy Foundation
- What can I do to exit the current operation and confirm it twice?
- Leetcode 300 longest ascending subsequence
- 20220531数学:快乐数
- CV learning notes - camera model (Euclidean transformation and affine transformation)
- openCV+dlib实现给蒙娜丽莎换脸
- Hands on deep learning pytorch version exercise answer - 2.2 preliminary knowledge / data preprocessing
- Powshell's set location: unable to find a solution to the problem of accepting actual parameters
猜你喜欢

Model evaluation and selection

Secure in mysql8.0 under Windows_ file_ Priv is null solution

Mise en œuvre d'OpenCV + dlib pour changer le visage de Mona Lisa

Leetcode - 706 design hash mapping (Design)*

The underlying principle of vector

2.1 Dynamic programming and case study: Jack‘s car rental

Boston house price forecast (tensorflow2.9 practice)

LeetCode - 508. Sum of subtree elements with the most occurrences (traversal of binary tree)

Opencv notes 20 PCA

CV learning notes - feature extraction
随机推荐
20220602 Mathematics: Excel table column serial number
QT setting suspension button
Flutter 退出当前操作二次确认怎么做才更优雅?
20220606数学:分数到小数
2018 Lenovo y7000 black apple external display scheme
Pycharm cannot import custom package
Leetcode-106: construct a binary tree according to the sequence of middle and later traversal
Codeup: word replacement
CV learning notes alexnet
Leetcode - 706 design hash mapping (Design)*
Opencv gray histogram, histogram specification
20220604数学:x的平方根
Mise en œuvre d'OpenCV + dlib pour changer le visage de Mona Lisa
Anaconda installation package reported an error packagesnotfounderror: the following packages are not available from current channels:
LeetCode - 715. Range 模块(TreeSet) *****
20220603 Mathematics: pow (x, n)
Deep Reinforcement learning with PyTorch
Leetcode bit operation
Replace the files under the folder with sed
LeetCode - 900. RLE 迭代器