File size: 1,486 Bytes
dbf90d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Human Mesh Recovery

## Data

1. Download the datasets [here](https://1drv.ms/f/s!AvAdh0LSjEOlfy-hqlHxdVMZxWM) and put them to  `data/mesh/`. We use Human3.6M, COCO, and PW3D for training and testing. Descriptions of the joint regressors could be found in [SPIN](https://github.com/nkolot/SPIN/tree/master/data).
2. Download the SMPL model(`basicModel_neutral_lbs_10_207_0_v1.0.0.pkl`) from [SMPLify](https://smplify.is.tue.mpg.de/), put it  to `data/mesh/`, and rename it as `SMPL_NEUTRAL.pkl`


## Running

**Train from scratch:**

```bash
# with 3DPW
python train_mesh.py \
--config configs/mesh/MB_train_pw3d.yaml \
--checkpoint checkpoint/mesh/MB_train_pw3d

# H36M
python train_mesh.py \
--config configs/mesh/MB_train_h36m.yaml \
--checkpoint checkpoint/mesh/MB_train_h36m
```

**Finetune from a pretrained model:**

```bash
# with 3DPW
python train_mesh.py \
--config configs/mesh/MB_ft_pw3d.yaml \
--pretrained checkpoint/pretrain/MB_release \
--checkpoint checkpoint/mesh/FT_MB_release_MB_ft_pw3d

# H36M
python train_mesh.py \
--config configs/mesh/MB_ft_h36m.yaml \
--pretrained checkpoint/pretrain/MB_release \
--checkpoint checkpoint/mesh/FT_MB_release_MB_ft_h36m

```

**Evaluate:**

```bash
# with 3DPW
python train_mesh.py \
--config configs/mesh/MB_train_pw3d.yaml \
--evaluate checkpoint/mesh/MB_train_pw3d/best_epoch.bin 

# H36M
python train_mesh.py \
--config configs/mesh/MB_train_h36m.yaml \
--evaluate checkpoint/mesh/MB_train_h36m/best_epoch.bin 
```