-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeCamp2023-313]ExLPose data set support (#2778)
[CodeCamp2023-313] ExLPose data set support (#2778)
- Loading branch information
1 parent
8102383
commit ea6ce0c
Showing
13 changed files
with
1,076 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
dataset_info = dict( | ||
dataset_name='exlpose', | ||
paper_info=dict( | ||
author='Sohyun Lee, Jaesung Rim, Boseung Jeong, Geonu Kim,' | ||
'ByungJu Woo, Haechan Lee, Sunghyun Cho, Suha Kwak', | ||
title='Human Pose Estimation in Extremely Low-Light Conditions', | ||
container='arXiv', | ||
year='2023', | ||
homepage='https://arxiv.org/abs/2303.15410', | ||
), | ||
keypoint_info={ | ||
0: | ||
dict( | ||
name='left_shoulder', | ||
id=0, | ||
color=[0, 255, 0], | ||
type='upper', | ||
swap='right_shoulder'), | ||
1: | ||
dict( | ||
name='right_shoulder', | ||
id=1, | ||
color=[255, 128, 0], | ||
type='upper', | ||
swap='left_shoulder'), | ||
2: | ||
dict( | ||
name='left_elbow', | ||
id=2, | ||
color=[0, 255, 0], | ||
type='upper', | ||
swap='right_elbow'), | ||
3: | ||
dict( | ||
name='right_elbow', | ||
id=3, | ||
color=[255, 128, 0], | ||
type='upper', | ||
swap='left_elbow'), | ||
4: | ||
dict( | ||
name='left_wrist', | ||
id=4, | ||
color=[0, 255, 0], | ||
type='upper', | ||
swap='right_wrist'), | ||
5: | ||
dict( | ||
name='right_wrist', | ||
id=5, | ||
color=[255, 128, 0], | ||
type='upper', | ||
swap='left_wrist'), | ||
6: | ||
dict( | ||
name='left_hip', | ||
id=6, | ||
color=[0, 255, 0], | ||
type='lower', | ||
swap='right_hip'), | ||
7: | ||
dict( | ||
name='right_hip', | ||
id=7, | ||
color=[255, 128, 0], | ||
type='lower', | ||
swap='left_hip'), | ||
8: | ||
dict( | ||
name='left_knee', | ||
id=8, | ||
color=[0, 255, 0], | ||
type='lower', | ||
swap='right_knee'), | ||
9: | ||
dict( | ||
name='right_knee', | ||
id=9, | ||
color=[255, 128, 0], | ||
type='lower', | ||
swap='left_knee'), | ||
10: | ||
dict( | ||
name='left_ankle', | ||
id=10, | ||
color=[0, 255, 0], | ||
type='lower', | ||
swap='right_ankle'), | ||
11: | ||
dict( | ||
name='right_ankle', | ||
id=11, | ||
color=[255, 128, 0], | ||
type='lower', | ||
swap='left_ankle'), | ||
12: | ||
dict(name='head', id=12, color=[51, 153, 255], type='upper', swap=''), | ||
13: | ||
dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap='') | ||
}, | ||
skeleton_info={ | ||
0: dict(link=('head', 'neck'), id=0, color=[51, 153, 255]), | ||
1: dict(link=('neck', 'left_shoulder'), id=1, color=[51, 153, 255]), | ||
2: dict(link=('neck', 'right_shoulder'), id=2, color=[51, 153, 255]), | ||
3: dict(link=('left_shoulder', 'left_elbow'), id=3, color=[0, 255, 0]), | ||
4: dict(link=('left_elbow', 'left_wrist'), id=4, color=[0, 255, 0]), | ||
5: dict( | ||
link=('right_shoulder', 'right_elbow'), id=5, color=[255, 128, 0]), | ||
6: | ||
dict(link=('right_elbow', 'right_wrist'), id=6, color=[255, 128, 0]), | ||
7: dict(link=('neck', 'right_hip'), id=7, color=[51, 153, 255]), | ||
8: dict(link=('neck', 'left_hip'), id=8, color=[51, 153, 255]), | ||
9: dict(link=('right_hip', 'right_knee'), id=9, color=[255, 128, 0]), | ||
10: | ||
dict(link=('right_knee', 'right_ankle'), id=10, color=[255, 128, 0]), | ||
11: dict(link=('left_hip', 'left_knee'), id=11, color=[0, 255, 0]), | ||
12: dict(link=('left_knee', 'left_ankle'), id=12, color=[0, 255, 0]), | ||
}, | ||
joint_weights=[ | ||
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 | ||
], | ||
sigmas=[ | ||
0.079, 0.079, 0.072, 0.072, 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, | ||
0.089, 0.089, 0.079, 0.079 | ||
]) |
38 changes: 38 additions & 0 deletions
38
configs/body_2d_keypoint/topdown_heatmap/exlpose/hrnet_exlpose.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- [ALGORITHM] --> | ||
|
||
<details> | ||
<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> | ||
|
||
```bibtex | ||
@inproceedings{sun2019deep, | ||
title={Deep high-resolution representation learning for human pose estimation}, | ||
author={Sun, Ke and Xiao, Bin and Liu, Dong and Wang, Jingdong}, | ||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition}, | ||
pages={5693--5703}, | ||
year={2019} | ||
} | ||
``` | ||
|
||
</details> | ||
|
||
<!-- [DATASET] --> | ||
|
||
<details> | ||
<summary align="right"><a href="http://cg.postech.ac.kr/research/ExLPose/">ExLPose (2023)</a></summary> | ||
|
||
```bibtex | ||
@inproceedings{ExLPose_2023_CVPR, | ||
title={Human Pose Estimation in Extremely Low-Light Conditions}, | ||
author={Sohyun Lee, Jaesung Rim, Boseung Jeong, Geonu Kim, ByungJu Woo, Haechan Lee, Sunghyun Cho, Suha Kwak}, | ||
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, | ||
year={2023} | ||
} | ||
``` | ||
|
||
</details> | ||
|
||
Results on ExLPose-LLA val set with ground-truth bounding boxes | ||
|
||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log | | ||
| :-------------------------------------------- | :--------: | :---: | :-------------: | :-------------: | :---: | :-------------: | :-------------------------------------------: | :-------------------------------------------: | | ||
| [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) | |
18 changes: 18 additions & 0 deletions
18
configs/body_2d_keypoint/topdown_heatmap/exlpose/hrnet_exlpose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Models: | ||
- Config: configs/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-256x192.py | ||
In Collection: HRNet | ||
Metadata: | ||
Architecture: | ||
- HRNet | ||
Training Data: ExLPose-LL | ||
Name: td-hm_hrnet-w32_8xb64-210e_exlpose-256x192 | ||
Results: | ||
- Dataset: ExLPose | ||
Metrics: | ||
AP: 0.401 | ||
[email protected]: 0.64 | ||
[email protected]: 0.40 | ||
AR: 0.452 | ||
[email protected]: 0.693 | ||
Task: Body 2D Keypoint | ||
Weights: https://download.openmmlab.com/mmpose/v1/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-ll-256x192.pth |
149 changes: 149 additions & 0 deletions
149
...gs/body_2d_keypoint/topdown_heatmap/exlpose/td-hm_hrnet-w32_8xb64-210e_exlpose-256x192.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
_base_ = ['../../../_base_/default_runtime.py'] | ||
|
||
# runtime | ||
train_cfg = dict(max_epochs=210, val_interval=10) | ||
|
||
# optimizer | ||
optim_wrapper = dict(optimizer=dict( | ||
type='Adam', | ||
lr=5e-4, | ||
)) | ||
|
||
# learning policy | ||
param_scheduler = [ | ||
dict( | ||
type='LinearLR', begin=0, end=500, start_factor=0.001, | ||
by_epoch=False), # warm-up | ||
dict( | ||
type='MultiStepLR', | ||
begin=0, | ||
end=210, | ||
milestones=[170, 200], | ||
gamma=0.1, | ||
by_epoch=True) | ||
] | ||
|
||
# automatically scaling LR based on the actual training batch size | ||
auto_scale_lr = dict(base_batch_size=512) | ||
|
||
# hooks | ||
default_hooks = dict(checkpoint=dict(save_best='coco/AP', rule='greater')) | ||
|
||
# codec settings | ||
codec = dict( | ||
type='MSRAHeatmap', input_size=(192, 256), heatmap_size=(48, 64), sigma=2) | ||
|
||
# model settings | ||
model = dict( | ||
type='TopdownPoseEstimator', | ||
data_preprocessor=dict( | ||
type='PoseDataPreprocessor', | ||
mean=[123.675, 116.28, 103.53], | ||
std=[58.395, 57.12, 57.375], | ||
bgr_to_rgb=True), | ||
backbone=dict( | ||
type='HRNet', | ||
in_channels=3, | ||
extra=dict( | ||
stage1=dict( | ||
num_modules=1, | ||
num_branches=1, | ||
block='BOTTLENECK', | ||
num_blocks=(4, ), | ||
num_channels=(64, )), | ||
stage2=dict( | ||
num_modules=1, | ||
num_branches=2, | ||
block='BASIC', | ||
num_blocks=(4, 4), | ||
num_channels=(32, 64)), | ||
stage3=dict( | ||
num_modules=4, | ||
num_branches=3, | ||
block='BASIC', | ||
num_blocks=(4, 4, 4), | ||
num_channels=(32, 64, 128)), | ||
stage4=dict( | ||
num_modules=3, | ||
num_branches=4, | ||
block='BASIC', | ||
num_blocks=(4, 4, 4, 4), | ||
num_channels=(32, 64, 128, 256))), | ||
init_cfg=dict( | ||
type='Pretrained', | ||
checkpoint='https://download.openmmlab.com/mmpose/' | ||
'pretrain_models/hrnet_w32-36af842e.pth'), | ||
), | ||
head=dict( | ||
type='HeatmapHead', | ||
in_channels=32, | ||
out_channels=14, | ||
deconv_out_channels=None, | ||
loss=dict(type='KeypointMSELoss', use_target_weight=True), | ||
decoder=codec), | ||
test_cfg=dict( | ||
flip_test=True, | ||
flip_mode='heatmap', | ||
shift_heatmap=True, | ||
)) | ||
|
||
# base dataset settings | ||
dataset_type = 'ExlposeDataset' | ||
data_mode = 'topdown' | ||
data_root = 'data/ExLPose/' | ||
|
||
# pipelines | ||
train_pipeline = [ | ||
dict(type='LoadImage'), | ||
dict(type='GetBBoxCenterScale'), | ||
dict(type='RandomFlip', direction='horizontal'), | ||
dict(type='RandomHalfBody'), | ||
dict(type='RandomBBoxTransform'), | ||
dict(type='TopdownAffine', input_size=codec['input_size']), | ||
dict(type='GenerateTarget', encoder=codec), | ||
dict(type='PackPoseInputs') | ||
] | ||
val_pipeline = [ | ||
dict(type='LoadImage'), | ||
dict(type='GetBBoxCenterScale'), | ||
dict(type='TopdownAffine', input_size=codec['input_size']), | ||
dict(type='PackPoseInputs') | ||
] | ||
|
||
# data loaders | ||
train_dataloader = dict( | ||
batch_size=64, | ||
num_workers=2, | ||
persistent_workers=True, | ||
sampler=dict(type='DefaultSampler', shuffle=True), | ||
dataset=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
data_mode=data_mode, | ||
ann_file='annotations/ExLPose/ExLPose_train_LL.json', | ||
data_prefix=dict(img=''), | ||
pipeline=train_pipeline, | ||
)) | ||
val_dataloader = dict( | ||
batch_size=32, | ||
num_workers=2, | ||
persistent_workers=True, | ||
drop_last=False, | ||
sampler=dict(type='DefaultSampler', shuffle=False, round_up=False), | ||
dataset=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
data_mode=data_mode, | ||
ann_file='annotations/ExLPose/ExLPose_test_LL-A.json', | ||
data_prefix=dict(img=''), | ||
test_mode=True, | ||
pipeline=val_pipeline, | ||
)) | ||
test_dataloader = val_dataloader | ||
|
||
# evaluators | ||
val_evaluator = dict( | ||
type='CocoMetric', | ||
ann_file=data_root + 'annotations/ExLPose/ExLPose_test_LL-A.json', | ||
use_area=False) | ||
test_evaluator = val_evaluator |
Oops, something went wrong.