Skip to content

Commit 9b5d128

Browse files
authored
Improve README (#370)
* refact: improve README * refact: rollback to markdown bullets and write NVIDIA in upper case * refact: update prediction documentation
1 parent 6c83f40 commit 9b5d128

File tree

4 files changed

+64
-214
lines changed

4 files changed

+64
-214
lines changed

README.md

Lines changed: 32 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
</a>
2+
23
<p align="center">
34
<img src="./docs/markdown/images/logo.png", width="600">
45
</p>
5-
66
<p align="center">
77
<a href="https://readthedocs.org/projects/hyperpose/badge/?version=latest" title="Docs Building"><img src="https://readthedocs.org/projects/hyperpose/badge/?version=latest"></a>
88
<a href="https://github.com/tensorlayer/hyperpose/actions?query=workflow%3ACI" title="Build Status"><img src="https://github.com/tensorlayer/hyperpose/workflows/CI/badge.svg"></a>
99
<a href="https://hub.docker.com/r/tensorlayer/hyperpose" title="Docker"><img src="https://img.shields.io/docker/image-size/tensorlayer/hyperpose"></a>
10-
<a href="https://drive.google.com/drive/folders/1w9EjMkrjxOmMw3Rf6fXXkiv_ge7M99jR?usp=sharing" title="PreTrainedModels"><img src="https://img.shields.io/badge/trained%20models-GoogleDrive-brightgreen.svg"></a>
10+
<a href="https://github.com/tensorlayer/hyperpose/releases" title="Github Release"><img src="https://img.shields.io/github/v/release/tensorlayer/hyperpose?include_prereleases"></a>
11+
<a href="https://drive.google.com/drive/folders/1w9EjMkrjxOmMw3Rf6fXXkiv_ge7M99jR?usp=sharing" title="PreTrainedModels"><img src="https://img.shields.io/badge/ModelZoo-GoogleDrive-brightgreen.svg"></a>
1112
<a href="https://en.cppreference.com/w/cpp/17" title="CppStandard"><img src="https://img.shields.io/badge/C++-17-blue.svg?style=flat&logo=c%2B%2B"></a>
12-
<a href="https://github.com/tensorlayer/hyperpose/graphs/commit-activity" title="Maintenance"><img src="https://img.shields.io/badge/maintained%3F-YES-brightgreen.svg"></a>
1313
<a href="https://github.com/tensorlayer/tensorlayer/blob/master/LICENSE.rst" title="TensorLayer"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg">
1414
</p>
1515

16+
1617
---
1718

1819
<p align="center">
1920
<a href="#Features">Features</a> •
2021
<a href="#Documentation">Documentation</a> •
21-
<a href="#Quick-Start-with-Docker">Quick-Start with Docker</a> •
22+
<a href="#Quick-Start">Quick Start</a> •
2223
<a href="#Performance">Performance</a> •
2324
<a href="#Accuracy">Accuracy</a> •
2425
<a href="#License">License</a>
2526
</p>
2627

2728
# HyperPose
2829

29-
HyperPose is a library for building high-performance custom pose estimation systems.
30+
HyperPose is a library for building high-performance custom pose estimation applications.
3031

3132
## Features
3233

3334
HyperPose has two key features:
3435

35-
- **High-performance pose estimation with CPUs/GPUs**: HyperPose achieves real-time pose estimation through a high-performance pose estimation engine. This engine implements numerous system optimisations: pipeline parallelism, model inference with TensorRT, CPU/GPU hybrid scheduling, and many others. These optimisations contribute to up to 10x higher FPS compared to OpenPose and TF-Pose.
36+
- **High-performance pose estimation with CPUs/GPUs**: HyperPose achieves real-time pose estimation through a high-performance pose estimation engine. This engine implements numerous system optimisations: pipeline parallelism, model inference with TensorRT, CPU/GPU hybrid scheduling, and many others. These optimisations contribute to up to 10x higher FPS compared to OpenPose, TF-Pose and OpenPifPaf.
3637
- **Flexibility for developing custom pose estimation models**: HyperPose provides high-level Python APIs to develop pose estimation models. HyperPose users can:
3738
* Customise training, evaluation, visualisation, pre-processing and post-processing in pose estimation.
3839
* Customise model architectures (e.g., OpenPose, Pifpaf, PoseProposal Network) and training datasets.
@@ -59,18 +60,17 @@ The HyperPose library contains two parts:
5960

6061
The easiest way to use the inference library is through a [Docker image](https://hub.docker.com/r/tensorlayer/hyperpose). Pre-requisites for this image:
6162

62-
* [CUDA Driver](https://www.tensorflow.org/install/gpu) (>= 418.81.07)
63-
* [NVIDIA docker](https://github.com/NVIDIA/nvidia-docker) (>= 2.0)
64-
* [Docker CE Engine](https://docs.docker.com/engine/install/) (>= 19.03)
63+
- [CUDA Driver >= 418.81.07](https://www.tensorflow.org/install/gpu) (For default CUDA 10.0 image)
64+
- [NVIDIA Docker >= 2.0](https://github.com/NVIDIA/nvidia-docker)
65+
- [Docker CE Engine >= 19.03](https://docs.docker.com/engine/install/)
6566

6667
Run this command to check if pre-requisites are ready:
6768

6869
```bash
6970
wget https://raw.githubusercontent.com/tensorlayer/hyperpose/master/scripts/test_docker.py -qO- | python
7071
```
7172

72-
Once pre-requisites are ready, pull
73-
the HyperPose docker:
73+
Once pre-requisites are ready, pull the HyperPose docker:
7474

7575
```bash
7676
docker pull tensorlayer/hyperpose
@@ -102,16 +102,19 @@ xhost +; docker run --rm --gpus all -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/t
102102
# docker run --rm --gpus all -it --entrypoint /bin/bash tensorlayer/hyperpose
103103
```
104104

105-
More information of the Docker image is [here](https://hyperpose.readthedocs.io/en/latest/markdown/quick_start/prediction.html#table-of-flags-for-hyperpose-cli).
105+
For more usage regarding the command line flags, please visit [here](https://hyperpose.readthedocs.io/en/latest/markdown/quick_start/prediction.html#table-of-flags-for-hyperpose-cli).
106106

107107
### Python training library
108108

109-
We recommend to use the Python training library within an [Anaconda](https://www.anaconda.com/products/individual) environment. The below quick-start has been tested with these environments:<br>
110-
* Ubuntu 18.04, Tesla V100-DGX, NVIDIA Driver 440.33.01, CUDA 10.2
111-
* Ubuntu 18.04, Tesla V100-DGX, NVIDIA Driver 410.79, CUDA 10.0
112-
* Ubuntu 18.04, TITAN RTX, NVIDIA Driver 430.64, CUDA 10.1
113-
* Ubuntu 18.04, TITAN XP, NVIDIA Driver 430.26, CUDA 10.2
114-
* Ubuntu 16.04, RTX 2080Ti, NVIDIA Driver 430.50, CUDA 10.1
109+
We recommend using the Python training library within an [Anaconda](https://www.anaconda.com/products/individual) environment. The below quick-start has been tested with these environments:
110+
111+
| OS | NVIDIA Driver | CUDA Toolkit | GPU |
112+
| ------------ | ------------- | ------------ | -------------- |
113+
| Ubuntu 18.04 | 410.79 | 10.0 | Tesla V100-DGX |
114+
| Ubuntu 18.04 | 440.33.01 | 10.2 | Tesla V100-DGX |
115+
| Ubuntu 18.04 | 430.64 | 10.1 | TITAN RTX |
116+
| Ubuntu 18.04 | 430.26 | 10.2 | TITAN XP |
117+
| Ubuntu 16.04 | 430.50 | 10.1 | RTX 2080Ti |
115118

116119
Once Anaconda is installed, run below Bash commands to create a virtual environment:
117120

@@ -125,46 +128,47 @@ conda install cudatoolkit=10.0.130
125128
conda install cudnn=7.6.0
126129
```
127130

128-
We then install the dependencies listed in [requirements.txt](https://github.com/tensorlayer/hyperpose/blob/master/requirements.txt):
131+
We then clone the repository and install the dependencies listed in [requirements.txt](https://github.com/tensorlayer/hyperpose/blob/master/requirements.txt):
129132

130133
```bash
134+
git clone https://github.com/tensorlayer/hyperpose.git && cd hyperpose
131135
pip install -r requirements.txt
132136
```
133137

134138
We demonstrate how to train a custom pose estimation model with HyperPose. HyperPose APIs contain three key modules: *Config*, *Model* and *Dataset*, and their basic usages are shown below.
135139

136140
```python
137-
import tensorflow as tf
138-
import tensorlayer as tl
139-
tf.test.is_gpu_available()
140-
141141
from hyperpose import Config, Model, Dataset
142+
142143
# Set model name to distinguish models (necessary)
143144
Config.set_model_name("My_lopps")
145+
144146
# Set model type, model backbone and dataset
145147
Config.set_model_type(Config.MODEL.LightweightOpenpose)
146148
Config.set_model_backbone(Config.BACKBONE.Vggtiny)
147149
Config.set_dataset_type(Config.DATA.MSCOCO)
150+
148151
# Set single-node training or parallel-training
149152
Config.set_train_type(Config.TRAIN.Single_train)
153+
150154
config = Config.get_config()
151155
model = Model.get_model(config)
152156
dataset = Dataset.get_dataset(config)
153-
train = Model.get_train(config)
157+
154158
# Start the training process
155-
train(model, dataset)
159+
Model.get_train(config)(model, dataset)
156160
```
157161

158-
The full training program is [here](https://github.com/tensorlayer/hyperpose/blob/master/train.py). To evaluate the trained model, you can use an evaluation program [here](https://github.com/tensorlayer/hyperpose/blob/master/eval.py). More information about the training library is [here](https://hyperpose.readthedocs.io/en/latest/markdown/quick_start/training.html).
162+
The full training program is listed [here](https://github.com/tensorlayer/hyperpose/blob/master/train.py). To evaluate the trained model, you can use the evaluation program [here](https://github.com/tensorlayer/hyperpose/blob/master/eval.py). More information about the training library can be found [here](https://hyperpose.readthedocs.io/en/latest/markdown/quick_start/training.html).
159163

160164

161165
## Documentation
162166

163-
The APIs of the HyperPose training library and the inference library are described in [Documentation](https://hyperpose.readthedocs.io/en/latest/).
167+
The APIs of the HyperPose training library and the inference library are described in the [Documentation](https://hyperpose.readthedocs.io/en/latest/).
164168

165169
## Performance
166170

167-
We compare the prediction performance of HyperPose with [OpenPose 1.6](https://github.com/CMU-Perceptual-Computing-Lab/openpose) and [TF-Pose](https://github.com/ildoonet/tf-pose-estimation). We implement the OpenPose algorithms with different configurations in HyperPose. The test-bed has Ubuntu18.04, 1070Ti GPU, Intel i7 CPU (12 logic cores).
171+
We compare the prediction performance of HyperPose with [OpenPose 1.6](https://github.com/CMU-Perceptual-Computing-Lab/openpose), [TF-Pose](https://github.com/ildoonet/tf-pose-estimation) and [OpenPifPaf 0.12](https://github.com/openpifpaf/openpifpaf). The test-bed has Ubuntu18.04, 1070Ti GPU, Intel i7 CPU (12 logic cores).
168172

169173
| HyperPose Configuration | DNN Size | Input Size | HyperPose | Baseline |
170174
| --------------- | ------------- | ------------------ | ------------------ | --------------------- |
@@ -191,155 +195,3 @@ We evaluate the accuracy of pose estimation models developed by HyperPose. The e
191195

192196
HyperPose is open-sourced under the [Apache 2.0 license](https://github.com/tensorlayer/tensorlayer/blob/master/LICENSE.rst).
193197

194-
<!-- - Please acknowledge TensorLayer and this project in your project websites/articles if you are a **commercial user**. -->
195-
196-
<!-- ## Related Discussion
197-
198-
- [TensorLayer Slack](https://join.slack.com/t/tensorlayer/shared_invite/enQtMjUyMjczMzU2Njg4LWI0MWU0MDFkOWY2YjQ4YjVhMzI5M2VlZmE4YTNhNGY1NjZhMzUwMmQ2MTc0YWRjMjQzMjdjMTg2MWQ2ZWJhYzc)
199-
- [TensorLayer WeChat](https://github.com/tensorlayer/tensorlayer-chinese/blob/master/docs/wechat_group.md)
200-
- [TensorLayer Issues 434](https://github.com/tensorlayer/tensorlayer/issues/434)
201-
- [TensorLayer Issues 416](https://github.com/tensorlayer/tensorlayer/issues/416) -->
202-
203-
<!--
204-
205-
[OpenPose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) is the state-of-the-art hyperpose estimation algorithm.
206-
In its Caffe [codebase](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation),
207-
data augmentation, training, and neural networks are most hard-coded. They are difficult
208-
to be customized. In addition,
209-
key performance features such as embedded platform supports and parallel GPU training are missing.
210-
All these limitations makes OpenPose, in these days, hard to
211-
be deployed in the wild. To resolve this, we develop **OpenPose-Plus**, a high-performance yet flexible hyperpose estimation framework that offers many powerful features:
212-
213-
- Flexible combination of standard training dataset with your own custom labelled data.
214-
- Customizable data augmentation pipeline without compromising performance
215-
- Deployment on embedded platforms using TensorRT
216-
- Switchable neural networks (e.g., changing VGG to MobileNet for minimal memory consumption)
217-
- High-performance training using multiple GPUs
218-
219-
## Custom Model Training
220-
221-
Training the model is implemented using TensorFlow. To run `train.py`, you would need to install packages, shown
222-
in [requirements.txt](https://github.com/tensorlayer/openpose-plus/blob/master/requirements.txt), in your virtual environment (**Python 3**):
223-
224-
```bash
225-
pip3 install -r requirements.txt
226-
pip3 install pycocotools
227-
```
228-
229-
`train.py` automatically download MSCOCO 2017 dataset into `dataset/coco17`.
230-
The default model is VGG19 used in the OpenPose paper.
231-
To customize the model, simply changing it in `models.py`.
232-
233-
You can use `train_config.py` to configure the training. `config.DATA.train_data` can be:
234-
* `coco`: training data is COCO dataset only (default)
235-
* `custom`: training data is your dataset specified by `config.DATA.your_xxx`
236-
* `coco_and_custom`: training data is COCO and your dataset
237-
238-
`config.MODEL.name` can be:
239-
* `vgg`: VGG19 version (default), slow
240-
* `vggtiny`: VGG tiny version, faster
241-
* `mobilenet`: MobileNet version, faster
242-
243-
Train your model by running:
244-
245-
```bash
246-
python3 train.py
247-
```
248-
249-
### Additional steps for training on Windows
250-
251-
There are a few extra steps to follow with Windows. Please make sure you have the following prerequisites installed:
252-
* [git](https://git-scm.com/downloads)
253-
* [Visual C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
254-
* [wget](https://eternallybored.org/misc/wget/)
255-
256-
Download the wget executable and copy it into one of your folders in System path to use the wget command from anywhere. Use the `path` command in command line to find the folders. Paste the wget.exe in one of the folders given by `path`. An example folder is `C:\Windows`.
257-
258-
pycocotools is not supported by default on Windows. Use the pycocotools build for Windows at [here](https://github.com/philferriere/cocoapi). Instead of `pip install pycocotools`, using:
259-
```bash
260-
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
261-
```
262-
263-
Visual C++ Build Tools are required by the build. Everything else is the same.
264-
265-
## Distributed Training
266-
267-
The hyperpose estimation neural network can take days to train.
268-
To speed up training, we support distributed GPU training.
269-
We use the [KungFu](https://github.com/lsds/KungFu) library to scale out training.
270-
KungFu is very easy to install and run (compared to the previously used Horovod library
271-
which depends on OpenMPI), and simply follow
272-
the [instruction](https://github.com/lsds/KungFu#install).
273-
274-
In the following, we assume that you have added `kungfu-run` into the `$PATH`.
275-
276-
(i) To run on a machine with 4 GPUs:
277-
278-
```bash
279-
kungfu-run -np 4 python3 train.py --parallel --kf-optimizer=sma
280-
```
281-
282-
The default KungFu optimizer is `sma` which implements synchronous model averaging.
283-
You can also use other KungFu optimizers: `sync-sgd` (which is the same as the DistributedOptimizer in Horovod)
284-
and `async-sgd` if you train your model in a cluster that has limited bandwidth and straggelers.
285-
286-
(ii) To run on 2 machines (which have the nic `eth0` with IPs as `192.168.0.1` and `192.168.0.2`):
287-
288-
```bash
289-
kungfu-run -np 8 -H 192.168.0.1:4,192.168.0.1:4 -nic eth0 python3 train.py --parallel --kf-optimizer=sma
290-
```
291-
292-
## High-performance Inference using TensorRT
293-
294-
Real-time inference on resource-constrained embedded platforms is always challenging. To resolve this, we provide a TensorRT-compatible inference engine.
295-
The engine has two C++ APIs, both defined in `include/openpose-plus.hpp`.
296-
They are for running the TensorFlow model with TensorRT and post-processing respectively.
297-
298-
For details of inference(dependencies/quick start), please refer to [**cpp-inference**](doc/markdown-doc/cpp-inference.md).
299-
300-
We are improving the performance of the engine.
301-
Initial benchmark results for running the full OpenPose model are as follows.
302-
On Jetson TX2, the inference speed is 13 frames / second (the mobilenet variant is even faster).
303-
On Jetson TX1, the speed is 10 frames / second. On Titan 1050, the speed is 38 frames / second.
304-
305-
After our first optimization, we achieved 50FPS(float32) on 1070Ti.
306-
307-
We also have a Python binding for the engine. The current binding relies on
308-
the external tf-hyperpose-estimation project. We are working on providing the Python binding for our high-performance
309-
C++ implementation. For now, to enable the binding, please build C++ library for post processing by:
310-
311-
```bash
312-
./scripts/install-pafprocess.sh
313-
# swig is required. Run `conda install -c anaconda swig` to install swig.
314-
```
315-
316-
See [tf-hyperpose](https://github.com/ildoonet/tf-hyperpose-estimation/tree/master/tf_pose/pafprocess) for details.
317-
318-
## Live Camera Example
319-
320-
You can look at the examples in the `examples` folder to see how to use the inference C++ APIs.
321-
Running `./scripts/live-camera.sh` will give you a quick review of how it works.
322-
323-
## License
324-
325-
You can use the project code under a free [Apache 2.0 license](https://github.com/tensorlayer/tensorlayer/blob/master/LICENSE.rst) ONLY IF you:
326-
- Cite the [TensorLayer paper](https://github.com/tensorlayer/tensorlayer#cite) and this project in your research article if you are an **academic user**.
327-
- Acknowledge TensorLayer and this project in your project websites/articles if you are a **commercial user**.
328-
329-
## Related Discussion
330-
331-
- [TensorLayer Slack](https://join.slack.com/t/tensorlayer/shared_invite/enQtMjUyMjczMzU2Njg4LWI0MWU0MDFkOWY2YjQ4YjVhMzI5M2VlZmE4YTNhNGY1NjZhMzUwMmQ2MTc0YWRjMjQzMjdjMTg2MWQ2ZWJhYzc)
332-
- [TensorLayer WeChat](https://github.com/tensorlayer/tensorlayer-chinese/blob/master/docs/wechat_group.md)
333-
- [TensorLayer Issues 434](https://github.com/tensorlayer/tensorlayer/issues/434)
334-
- [TensorLayer Issues 416](https://github.com/tensorlayer/tensorlayer/issues/416)
335-
336-
-->
337-
338-
<!--
339-
340-
## Paper's Model
341-
342-
- [Default MPII](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation/blob/master/model/_trained_MPI/pose_deploy.prototxt)
343-
- [Default COCO model](https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation/blob/master/model/_trained_COCO/pose_deploy.prototxt)
344-
- [Visualizing Caffe model](http://ethereon.github.io/netscope/#/editor)
345-
-->

docs/markdown/design/design.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,23 @@
55
HyperPose provides:
66

77
- **Flexible training**
8-
- Well abstracted APIs(Python) to help you manage the pose estimation pipeline quickly and directly
9-
- Dataset(COCO, MPII)
8+
- Well abstracted APIs (Python) to help you manage the pose estimation pipeline quickly and directly
9+
- Dataset (COCO, MPII)
1010
- Pose Estimation Methods
11-
- Backbones: ResNet, VGG(Tiny/Normal/Thin), Pose Proposal Network.
12-
- Post-Processing: Part Association Field(PAF), Pose Proposal Networks.
11+
- Backbones: ResNet, VGG (Tiny/Normal/Thin), Pose Proposal Network, OpenPifPaf.
12+
- Post-Processing: Part Association Field (PAF), Pose Proposal Networks, PifPaf.
1313

1414
- **Fast Prediction**
1515
- Rich operator APIs for you to do fast DNN inference and post-processing.
1616
- 2 API styles:
17-
- Operator API(Imperative): HyperPose provides basic operators to do DNN inference and post processing.
18-
- Stream API(Declarative): HyperPose provides a streaming processing runtime scheduler where users only need to specify the engine, post-processing methods and input/output streams.
17+
- Operator API (Imperative): HyperPose provides basic operators to do DNN inference and post processing.
18+
- Stream API (Declarative): HyperPose provides a streaming processing runtime scheduler where users only need to specify the engine, post-processing methods and input/output streams.
1919
- Model format supports:
2020
- Uff.
2121
- ONNX.
2222
- Cuda Engine Protobuf.
2323
- Good performance. (see [here](../performance/prediction.md))
2424

25-
## Training Library Design
26-
2725
## Prediction Library Design
2826

2927
### HyperPose Prediction Pipeline

0 commit comments

Comments
 (0)