Skip to content

Commit 668567e

Browse files
authored
Fix doc for windows uers (PaddlePaddle#2727)
1 parent 19ed671 commit 668567e

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

PaddleCV/human_pose_estimation/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Simple Baselines for Human Pose Estimation in Fluid
22

33
## Introduction
4-
This is a simple demonstration of re-implementation in [PaddlePaddle.Fluid](http://www.paddlepaddle.org/en) for the paper [Simple Baselines for Human Pose Estimation and Tracking](https://arxiv.org/abs/1804.06208) (ECCV'18) from MSRA.
4+
This is a simple demonstration of re-implementation in [PaddlePaddle.Fluid](http://www.paddlepaddle.org/en) for the paper [Simple Baselines for Human Pose Estimation and Tracking](https://arxiv.org/abs/1804.06208) (ECCV'18) from MSRA.
55

66
![demo](demo.gif)
77

@@ -10,7 +10,7 @@ This is a simple demonstration of re-implementation in [PaddlePaddle.Fluid](http
1010
## Requirements
1111

1212
- Python == 2.7 or 3.6
13-
- PaddlePaddle >= 1.1.0
13+
- PaddlePaddle >= 1.1.0
1414
- opencv-python >= 3.3
1515

1616
### Notes:
@@ -23,7 +23,7 @@ The code is developed and tested under 4 Tesla K40/P40 GPUS cards on CentOS with
2323
## Results on MPII Val
2424
| Arch | Head | Shoulder | Elbow | Wrist | Hip | Knee | Ankle | Mean | [email protected]| Models |
2525
| ---- |:----:|:--------:|:-----:|:-----:|:---:|:----:|:-----:|:----:|:-------:|:------:|
26-
| 256x256\_pose\_resnet\_50 in PyTorch | 96.351 | 95.329 | 88.989 | 83.176 | 88.420 | 83.960 | 79.594 | 88.532 | 33.911 | - |
26+
| 256x256\_pose\_resnet\_50 in PyTorch | 96.351 | 95.329 | 88.989 | 83.176 | 88.420 | 83.960 | 79.594 | 88.532 | 33.911 | - |
2727
| 256x256\_pose\_resnet\_50 in Fluid | 96.385 | 95.363 | 89.211 | 84.084 | 88.454 | 84.182 | 79.546 | 88.748 | 33.750 | [`link`](https://paddlemodels.bj.bcebos.com/pose/pose-resnet50-mpii-256x256.tar.gz) |
2828
| 384x384\_pose\_resnet\_50 in PyTorch | 96.658 | 95.754 | 89.790 | 84.614 | 88.523 | 84.666 | 79.287 | 89.066 | 38.046 | - |
2929
| 384x384\_pose\_resnet\_50 in Fluid | 96.862 | 95.635 | 90.046 | 85.557 | 88.818 | 84.948 | 78.484 | 89.235 | 38.093 | [`link`](https://paddlemodels.bj.bcebos.com/pose/pose-resnet50-mpii-384x384.tar.gz) |
@@ -88,13 +88,13 @@ python2 setup.py install --user
8888
Downloading the checkpoints of Pose-ResNet-50 trained on MPII dataset from [here](https://paddlemodels.bj.bcebos.com/pose/pose-resnet50-mpii-384x384.tar.gz). Extract it into the folder `checkpoints` under the directory root of this repo. Then run
8989

9090
```bash
91-
python val.py --dataset 'mpii' --checkpoint 'checkpoints/pose-resnet50-mpii-384x384' --data_root 'data/mpii'
91+
python val.py --dataset mpii --checkpoint checkpoints/pose-resnet50-mpii-384x384 --data_root data/mpii
9292
```
9393

9494
### Perform Training
9595

9696
```bash
97-
python train.py --dataset 'mpii'
97+
python train.py --dataset mpii
9898
```
9999

100100
**Note**: Configurations for training are aggregated in the `lib/mpii_reader.py` and `lib/coco_reader.py`.
@@ -106,7 +106,7 @@ We also support to apply pre-trained models on customized images.
106106
Put the images into the folder `test` under the directory root of this repo. Then run
107107

108108
```bash
109-
python test.py --checkpoint 'checkpoints/pose-resnet-50-384x384-mpii'
109+
python test.py --checkpoint checkpoints/pose-resnet-50-384x384-mpii
110110
```
111111

112112
If there are multiple persons in images, detectors such as [Faster R-CNN](https://github.com/PaddlePaddle/models/tree/develop/fluid/PaddleCV/rcnn), [SSD](https://github.com/PaddlePaddle/models/tree/develop/fluid/PaddleCV/object_detection) or others should be used first to crop them out. Because the simple baseline for human pose estimation is a top-down method.

PaddleCV/ssd/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Declaration: the MobileNet-v1 SSD model is converted by [TensorFlow model](https
4747

4848
`train.py` is the main caller of the training module. Examples of usage are shown below.
4949
```bash
50-
python -u train.py --batch_size=64 --dataset='pascalvoc' --pretrained_model='pretrained/ssd_mobilenet_v1_coco/'
50+
python -u train.py --batch_size=64 --dataset=pascalvoc --pretrained_model=pretrained/ssd_mobilenet_v1_coco/
5151
```
5252
- Set ```export CUDA_VISIBLE_DEVICES=0,1``` to specifiy the number of GPU you want to use.
5353
- For more help on arguments:
@@ -70,13 +70,13 @@ You can evaluate your trained model in different metrics like 11point, integral
7070

7171
`eval.py` is the main caller of the evaluating module. Examples of usage are shown below.
7272
```bash
73-
python eval.py --dataset='pascalvoc' --model_dir='train_pascal_model/best_model' --data_dir='data/pascalvoc' --test_list='test.txt' --ap_version='11point' --nms_threshold=0.45
73+
python eval.py --dataset=pascalvoc --model_dir=model/best_model --data_dir=data/pascalvoc --test_list=test.txt
7474
```
7575

7676
### Infer and Visualize
7777
`infer.py` is the main caller of the inferring module. Examples of usage are shown below.
7878
```bash
79-
python infer.py --dataset='pascalvoc' --nms_threshold=0.45 --model_dir='train_pascal_model/best_model' --image_path='./data/pascalvoc/VOCdevkit/VOC2007/JPEGImages/009963.jpg'
79+
python infer.py --dataset=pascalvoc --nms_threshold=0.45 --model_dir=model/best_model --image_path=./data/pascalvoc/VOCdevkit/VOC2007/JPEGImages/009963.jpg
8080
```
8181
Below are the examples of running the inference and visualizing the model result.
8282
<p align="center">

PaddleCV/ssd/train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def save_model(postfix, main_prog):
203203
fluid.io.save_persistables(exe, model_path, main_program=main_prog)
204204

205205
best_map = 0.
206+
test_map = None
206207
def test(epoc_id, best_map):
207208
_, accum_map = map_eval.get_map_var()
208209
map_eval.reset(exe)
@@ -329,4 +330,4 @@ def main():
329330

330331

331332
if __name__ == '__main__':
332-
main()
333+
main()

0 commit comments

Comments
 (0)