README.md 3.8 KB
Newer Older
Eric.Lee2021's avatar
Eric.Lee2021 已提交
1 2 3
# DpCas-Light  
### dpcas(Deep Learning Componentized Application System):深度学习组件化应用系统,为了更好更快的将已有的模型进行快速集成,实现应用。

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
4
### 第一个完整 pipeline 的 项目,本地手势交互应用 Demo,之后会推出web架构的手势交互,另外除了手势相关,我也会尝试推出其它类型或是不同行业领域的项目应用。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
5

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
6
### 虽然它才刚刚诞生,有各种不足,但是我会继续改进,努力让更多人看到它,希望它不仅仅是一个demo。
Eric.Lee2021's avatar
uodate  
Eric.Lee2021 已提交
7

Eric.Lee2021's avatar
Eric.Lee2021 已提交
8 9 10 11 12
## DpCas架构介绍(FrameWork)

![dpcas_framework](https://codechina.csdn.net/EricLee/dpcas/-/raw/master/DpCasFrameWork.png)

## 项目示例介绍
Eric.Lee2021's avatar
Eric.Lee2021 已提交
13
### 项目1:手势交互项目(local 本地版本)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
14 15 16
*  开发语言:100% python代码。
*  场景:目前demo开发的使用场景为桌面使用,相机视角为使用者上方往下照射。
*  采用python多进程实现。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
17
* 1、实现单手点击,即大拇指和食指捏合时认为点击。
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
18 19 20 21 22
* 2、实现手的轨迹跟踪,可支持动态手势二次开发(目前计划后面也会开发相应的动态手势功能)。
* 3、实现双手配合点击选中目标区域。
* 4、基于第2点的功能,支持识别架构的拓展(目前没有加任何物体识别模型,后面会加上)。
* 5、实现基于IOU的手部跟踪。
* 6、支持语音拓展功能。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
23 24 25 26 27 28 29 30 31 32 33 34 35 36

## 项目配置  
### 1、软件  
* Python 3.7  
* PyTorch >= 1.5.1  
* opencv-python
* playsound
### 2、硬件
* 普通USB彩色(RGB)网络摄像头

## 相关项目
### 1、手部检测项目(yolo_v3)
* 项目地址:https://codechina.csdn.net/EricLee/yolo_v3
* [预训练模型下载地址(百度网盘 Password: 7mk0 )](https://pan.baidu.com/s/1hqzvz0MeFX0EdpWXUV6aFg)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
37
* 另外同学们可以根据自己需求替换检测模型。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
38
### 2、手21关键点回归项目(handpose_x)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
39
* 项目地址:https://codechina.csdn.net/EricLee/handpose_x
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
40
* [预训练模型下载地址(百度网盘 Password: 99f3 )](https://pan.baidu.com/s/1Ur6Ikp31XGEuA3hQjYzwIw)
Eric.Lee2021's avatar
Eric.Lee2021 已提交
41

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
42 43
### 3、识别分类项目(classification)
* 项目地址:https://codechina.csdn.net/EricLee/classification
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
44 45
* [imagenet 1000 类识别,预训练模型下载地址(百度网盘 Password: ct31 )](https://pan.baidu.com/s/1uZsAHF6wK-LOR8j6TFABmQ)
* 另外可以根据自己的需求替换识别模型及对应的语音素材。
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
46

Eric.Lee2021's avatar
Eric.Lee2021 已提交
47 48 49 50
## 项目使用方法  
### 项目1:手势交互项目(local 本地版本)
### 1、下载手部检测模型和21关键点回归模型。
### 2、确定摄像头连接成功。
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
51
### 3、打开配置文件 lib/hand_lib/cfg/[handpose.cfg](https://codechina.csdn.net/EricLee/dpcas/-/blob/master/lib/hand_lib/cfg/handpose.cfg) 进行相关参数配置,具体配置参数如下,请仔细阅读(一般只需要配置模型路径及模型结构)
Eric.Lee2021's avatar
Eric.Lee2021 已提交
52
```
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
53
detect_model_path=./latest_416.pt #手部检测模型地址
Eric.Lee2021's avatar
Eric.Lee2021 已提交
54
detect_model_arch=yolo_v3 #检测模型类型 ,yolo  or yolo-tiny
55
yolo_anchor_scale=1.0 # yolo anchor 比例,默认为 1
Eric.Lee2021's avatar
Eric.Lee2021 已提交
56 57 58
detect_conf_thres=0.5 # 检测模型阈值
detect_nms_thres=0.45 # 检测模型 nms 阈值

Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
59
handpose_x_model_path=./ReXNetV1-size-256-wingloss102-0.1063.pth # 21点手回归模型地址
Eric.Lee2021's avatar
Eric.Lee2021 已提交
60 61
handpose_x_model_arch=rexnetv1 # 回归模型结构

62 63 64 65
classify_model_path=./imagenet_size-256_20210409.pth # 分类识别模型地址
classify_model_arch=resnet_50 # 分类识别模型结构
classify_model_classify_num=1000 # 分类类别数

Eric.Lee2021's avatar
Eric.Lee2021 已提交
66
camera_id = 0 # 相机 ID ,一般默认为0,如果不是请自行确认
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
67
vis_gesture_lines = True # True: 点击时的轨迹可视化, False:点击时的轨迹不可视化
Eric.Lee2021's avatar
Eric.Lee2021 已提交
68 69 70 71 72 73
charge_cycle_step = 32 # 点击稳定状态计数器,点击稳定充电环。
```
### 4、根目录下运行命令: python main.py

## 联系方式 (Contact)  
* E-mails: 305141918@qq.com