README.md 2.6 KB
Newer Older
E
Eric.Lee 已提交
1
# HandPose X  
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
2
手势 21 个关键点检测  
E
Eric.Lee 已提交
3

E
Eric.Lee 已提交
4
## 项目介绍   
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
5
注意:该项目不包括手部检测部分,手部检测项目地址:https://codechina.csdn.net/EricLee/yolo_v3   
E
update  
Eric.Lee 已提交
6
该项目是对手的21个关键点进行检测,示例如下 :    
E
Eric.Lee 已提交
7
* 图片示例:  
E
Eric.Lee 已提交
8
![image](https://codechina.csdn.net/weixin_42140236/handpose_x/-/raw/master/samples/test.png)    
E
Eric.Lee 已提交
9 10
* 视频示例:  
![video](https://codechina.csdn.net/weixin_42140236/handpose_x/-/raw/master/samples/sample.gif)    
E
update  
Eric.Lee 已提交
11

E
Eric.Lee 已提交
12
## 项目配置  
E
update  
Eric.Lee 已提交
13
* 作者开发环境:  
E
Eric.Lee 已提交
14 15 16
* Python 3.7  
* PyTorch >= 1.5.1  

E
Eric.Lee 已提交
17
## 数据集   
E
Eric.Lee 已提交
18
该数据集包括网络图片及数据集<<Large-scale Multiview 3D Hand Pose Dataset>>筛选动作重复度低的部分图片,进行制作(如有侵权请联系删除),共49062个样本。         
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
19
<<Large-scale Multiview 3D Hand Pose Dataset>>数据集,其官网地址 http://www.rovit.ua.es/dataset/mhpdataset/       
E
Eric.Lee 已提交
20
感谢《Large-scale Multiview 3D Hand Pose Dataset》数据集贡献者:Francisco Gomez-Donoso, Sergio Orts-Escolano, and Miguel Cazorla. "Large-scale Multiview 3D Hand Pose Dataset". ArXiv e-prints 1707.03742, July 2017.    
E
Eric.Lee 已提交
21

E
Eric.Lee 已提交
22 23 24
* 标注文件示例:   
![label](https://codechina.csdn.net/weixin_42140236/handpose_x/-/raw/master/samples/label.png)   

Eric.Lee2021's avatar
Eric.Lee2021 已提交
25
* [数据集下载地址(百度网盘 Password: ara8 )](https://pan.baidu.com/s/1KY7lAFXBTfrFHlApxTY8NA)  
E
Eric.Lee 已提交
26
* 如果使用该数据集并发布相关项目或网络资源文章等,请讲述其数据集的出处 "https://codechina.csdn.net/EricLee/handpose_x"    
E
Eric.Lee 已提交
27
* 数据集读取脚本为:read_datasets.py,并需要相应更改脚本中的数据集路径。  
E
Eric.Lee 已提交
28

E
Eric.Lee 已提交
29 30

## 预训练模型  
Eric.Lee2021's avatar
Eric.Lee2021 已提交
31
* [预训练模型下载地址(百度网盘 Password: 99f3 )](https://pan.baidu.com/s/1Ur6Ikp31XGEuA3hQjYzwIw)     
E
Eric.Lee 已提交
32 33 34

## 项目使用方法  
### 模型训练  
Eric.Lee2021's avatar
Eric.Lee2021 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
* 根目录下运行命令: python train.py       (注意脚本内相关参数配置 )   

### 模型推理  
* 根目录下运行命令: python inference.py        (注意脚本内相关参数配置 )   

*-------------------------------------------------------------------------   
···
*建议  
检测手bbox后,crop手图片size预处理方式:  
  # img 为原图  ,np为numpy
  x_min,y_min,x_max,y_max,score = bbox  
  w_ = max(abs(x_max-x_min),abs(y_max-y_min))  

  w_ = w_*1.1  

  x_mid = (x_max+x_min)/2  
  y_mid = (y_max+y_min)/2  

  x1,y1,x2,y2 = int(x_mid-w_/2),int(y_mid-w_/2),int(x_mid+w_/2),int(y_mid+w_/2)  

  x1 = np.clip(x1,0,img.shape[1]-1)  
  x2 = np.clip(x2,0,img.shape[1]-1)  

  y1 = np.clip(y1,0,img.shape[0]-1)  
  y2 = np.clip(y2,0,img.shape[0]-1)  
···