当前位置:网站首页>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
边栏推荐
- Opencv Harris corner detection
- Opencv interview guide
- 2.2 DP: Value Iteration & Gambler‘s Problem
- Leetcode-112: path sum
- Numpy Foundation
- 20220610其他:任务调度器
- [combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
- Dynamic layout management
- Leetcode - 933 number of recent requests
- Hands on deep learning pytorch version exercise solution-3.3 simple implementation of linear regression
猜你喜欢

The underlying principle of vector

LeetCode - 5 最长回文子串

CV learning notes - image filter
![[LZY learning notes dive into deep learning] 3.4 3.6 3.7 softmax principle and Implementation](/img/02/35e73a43c4ad26fee9ecf180593464.jpg)
[LZY learning notes dive into deep learning] 3.4 3.6 3.7 softmax principle and Implementation

Leetcode - 1670 conception de la file d'attente avant, moyenne et arrière (conception - deux files d'attente à double extrémité)

Leetcode - 5 longest palindrome substring

『快速入门electron』之实现窗口拖拽

Opencv+dlib to change the face of Mona Lisa

Leetcode - 933 number of recent requests
![[LZY learning notes -dive into deep learning] math preparation 2.5-2.7](/img/57/579357f1a07dbe179f355c4a80ae27.jpg)
[LZY learning notes -dive into deep learning] math preparation 2.5-2.7
随机推荐
Hands on deep learning pytorch version exercise solution - 2.5 automatic differentiation
CV learning notes - reasoning and training
Leetcode-100:相同的树
Hands on deep learning pytorch version exercise solution - 2.6 probability
Hands on deep learning pytorch version exercise solution - 2.3 linear algebra
Deep Reinforcement learning with PyTorch
Configure opencv in QT Creator
LeetCode - 933 最近的请求次数
Label Semantic Aware Pre-training for Few-shot Text Classification
Deep learning by Pytorch
Neural Network Fundamentals (1)
『快速入门electron』之实现窗口拖拽
CV learning notes - scale invariant feature transformation (SIFT)
LeetCode - 919. Full binary tree inserter (array)
1. Finite Markov Decision Process
Leetcode-100: same tree
Policy Gradient Methods of Deep Reinforcement Learning (Part Two)
Discrete-event system
[LZY learning notes -dive into deep learning] math preparation 2.5-2.7
openCV+dlib實現給蒙娜麗莎換臉