Skip to content

Commit 8d8ddba

Browse files
authored
clean readme (#369)
1 parent 5e1be9a commit 8d8ddba

File tree

1 file changed

+25
-45
lines changed

1 file changed

+25
-45
lines changed

README.md

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -96,77 +96,57 @@ More information of the HyperPose Docker image can be found [here](https://hyper
9696

9797
### Python training library
9898

99-
We recommend to use [Anaconda](https://www.anaconda.com/products/individual) to create a virtual python environment for hyperpose python training library, so we can avoid the possible package conflicts and handle the *cudatoolkit* and *cudnn* library dependency.
99+
We recommend to use the Python training library with the [Anaconda](https://www.anaconda.com/products/individual) environment which can come with *cudatoolkit* and *cudnn*.
100100

101101
All the following instructions have been tested on the environments below:<br>
102-
* Ubuntu 18.04, Tesla V100-DGXStation, Nvidia Driver Version 440.33.01, CUDA Verison=10.2
103-
* Ubuntu 18.04, Tesla V100-DGXStation, Nvidia Driver Version 410.79, CUDA Verison=10.0
104-
* Ubuntu 18.04, TITAN RTX, Nvidia Driver Version 430.64, CUDA Version=10.1
105-
* Ubuntu 18.04, TITAN Xp, Nvidia Driver Version 430.26, CUDA Version=10.2
106-
* Ubuntu 16.04, RTX 2080Ti, Nvidia Driver Version 430.50, CUDA Version=10.1
102+
* Ubuntu 18.04, Tesla V100-DGX, NVIDIA Driver > 410.79, CUDA > 10.0
103+
* Ubuntu 18.04, TITAN RTX, NVIDIA Driver 430.64, CUDA 10.1
104+
* Ubuntu 18.04, TITAN XP, NVIDIA Driver 430.26, CUDA 10.2
105+
* Ubuntu 16.04, RTX 2080Ti, NVIDIA Driver 430.50, CUDA 10.1
107106

108-
With Anaconda installed, run the following command to configure the appropriate virtual environment:
107+
After installing Anaconda, run following Bash commands to create a virtual environment:
109108

110109
```bash
111-
# >>> create virtual environment (choose yes)
110+
# Create virtual environment (choose yes)
112111
conda create -n hyperpose python=3.7
113-
# >>> activate the virtual environment, start installation
112+
# Activate the virtual environment, start installation
114113
conda activate hyperpose
115-
# >>> install cudatoolkit and cudnn library using conda
114+
# Install cudatoolkit and cudnn library using conda
116115
conda install cudatoolkit=10.0.130
117116
conda install cudnn=7.6.0
118117
```
119118

120-
Then we need to using pip to install the python requirements according to the [requirements.txt](https://github.com/tensorlayer/hyperpose/blob/master/requirements.txt):
119+
We then install the python packages listed in [requirements.txt](https://github.com/tensorlayer/hyperpose/blob/master/requirements.txt):
121120

122121
```bash
123122
pip install -r requirements.txt
124123
```
125124

126-
Now all the configuration is down, run the following command under the root directory of the repository to test whether hyperpose can be successfully import:
125+
The below sample Python programs shows how to use HyperPose to train a pose estimation model. HyperPose contains three key APIs through *Config*, *Model* and *Dataset* modules. We use the *Config* module to set up the configuration, and use *Model* and *Dataset* module to assemble the train or evaluation pipline:
127126

128-
```bash
129-
# >>> Check whether the GPU is avaliable.
130-
python
131-
>>> import tensorflow as tf
132-
>>> import tensorlayer as tl
133-
>>> tf.test.is_gpu_available()
134-
# >>> if the output is True, we can then import and run hyperpose now
135-
>>> from hyperpose import Config,Model,Dataset
136-
```
137-
138-
Congratulations! we can use hyperpose to develop your pose estimation models now!
139-
140-
Hyperpose python training library provides APIs through *Config*, *Model* and *Dataset* modules.
127+
```python
128+
import tensorflow as tf
129+
import tensorlayer as tl
130+
tf.test.is_gpu_available()
141131

142-
We use the *Config* module to set up the configuration, and use *Model* and *Dataset* module to assemble the train or evaluation pipline, the sample code below shows how to use hyperpose to train a *LightweightOpenpose* model with *Vggtiny* network backbone:
143-
144-
```bash
145-
# >>> import modules of hyperpose
146-
from hyperpose import Config,Model,Dataset
147-
# >>> set model name to distinguish models (neccesarry)
132+
from hyperpose import Config, Model, Dataset
133+
# Set model name to distinguish models (necessary)
148134
Config.set_model_name("My_lopps")
149-
# >>> set model architecture (and set model backbone when in need)
135+
# Set model type, model backbone and dataset
150136
Config.set_model_type(Config.MODEL.LightweightOpenpose)
151137
Config.set_model_backbone(Config.BACKBONE.Vggtiny)
152-
# >>> set dataset to use
153138
Config.set_dataset_type(Config.DATA.MSCOCO)
154-
# >>> set training type
139+
# Set single-node training or parallel-training
155140
Config.set_train_type(Config.TRAIN.Single_train)
156-
# >>> configuration is done, get config object and assemble the system
157-
config=Config.get_config()
158-
model=Model.get_model(config)
159-
dataset=Dataset.get_dataset(config)
160-
train=Model.get_train(config)
161-
# >>> train!
141+
config = Config.get_config()
142+
model = Model.get_model(config)
143+
dataset = Dataset.get_dataset(config)
144+
train = Model.get_train(config)
145+
# Start the training process
162146
train(model,dataset)
163147
```
164148

165-
We provide a sample training script with cli located at [train.py](https://github.com/tensorlayer/hyperpose/blob/master/train.py) which demonstrates the usage of hyperpose python training library, you can either directly use the script to train your model or use it as a template for further modification.
166-
167-
To evaluate a model using hyperpose is similiar to the training procedure, we also provide a sample evaluation script with cli located at [eval.py](https://github.com/tensorlayer/hyperpose/blob/master/eval.py) as an example and a template for modification.
168-
169-
More information of the Hyperpose training library usage can be found [here](https://hyperpose.readthedocs.io/en/latest/markdown/quick_start/training.html).
149+
The full Python training program is [here](https://github.com/tensorlayer/hyperpose/blob/master/train.py). To evaluate the trained model, you can use a Python evaluation program [here](https://github.com/tensorlayer/hyperpose/blob/master/eval.py). More information of the training library is [here](https://hyperpose.readthedocs.io/en/latest/markdown/quick_start/training.html).
170150

171151

172152
## Documentation

0 commit comments

Comments
 (0)