dog-qiuqiu / Ultralight-SimplePose

Ultra-lightweight human body posture key point CNN model. ModelSize:2.3MB HUAWEI P40 NCNN benchmark: 6ms/img,
301 stars 62 forks source link
gluoncv humanpose mxnet mxnet-gluon openpose simplepose

Ultralight-SimplePose

image

# Install

pip install mxnet-cu101 gluoncv pip install opencv-python cython pycocotools

* Install mxnet according to your own cuda version
# Demo
### Test picture

python img_demo.py

![image](https://github.com/dog-qiuqiu/Ultralight-SimplePose/blob/master/data/Figure_1-1.jpg)
### Test camera stream

python cam_demo

# How To Train
### Download the coco2017 dataset
* http://images.cocodataset.org/zips/train2017.zip
* http://images.cocodataset.org/annotations/annotations_trainval2017.zip
* http://images.cocodataset.org/zips/val2017.zip
* Unzip the downloaded dataset zip file to the coco directory
* 交流qq群:1062122604
### Train

python train_simple_pose.py

# Ncnn Deploy
* Dependent library: Opencv Ncnn
* Read the camera video stream test by default, if you test the picture, please modify the code
## Install ncnn

$ git clone https://github.com/Tencent/ncnn.git $ cd $ mkdir -p build $ cd build $ make -j4 $ make install

## Run ncnn sample

$ cp -rf ncnn/build/install/include ./Ultralight-SimplePose/ncnnsample/ $ cp -rf ncnn/build/install/lib ./Ultralight-SimplePose/ncnnsample/ $ g++ -o ncnnpose ncnnpose.cpp -I include/ncnn/ lib/libncnn.a pkg-config --libs --cflags opencv -fopenmp $ ./ncnnpose


## Ncnn Picture test results
![image](https://github.com/dog-qiuqiu/Ultralight-SimplePose/blob/master/data/ncnndemo.png)                    
## Android sample
<img src="https://github.com/dog-qiuqiu/Ultralight-SimplePose/blob/master/data/Android_Meizu16x_simple_pose.jpg" width="330" height="660" /><br/>
* https://github.com/WZTENG/YOLOv5_NCNN
# Thanks
* SimplePose Paper:https://arxiv.org/abs/1804.06208
* https://github.com/Tencent/ncnn
* https://gluon-cv.mxnet.io/