Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
acqpriwny1
Yolov5_PyTorch
Commits
871ec4ca
Commit
871ec4ca
authored
Jul 24, 2023
by
acqpriwny1
Browse files
Update README.md
parent
9a73a372
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
README.md
README.md
+5
-6
No files found.
README.md
View file @
871ec4ca
# YOLOV5_PyTorch
# YOLOV5_PyTorch
口罩检测
## 1.模型介绍
...
...
@@ -16,10 +16,6 @@ YOLOv5是一种基于深度学习的目标检测算法,它的模型结构主
更具体地说,YOLOv5的backbone采用CSPDarknet53网络结构,其中CSP表示Cross Stage Partial Network,它可以有效地减少参数量和计算量。neck采用FPN+PAN的结构,其中FPN表示Feature Pyramid Network,PAN表示Path Aggregation Network,它们可以将不同层次的特征进行融合。head采用YOLOv3中的anchor-based检测头,并在此基础上加入了SPP结构和SAM结构,以提高检测精度。loss采用GIOU Loss作为bounding box的损失,并使用二进制交叉熵和Logits损失函数计算类概率和目标得分的损失。
## 3.数据集
**一**
使用COCO2017数据集,COCO2017数据集是一个用于目标检测、分割、关键点检测和图像描述的数据集,由微软公司制作收集。该数据集包含超过33万张图像,其中大约20万张图像用于训练,6万张图像用于验证,7万张图像用于测试。COCO2017数据集中的物体类别共有80个,包括人、动物、交通工具、家具等。
COCO2017数据集中的每个物体都有一个矩形边界框和一个类别标签,同时还有一些物体的关键点标注和图像描述信息。COCO2017数据集的标注格式采用JSON文件存储,其中包含了每个物体的位置、类别、关键点等信息。
**二**
1.
数据集名称:深度学习人脸口罩数据集
2.
数据量:两个数据集,一个1600张图片,一个7056张图片
3.
标注框种类:face(人脸)、face_mask(戴口罩)、共两类
...
...
@@ -86,7 +82,7 @@ python3 -m torch.distributed.run --nproc_per_node 4 train.py --batch 128 --data
其中--nproc_per_node参数代表卡的个数,--batch参数代表global batchsize的大小

## 推理测试
## 推理测试
(以口罩检测为例)
```
python detect.py --source 0 # webcam
file.jpg # image
...
...
@@ -108,6 +104,9 @@ Image(filename='runs/detect/exp/zidane.jpg', width=600)
```
python3 val.py --data data/coco-v5.yaml --weights runs/train/exp12/weights/best.pt --device 0
```
##口罩检测
##ONNX模型单张图片推理并导出
在export.py 中的 def parse_opt()函数修改:
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment