You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-45Lines changed: 25 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,77 +96,57 @@ More information of the HyperPose Docker image can be found [here](https://hyper
96
96
97
97
### Python training library
98
98
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*.
100
100
101
101
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
107
106
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:
109
108
110
109
```bash
111
-
#>>> create virtual environment (choose yes)
110
+
#Create virtual environment (choose yes)
112
111
conda create -n hyperpose python=3.7
113
-
#>>> activate the virtual environment, start installation
112
+
#Activate the virtual environment, start installation
114
113
conda activate hyperpose
115
-
#>>> install cudatoolkit and cudnn library using conda
114
+
#Install cudatoolkit and cudnn library using conda
116
115
conda install cudatoolkit=10.0.130
117
116
conda install cudnn=7.6.0
118
117
```
119
118
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):
121
120
122
121
```bash
123
122
pip install -r requirements.txt
124
123
```
125
124
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:
127
126
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()
141
131
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)
148
134
Config.set_model_name("My_lopps")
149
-
#>>> set model architecture (and set model backbone when in need)
# >>> 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
162
146
train(model,dataset)
163
147
```
164
148
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).
0 commit comments