# MMSkeleton
## News
ST-GCN has joined into the [open-mmlab](https://github.com/open-mmlab) project in charge of [Multimedia Laboratory, CUHK](http://mmlab.ie.cuhk.edu.hk/).
The new ST-GCN will be named as **MMSkeleton**.
It is going to be an open source toolbox for skeleton-based human understanding,
including but not limited to pose estimation, action recognition and skeleton sequence generation.
## Introduction
This repository holds the codebase, dataset and models for the paper:
**Spatial Temporal Graph Convolutional Networks for Skeleton-Based Action Recognition** Sijie Yan, Yuanjun Xiong and Dahua Lin, AAAI 2018. [[Arxiv Preprint]](https://arxiv.org/abs/1801.07455)
<div align="center">
<img src="resource/info/pipeline.png">
</div>
## Visulization of ST-GCN in Action
Our demo for skeleton-based action recognition:
<p align="center">
<img src="resource/info/demo_video.gif", width="1200">
</p>
ST-GCN is able to exploit local pattern and correlation from human skeletons.
Below figures show the neural response magnitude of each node in the last layer of our ST-GCN.
<table style="width:100%; table-layout:fixed;">
<tr>
<td><img width="150px" src="resource/info/S001C001P001R001A044_w.gif"></td>
<td><img width="150px" src="resource/info/S003C001P008R001A008_w.gif"></td>
<td><img width="150px" src="resource/info/S002C001P010R001A017_w.gif"></td>
<td><img width="150px" src="resource/info/S003C001P008R001A002_w.gif"></td>
<td><img width="150px" src="resource/info/S001C001P001R001A051_w.gif"></td>
</tr>
<tr>
<td><font size="1">Touch head<font></td>
<td><font size="1">Sitting down<font></td>
<td><font size="1">Take off a shoe<font></td>
<td><font size="1">Eat meal/snack<font></td>
<td><font size="1">Kick other person<font></td>
</tr>
<tr>
<td><img width="150px" src="resource/info/hammer_throw_w.gif"></td>
<td><img width="150px" src="resource/info/clean_and_jerk_w.gif"></td>
<td><img width="150px" src="resource/info/pull_ups_w.gif"></td>
<td><img width="150px" src="resource/info/tai_chi_w.gif"></td>
<td><img width="150px" src="resource/info/juggling_balls_w.gif"></td>
</tr>
<tr>
<td><font size="1">Hammer throw<font></td>
<td><font size="1">Clean and jerk<font></td>
<td><font size="1">Pull ups<font></td>
<td><font size="1">Tai chi<font></td>
<td><font size="1">Juggling ball<font></td>
</tr>
</table>
The first row of above results is from **NTU-RGB+D** dataset, and the second row is from **Kinetics-skeleton**.
## Prerequisites
- Python3 (>3.5)
- [PyTorch](http://pytorch.org/)
- [Openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) **with** [Python API](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#python-api). (Optional: for demo only)
- Other Python libraries can be installed by `pip install -r requirements.txt`
<!-- - FFmpeg (Optional: for demo only), which can be installed by `sudo apt-get install ffmpeg` -->
### Installation
```
cd torchlight; python setup.py install; cd ..
```
### Get pretrained models
We provided the pretrained model weithts of our **ST-GCN**. The model weights can be downloaded by running the script
```
bash tools/get_models.sh
```
<!-- The downloaded models will be stored under ```./models```. -->
You can also obtain models from [GoogleDrive](https://drive.google.com/drive/folders/1IYKoSrjeI3yYJ9bO0_z_eDo92i7ob_aF) or [BaiduYun](https://pan.baidu.com/s/1dwKG2TLvG-R1qeIiE4MjeA#list/path=%2FShare%2FAAAI18%2Fst-gcn%2Fmodels&parentPath=%2FShare), and manually put them into ```./models```.
## Demo
<!-- To visualize how ST-GCN exploit local correlation and local pattern, we compute the feature vector magnitude of each node in the final spatial temporal graph, and overlay them on the original video. **Openpose** should be ready for extracting human skeletons from videos. The skeleton based action recognition results is also shwon thereon. -->
You can use the following commands to run the demo.
```shell
# with offline pose estimation
python main.py demo_offline [--video ${PATH_TO_VIDEO}] [--openpose ${PATH_TO_OPENPOSE}]
# with realtime pose estimation
python main.py demo [--video ${PATH_TO_VIDEO}] [--openpose ${PATH_TO_OPENPOSE}]
```
Optional arguments:
- `PATH_TO_OPENPOSE`: It is required if the Openpose Python API is not in `PYTHONPATH`.
- `PATH_TO_VIDEO`: Filename of the input video.
<!-- The realtime demo also support to load video streams from camera source by
```
python main.py demo --video camera
``` -->
<!-- Openpose Python API is required in the above demos. -->
## Data Preparation
We experimented on two skeleton-based action recognition datasts: **Kinetics-skeleton** and **NTU RGB+D**.
Before training and testing, for convenience of fast data loading,
the datasets should be converted to proper file structure.
You can download the pre-processed data from
[GoogleDrive](https://drive.google.com/open?id=103NOL9YYZSW1hLoWmYnv5Fs8mK-Ij7qb)
and extract files with
```
cd st-gcn
unzip <path to st-gcn-processed-data.zip>
```
Otherwise, for processing raw data by yourself,
please refer to below guidances.
#### Kinetics-skeleton
[Kinetics](https://deepmind.com/research/open-source/open-source-datasets/kinetics/) is a video-based dataset for action recognition which only provide raw video clips without skeleton data. Kinetics dataset include To obatin the joint locations, we first resized all videos to the resolution of 340x256 and converted the frame rate to 30 fps. Then, we extracted skeletons from each frame in Kinetics by [Openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose). The extracted skeleton data we called **Kinetics-skeleton**(7.5GB) can be directly downloaded from [GoogleDrive](https://drive.google.com/open?id=1SPQ6FmFsjGg3f59uCWfdUWI-5HJM_YhZ) or [BaiduYun](https://pan.baidu.com/s/1dwKG2TLvG-R1qeIiE4MjeA#list/path=%2FShare%2FAAAI18%2Fkinetics-skeleton&parentPath=%2FShare).
After uncompressing, rebuild the database by this command:
```
python tools/kinetics_gendata.py --data_path <path to kinetics-skeleton>
```
#### NTU RGB+D
NTU RGB+D can be downloaded from [their website](http://rose1.ntu.edu.sg/datasets/actionrecognition.asp).
Only the **3D skeletons**(5.8GB) modality is required in our experiments. After that, this command should be used to build the database for training or evaluation:
```
python tools/ntu_gendata.py --data_path <path to nturgbd+d_skeletons>
```
where the ```<path to nturgbd+d_skeletons>``` points to the 3D skeletons modality of NTU RGB+D dataset you download.
## Testing Pretrained Models
<!-- ### Evaluation
Once datasets ready, we can start the evaluation. -->
To evaluate ST-GCN model pretrained on **Kinetcis-skeleton**, run
```
python main.py recognition -c config/st_gcn/kinetics-skeleton/test.yaml
```
For **cross-view** evaluation in **NTU RGB+D**, run
```
python main.py recognition -c config/st_gcn/ntu-xview/test.yaml
```
For **cross-subject** evaluation in **NTU RGB+D**, run
```
python main.py recognition -c config/st_gcn/ntu-xsub/test.yaml
```
<!-- Similary, the configuration file for testing baseline models can be found under the ```./config/baseline```. -->
To speed up evaluation by multi-gpu inference or modify batch size for reducing the memory cost, set ```--test_batch_size``` and ```--device``` like:
```
python main.py recognition -c <config file> --test_batch_size <batch size> --device <gpu0> <gpu1> ...
```
### Results
The expected **Top-1** **accuracy** of provided models are shown here:
| Model | Kinetics-<br>skeleton (%) | NTU RGB+D <br> Cross View (%) | NTU RGB+D <br> Cross Subject (%) |
|:------------------|:-------------------------:|:-----------------------------:|:--------------------------------:|
| Baseline[1] | 20.3 | 83.1 | 74.3 |
| **ST-GCN** (Ours) | **31.6** |
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于ST-GCN自适应图卷积网络的人体动作识别系统python源码+使用说明.zip 基于ST-GCN(Spatial Temporal Graph Convolutional Networks,时空图卷积网络)自适应图卷积网络的人体动作识别系统是一个利用深度学习技术,特别是图卷积网络(GCN)来处理和分析人体动作数据的项目。该系统通过捕捉人体关节点随时间变化的动态信息,实现对人体动作的准确识别。 【说明】 【1】项目代码完整且功能都验证ok,确保稳定可靠运行后才上传。欢迎下载使用!在使用过程中,如有问题或建议,请及时私信沟通,帮助解答。 【2】项目主要针对各个计算机相关专业,包括计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网等领域的在校学生、专业教师或企业员工使用。 【3】项目具有较高的学习借鉴价值,不仅适用于小白学习入门进阶。也可作为毕设项目、课程设计、大作业、初期项目立项演示等。 【4】如果基础还行,或热爱钻研,可基于此项目进行二次开发,DIY其他不同功能,欢迎交流学习。 【注意】 项目下载解压后,项目名字和项目路径不要用中文,建议解压重命名为英文名字后再运行!有问题私信沟通,祝顺利!
资源推荐
资源详情
资源评论
收起资源包目录
基于ST-GCN自适应图卷积网络的人体动作识别系统python源码+使用说明.zip (476个子文件)
main.css 554B
main.css 554B
gpu_nms.cu 281KB
gpu_nms.cu 281KB
nms_kernel.cu 5KB
nms_kernel.cu 5KB
demo_video.gif 5.2MB
demo_video.gif 5.2MB
pull_ups_w.gif 2.5MB
pull_ups_w.gif 2.5MB
clean_and_jerk_w.gif 2.18MB
clean_and_jerk_w.gif 2.18MB
juggling_balls_w.gif 1.96MB
juggling_balls_w.gif 1.96MB
tai_chi_w.gif 1.75MB
tai_chi_w.gif 1.75MB
hammer_throw_w.gif 1.13MB
hammer_throw_w.gif 1.13MB
S002C001P010R001A017_w.gif 673KB
S002C001P010R001A017_w.gif 673KB
S003C001P008R001A002_w.gif 504KB
S003C001P008R001A002_w.gif 504KB
S003C001P008R001A008_w.gif 436KB
S003C001P008R001A008_w.gif 436KB
S001C001P001R001A051_w.gif 408KB
S001C001P001R001A051_w.gif 408KB
S001C001P001R001A044_w.gif 355KB
S001C001P001R001A044_w.gif 355KB
.gitignore 9B
.gitignore 9B
gpu_nms.hpp 146B
gpu_nms.hpp 146B
index.html 2KB
index.html 2KB
index.html 2KB
index.html 2KB
detect.html 1KB
detect.html 1KB
detect.html 1KB
detect.html 1KB
longlife_result.jpg 261KB
longlife_result.jpg 261KB
xsub_acc.jpg 93KB
xsub_acc.jpg 93KB
background.jpg 88KB
background.jpg 88KB
xview_acc.jpg 82KB
xview_acc.jpg 82KB
avg_all.jpg 36KB
avg_all.jpg 36KB
avg.jpg 33KB
avg.jpg 33KB
result.jpg 23KB
result.jpg 23KB
example.jpg 20KB
example.jpg 20KB
category_annotation_example.json 331B
category_annotation_example.json 331B
category_annotation_example_web.json 97B
category_annotation_example_web.json 97B
LICENSE 1KB
LICENSE 1KB
Makefile 122B
Makefile 122B
README.md 9KB
README.md 9KB
START_RECOGNITION.md 3KB
START_RECOGNITION.md 3KB
GETTING_STARTED.md 2KB
GETTING_STARTED.md 2KB
使用说明.md 2KB
使用说明.md 2KB
ISSUE_TEMPLATE.md 167B
ISSUE_TEMPLATE.md 167B
mmskl 3KB
mmskl 3KB
skateboarding.mp4 1.44MB
skateboarding.mp4 1.44MB
skateboarding.mp4 1.44MB
skateboarding.mp4 1.44MB
clean_and_jerk.mp4 212KB
clean_and_jerk.mp4 212KB
clean_and_jerk.mp4 212KB
clean_and_jerk.mp4 212KB
clean_and_jerk.mp4 212KB
clean_and_jerk.mp4 212KB
ta_chi.mp4 134KB
ta_chi.mp4 134KB
ta_chi.mp4 134KB
ta_chi.mp4 134KB
train_data.npy 135B
val_data.npy 135B
train_data.npy 135B
val_data.npy 135B
standard_data.npy 133B
standard_data.npy 133B
standard_data.npy 133B
standard_data.npy 133B
standard_data.npy 133B
standard_data.npy 133B
共 476 条
- 1
- 2
- 3
- 4
- 5
资源评论
.whl
- 粉丝: 3823
- 资源: 4648
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功