README.md 4.2 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
## DpCas架构介绍(FrameWork)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
9
### DpCas FrameWork
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
10
* DpCas的FrameWork如下图所示:
Eric.Lee2021's avatar
Eric.Lee2021 已提交
11
![dpcas_framework](https://codechina.csdn.net/EricLee/dpcas/-/raw/master/DpCasFrameWork.png)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
12
### xxx_lib(应用支持库)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
13 14
* 具体应用对应的支持库,包括3部分如下图所示:
![dpcas_framework](https://codechina.csdn.net/EricLee/dpcas/-/raw/master/xxx_lib.png)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
15 16
### Application(应用 pipeline)
* 具体应用模块,则是基于项目业务设计的pipeline的具体实现,以业务流为指导,去调用应用支持库(xxx_lib)和 算法组件(components)。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
17
## 项目示例介绍
Eric.Lee2021's avatar
Eric.Lee2021 已提交
18
### 项目1:手势交互项目(local 本地版本)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
19 20 21
*  开发语言:100% python代码。
*  场景:目前demo开发的使用场景为桌面使用,相机视角为使用者上方往下照射。
*  采用python多进程实现。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
22
* 1、实现单手点击,即大拇指和食指捏合时认为点击。
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
23 24 25 26 27
* 2、实现手的轨迹跟踪,可支持动态手势二次开发(目前计划后面也会开发相应的动态手势功能)。
* 3、实现双手配合点击选中目标区域。
* 4、基于第2点的功能,支持识别架构的拓展(目前没有加任何物体识别模型,后面会加上)。
* 5、实现基于IOU的手部跟踪。
* 6、支持语音拓展功能。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41

## 项目配置  
### 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 已提交
42
* 另外同学们可以根据自己需求替换检测模型。
Eric.Lee2021's avatar
Eric.Lee2021 已提交
43
### 2、手21关键点回归项目(handpose_x)
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
44
* 项目地址:https://codechina.csdn.net/EricLee/handpose_x
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
45
* [预训练模型下载地址(百度网盘 Password: 99f3 )](https://pan.baidu.com/s/1Ur6Ikp31XGEuA3hQjYzwIw)
Eric.Lee2021's avatar
Eric.Lee2021 已提交
46

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

Eric.Lee2021's avatar
Eric.Lee2021 已提交
52 53 54 55
## 项目使用方法  
### 项目1:手势交互项目(local 本地版本)
### 1、下载手部检测模型和21关键点回归模型。
### 2、确定摄像头连接成功。
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
56
### 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 已提交
57
```
Eric.Lee2021's avatar
update  
Eric.Lee2021 已提交
58
detect_model_path=./latest_416.pt #手部检测模型地址
Eric.Lee2021's avatar
Eric.Lee2021 已提交
59
detect_model_arch=yolo_v3 #检测模型类型 ,yolo  or yolo-tiny
60
yolo_anchor_scale=1.0 # yolo anchor 比例,默认为 1
Eric.Lee2021's avatar
Eric.Lee2021 已提交
61 62 63
detect_conf_thres=0.5 # 检测模型阈值
detect_nms_thres=0.45 # 检测模型 nms 阈值

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

67 68 69 70
classify_model_path=./imagenet_size-256_20210409.pth # 分类识别模型地址
classify_model_arch=resnet_50 # 分类识别模型结构
classify_model_classify_num=1000 # 分类类别数

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

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