README.md 5.0 KB
Newer Older
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
1
# YOLO V3
Eric.Lee2021's avatar
Eric.Lee2021 已提交
2
物体检测,包括手部检测、人脸检测、人检测、安全帽检测,因为数据集的独立所以分别为4个独立模型。  
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
3

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
4 5 6
## 项目介绍    
### 1、手部检测  
手部检测示例如下 :    
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
7 8 9 10 11
* 图片示例:  
![image](https://codechina.csdn.net/EricLee/yolo_v3/-/raw/master/samples/sample.png)    
* 视频示例:  
![video](https://codechina.csdn.net/EricLee/yolo_v3/-/raw/master/samples/sample.gif)    

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
12 13 14 15 16
### 2、脸部检测  
脸部检测示例如下 :     
* 视频示例:    
![videoface](https://codechina.csdn.net/EricLee/yolo_v3/-/raw/master/samples/face.gif)    

Eric.Lee2021's avatar
Eric.Lee2021 已提交
17
### 3、人检测  
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
18 19 20
人检测示例如下 :      
* 视频示例:     
![videoPerson](https://codechina.csdn.net/EricLee/yolo_v3/-/raw/master/samples/person.gif)      
Eric.Lee2021's avatar
Eric.Lee2021 已提交
21

Eric.Lee2021's avatar
Eric.Lee2021 已提交
22 23
### 4、安全帽检测    
安全帽检测示例如下 :      
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
24 25
* 视频示例:   
![videoHat](https://codechina.csdn.net/EricLee/yolo_v3/-/raw/master/samples/hat.gif)      
Eric.Lee2021's avatar
Eric.Lee2021 已提交
26

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
27 28 29 30 31
### 5、交通工具检测
包括:bicycle,car,motorcycle,airplane,bus,train,truck,boat     
安全帽检测示例如下 :      
* 视频示例:  
![auto](https://codechina.csdn.net/EricLee/yolo_v3/-/raw/master/samples/auto.gif)    
Eric.Lee2021's avatar
Eric.Lee2021 已提交
32

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
33 34 35 36 37 38
## 项目配置  
* 作者开发环境:  
* Python 3.7  
* PyTorch >= 1.5.1  

## 数据集   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
39
### 1、手部检测数据集   
Eric.Lee2021's avatar
Eric.Lee2021 已提交
40
该项目数据集采用 TV-Hand 和 COCO-Hand (COCO-Hand-Big 部分) 进行制作。  
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
41 42 43 44 45 46
TV-Hand 和 COCO-Hand数据集官网地址 http://vision.cs.stonybrook.edu/~supreeth/      
感谢数据集贡献者。    
Paper:  
Contextual Attention for Hand Detection in the Wild. S. Narasimhaswamy, Z. Wei, Y. Wang, J. Zhang, and M. Hoai, IEEE International Conference on Computer Vision, ICCV 2019.   

* [该项目制作的训练集的数据集下载地址(百度网盘 Password: c680 )](https://pan.baidu.com/s/1H0YH8jMEXeIcubLEv0W_yw)   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
47 48

### 2、脸部检测数据集   
Eric.Lee2021's avatar
Eric.Lee2021 已提交
49
该项目采用的是开源数据集 WIDERFACE,其地址为 http://shuoyang1213.me/WIDERFACE/  
Eric.Lee2021's avatar
Eric.Lee2021 已提交
50 51
```  
@inproceedings{yang2016wider,
Eric.Lee2021's avatar
Eric.Lee2021 已提交
52 53 54 55
Author = {Yang, Shuo and Luo, Ping and Loy, Chen Change and Tang, Xiaoou},
Booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
Title = {WIDER FACE: A Face Detection Benchmark},
Year = {2016}}
Eric.Lee2021's avatar
Eric.Lee2021 已提交
56 57
```  
* [该项目制作的训练集的数据集下载地址(百度网盘 Password: r77x )](https://pan.baidu.com/s/1Jsm1qPPzAW46LRW5nUClzQ)   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
58

Eric.Lee2021's avatar
Eric.Lee2021 已提交
59
### 3、人检测数据集     
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
60
该项目采用的是开源数据集 COCO ,其地址为 https://cocodataset.org/   
Eric.Lee2021's avatar
Eric.Lee2021 已提交
61
* [该项目制作的训练集的数据集下载地址(百度网盘 Password: ilv9 )](https://pan.baidu.com/s/1Y1LA8Coc902zrDgmVqAU3A)      
Eric.Lee2021's avatar
Eric.Lee2021 已提交
62

Eric.Lee2021's avatar
Eric.Lee2021 已提交
63 64 65 66
### 4、安全帽检测数据集     
该项目采用的是数据集 VOC2028 ,其地址为 https://github.com/njvisionpower/Safety-Helmet-Wearing-Dataset     
* [该项目制作的训练集的数据集下载地址(百度网盘 Password: y694 )](https://pan.baidu.com/s/1m1ysN5r0wYlIUY6FW1XkHg)      

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
### 5、交通工具数据集  
该项目采用的是开源数据集 COCO ,其地址为 https://cocodataset.org/   
* [该项目制作的训练集的数据集下载地址(百度网盘 Password:  )]()    
  该项目制作数据集类型及对应的实例数量如下所示:  
```
  bicycle : 4955
  car : 30785
  motorcycle : 6021
  airplane : 3833
  bus : 4327
  train : 3159
  truck : 7050
  boat : 7590
```

Eric.Lee2021's avatar
Eric.Lee2021 已提交
82 83
### 数据格式  
size是全图分辨率, (x,y) 是目标物体中心对于全图的归一化坐标,w,h是目标物体边界框对于全图的归一化宽、高。   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
84

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
85 86 87 88 89 90 91 92 93 94 95 96
```  
dw = 1./(size[0])  
dh = 1./(size[1])  
x = (box[0] + box[1])/2.0 - 1  
y = (box[2] + box[3])/2.0 - 1  
w = box[1] - box[0]  
h = box[3] - box[2]  
x = x*dw  
w = w*dw  
y = y*dh  
h = h*dh  
```  
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
97

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
98 99 100 101
为了更好了解标注数据格式,可以通过运行 show_yolo_anno.py 脚本进行制作数据集的格式。注意配置脚本里的path和path_voc_names,path为标注数据集的相关文件路径,path_voc_names为数据集配置文件。


## 预训练模型   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
102
### 1、手部检测预训练模型    
103
* 包括yolo预训练模型图像输入尺寸416,yolo-tiny预训练模型图像输入尺寸为512。  
Eric.Lee2021's avatar
Eric.Lee2021 已提交
104
* [预训练模型下载地址(百度网盘 Password: 7mk0 )](https://pan.baidu.com/s/1hqzvz0MeFX0EdpWXUV6aFg)     
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
105

Eric.Lee2021's avatar
Eric.Lee2021 已提交
106 107 108
### 2、脸部检测预训练模型    
* [预训练模型下载地址(百度网盘 Password: l2a3 )](https://pan.baidu.com/s/1xVtZUMD94DiT9FQQ66xG1A)     

Eric.Lee2021's avatar
Eric.Lee2021 已提交
109 110 111
### 3、人检测预训练模型    
* [预训练模型下载地址(百度网盘 Password: ise9 )](https://pan.baidu.com/s/1mxiI-tOpE3sU-9TVPJmPWw)     

Eric.Lee2021's avatar
Eric.Lee2021 已提交
112
### 4、安全帽检测预训练模型    
Eric.Lee2021's avatar
Eric.Lee2021 已提交
113
* [预训练模型下载地址(百度网盘 Password: inu8 )](https://pan.baidu.com/s/1rWUEsPnOTdmfJW4xM8m3Eg)     
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
114

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
115
## 项目使用方法     
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
116

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
117 118
### 数据集可视化    
* 根目录下运行命令: show_yolo_anno.py   (注意脚本内相关参数配置 )   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
119

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
120 121
### 模型训练     
* 根目录下运行命令: python train.py     (注意脚本内相关参数配置 )   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
122

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
123
### 模型推理    
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
124
* 根目录下运行命令: python predict.py   (注意脚本内相关参数配置  )