README.md 2.0 KB
Newer Older
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
1
# YOLO V3
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
手部检测  

## 项目介绍   
注意:该项目使用yolo v3 进行手部检测。   
示例如下 :    
* 图片示例:  
![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)    

## 项目配置  
* 作者开发环境:  
* Python 3.7  
* PyTorch >= 1.5.1  

## 数据集   
Eric.Lee2021's avatar
Eric.Lee2021 已提交
18 19
该项目数据集采用 TV-Hand 和 COCO-Hand (COCO-Hand-Big 部分) 进行制作。  
* [数据集下载地址(百度网盘 Password: c680 )](https://pan.baidu.com/s/1H0YH8jMEXeIcubLEv0W_yw)  
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
20
数据格式: size是全图分辨率, (x,y) 是目标物体中心对于全图的归一化坐标,w,h是目标物体边界框对于全图的归一化宽、高。
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
21

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
22 23 24 25 26 27 28 29 30 31 32 33
```  
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 已提交
34

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

Eric.Lee2021's avatar
Eric.Lee2021 已提交
37
TV-Hand 和 COCO-Hand数据集官网地址 http://vision.cs.stonybrook.edu/~supreeth/      
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
38 39 40 41 42
感谢数据集贡献者。    
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.   

## 预训练模型   
Eric.Lee2021's avatar
Eric.Lee2021 已提交
43
* [预训练模型下载地址(百度网盘 Password: 7mk0 )](https://pan.baidu.com/s/1hqzvz0MeFX0EdpWXUV6aFg)     
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
44

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

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

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

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