Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Add support for caffe-style ResNet and more flexible pretrained model loading #51

Merged
merged 4 commits into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add caffe-style resnet results in README
  • Loading branch information
bowenc0221 committed Nov 9, 2018
commit 0d92c9044c30bb202259d6ad0a96035b1ee86976
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,18 @@ This is an official pytorch implementation of [*Simple Baselines for Human Pose
| 256x192_pose_resnet_152_d256d256d256 | 0.720 | 0.893 | 0.798 | 0.687 | 0.789 | 0.778 | 0.934 | 0.846 | 0.736 | 0.839 |
| 384x288_pose_resnet_152_d256d256d256 | 0.743 | 0.896 | 0.811 | 0.705 | 0.816 | 0.797 | 0.937 | 0.858 | 0.751 | 0.863 |


#### Results on Caffe-style ResNet
| Arch | AP | Ap .5 | AP .75 | AP (M) | AP (L) | AR | AR .5 | AR .75 | AR (M) | AR (L) |
|---|---|---|---|---|---|---|---|---|---|---|
| 256x192_pose_resnet_50_caffe_d256d256d256 | 0.704 | 0.914 | 0.782 | 0.677 | 0.744 | 0.735 | 0.921 | 0.805 | 0.704 | 0.783 |
| 256x192_pose_resnet_101_caffe_d256d256d256 | 0.720 | 0.915 | 0.803 | 0.693 | 0.764 | 0.753 | 0.928 | 0.821 | 0.720 | 0.802 |


### Note:
- Flip test is used.
- Person detector has person AP of 56.4 on COCO val2017 dataset.
- Difference between PyTorch-style and Caffe-style ResNet is the position of stride=2 convolution

## Environment
The code is developed using python 3.6 on Ubuntu 16.04. NVIDIA GPUs are needed. The code is developed and tested using 4 NVIDIA P100 GPU cards. Other platforms or GPU cards are not fully tested.
Expand Down
77 changes: 77 additions & 0 deletions experiments/coco/resnet101/256x192_d256x3_adam_lr1e-3_caffe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
GPUS: '0'
DATA_DIR: ''
OUTPUT_DIR: 'output'
LOG_DIR: 'log'
WORKERS: 4
PRINT_FREQ: 100

DATASET:
DATASET: 'coco'
ROOT: 'data/coco/'
TEST_SET: 'val2017'
TRAIN_SET: 'train2017'
FLIP: true
ROT_FACTOR: 40
SCALE_FACTOR: 0.3
MODEL:
NAME: 'pose_resnet'
PRETRAINED: 'models/pytorch/imagenet/resnet101-caffe.pth'
STYLE: 'caffe'
IMAGE_SIZE:
- 192
- 256
NUM_JOINTS: 17
EXTRA:
TARGET_TYPE: 'gaussian'
HEATMAP_SIZE:
- 48
- 64
SIGMA: 2
FINAL_CONV_KERNEL: 1
DECONV_WITH_BIAS: false
NUM_DECONV_LAYERS: 3
NUM_DECONV_FILTERS:
- 256
- 256
- 256
NUM_DECONV_KERNELS:
- 4
- 4
- 4
NUM_LAYERS: 101
LOSS:
USE_TARGET_WEIGHT: true
TRAIN:
BATCH_SIZE: 32
SHUFFLE: true
BEGIN_EPOCH: 0
END_EPOCH: 140
RESUME: false
OPTIMIZER: 'adam'
LR: 0.001
LR_FACTOR: 0.1
LR_STEP:
- 90
- 120
WD: 0.0001
GAMMA1: 0.99
GAMMA2: 0.0
MOMENTUM: 0.9
NESTEROV: false
TEST:
BATCH_SIZE: 32
COCO_BBOX_FILE: 'data/coco/person_detection_results/COCO_val2017_detections_AP_H_56_person.json'
BBOX_THRE: 1.0
FLIP_TEST: false
IMAGE_THRE: 0.0
IN_VIS_THRE: 0.2
MODEL_FILE: ''
NMS_THRE: 1.0
OKS_THRE: 0.9
USE_GT_BBOX: true
DEBUG:
DEBUG: true
SAVE_BATCH_IMAGES_GT: true
SAVE_BATCH_IMAGES_PRED: true
SAVE_HEATMAPS_GT: true
SAVE_HEATMAPS_PRED: true
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DATASET:
SCALE_FACTOR: 0.3
MODEL:
NAME: 'pose_resnet'
PRETRAINED: 'models/pytorch/imagenet/resnet50-19c8e357.pth'
PRETRAINED: 'models/pytorch/imagenet/resnet50-caffe.pth'
STYLE: 'caffe'
IMAGE_SIZE:
- 192
Expand Down