Skip to content

Commit 0e27c3b

Browse files
committed
Merge branch 'dev-1.x' of https://github.com/open-mmlab/mmpose into dev-1.x
2 parents 9e5aa6b + 7bfa713 commit 0e27c3b

35 files changed

+3120
-607
lines changed

configs/_base_/datasets/exlpose.py

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
dataset_info = dict(
2+
dataset_name='exlpose',
3+
paper_info=dict(
4+
author='Sohyun Lee, Jaesung Rim, Boseung Jeong, Geonu Kim,'
5+
'ByungJu Woo, Haechan Lee, Sunghyun Cho, Suha Kwak',
6+
title='Human Pose Estimation in Extremely Low-Light Conditions',
7+
container='arXiv',
8+
year='2023',
9+
homepage='https://arxiv.org/abs/2303.15410',
10+
),
11+
keypoint_info={
12+
0:
13+
dict(
14+
name='left_shoulder',
15+
id=0,
16+
color=[0, 255, 0],
17+
type='upper',
18+
swap='right_shoulder'),
19+
1:
20+
dict(
21+
name='right_shoulder',
22+
id=1,
23+
color=[255, 128, 0],
24+
type='upper',
25+
swap='left_shoulder'),
26+
2:
27+
dict(
28+
name='left_elbow',
29+
id=2,
30+
color=[0, 255, 0],
31+
type='upper',
32+
swap='right_elbow'),
33+
3:
34+
dict(
35+
name='right_elbow',
36+
id=3,
37+
color=[255, 128, 0],
38+
type='upper',
39+
swap='left_elbow'),
40+
4:
41+
dict(
42+
name='left_wrist',
43+
id=4,
44+
color=[0, 255, 0],
45+
type='upper',
46+
swap='right_wrist'),
47+
5:
48+
dict(
49+
name='right_wrist',
50+
id=5,
51+
color=[255, 128, 0],
52+
type='upper',
53+
swap='left_wrist'),
54+
6:
55+
dict(
56+
name='left_hip',
57+
id=6,
58+
color=[0, 255, 0],
59+
type='lower',
60+
swap='right_hip'),
61+
7:
62+
dict(
63+
name='right_hip',
64+
id=7,
65+
color=[255, 128, 0],
66+
type='lower',
67+
swap='left_hip'),
68+
8:
69+
dict(
70+
name='left_knee',
71+
id=8,
72+
color=[0, 255, 0],
73+
type='lower',
74+
swap='right_knee'),
75+
9:
76+
dict(
77+
name='right_knee',
78+
id=9,
79+
color=[255, 128, 0],
80+
type='lower',
81+
swap='left_knee'),
82+
10:
83+
dict(
84+
name='left_ankle',
85+
id=10,
86+
color=[0, 255, 0],
87+
type='lower',
88+
swap='right_ankle'),
89+
11:
90+
dict(
91+
name='right_ankle',
92+
id=11,
93+
color=[255, 128, 0],
94+
type='lower',
95+
swap='left_ankle'),
96+
12:
97+
dict(name='head', id=12, color=[51, 153, 255], type='upper', swap=''),
98+
13:
99+
dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap='')
100+
},
101+
skeleton_info={
102+
0: dict(link=('head', 'neck'), id=0, color=[51, 153, 255]),
103+
1: dict(link=('neck', 'left_shoulder'), id=1, color=[51, 153, 255]),
104+
2: dict(link=('neck', 'right_shoulder'), id=2, color=[51, 153, 255]),
105+
3: dict(link=('left_shoulder', 'left_elbow'), id=3, color=[0, 255, 0]),
106+
4: dict(link=('left_elbow', 'left_wrist'), id=4, color=[0, 255, 0]),
107+
5: dict(
108+
link=('right_shoulder', 'right_elbow'), id=5, color=[255, 128, 0]),
109+
6:
110+
dict(link=('right_elbow', 'right_wrist'), id=6, color=[255, 128, 0]),
111+
7: dict(link=('neck', 'right_hip'), id=7, color=[51, 153, 255]),
112+
8: dict(link=('neck', 'left_hip'), id=8, color=[51, 153, 255]),
113+
9: dict(link=('right_hip', 'right_knee'), id=9, color=[255, 128, 0]),
114+
10:
115+
dict(link=('right_knee', 'right_ankle'), id=10, color=[255, 128, 0]),
116+
11: dict(link=('left_hip', 'left_knee'), id=11, color=[0, 255, 0]),
117+
12: dict(link=('left_knee', 'left_ankle'), id=12, color=[0, 255, 0]),
118+
},
119+
joint_weights=[
120+
0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, 0.2, 0.5
121+
],
122+
sigmas=[
123+
0.079, 0.079, 0.072, 0.072, 0.062, 0.062, 0.107, 0.107, 0.087, 0.087,
124+
0.089, 0.089, 0.079, 0.079
125+
])
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- [ALGORITHM] -->
2+
3+
<details>
4+
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2019/html/Sun_Deep_High-Resolution_Representation_Learning_for_Human_Pose_Estimation_CVPR_2019_paper.html">HRNet (CVPR'2019)</a></summary>
5+
6+
```bibtex
7+
@inproceedings{sun2019deep,
8+
title={Deep high-resolution representation learning for human pose estimation},
9+
author={Sun, Ke and Xiao, Bin and Liu, Dong and Wang, Jingdong},
10+
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
11+
pages={5693--5703},
12+
year={2019}
13+
}
14+
```
15+
16+
</details>
17+
18+
<!-- [DATASET] -->
19+
20+
<details>
21+
<summary align="right"><a href="http://cg.postech.ac.kr/research/ExLPose/">ExLPose (2023)</a></summary>
22+
23+
```bibtex
24+
@inproceedings{ExLPose_2023_CVPR,
25+
title={Human Pose Estimation in Extremely Low-Light Conditions},
26+
author={Sohyun Lee, Jaesung Rim, Boseung Jeong, Geonu Kim, ByungJu Woo, Haechan Lee, Sunghyun Cho, Suha Kwak},
27+
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
28+
year={2023}
29+
}
30+
```
31+
32+
</details>
33+
34+
Results on ExLPose-LLA val set with ground-truth bounding boxes
35+
36+
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
37+
| :-------------------------------------------- | :--------: | :---: | :-------------: | :-------------: | :---: | :-------------: | :-------------------------------------------: | :-------------------------------------------: |
38+
| [pose_hrnet_w32](/configs/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-256x192.py) | 256x192 | 0.401 | 0.64 | 0.40 | 0.452 | 0.693 | [ckpt](https://download.openmmlab.com/mmpose/v1/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-ll-256x192.pth) | [log](https://download.openmmlab.com/mmpose/v1/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-ll-256x192.json) |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Models:
2+
- Config: configs/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-256x192.py
3+
In Collection: HRNet
4+
Metadata:
5+
Architecture:
6+
- HRNet
7+
Training Data: ExLPose-LL
8+
Name: td-hm_hrnet-w32_8xb64-210e_exlpose-256x192
9+
Results:
10+
- Dataset: ExLPose
11+
Metrics:
12+
AP: 0.401
13+
14+
15+
AR: 0.452
16+
17+
Task: Body 2D Keypoint
18+
Weights: https://download.openmmlab.com/mmpose/v1/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-ll-256x192.pth
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
_base_ = ['../../../_base_/default_runtime.py']
2+
3+
# runtime
4+
train_cfg = dict(max_epochs=210, val_interval=10)
5+
6+
# optimizer
7+
optim_wrapper = dict(optimizer=dict(
8+
type='Adam',
9+
lr=5e-4,
10+
))
11+
12+
# learning policy
13+
param_scheduler = [
14+
dict(
15+
type='LinearLR', begin=0, end=500, start_factor=0.001,
16+
by_epoch=False), # warm-up
17+
dict(
18+
type='MultiStepLR',
19+
begin=0,
20+
end=210,
21+
milestones=[170, 200],
22+
gamma=0.1,
23+
by_epoch=True)
24+
]
25+
26+
# automatically scaling LR based on the actual training batch size
27+
auto_scale_lr = dict(base_batch_size=512)
28+
29+
# hooks
30+
default_hooks = dict(checkpoint=dict(save_best='coco/AP', rule='greater'))
31+
32+
# codec settings
33+
codec = dict(
34+
type='MSRAHeatmap', input_size=(192, 256), heatmap_size=(48, 64), sigma=2)
35+
36+
# model settings
37+
model = dict(
38+
type='TopdownPoseEstimator',
39+
data_preprocessor=dict(
40+
type='PoseDataPreprocessor',
41+
mean=[123.675, 116.28, 103.53],
42+
std=[58.395, 57.12, 57.375],
43+
bgr_to_rgb=True),
44+
backbone=dict(
45+
type='HRNet',
46+
in_channels=3,
47+
extra=dict(
48+
stage1=dict(
49+
num_modules=1,
50+
num_branches=1,
51+
block='BOTTLENECK',
52+
num_blocks=(4, ),
53+
num_channels=(64, )),
54+
stage2=dict(
55+
num_modules=1,
56+
num_branches=2,
57+
block='BASIC',
58+
num_blocks=(4, 4),
59+
num_channels=(32, 64)),
60+
stage3=dict(
61+
num_modules=4,
62+
num_branches=3,
63+
block='BASIC',
64+
num_blocks=(4, 4, 4),
65+
num_channels=(32, 64, 128)),
66+
stage4=dict(
67+
num_modules=3,
68+
num_branches=4,
69+
block='BASIC',
70+
num_blocks=(4, 4, 4, 4),
71+
num_channels=(32, 64, 128, 256))),
72+
init_cfg=dict(
73+
type='Pretrained',
74+
checkpoint='https://download.openmmlab.com/mmpose/'
75+
'pretrain_models/hrnet_w32-36af842e.pth'),
76+
),
77+
head=dict(
78+
type='HeatmapHead',
79+
in_channels=32,
80+
out_channels=14,
81+
deconv_out_channels=None,
82+
loss=dict(type='KeypointMSELoss', use_target_weight=True),
83+
decoder=codec),
84+
test_cfg=dict(
85+
flip_test=True,
86+
flip_mode='heatmap',
87+
shift_heatmap=True,
88+
))
89+
90+
# base dataset settings
91+
dataset_type = 'ExlposeDataset'
92+
data_mode = 'topdown'
93+
data_root = 'data/ExLPose/'
94+
95+
# pipelines
96+
train_pipeline = [
97+
dict(type='LoadImage'),
98+
dict(type='GetBBoxCenterScale'),
99+
dict(type='RandomFlip', direction='horizontal'),
100+
dict(type='RandomHalfBody'),
101+
dict(type='RandomBBoxTransform'),
102+
dict(type='TopdownAffine', input_size=codec['input_size']),
103+
dict(type='GenerateTarget', encoder=codec),
104+
dict(type='PackPoseInputs')
105+
]
106+
val_pipeline = [
107+
dict(type='LoadImage'),
108+
dict(type='GetBBoxCenterScale'),
109+
dict(type='TopdownAffine', input_size=codec['input_size']),
110+
dict(type='PackPoseInputs')
111+
]
112+
113+
# data loaders
114+
train_dataloader = dict(
115+
batch_size=64,
116+
num_workers=2,
117+
persistent_workers=True,
118+
sampler=dict(type='DefaultSampler', shuffle=True),
119+
dataset=dict(
120+
type=dataset_type,
121+
data_root=data_root,
122+
data_mode=data_mode,
123+
ann_file='annotations/ExLPose/ExLPose_train_LL.json',
124+
data_prefix=dict(img=''),
125+
pipeline=train_pipeline,
126+
))
127+
val_dataloader = dict(
128+
batch_size=32,
129+
num_workers=2,
130+
persistent_workers=True,
131+
drop_last=False,
132+
sampler=dict(type='DefaultSampler', shuffle=False, round_up=False),
133+
dataset=dict(
134+
type=dataset_type,
135+
data_root=data_root,
136+
data_mode=data_mode,
137+
ann_file='annotations/ExLPose/ExLPose_test_LL-A.json',
138+
data_prefix=dict(img=''),
139+
test_mode=True,
140+
pipeline=val_pipeline,
141+
))
142+
test_dataloader = val_dataloader
143+
144+
# evaluators
145+
val_evaluator = dict(
146+
type='CocoMetric',
147+
ann_file=data_root + 'annotations/ExLPose/ExLPose_test_LL-A.json',
148+
use_area=False)
149+
test_evaluator = val_evaluator

0 commit comments

Comments
 (0)