Initial snapshot: hand motion pipeline (Dyn-HaMR + dex-retargeting + SPIDER)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
# Image-based Human Body 2D Pose Estimation
|
||||
|
||||
Multi-person human pose estimation is defined as the task of detecting the poses (or keypoints) of all people from an input image.
|
||||
|
||||
Existing approaches can be categorized into top-down and bottom-up approaches.
|
||||
|
||||
Top-down methods (e.g. deeppose) divide the task into two stages: human detection and pose estimation. They perform human detection first, followed by single-person pose estimation given human bounding boxes.
|
||||
|
||||
Bottom-up approaches (e.g. AE) first detect all the keypoints and then group/associate them into person instances.
|
||||
|
||||
## Data preparation
|
||||
|
||||
Please follow [DATA Preparation](/docs/en/tasks/2d_body_keypoint.md) to prepare data.
|
||||
|
||||
## Demo
|
||||
|
||||
Please follow [Demo](/demo/docs/2d_human_pose_demo.md#2d-human-pose-demo) to run demos.
|
||||
|
||||
<img src="demo/resources/demo_coco.gif" width="600px" alt>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
# Associative embedding: End-to-end learning for joint detection and grouping (AE)
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
AE is one of the most popular 2D bottom-up pose estimation approaches, that first detect all the keypoints and
|
||||
then group/associate them into person instances.
|
||||
|
||||
In order to group all the predicted keypoints to individuals, a tag is also predicted for each detected keypoint.
|
||||
Tags of the same person are similar, while tags of different people are different. Thus the keypoints can be grouped
|
||||
according to the tags.
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html">HigherHRNet (CVPR'2020)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{cheng2020higherhrnet,
|
||||
title={HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation},
|
||||
author={Cheng, Bowen and Xiao, Bin and Wang, Jingdong and Shi, Honghui and Huang, Thomas S and Zhang, Lei},
|
||||
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
|
||||
pages={5386--5395},
|
||||
year={2020}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1711.06475">AI Challenger (ArXiv'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@article{wu2017ai,
|
||||
title={Ai challenger: A large-scale dataset for going deeper in image understanding},
|
||||
author={Wu, Jiahong and Zheng, He and Zhao, Bo and Li, Yixin and Yan, Baoming and Liang, Rui and Wang, Wenjia and Zhou, Shipei and Lin, Guosen and Fu, Yanwei and others},
|
||||
journal={arXiv preprint arXiv:1711.06475},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on AIC validation set without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py) | 512x512 | 0.315 | 0.710 | 0.243 | 0.379 | 0.757 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_aic_512x512-9a674c33_20210130.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_aic_512x512_20210130.log.json) |
|
||||
|
||||
Results on AIC validation set with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py) | 512x512 | 0.323 | 0.718 | 0.254 | 0.379 | 0.758 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_aic_512x512-9a674c33_20210130.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_aic_512x512_20210130.log.json) |
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
Collections:
|
||||
- Name: HigherHRNet
|
||||
Paper:
|
||||
Title: 'HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose
|
||||
Estimation'
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/higherhrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HigherHRNet
|
||||
Training Data: AI Challenger
|
||||
Name: associative_embedding_higherhrnet_w32_aic_512x512
|
||||
Results:
|
||||
- Dataset: AI Challenger
|
||||
Metrics:
|
||||
AP: 0.315
|
||||
AP@0.5: 0.71
|
||||
AP@0.75: 0.243
|
||||
AR: 0.379
|
||||
AR@0.5: 0.757
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_aic_512x512-9a674c33_20210130.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: AI Challenger
|
||||
Name: associative_embedding_higherhrnet_w32_aic_512x512
|
||||
Results:
|
||||
- Dataset: AI Challenger
|
||||
Metrics:
|
||||
AP: 0.323
|
||||
AP@0.5: 0.718
|
||||
AP@0.75: 0.254
|
||||
AR: 0.379
|
||||
AR@0.5: 0.758
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_aic_512x512-9a674c33_20210130.pth
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.01, 0.01],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.01, 0.01],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [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="https://arxiv.org/abs/1711.06475">AI Challenger (ArXiv'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@article{wu2017ai,
|
||||
title={Ai challenger: A large-scale dataset for going deeper in image understanding},
|
||||
author={Wu, Jiahong and Zheng, He and Zhao, Bo and Li, Yixin and Yan, Baoming and Liang, Rui and Wang, Wenjia and Zhou, Shipei and Lin, Guosen and Fu, Yanwei and others},
|
||||
journal={arXiv preprint arXiv:1711.06475},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on AIC validation set without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py) | 512x512 | 0.303 | 0.697 | 0.225 | 0.373 | 0.755 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_aic_512x512-77e2a98a_20210131.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_aic_512x512_20210131.log.json) |
|
||||
|
||||
Results on AIC validation set with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py) | 512x512 | 0.318 | 0.717 | 0.246 | 0.379 | 0.764 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_aic_512x512-77e2a98a_20210131.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_aic_512x512_20210131.log.json) |
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
Collections:
|
||||
- Name: HRNet
|
||||
Paper:
|
||||
Title: Deep high-resolution representation learning for human pose estimation
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2019/html/Sun_Deep_High-Resolution_Representation_Learning_for_Human_Pose_Estimation_CVPR_2019_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/hrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HRNet
|
||||
Training Data: AI Challenger
|
||||
Name: associative_embedding_hrnet_w32_aic_512x512
|
||||
Results:
|
||||
- Dataset: AI Challenger
|
||||
Metrics:
|
||||
AP: 0.303
|
||||
AP@0.5: 0.697
|
||||
AP@0.75: 0.225
|
||||
AR: 0.373
|
||||
AR@0.5: 0.755
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_aic_512x512-77e2a98a_20210131.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: AI Challenger
|
||||
Name: associative_embedding_hrnet_w32_aic_512x512
|
||||
Results:
|
||||
- Dataset: AI Challenger
|
||||
Metrics:
|
||||
AP: 0.318
|
||||
AP@0.5: 0.717
|
||||
AP@0.75: 0.246
|
||||
AR: 0.379
|
||||
AR@0.5: 0.764
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_aic_512x512-77e2a98a_20210131.pth
|
||||
+191
@@ -0,0 +1,191 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.01],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html">HigherHRNet (CVPR'2020)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{cheng2020higherhrnet,
|
||||
title={HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation},
|
||||
author={Cheng, Bowen and Xiao, Bin and Wang, Jingdong and Shi, Honghui and Huang, Thomas S and Zhang, Lei},
|
||||
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
|
||||
pages={5386--5395},
|
||||
year={2020}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py) | 512x512 | 0.677 | 0.870 | 0.738 | 0.723 | 0.890 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512-8ae85183_20200713.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512_20200713.log.json) |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py) | 640x640 | 0.686 | 0.871 | 0.747 | 0.733 | 0.898 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640-a22fe938_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640_20200712.log.json) |
|
||||
| [HigherHRNet-w48](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py) | 512x512 | 0.686 | 0.873 | 0.741 | 0.731 | 0.892 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512-60fedcbc_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_20200712.log.json) |
|
||||
|
||||
Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py) | 512x512 | 0.706 | 0.881 | 0.771 | 0.747 | 0.901 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512-8ae85183_20200713.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512_20200713.log.json) |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py) | 640x640 | 0.706 | 0.880 | 0.770 | 0.749 | 0.902 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640-a22fe938_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640_20200712.log.json) |
|
||||
| [HigherHRNet-w48](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py) | 512x512 | 0.716 | 0.884 | 0.775 | 0.755 | 0.901 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512-60fedcbc_20200712.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_20200712.log.json) |
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
Collections:
|
||||
- Name: HigherHRNet
|
||||
Paper:
|
||||
Title: 'HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose
|
||||
Estimation'
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/higherhrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HigherHRNet
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w32_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.677
|
||||
AP@0.5: 0.87
|
||||
AP@0.75: 0.738
|
||||
AR: 0.723
|
||||
AR@0.5: 0.89
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512-8ae85183_20200713.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w32_coco_640x640
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.686
|
||||
AP@0.5: 0.871
|
||||
AP@0.75: 0.747
|
||||
AR: 0.733
|
||||
AR@0.5: 0.898
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640-a22fe938_20200712.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w48_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.686
|
||||
AP@0.5: 0.873
|
||||
AP@0.75: 0.741
|
||||
AR: 0.731
|
||||
AR@0.5: 0.892
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512-60fedcbc_20200712.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w32_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.706
|
||||
AP@0.5: 0.881
|
||||
AP@0.75: 0.771
|
||||
AR: 0.747
|
||||
AR@0.5: 0.901
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512-8ae85183_20200713.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w32_coco_640x640
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.706
|
||||
AP@0.5: 0.88
|
||||
AP@0.75: 0.77
|
||||
AR: 0.749
|
||||
AR@0.5: 0.902
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_640x640-a22fe938_20200712.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w48_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.716
|
||||
AP@0.5: 0.884
|
||||
AP@0.75: 0.775
|
||||
AR: 0.755
|
||||
AR@0.5: 0.901
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512-60fedcbc_20200712.pth
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html">HigherHRNet (CVPR'2020)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{cheng2020higherhrnet,
|
||||
title={HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation},
|
||||
author={Cheng, Bowen and Xiao, Bin and Wang, Jingdong and Shi, Honghui and Huang, Thomas S and Zhang, Lei},
|
||||
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
|
||||
pages={5386--5395},
|
||||
year={2020}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2020/html/Huang_The_Devil_Is_in_the_Details_Delving_Into_Unbiased_Data_CVPR_2020_paper.html">UDP (CVPR'2020)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@InProceedings{Huang_2020_CVPR,
|
||||
author = {Huang, Junjie and Zhu, Zheng and Guo, Feng and Huang, Guan},
|
||||
title = {The Devil Is in the Details: Delving Into Unbiased Data Processing for Human Pose Estimation},
|
||||
booktitle = {The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
|
||||
month = {June},
|
||||
year = {2020}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HigherHRNet-w32_udp](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py) | 512x512 | 0.678 | 0.862 | 0.736 | 0.724 | 0.890 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512_udp-8cc64794_20210222.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512_udp_20210222.log.json) |
|
||||
| [HigherHRNet-w48_udp](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py) | 512x512 | 0.690 | 0.872 | 0.750 | 0.734 | 0.891 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_udp-7cad61ef_20210222.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_udp_20210222.log.json) |
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
Collections:
|
||||
- Name: HigherHRNet
|
||||
Paper:
|
||||
Title: 'HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose
|
||||
Estimation'
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/higherhrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HigherHRNet
|
||||
- UDP
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w32_coco_512x512_udp
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.678
|
||||
AP@0.5: 0.862
|
||||
AP@0.75: 0.736
|
||||
AR: 0.724
|
||||
AR@0.5: 0.89
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_coco_512x512_udp-8cc64794_20210222.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_higherhrnet_w48_coco_512x512_udp
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.69
|
||||
AP@0.5: 0.872
|
||||
AP@0.75: 0.75
|
||||
AR: 0.734
|
||||
AR@0.5: 0.891
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet48_coco_512x512_udp-7cad61ef_20210222.pth
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160, 320],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160, 320],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=48,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[48],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=48,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[48],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">HourglassAENet (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [pose_hourglass_ae](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hourglass_ae_coco_512x512.py) | 512x512 | 0.613 | 0.833 | 0.667 | 0.659 | 0.850 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hourglass_ae/hourglass_ae_coco_512x512-90af499f_20210920.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hourglass_ae/hourglass_ae_coco_512x512_20210920.log.json) |
|
||||
|
||||
Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [pose_hourglass_ae](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hourglass_ae_coco_512x512.py) | 512x512 | 0.667 | 0.855 | 0.723 | 0.707 | 0.877 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hourglass_ae/hourglass_ae_coco_512x512-90af499f_20210920.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hourglass_ae/hourglass_ae_coco_512x512_20210920.log.json) |
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
Collections:
|
||||
- Name: Associative Embedding
|
||||
Paper:
|
||||
Title: 'Associative embedding: End-to-end learning for joint detection and grouping'
|
||||
URL: https://arxiv.org/abs/1611.05424
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/algorithms/associative_embedding.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hourglass_ae_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HourglassAENet
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hourglass_ae_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.613
|
||||
AP@0.5: 0.833
|
||||
AP@0.75: 0.667
|
||||
AR: 0.659
|
||||
AR@0.5: 0.85
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hourglass_ae/hourglass_ae_coco_512x512-90af499f_20210920.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hourglass_ae_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hourglass_ae_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.667
|
||||
AP@0.5: 0.855
|
||||
AP@0.75: 0.723
|
||||
AR: 0.707
|
||||
AR@0.5: 0.877
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hourglass_ae/hourglass_ae_coco_512x512-90af499f_20210920.pth
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='HourglassAENet',
|
||||
num_stacks=4,
|
||||
out_channels=34,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEMultiStageHead',
|
||||
in_channels=34,
|
||||
out_channels=34,
|
||||
num_stages=4,
|
||||
num_deconv_layers=0,
|
||||
extra=dict(final_conv_kernel=0),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=4,
|
||||
ae_loss_type='exp',
|
||||
with_heatmaps_loss=[True, True, True, True],
|
||||
with_ae_loss=[True, True, True, True],
|
||||
push_loss_factor=[0.001, 0.001, 0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001, 0.001, 0.001],
|
||||
heatmaps_loss_factor=[1.0, 1.0, 1.0, 1.0])),
|
||||
train_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
img_size=data_cfg['image_size']),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True, True, True],
|
||||
with_ae=[True, True, True, True],
|
||||
select_output_index=[3],
|
||||
project2image=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='MultitaskGatherTarget',
|
||||
pipeline_list=[
|
||||
[dict(type='BottomUpGenerateTarget', sigma=2, max_num_people=30)],
|
||||
],
|
||||
pipeline_indices=[0] * 4,
|
||||
keys=['targets', 'masks', 'joints']),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=6),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [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="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py) | 512x512 | 0.654 | 0.863 | 0.720 | 0.710 | 0.892 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512_20200816.log.json) |
|
||||
| [HRNet-w48](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py) | 512x512 | 0.665 | 0.860 | 0.727 | 0.716 | 0.889 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512-cf72fcdf_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512_20200816.log.json) |
|
||||
|
||||
Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py) | 512x512 | 0.698 | 0.877 | 0.760 | 0.748 | 0.907 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512_20200816.log.json) |
|
||||
| [HRNet-w48](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py) | 512x512 | 0.712 | 0.880 | 0.771 | 0.757 | 0.909 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512-cf72fcdf_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512_20200816.log.json) |
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
Collections:
|
||||
- Name: HRNet
|
||||
Paper:
|
||||
Title: Deep high-resolution representation learning for human pose estimation
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2019/html/Sun_Deep_High-Resolution_Representation_Learning_for_Human_Pose_Estimation_CVPR_2019_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/hrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HRNet
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hrnet_w32_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.654
|
||||
AP@0.5: 0.863
|
||||
AP@0.75: 0.72
|
||||
AR: 0.71
|
||||
AR@0.5: 0.892
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hrnet_w48_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.665
|
||||
AP@0.5: 0.86
|
||||
AP@0.75: 0.727
|
||||
AR: 0.716
|
||||
AR@0.5: 0.889
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512-cf72fcdf_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hrnet_w32_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.698
|
||||
AP@0.5: 0.877
|
||||
AP@0.75: 0.76
|
||||
AR: 0.748
|
||||
AR@0.5: 0.907
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512-bcb8c247_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hrnet_w48_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.712
|
||||
AP@0.5: 0.88
|
||||
AP@0.75: 0.771
|
||||
AR: 0.757
|
||||
AR@0.5: 0.909
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512-cf72fcdf_20200816.pth
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<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>
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2020/html/Huang_The_Devil_Is_in_the_Details_Delving_Into_Unbiased_Data_CVPR_2020_paper.html">UDP (CVPR'2020)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@InProceedings{Huang_2020_CVPR,
|
||||
author = {Huang, Junjie and Zhu, Zheng and Guo, Feng and Huang, Guan},
|
||||
title = {The Devil Is in the Details: Delving Into Unbiased Data Processing for Human Pose Estimation},
|
||||
booktitle = {The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
|
||||
month = {June},
|
||||
year = {2020}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w32_udp](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py) | 512x512 | 0.671 | 0.863 | 0.729 | 0.717 | 0.889 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512_udp-91663bf9_20210220.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512_udp_20210220.log.json) |
|
||||
| [HRNet-w48_udp](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py) | 512x512 | 0.681 | 0.872 | 0.741 | 0.725 | 0.892 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512_udp-de08fd8c_20210222.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512_udp_20210222.log.json) |
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
Collections:
|
||||
- Name: UDP
|
||||
Paper:
|
||||
Title: 'The Devil Is in the Details: Delving Into Unbiased Data Processing for
|
||||
Human Pose Estimation'
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2020/html/Huang_The_Devil_Is_in_the_Details_Delving_Into_Unbiased_Data_CVPR_2020_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/techniques/udp.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py
|
||||
In Collection: UDP
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HRNet
|
||||
- UDP
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hrnet_w32_coco_512x512_udp
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.671
|
||||
AP@0.5: 0.863
|
||||
AP@0.75: 0.729
|
||||
AR: 0.717
|
||||
AR@0.5: 0.889
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w32_coco_512x512_udp-91663bf9_20210220.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py
|
||||
In Collection: UDP
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_hrnet_w48_coco_512x512_udp
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.681
|
||||
AP@0.5: 0.872
|
||||
AP@0.75: 0.741
|
||||
AR: 0.725
|
||||
AR@0.5: 0.892
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_coco_512x512_udp-de08fd8c_20210222.pth
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=32,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=48,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=48,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=48,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=8),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=48,
|
||||
num_joints=17,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=8),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2018/html/Sandler_MobileNetV2_Inverted_Residuals_CVPR_2018_paper.html">MobilenetV2 (CVPR'2018)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{sandler2018mobilenetv2,
|
||||
title={Mobilenetv2: Inverted residuals and linear bottlenecks},
|
||||
author={Sandler, Mark and Howard, Andrew and Zhu, Menglong and Zhmoginov, Andrey and Chen, Liang-Chieh},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={4510--4520},
|
||||
year={2018}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [pose_mobilenetv2](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py) | 512x512 | 0.380 | 0.671 | 0.368 | 0.473 | 0.741 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512-4d96e309_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512_20200816.log.json) |
|
||||
|
||||
Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [pose_mobilenetv2](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py) | 512x512 | 0.442 | 0.696 | 0.422 | 0.517 | 0.766 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512-4d96e309_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512_20200816.log.json) |
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
Collections:
|
||||
- Name: MobilenetV2
|
||||
Paper:
|
||||
Title: 'Mobilenetv2: Inverted residuals and linear bottlenecks'
|
||||
URL: http://openaccess.thecvf.com/content_cvpr_2018/html/Sandler_MobileNetV2_Inverted_Residuals_CVPR_2018_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/mobilenetv2.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py
|
||||
In Collection: MobilenetV2
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- MobilenetV2
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_mobilenetv2_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.38
|
||||
AP@0.5: 0.671
|
||||
AP@0.75: 0.368
|
||||
AR: 0.473
|
||||
AR@0.5: 0.741
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512-4d96e309_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py
|
||||
In Collection: MobilenetV2
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_mobilenetv2_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.442
|
||||
AP@0.5: 0.696
|
||||
AP@0.75: 0.422
|
||||
AR: 0.517
|
||||
AR@0.5: 0.766
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/mobilenetv2_coco_512x512-4d96e309_20200816.pth
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='mmcls://mobilenet_v2',
|
||||
backbone=dict(type='MobileNetV2', widen_factor=1., out_indices=(7, )),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=1280,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=1,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0],
|
||||
)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=1,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=17,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=17,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
workers_per_gpu=1,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html">ResNet (CVPR'2016)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{he2016deep,
|
||||
title={Deep residual learning for image recognition},
|
||||
author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={770--778},
|
||||
year={2016}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [pose_resnet_50](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py) | 512x512 | 0.466 | 0.742 | 0.479 | 0.552 | 0.797 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_512x512-5521bead_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_512x512_20200816.log.json) |
|
||||
| [pose_resnet_50](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py) | 640x640 | 0.479 | 0.757 | 0.487 | 0.566 | 0.810 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_640x640-2046f9cb_20200822.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_640x640_20200822.log.json) |
|
||||
| [pose_resnet_101](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py) | 512x512 | 0.554 | 0.807 | 0.599 | 0.622 | 0.841 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res101_coco_512x512-e0c95157_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res101_coco_512x512_20200816.log.json) |
|
||||
| [pose_resnet_152](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py) | 512x512 | 0.595 | 0.829 | 0.648 | 0.651 | 0.856 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res152_coco_512x512-364eb38d_20200822.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res152_coco_512x512_20200822.log.json) |
|
||||
|
||||
Results on COCO val2017 with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [pose_resnet_50](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py) | 512x512 | 0.503 | 0.765 | 0.521 | 0.591 | 0.821 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_512x512-5521bead_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_512x512_20200816.log.json) |
|
||||
| [pose_resnet_50](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py) | 640x640 | 0.525 | 0.784 | 0.542 | 0.610 | 0.832 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_640x640-2046f9cb_20200822.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res50_coco_640x640_20200822.log.json) |
|
||||
| [pose_resnet_101](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py) | 512x512 | 0.603 | 0.831 | 0.641 | 0.668 | 0.870 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res101_coco_512x512-e0c95157_20200816.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res101_coco_512x512_20200816.log.json) |
|
||||
| [pose_resnet_152](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py) | 512x512 | 0.660 | 0.860 | 0.713 | 0.709 | 0.889 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/res152_coco_512x512-364eb38d_20200822.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/res152_coco_512x512_20200822.log.json) |
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
Collections:
|
||||
- Name: Associative Embedding
|
||||
Paper:
|
||||
Title: 'Associative embedding: End-to-end learning for joint detection and grouping'
|
||||
URL: https://arxiv.org/abs/1611.05424
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/algorithms/associative_embedding.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- ResNet
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res50_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.466
|
||||
AP@0.5: 0.742
|
||||
AP@0.75: 0.479
|
||||
AR: 0.552
|
||||
AR@0.5: 0.797
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res50_coco_512x512-5521bead_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res50_coco_640x640
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.479
|
||||
AP@0.5: 0.757
|
||||
AP@0.75: 0.487
|
||||
AR: 0.566
|
||||
AR@0.5: 0.81
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res50_coco_640x640-2046f9cb_20200822.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res101_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.554
|
||||
AP@0.5: 0.807
|
||||
AP@0.75: 0.599
|
||||
AR: 0.622
|
||||
AR@0.5: 0.841
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res101_coco_512x512-e0c95157_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res152_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.595
|
||||
AP@0.5: 0.829
|
||||
AP@0.75: 0.648
|
||||
AR: 0.651
|
||||
AR@0.5: 0.856
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res152_coco_512x512-364eb38d_20200822.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res50_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.503
|
||||
AP@0.5: 0.765
|
||||
AP@0.75: 0.521
|
||||
AR: 0.591
|
||||
AR@0.5: 0.821
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res50_coco_512x512-5521bead_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res50_coco_640x640
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.525
|
||||
AP@0.5: 0.784
|
||||
AP@0.75: 0.542
|
||||
AR: 0.61
|
||||
AR@0.5: 0.832
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res50_coco_640x640-2046f9cb_20200822.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res101_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.603
|
||||
AP@0.5: 0.831
|
||||
AP@0.75: 0.641
|
||||
AR: 0.668
|
||||
AR@0.5: 0.87
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res101_coco_512x512-e0c95157_20200816.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py
|
||||
In Collection: Associative Embedding
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: associative_embedding_res152_coco_512x512
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.66
|
||||
AP@0.5: 0.86
|
||||
AP@0.75: 0.713
|
||||
AR: 0.709
|
||||
AR@0.5: 0.889
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/res152_coco_512x512-364eb38d_20200822.pth
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html">HigherHRNet (CVPR'2020)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{cheng2020higherhrnet,
|
||||
title={HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose Estimation},
|
||||
author={Cheng, Bowen and Xiao, Bin and Wang, Jingdong and Shi, Honghui and Huang, Thomas S and Zhang, Lei},
|
||||
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
|
||||
pages={5386--5395},
|
||||
year={2020}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_CVPR_2019/html/Li_CrowdPose_Efficient_Crowded_Scenes_Pose_Estimation_and_a_New_Benchmark_CVPR_2019_paper.html">CrowdPose (CVPR'2019)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@article{li2018crowdpose,
|
||||
title={CrowdPose: Efficient Crowded Scenes Pose Estimation and A New Benchmark},
|
||||
author={Li, Jiefeng and Wang, Can and Zhu, Hao and Mao, Yihuan and Fang, Hao-Shu and Lu, Cewu},
|
||||
journal={arXiv preprint arXiv:1812.00324},
|
||||
year={2018}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on CrowdPose test without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AP (E) | AP (M) | AP (H) | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: | :------: |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py) | 512x512 | 0.655 | 0.859 | 0.705 | 0.728 | 0.660 | 0.577 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512-1aa4a132_20201017.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512_20201017.log.json) |
|
||||
|
||||
Results on CrowdPose test with multi-scale test. 2 scales (\[2, 1\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AP (E) | AP (M) | AP (H) | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: | :------: |
|
||||
| [HigherHRNet-w32](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py) | 512x512 | 0.661 | 0.864 | 0.710 | 0.742 | 0.670 | 0.566 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512-1aa4a132_20201017.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512_20201017.log.json) |
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
Collections:
|
||||
- Name: HigherHRNet
|
||||
Paper:
|
||||
Title: 'HigherHRNet: Scale-Aware Representation Learning for Bottom-Up Human Pose
|
||||
Estimation'
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2020/html/Cheng_HigherHRNet_Scale-Aware_Representation_Learning_for_Bottom-Up_Human_Pose_Estimation_CVPR_2020_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/higherhrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HigherHRNet
|
||||
Training Data: CrowdPose
|
||||
Name: associative_embedding_higherhrnet_w32_crowdpose_512x512
|
||||
Results:
|
||||
- Dataset: CrowdPose
|
||||
Metrics:
|
||||
AP: 0.655
|
||||
AP (E): 0.728
|
||||
AP (H): 0.577
|
||||
AP (M): 0.66
|
||||
AP@0.5: 0.859
|
||||
AP@0.75: 0.705
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512-1aa4a132_20201017.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py
|
||||
In Collection: HigherHRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: CrowdPose
|
||||
Name: associative_embedding_higherhrnet_w32_crowdpose_512x512
|
||||
Results:
|
||||
- Dataset: CrowdPose
|
||||
Metrics:
|
||||
AP: 0.661
|
||||
AP (E): 0.742
|
||||
AP (H): 0.566
|
||||
AP (M): 0.67
|
||||
AP@0.5: 0.864
|
||||
AP@0.75: 0.71
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/higher_hrnet32_crowdpose_512x512-1aa4a132_20201017.pth
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160, 320],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=640,
|
||||
base_size=320,
|
||||
base_sigma=2,
|
||||
heatmap_size=[160, 320],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=32,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[32],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=48,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[48],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128, 256],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=2,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AEHigherResolutionHead',
|
||||
in_channels=48,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
num_deconv_layers=1,
|
||||
num_deconv_filters=[48],
|
||||
num_deconv_kernels=[4],
|
||||
num_basic_blocks=4,
|
||||
cat_output=[True],
|
||||
with_ae_loss=[True, False],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=2,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True, False],
|
||||
push_loss_factor=[0.001, 0.001],
|
||||
pull_loss_factor=[0.001, 0.001],
|
||||
with_heatmaps_loss=[True, True],
|
||||
heatmaps_loss_factor=[1.0, 1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True, True],
|
||||
with_ae=[True, False],
|
||||
project2image=False,
|
||||
align_corners=True,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True,
|
||||
use_udp=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40,
|
||||
use_udp=True),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
use_udp=True,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1], use_udp=True),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225])
|
||||
],
|
||||
use_udp=True),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='mmcls://mobilenet_v2',
|
||||
backbone=dict(type='MobileNetV2', widen_factor=1., out_indices=(7, )),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=1280,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/crowdpose.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.0015,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[200, 260])
|
||||
total_epochs = 300
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=2048,
|
||||
num_joints=14,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=14,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.001],
|
||||
pull_loss_factor=[0.001],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0],
|
||||
)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/crowdpose'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=24),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpCrowdPoseDataset',
|
||||
ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1611.05424">Associative Embedding (NIPS'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{newell2017associative,
|
||||
title={Associative embedding: End-to-end learning for joint detection and grouping},
|
||||
author={Newell, Alejandro and Huang, Zhiao and Deng, Jia},
|
||||
booktitle={Advances in neural information processing systems},
|
||||
pages={2277--2287},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [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="https://dl.acm.org/doi/abs/10.1145/3240508.3240509">MHP (ACM MM'2018)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{zhao2018understanding,
|
||||
title={Understanding humans in crowded scenes: Deep nested adversarial learning and a new benchmark for multi-human parsing},
|
||||
author={Zhao, Jian and Li, Jianshu and Cheng, Yu and Sim, Terence and Yan, Shuicheng and Feng, Jiashi},
|
||||
booktitle={Proceedings of the 26th ACM international conference on Multimedia},
|
||||
pages={792--800},
|
||||
year={2018}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on MHP v2.0 validation set without multi-scale test
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w48](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_mhp_512x512.py) | 512x512 | 0.583 | 0.895 | 0.666 | 0.656 | 0.931 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_mhp_512x512-85a6ab6f_20201229.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_mhp_512x512_20201229.log.json) |
|
||||
|
||||
Results on MHP v2.0 validation set with multi-scale test. 3 default scales (\[2, 1, 0.5\]) are used
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :----------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [HRNet-w48](/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_mhp_512x512.py) | 512x512 | 0.592 | 0.898 | 0.673 | 0.664 | 0.932 | [ckpt](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_mhp_512x512-85a6ab6f_20201229.pth) | [log](https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_mhp_512x512_20201229.log.json) |
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
Collections:
|
||||
- Name: HRNet
|
||||
Paper:
|
||||
Title: Deep high-resolution representation learning for human pose estimation
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2019/html/Sun_Deep_High-Resolution_Representation_Learning_for_Human_Pose_Estimation_CVPR_2019_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/hrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_mhp_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- Associative Embedding
|
||||
- HRNet
|
||||
Training Data: MHP
|
||||
Name: associative_embedding_hrnet_w48_mhp_512x512
|
||||
Results:
|
||||
- Dataset: MHP
|
||||
Metrics:
|
||||
AP: 0.583
|
||||
AP@0.5: 0.895
|
||||
AP@0.75: 0.666
|
||||
AR: 0.656
|
||||
AR@0.5: 0.931
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_mhp_512x512-85a6ab6f_20201229.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_mhp_512x512.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: MHP
|
||||
Name: associative_embedding_hrnet_w48_mhp_512x512
|
||||
Results:
|
||||
- Dataset: MHP
|
||||
Metrics:
|
||||
AP: 0.592
|
||||
AP@0.5: 0.898
|
||||
AP@0.75: 0.673
|
||||
AR: 0.664
|
||||
AR@0.5: 0.932
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/bottom_up/hrnet_w48_mhp_512x512-85a6ab6f_20201229.pth
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/mhp.py'
|
||||
]
|
||||
checkpoint_config = dict(interval=50)
|
||||
evaluation = dict(interval=50, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=0.005,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[400, 550])
|
||||
total_epochs = 600
|
||||
channel_cfg = dict(
|
||||
dataset_joints=16,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=512,
|
||||
base_size=256,
|
||||
base_sigma=2,
|
||||
heatmap_size=[128],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
num_scales=1,
|
||||
scale_aware_sigma=False,
|
||||
)
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='AssociativeEmbedding',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='AESimpleHead',
|
||||
in_channels=48,
|
||||
num_joints=16,
|
||||
num_deconv_layers=0,
|
||||
tag_per_joint=True,
|
||||
with_ae_loss=[True],
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(
|
||||
type='MultiLossFactory',
|
||||
num_joints=16,
|
||||
num_stages=1,
|
||||
ae_loss_type='exp',
|
||||
with_ae_loss=[True],
|
||||
push_loss_factor=[0.01],
|
||||
pull_loss_factor=[0.01],
|
||||
with_heatmaps_loss=[True],
|
||||
heatmaps_loss_factor=[1.0])),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
max_num_people=30,
|
||||
scale_factor=[1],
|
||||
with_heatmaps=[True],
|
||||
with_ae=[True],
|
||||
project2image=True,
|
||||
align_corners=False,
|
||||
nms_kernel=5,
|
||||
nms_padding=2,
|
||||
tag_per_joint=True,
|
||||
detection_threshold=0.1,
|
||||
tag_threshold=1,
|
||||
use_detection_val=True,
|
||||
ignore_too_much=False,
|
||||
adjust=True,
|
||||
refine=True,
|
||||
flip_test=True))
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(
|
||||
type='BottomUpRandomAffine',
|
||||
rot_factor=30,
|
||||
scale_factor=[0.75, 1.5],
|
||||
scale_type='short',
|
||||
trans_factor=40),
|
||||
dict(type='BottomUpRandomFlip', flip_prob=0.5),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='BottomUpGenerateTarget',
|
||||
sigma=2,
|
||||
max_num_people=30,
|
||||
),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'joints', 'targets', 'masks'],
|
||||
meta_keys=[]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='BottomUpGetImgSize', test_scale_factor=[1]),
|
||||
dict(
|
||||
type='BottomUpResizeAlign',
|
||||
transforms=[
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'aug_data', 'test_scale_factor', 'base_size',
|
||||
'center', 'scale', 'flip_index'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/mhp'
|
||||
data = dict(
|
||||
workers_per_gpu=2,
|
||||
train_dataloader=dict(samples_per_gpu=16),
|
||||
val_dataloader=dict(samples_per_gpu=1),
|
||||
test_dataloader=dict(samples_per_gpu=1),
|
||||
train=dict(
|
||||
type='BottomUpMhpDataset',
|
||||
ann_file=f'{data_root}/annotations/mhp_train.json',
|
||||
img_prefix=f'{data_root}/train/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='BottomUpMhpDataset',
|
||||
ann_file=f'{data_root}/annotations/mhp_val.json',
|
||||
img_prefix=f'{data_root}/val/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='BottomUpMhpDataset',
|
||||
ann_file=f'{data_root}/annotations/mhp_val.json',
|
||||
img_prefix=f'{data_root}/val/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
# DeepPose: Human pose estimation via deep neural networks
|
||||
|
||||
## Introduction
|
||||
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2014/html/Toshev_DeepPose_Human_Pose_2014_CVPR_paper.html">DeepPose (CVPR'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{toshev2014deeppose,
|
||||
title={Deeppose: Human pose estimation via deep neural networks},
|
||||
author={Toshev, Alexander and Szegedy, Christian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={1653--1660},
|
||||
year={2014}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
DeepPose first proposes using deep neural networks (DNNs) to tackle the problem of human pose estimation.
|
||||
It follows the top-down paradigm, that first detects human bounding boxes and then estimates poses.
|
||||
It learns to directly regress the human body keypoint coordinates.
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101, num_stages=4, out_indices=(3, )),
|
||||
neck=dict(type='GlobalAveragePooling'),
|
||||
keypoint_head=dict(
|
||||
type='DeepposeRegressionHead',
|
||||
in_channels=2048,
|
||||
num_joints=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='SmoothL1Loss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(flip_test=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTargetRegression'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152, num_stages=4, out_indices=(3, )),
|
||||
neck=dict(type='GlobalAveragePooling'),
|
||||
keypoint_head=dict(
|
||||
type='DeepposeRegressionHead',
|
||||
in_channels=2048,
|
||||
num_joints=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='SmoothL1Loss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(flip_test=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTargetRegression'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50, num_stages=4, out_indices=(3, )),
|
||||
neck=dict(type='GlobalAveragePooling'),
|
||||
keypoint_head=dict(
|
||||
type='DeepposeRegressionHead',
|
||||
in_channels=2048,
|
||||
num_joints=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='SmoothL1Loss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(flip_test=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTargetRegression'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
third_party/hamer/third-party/ViTPose/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/resnet_coco.md
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2014/html/Toshev_DeepPose_Human_Pose_2014_CVPR_paper.html">DeepPose (CVPR'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{toshev2014deeppose,
|
||||
title={Deeppose: Human pose estimation via deep neural networks},
|
||||
author={Toshev, Alexander and Szegedy, Christian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={1653--1660},
|
||||
year={2014}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html">ResNet (CVPR'2016)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{he2016deep,
|
||||
title={Deep residual learning for image recognition},
|
||||
author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={770--778},
|
||||
year={2016}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48">COCO (ECCV'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{lin2014microsoft,
|
||||
title={Microsoft coco: Common objects in context},
|
||||
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
|
||||
booktitle={European conference on computer vision},
|
||||
pages={740--755},
|
||||
year={2014},
|
||||
organization={Springer}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on COCO val2017 with detector having human AP of 56.4 on COCO val2017 dataset
|
||||
|
||||
| Arch | Input Size | AP | AP<sup>50</sup> | AP<sup>75</sup> | AR | AR<sup>50</sup> | ckpt | log |
|
||||
| :-------------- | :-----------: | :------: | :------: | :------: | :------: | :------: |:------: |:------: |
|
||||
| [deeppose_resnet_50](/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py) | 256x192 | 0.526 | 0.816 | 0.586 | 0.638 | 0.887 | [ckpt](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res50_coco_256x192-f6de6c0e_20210205.pth) | [log](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res50_coco_256x192_20210205.log.json) |
|
||||
| [deeppose_resnet_101](/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py) | 256x192 | 0.560 | 0.832 | 0.628 | 0.668 | 0.900 | [ckpt](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res101_coco_256x192-2f247111_20210205.pth) | [log](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res101_coco_256x192_20210205.log.json) |
|
||||
| [deeppose_resnet_152](/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py) | 256x192 | 0.583 | 0.843 | 0.659 | 0.686 | 0.907 | [ckpt](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res152_coco_256x192-7df89a88_20210205.pth) | [log](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res152_coco_256x192_20210205.log.json) |
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
Collections:
|
||||
- Name: ResNet
|
||||
Paper:
|
||||
Title: Deep residual learning for image recognition
|
||||
URL: http://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/resnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py
|
||||
In Collection: ResNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- DeepPose
|
||||
- ResNet
|
||||
Training Data: COCO
|
||||
Name: deeppose_res50_coco_256x192
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.526
|
||||
AP@0.5: 0.816
|
||||
AP@0.75: 0.586
|
||||
AR: 0.638
|
||||
AR@0.5: 0.887
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res50_coco_256x192-f6de6c0e_20210205.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py
|
||||
In Collection: ResNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: deeppose_res101_coco_256x192
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.56
|
||||
AP@0.5: 0.832
|
||||
AP@0.75: 0.628
|
||||
AR: 0.668
|
||||
AR@0.5: 0.9
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res101_coco_256x192-2f247111_20210205.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py
|
||||
In Collection: ResNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: COCO
|
||||
Name: deeppose_res152_coco_256x192
|
||||
Results:
|
||||
- Dataset: COCO
|
||||
Metrics:
|
||||
AP: 0.583
|
||||
AP@0.5: 0.843
|
||||
AP@0.75: 0.659
|
||||
AR: 0.686
|
||||
AR@0.5: 0.907
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res152_coco_256x192-7df89a88_20210205.pth
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/mpii.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='PCKh', save_best='PCKh')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=16,
|
||||
dataset_joints=16,
|
||||
dataset_channel=list(range(16)),
|
||||
inference_channel=list(range(16)))
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101, num_stages=4, out_indices=(3, )),
|
||||
neck=dict(type='GlobalAveragePooling'),
|
||||
keypoint_head=dict(
|
||||
type='DeepposeRegressionHead',
|
||||
in_channels=2048,
|
||||
num_joints=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='SmoothL1Loss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(flip_test=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[256, 256],
|
||||
heatmap_size=[64, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
use_gt_bbox=True,
|
||||
bbox_file=None,
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTargetRegression'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=['image_file', 'center', 'scale', 'rotation', 'flip_pairs']),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/mpii'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_train.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_val.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_val.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/mpii.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='PCKh', save_best='PCKh')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=16,
|
||||
dataset_joints=16,
|
||||
dataset_channel=list(range(16)),
|
||||
inference_channel=list(range(16)))
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152, num_stages=4, out_indices=(3, )),
|
||||
neck=dict(type='GlobalAveragePooling'),
|
||||
keypoint_head=dict(
|
||||
type='DeepposeRegressionHead',
|
||||
in_channels=2048,
|
||||
num_joints=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='SmoothL1Loss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(flip_test=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[256, 256],
|
||||
heatmap_size=[64, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
use_gt_bbox=True,
|
||||
bbox_file=None,
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTargetRegression'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=['image_file', 'center', 'scale', 'rotation', 'flip_pairs']),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/mpii'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_train.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_val.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_val.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/mpii.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='PCKh', save_best='PCKh')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=16,
|
||||
dataset_joints=16,
|
||||
dataset_channel=list(range(16)),
|
||||
inference_channel=list(range(16)))
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50, num_stages=4, out_indices=(3, )),
|
||||
neck=dict(type='GlobalAveragePooling'),
|
||||
keypoint_head=dict(
|
||||
type='DeepposeRegressionHead',
|
||||
in_channels=2048,
|
||||
num_joints=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='SmoothL1Loss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(flip_test=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[256, 256],
|
||||
heatmap_size=[64, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
use_gt_bbox=True,
|
||||
bbox_file=None,
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTargetRegression'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=['image_file', 'center', 'scale', 'rotation', 'flip_pairs']),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/mpii'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_train.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_val.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownMpiiDataset',
|
||||
ann_file=f'{data_root}/annotations/mpii_val.json',
|
||||
img_prefix=f'{data_root}/images/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
third_party/hamer/third-party/ViTPose/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/resnet_mpii.md
Vendored
+58
@@ -0,0 +1,58 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2014/html/Toshev_DeepPose_Human_Pose_2014_CVPR_paper.html">DeepPose (CVPR'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{toshev2014deeppose,
|
||||
title={Deeppose: Human pose estimation via deep neural networks},
|
||||
author={Toshev, Alexander and Szegedy, Christian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={1653--1660},
|
||||
year={2014}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html">ResNet (CVPR'2016)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{he2016deep,
|
||||
title={Deep residual learning for image recognition},
|
||||
author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={770--778},
|
||||
year={2016}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2014/html/Andriluka_2D_Human_Pose_2014_CVPR_paper.html">MPII (CVPR'2014)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{andriluka14cvpr,
|
||||
author = {Mykhaylo Andriluka and Leonid Pishchulin and Peter Gehler and Schiele, Bernt},
|
||||
title = {2D Human Pose Estimation: New Benchmark and State of the Art Analysis},
|
||||
booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
|
||||
year = {2014},
|
||||
month = {June}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on MPII val set
|
||||
|
||||
| Arch | Input Size | Mean | Mean@0.1 | ckpt | log |
|
||||
| :--- | :--------: | :------: | :------: |:------: |:------: |
|
||||
| [deeppose_resnet_50](/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py) | 256x256 | 0.825 | 0.174 | [ckpt](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res50_mpii_256x256-c63cd0b6_20210203.pth) | [log](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res50_mpii_256x256_20210203.log.json) |
|
||||
| [deeppose_resnet_101](/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py) | 256x256 | 0.841 | 0.193 | [ckpt](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res101_mpii_256x256-87516a90_20210205.pth) | [log](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res101_mpii_256x256_20210205.log.json) |
|
||||
| [deeppose_resnet_152](/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py) | 256x256 | 0.850 | 0.198 | [ckpt](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res152_mpii_256x256-15f5e6f9_20210205.pth) | [log](https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res152_mpii_256x256_20210205.log.json) |
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
Collections:
|
||||
- Name: ResNet
|
||||
Paper:
|
||||
Title: Deep residual learning for image recognition
|
||||
URL: http://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/resnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py
|
||||
In Collection: ResNet
|
||||
Metadata:
|
||||
Architecture: &id001
|
||||
- DeepPose
|
||||
- ResNet
|
||||
Training Data: MPII
|
||||
Name: deeppose_res50_mpii_256x256
|
||||
Results:
|
||||
- Dataset: MPII
|
||||
Metrics:
|
||||
Mean: 0.825
|
||||
Mean@0.1: 0.174
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res50_mpii_256x256-c63cd0b6_20210203.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py
|
||||
In Collection: ResNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: MPII
|
||||
Name: deeppose_res101_mpii_256x256
|
||||
Results:
|
||||
- Dataset: MPII
|
||||
Metrics:
|
||||
Mean: 0.841
|
||||
Mean@0.1: 0.193
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res101_mpii_256x256-87516a90_20210205.pth
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py
|
||||
In Collection: ResNet
|
||||
Metadata:
|
||||
Architecture: *id001
|
||||
Training Data: MPII
|
||||
Name: deeppose_res152_mpii_256x256
|
||||
Results:
|
||||
- Dataset: MPII
|
||||
Metrics:
|
||||
Mean: 0.85
|
||||
Mean@0.1: 0.198
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/deeppose/deeppose_res152_mpii_256x256-15f5e6f9_20210205.pth
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
# Top-down heatmap-based pose estimation
|
||||
|
||||
Top-down methods divide the task into two stages: human detection and pose estimation.
|
||||
|
||||
They perform human detection first, followed by single-person pose estimation given human bounding boxes.
|
||||
Instead of estimating keypoint coordinates directly, the pose estimator will produce heatmaps which represent the
|
||||
likelihood of being a keypoint.
|
||||
|
||||
Various neural network models have been proposed for better performance.
|
||||
The popular ones include stacked hourglass networks, and HRNet.
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=768,
|
||||
depth=12,
|
||||
num_heads=12,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.3,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=768,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=1280,
|
||||
depth=32,
|
||||
num_heads=16,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.55,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=1280,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=1024,
|
||||
depth=24,
|
||||
num_heads=16,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.55,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=1024,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=384,
|
||||
depth=12,
|
||||
num_heads=12,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.3,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=384,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
|
||||
<!-- [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="https://arxiv.org/abs/1711.06475">AI Challenger (ArXiv'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@article{wu2017ai,
|
||||
title={Ai challenger: A large-scale dataset for going deeper in image understanding},
|
||||
author={Wu, Jiahong and Zheng, He and Zhao, Bo and Li, Yixin and Yan, Baoming and Liang, Rui and Wang, Wenjia and Zhou, Shipei and Lin, Guosen and Fu, Yanwei and others},
|
||||
journal={arXiv preprint arXiv:1711.06475},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on AIC 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_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py) | 256x192 | 0.323 | 0.762 | 0.219 | 0.366 | 0.789 | [ckpt](https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_aic_256x192-30a4e465_20200826.pth) | [log](https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_aic_256x192_20200826.log.json) |
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
Collections:
|
||||
- Name: HRNet
|
||||
Paper:
|
||||
Title: Deep high-resolution representation learning for human pose estimation
|
||||
URL: http://openaccess.thecvf.com/content_CVPR_2019/html/Sun_Deep_High-Resolution_Representation_Learning_for_Human_Pose_Estimation_CVPR_2019_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/backbones/hrnet.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py
|
||||
In Collection: HRNet
|
||||
Metadata:
|
||||
Architecture:
|
||||
- HRNet
|
||||
Training Data: AI Challenger
|
||||
Name: topdown_heatmap_hrnet_w32_aic_256x192
|
||||
Results:
|
||||
- Dataset: AI Challenger
|
||||
Metrics:
|
||||
AP: 0.323
|
||||
AP@0.5: 0.762
|
||||
AP@0.75: 0.219
|
||||
AR: 0.366
|
||||
AR@0.5: 0.789
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_aic_256x192-30a4e465_20200826.pth
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=32,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_deconv_layers=0,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w32-36af842e.pth',
|
||||
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))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=32,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_deconv_layers=0,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[288, 384],
|
||||
heatmap_size=[72, 96],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=3),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=48,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_deconv_layers=0,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup=None,
|
||||
# warmup='linear',
|
||||
# warmup_iters=500,
|
||||
# warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='https://download.openmmlab.com/mmpose/'
|
||||
'pretrain_models/hrnet_w48-8ef0771d.pth',
|
||||
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=(48, 96)),
|
||||
stage3=dict(
|
||||
num_modules=4,
|
||||
num_branches=3,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4),
|
||||
num_channels=(48, 96, 192)),
|
||||
stage4=dict(
|
||||
num_modules=3,
|
||||
num_branches=4,
|
||||
block='BASIC',
|
||||
num_blocks=(4, 4, 4, 4),
|
||||
num_channels=(48, 96, 192, 384))),
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=48,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_deconv_layers=0,
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[288, 384],
|
||||
heatmap_size=[72, 96],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=3),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=2048,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet101',
|
||||
backbone=dict(type='ResNet', depth=101),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=2048,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[288, 384],
|
||||
heatmap_size=[72, 96],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=3),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=2048,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet152',
|
||||
backbone=dict(type='ResNet', depth=152),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=2048,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[288, 384],
|
||||
heatmap_size=[72, 96],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=3),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=2048,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=2),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/aic.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-4,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
channel_cfg = dict(
|
||||
num_output_channels=14,
|
||||
dataset_joints=14,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
||||
],
|
||||
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(type='ResNet', depth=50),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=2048,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=True,
|
||||
modulate_kernel=11))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[288, 384],
|
||||
heatmap_size=[72, 96],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=True,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(type='TopDownGenerateTarget', sigma=3),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/aic'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=2,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_train.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/'
|
||||
'keypoint_train_images_20170902/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownAicDataset',
|
||||
ann_file=f'{data_root}/annotations/aic_val.json',
|
||||
img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/'
|
||||
'keypoint_validation_images_20170911/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}))
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<!-- [ALGORITHM] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_ECCV_2018/html/Bin_Xiao_Simple_Baselines_for_ECCV_2018_paper.html">SimpleBaseline2D (ECCV'2018)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{xiao2018simple,
|
||||
title={Simple baselines for human pose estimation and tracking},
|
||||
author={Xiao, Bin and Wu, Haiping and Wei, Yichen},
|
||||
booktitle={Proceedings of the European conference on computer vision (ECCV)},
|
||||
pages={466--481},
|
||||
year={2018}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [BACKBONE] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="http://openaccess.thecvf.com/content_cvpr_2016/html/He_Deep_Residual_Learning_CVPR_2016_paper.html">ResNet (CVPR'2016)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@inproceedings{he2016deep,
|
||||
title={Deep residual learning for image recognition},
|
||||
author={He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
|
||||
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
|
||||
pages={770--778},
|
||||
year={2016}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<!-- [DATASET] -->
|
||||
|
||||
<details>
|
||||
<summary align="right"><a href="https://arxiv.org/abs/1711.06475">AI Challenger (ArXiv'2017)</a></summary>
|
||||
|
||||
```bibtex
|
||||
@article{wu2017ai,
|
||||
title={Ai challenger: A large-scale dataset for going deeper in image understanding},
|
||||
author={Wu, Jiahong and Zheng, He and Zhao, Bo and Li, Yixin and Yan, Baoming and Liang, Rui and Wang, Wenjia and Zhou, Shipei and Lin, Guosen and Fu, Yanwei and others},
|
||||
journal={arXiv preprint arXiv:1711.06475},
|
||||
year={2017}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
Results on AIC 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_resnet_101](/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py) | 256x192 | 0.294 | 0.736 | 0.174 | 0.337 | 0.763 | [ckpt](https://download.openmmlab.com/mmpose/top_down/resnet/res101_aic_256x192-79b35445_20200826.pth) | [log](https://download.openmmlab.com/mmpose/top_down/resnet/res101_aic_256x192_20200826.log.json) |
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
Collections:
|
||||
- Name: SimpleBaseline2D
|
||||
Paper:
|
||||
Title: Simple baselines for human pose estimation and tracking
|
||||
URL: http://openaccess.thecvf.com/content_ECCV_2018/html/Bin_Xiao_Simple_Baselines_for_ECCV_2018_paper.html
|
||||
README: https://github.com/open-mmlab/mmpose/blob/master/docs/en/papers/algorithms/simplebaseline2d.md
|
||||
Models:
|
||||
- Config: configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py
|
||||
In Collection: SimpleBaseline2D
|
||||
Metadata:
|
||||
Architecture:
|
||||
- SimpleBaseline2D
|
||||
- ResNet
|
||||
Training Data: AI Challenger
|
||||
Name: topdown_heatmap_res101_aic_256x192
|
||||
Results:
|
||||
- Dataset: AI Challenger
|
||||
Metrics:
|
||||
AP: 0.294
|
||||
AP@0.5: 0.736
|
||||
AP@0.75: 0.174
|
||||
AR: 0.337
|
||||
AR@0.5: 0.763
|
||||
Task: Body 2D Keypoint
|
||||
Weights: https://download.openmmlab.com/mmpose/top_down/resnet/res101_aic_256x192-79b35445_20200826.pth
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-3,
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(
|
||||
type='MSPN',
|
||||
unit_channels=256,
|
||||
num_stages=2,
|
||||
num_units=4,
|
||||
num_blocks=[3, 4, 6, 3],
|
||||
norm_cfg=dict(type='BN')),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapMSMUHead',
|
||||
out_shape=(64, 48),
|
||||
unit_channels=256,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_stages=2,
|
||||
num_units=4,
|
||||
use_prm=False,
|
||||
norm_cfg=dict(type='BN'),
|
||||
loss_keypoint=([
|
||||
dict(
|
||||
type='JointsMSELoss', use_target_weight=True, loss_weight=0.25)
|
||||
] * 3 + [
|
||||
dict(
|
||||
type='JointsOHKMMSELoss',
|
||||
use_target_weight=True,
|
||||
loss_weight=1.)
|
||||
]) * 2),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='megvii',
|
||||
shift_heatmap=False,
|
||||
modulate_kernel=5))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
use_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
kernel=[(15, 15), (11, 11), (9, 9), (7, 7)] + [(11, 11), (9, 9),
|
||||
(7, 7), (5, 5)],
|
||||
encoding='Megvii'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=[
|
||||
'img',
|
||||
],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-3,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='RSN',
|
||||
unit_channels=256,
|
||||
num_stages=2,
|
||||
num_units=4,
|
||||
num_blocks=[3, 4, 6, 3],
|
||||
num_steps=4,
|
||||
norm_cfg=dict(type='BN')),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapMSMUHead',
|
||||
out_shape=(64, 48),
|
||||
unit_channels=256,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_stages=2,
|
||||
num_units=4,
|
||||
use_prm=False,
|
||||
norm_cfg=dict(type='BN'),
|
||||
loss_keypoint=([
|
||||
dict(
|
||||
type='JointsMSELoss', use_target_weight=True, loss_weight=0.25)
|
||||
] * 3 + [
|
||||
dict(
|
||||
type='JointsOHKMMSELoss',
|
||||
use_target_weight=True,
|
||||
loss_weight=1.)
|
||||
]) * 2),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='megvii',
|
||||
shift_heatmap=False,
|
||||
modulate_kernel=5))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
use_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
kernel=[(15, 15), (11, 11), (9, 9), (7, 7)] + [(11, 11), (9, 9),
|
||||
(7, 7), (5, 5)],
|
||||
encoding='Megvii'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=[
|
||||
'img',
|
||||
],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-3,
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(
|
||||
type='MSPN',
|
||||
unit_channels=256,
|
||||
num_stages=3,
|
||||
num_units=4,
|
||||
num_blocks=[3, 4, 6, 3],
|
||||
norm_cfg=dict(type='BN')),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapMSMUHead',
|
||||
out_shape=(64, 48),
|
||||
unit_channels=256,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_stages=3,
|
||||
num_units=4,
|
||||
use_prm=False,
|
||||
norm_cfg=dict(type='BN'),
|
||||
loss_keypoint=([
|
||||
dict(
|
||||
type='JointsMSELoss', use_target_weight=True, loss_weight=0.25)
|
||||
] * 3 + [
|
||||
dict(
|
||||
type='JointsOHKMMSELoss',
|
||||
use_target_weight=True,
|
||||
loss_weight=1.)
|
||||
]) * 3),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='megvii',
|
||||
shift_heatmap=False,
|
||||
modulate_kernel=5))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
use_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
kernel=[(15, 15), (11, 11), (9, 9), (7, 7)] * 2 + [(11, 11), (9, 9),
|
||||
(7, 7), (5, 5)],
|
||||
encoding='Megvii'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=[
|
||||
'img',
|
||||
],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-3,
|
||||
)
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='RSN',
|
||||
unit_channels=256,
|
||||
num_stages=3,
|
||||
num_units=4,
|
||||
num_blocks=[3, 4, 6, 3],
|
||||
num_steps=4,
|
||||
norm_cfg=dict(type='BN')),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapMSMUHead',
|
||||
out_shape=(64, 48),
|
||||
unit_channels=256,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_stages=3,
|
||||
num_units=4,
|
||||
use_prm=False,
|
||||
norm_cfg=dict(type='BN'),
|
||||
loss_keypoint=([
|
||||
dict(
|
||||
type='JointsMSELoss', use_target_weight=True, loss_weight=0.25)
|
||||
] * 3 + [
|
||||
dict(
|
||||
type='JointsOHKMMSELoss',
|
||||
use_target_weight=True,
|
||||
loss_weight=1.)
|
||||
]) * 3),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='megvii',
|
||||
shift_heatmap=False,
|
||||
modulate_kernel=5))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
use_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
kernel=[(15, 15), (11, 11), (9, 9), (7, 7)] * 2 + [(11, 11), (9, 9),
|
||||
(7, 7), (5, 5)],
|
||||
encoding='Megvii'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=[
|
||||
'img',
|
||||
],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(
|
||||
type='Adam',
|
||||
lr=5e-3,
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=None)
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
log_config = dict(
|
||||
interval=50, hooks=[
|
||||
dict(type='TextLoggerHook'),
|
||||
])
|
||||
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained='torchvision://resnet50',
|
||||
backbone=dict(
|
||||
type='MSPN',
|
||||
unit_channels=256,
|
||||
num_stages=4,
|
||||
num_units=4,
|
||||
num_blocks=[3, 4, 6, 3],
|
||||
norm_cfg=dict(type='BN')),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapMSMUHead',
|
||||
out_shape=(64, 48),
|
||||
unit_channels=256,
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
num_stages=4,
|
||||
num_units=4,
|
||||
use_prm=False,
|
||||
norm_cfg=dict(type='BN'),
|
||||
loss_keypoint=([
|
||||
dict(
|
||||
type='JointsMSELoss', use_target_weight=True, loss_weight=0.25)
|
||||
] * 3 + [
|
||||
dict(
|
||||
type='JointsOHKMMSELoss',
|
||||
use_target_weight=True,
|
||||
loss_weight=1.)
|
||||
]) * 4),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='megvii',
|
||||
shift_heatmap=False,
|
||||
modulate_kernel=5))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
use_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
kernel=[(15, 15), (11, 11), (9, 9), (7, 7)] * 3 + [(11, 11), (9, 9),
|
||||
(7, 7), (5, 5)],
|
||||
encoding='Megvii'),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine'),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=[
|
||||
'img',
|
||||
],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=32,
|
||||
workers_per_gpu=4,
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(type='AdamW', lr=5e-4, betas=(0.9, 0.999), weight_decay=0.1,
|
||||
constructor='LayerDecayOptimizerConstructor',
|
||||
paramwise_cfg=dict(
|
||||
num_layers=12,
|
||||
layer_decay_rate=0.75,
|
||||
custom_keys={
|
||||
'bias': dict(decay_multi=0.),
|
||||
'pos_embed': dict(decay_mult=0.),
|
||||
'relative_position_bias_table': dict(decay_mult=0.),
|
||||
'norm': dict(decay_mult=0.)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=dict(max_norm=1., norm_type=2))
|
||||
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
target_type = 'GaussianHeatmap'
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=768,
|
||||
depth=12,
|
||||
num_heads=12,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.3,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=768,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=False,
|
||||
target_type=target_type,
|
||||
modulate_kernel=11,
|
||||
use_udp=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
sigma=2,
|
||||
encoding='UDP',
|
||||
target_type=target_type),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(type='AdamW', lr=5e-4, betas=(0.9, 0.999), weight_decay=0.1,
|
||||
constructor='LayerDecayOptimizerConstructor',
|
||||
paramwise_cfg=dict(
|
||||
num_layers=12,
|
||||
layer_decay_rate=0.75,
|
||||
custom_keys={
|
||||
'bias': dict(decay_multi=0.),
|
||||
'pos_embed': dict(decay_mult=0.),
|
||||
'relative_position_bias_table': dict(decay_mult=0.),
|
||||
'norm': dict(decay_mult=0.)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=dict(max_norm=1., norm_type=2))
|
||||
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
target_type = 'GaussianHeatmap'
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=768,
|
||||
depth=12,
|
||||
num_heads=12,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.3,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=768,
|
||||
num_deconv_layers=0,
|
||||
num_deconv_filters=[],
|
||||
num_deconv_kernels=[],
|
||||
upsample=4,
|
||||
extra=dict(final_conv_kernel=3, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=False,
|
||||
target_type=target_type,
|
||||
modulate_kernel=11,
|
||||
use_udp=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
sigma=2,
|
||||
encoding='UDP',
|
||||
target_type=target_type),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(type='AdamW', lr=5e-4, betas=(0.9, 0.999), weight_decay=0.1,
|
||||
constructor='LayerDecayOptimizerConstructor',
|
||||
paramwise_cfg=dict(
|
||||
num_layers=32,
|
||||
layer_decay_rate=0.85,
|
||||
custom_keys={
|
||||
'bias': dict(decay_multi=0.),
|
||||
'pos_embed': dict(decay_mult=0.),
|
||||
'relative_position_bias_table': dict(decay_mult=0.),
|
||||
'norm': dict(decay_mult=0.)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=dict(max_norm=1., norm_type=2))
|
||||
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
target_type = 'GaussianHeatmap'
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=1280,
|
||||
depth=32,
|
||||
num_heads=16,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.55,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=1280,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=False,
|
||||
target_type=target_type,
|
||||
modulate_kernel=11,
|
||||
use_udp=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
sigma=2,
|
||||
encoding='UDP',
|
||||
target_type=target_type),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(type='AdamW', lr=5e-4, betas=(0.9, 0.999), weight_decay=0.1,
|
||||
constructor='LayerDecayOptimizerConstructor',
|
||||
paramwise_cfg=dict(
|
||||
num_layers=32,
|
||||
layer_decay_rate=0.85,
|
||||
custom_keys={
|
||||
'bias': dict(decay_multi=0.),
|
||||
'pos_embed': dict(decay_mult=0.),
|
||||
'relative_position_bias_table': dict(decay_mult=0.),
|
||||
'norm': dict(decay_mult=0.)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=dict(max_norm=1., norm_type=2))
|
||||
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
target_type = 'GaussianHeatmap'
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=1280,
|
||||
depth=32,
|
||||
num_heads=16,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.55,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=1280,
|
||||
num_deconv_layers=0,
|
||||
num_deconv_filters=[],
|
||||
num_deconv_kernels=[],
|
||||
upsample=4,
|
||||
extra=dict(final_conv_kernel=3, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=False,
|
||||
target_type=target_type,
|
||||
modulate_kernel=11,
|
||||
use_udp=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
sigma=2,
|
||||
encoding='UDP',
|
||||
target_type=target_type),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
_base_ = [
|
||||
'../../../../_base_/default_runtime.py',
|
||||
'../../../../_base_/datasets/coco.py'
|
||||
]
|
||||
evaluation = dict(interval=10, metric='mAP', save_best='AP')
|
||||
|
||||
optimizer = dict(type='AdamW', lr=5e-4, betas=(0.9, 0.999), weight_decay=0.1,
|
||||
constructor='LayerDecayOptimizerConstructor',
|
||||
paramwise_cfg=dict(
|
||||
num_layers=24,
|
||||
layer_decay_rate=0.8,
|
||||
custom_keys={
|
||||
'bias': dict(decay_multi=0.),
|
||||
'pos_embed': dict(decay_mult=0.),
|
||||
'relative_position_bias_table': dict(decay_mult=0.),
|
||||
'norm': dict(decay_mult=0.)
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
optimizer_config = dict(grad_clip=dict(max_norm=1., norm_type=2))
|
||||
|
||||
# learning policy
|
||||
lr_config = dict(
|
||||
policy='step',
|
||||
warmup='linear',
|
||||
warmup_iters=500,
|
||||
warmup_ratio=0.001,
|
||||
step=[170, 200])
|
||||
total_epochs = 210
|
||||
target_type = 'GaussianHeatmap'
|
||||
channel_cfg = dict(
|
||||
num_output_channels=17,
|
||||
dataset_joints=17,
|
||||
dataset_channel=[
|
||||
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
|
||||
],
|
||||
inference_channel=[
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
||||
])
|
||||
|
||||
# model settings
|
||||
model = dict(
|
||||
type='TopDown',
|
||||
pretrained=None,
|
||||
backbone=dict(
|
||||
type='ViT',
|
||||
img_size=(256, 192),
|
||||
patch_size=16,
|
||||
embed_dim=1024,
|
||||
depth=24,
|
||||
num_heads=16,
|
||||
ratio=1,
|
||||
use_checkpoint=False,
|
||||
mlp_ratio=4,
|
||||
qkv_bias=True,
|
||||
drop_path_rate=0.5,
|
||||
),
|
||||
keypoint_head=dict(
|
||||
type='TopdownHeatmapSimpleHead',
|
||||
in_channels=1024,
|
||||
num_deconv_layers=2,
|
||||
num_deconv_filters=(256, 256),
|
||||
num_deconv_kernels=(4, 4),
|
||||
extra=dict(final_conv_kernel=1, ),
|
||||
out_channels=channel_cfg['num_output_channels'],
|
||||
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
|
||||
train_cfg=dict(),
|
||||
test_cfg=dict(
|
||||
flip_test=True,
|
||||
post_process='default',
|
||||
shift_heatmap=False,
|
||||
target_type=target_type,
|
||||
modulate_kernel=11,
|
||||
use_udp=True))
|
||||
|
||||
data_cfg = dict(
|
||||
image_size=[192, 256],
|
||||
heatmap_size=[48, 64],
|
||||
num_output_channels=channel_cfg['num_output_channels'],
|
||||
num_joints=channel_cfg['dataset_joints'],
|
||||
dataset_channel=channel_cfg['dataset_channel'],
|
||||
inference_channel=channel_cfg['inference_channel'],
|
||||
soft_nms=False,
|
||||
nms_thr=1.0,
|
||||
oks_thr=0.9,
|
||||
vis_thr=0.2,
|
||||
use_gt_bbox=False,
|
||||
det_bbox_thr=0.0,
|
||||
bbox_file='data/coco/person_detection_results/'
|
||||
'COCO_val2017_detections_AP_H_56_person.json',
|
||||
)
|
||||
|
||||
train_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownRandomFlip', flip_prob=0.5),
|
||||
dict(
|
||||
type='TopDownHalfBodyTransform',
|
||||
num_joints_half_body=8,
|
||||
prob_half_body=0.3),
|
||||
dict(
|
||||
type='TopDownGetRandomScaleRotation', rot_factor=40, scale_factor=0.5),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='TopDownGenerateTarget',
|
||||
sigma=2,
|
||||
encoding='UDP',
|
||||
target_type=target_type),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img', 'target', 'target_weight'],
|
||||
meta_keys=[
|
||||
'image_file', 'joints_3d', 'joints_3d_visible', 'center', 'scale',
|
||||
'rotation', 'bbox_score', 'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
val_pipeline = [
|
||||
dict(type='LoadImageFromFile'),
|
||||
dict(type='TopDownAffine', use_udp=True),
|
||||
dict(type='ToTensor'),
|
||||
dict(
|
||||
type='NormalizeTensor',
|
||||
mean=[0.485, 0.456, 0.406],
|
||||
std=[0.229, 0.224, 0.225]),
|
||||
dict(
|
||||
type='Collect',
|
||||
keys=['img'],
|
||||
meta_keys=[
|
||||
'image_file', 'center', 'scale', 'rotation', 'bbox_score',
|
||||
'flip_pairs'
|
||||
]),
|
||||
]
|
||||
|
||||
test_pipeline = val_pipeline
|
||||
|
||||
data_root = 'data/coco'
|
||||
data = dict(
|
||||
samples_per_gpu=64,
|
||||
workers_per_gpu=4,
|
||||
val_dataloader=dict(samples_per_gpu=32),
|
||||
test_dataloader=dict(samples_per_gpu=32),
|
||||
train=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_train2017.json',
|
||||
img_prefix=f'{data_root}/train2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=train_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
val=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=val_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
test=dict(
|
||||
type='TopDownCocoDataset',
|
||||
ann_file=f'{data_root}/annotations/person_keypoints_val2017.json',
|
||||
img_prefix=f'{data_root}/val2017/',
|
||||
data_cfg=data_cfg,
|
||||
pipeline=test_pipeline,
|
||||
dataset_info={{_base_.dataset_info}}),
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user