Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sub-jhmdb dataset #292

Merged
merged 14 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Supported datasets:
- [x] [AI Challenger](https://github.com/AIChallenger/AI_Challenger_2017)
- [x] [OCHuman](https://github.com/liruilong940607/OCHumanApi)
- [x] [CrowdPose](https://github.com/Jeff-sjtu/CrowdPose)
- [x] [sub-JHMDB](http://jhmdb.is.tue.mpg.de/dataset)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does sub- mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a subset of JHMDB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JHMDB is initially proposed for action recognition. Some works also use a subset of JHMDB (sub-JHMDB) for pose estimation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know. Put it in the intro of preparation will be helpful

- [x] [H36m](http://vision.imar.ro/human3.6m/description.php)
- [x] [OneHand10K](https://www.yangangwang.com/papers/WANG-MCC-2018-10.html)
- [x] [FreiHand](https://lmb.informatik.uni-freiburg.de/projects/freihand/)
Expand Down
23 changes: 23 additions & 0 deletions configs/top_down/cpm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,26 @@
| Arch | Input Size | Mean | Mean@0.1 | ckpt | log |
| :--- | :--------: | :------: | :------: |:------: |:------: |
| [cpm](/configs/top_down/cpm/mpii/cpm_mpii_368x368.py) | 368x368 | 0.876 | 0.325 | [ckpt](https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth) | [log](https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368_20200822.log.json) |


#### Results on Sub-JHMDB dataset.
The models are pre-trained on MPII dataset only. NO test-time augmentation (multi-scale /rotation testing) is used.

##### Normalized by Person Size

| Split| Arch | Input Size | Head | Sho | Elb | Wri | Hip | Knee | Ank | Mean | ckpt | log |
| :--- | :--------: | :--------: | :---: | :---: |:---: |:---: |:---: |:---: |:---: | :---: | :-----: |:------: |
| Sub1 | [cpm](/configs/top_down/cpm/jhmdb/cpm_jhmdb_sub1_368x368.py) | 368x368 | 99.4 | 76.9 | 92.9 | 89.1 | 83.4 | 86.6| 98.0 | 89.5 | [ckpt](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub1_368x368-2d2585c9_20201122.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub1_368x368_20201122.log.json) |
| Sub2 | [cpm](/configs/top_down/cpm/jhmdb/cpm_jhmdb_sub2_368x368.py) | 368x368 | 98.8 | 95.0 | 84.4 | 77.1 | 84.1 | 80.0| 94.7 | 87.4 | [ckpt](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub2_368x368-fc742f1f_20201122.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub2_368x368_20201122.log.json) |
| Sub3 | [cpm](/configs/top_down/cpm/jhmdb/cpm_jhmdb_sub3_368x368.py) | 368x368 | 94.8 | 98.4 | 87.9 | 86.6 | 86.5 | 93.8| 95.8 | 92.5 | [ckpt](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub3_368x368-49337155_20201122.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub3_368x368_20201122.log.json) |
| Average | cpm | 368x368 | 97.7 | 90.1 | 88.4 | 84.3 | 84.7 | 86.8| 96.2 | 89.8 | - | - |


##### Normalized by Torso Size

| Split| Arch | Input Size | Head | Sho | Elb | Wri | Hip | Knee | Ank | Mean | ckpt | log |
| :--- | :--------: | :--------: | :---: | :---: |:---: |:---: |:---: |:---: |:---: | :---: | :-----: |:------: |
| Sub1 | [cpm](/configs/top_down/cpm/jhmdb/cpm_jhmdb_sub1_368x368.py) | 368x368 | 88.7 | 46.4 | 75.3 | 53.3 | 55.0 | 59.6 | 85.7 | 65.8 | [ckpt](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub1_368x368-2d2585c9_20201122.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub1_368x368_20201122.log.json) |
| Sub2 | [cpm](/configs/top_down/cpm/jhmdb/cpm_jhmdb_sub2_368x368.py) | 368x368 | 86.5 | 76.7 | 50.2 | 41.3 | 50.8 | 54.8 | 74.2 | 60.9 | [ckpt](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub2_368x368-fc742f1f_20201122.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub2_368x368_20201122.log.json) |
| Sub3 | [cpm](/configs/top_down/cpm/jhmdb/cpm_jhmdb_sub3_368x368.py) | 368x368 | 72.0 | 83.2 | 57.1 | 59.2 | 65.3 | 73.7 | 70.9 | 70.4 | [ckpt](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub3_368x368-49337155_20201122.pth) | [log](https://openmmlab.oss-cn-hangzhou.aliyuncs.com/mmpose/top_down/cpm/cpm_jhmdb_sub3_368x368_20201122.log.json) |
| Average | cpm | 368x368 | 82.4 | 68.8 | 60.9 | 51.3 | 57.0 | 62.7 | 76.9 | 65.7 | - | - |
145 changes: 145 additions & 0 deletions configs/top_down/cpm/jhmdb/cpm_jhmdb_sub1_368x368.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
log_level = 'INFO'
load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=1)
evaluation = dict(interval=1, metric=['PCK', 'tPCK'], key_indicator='Mean PCK')

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=[20, 30])
total_epochs = 40
log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])

channel_cfg = dict(
num_output_channels=15,
dataset_joints=15,
dataset_channel=[
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
],
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])

# model settings
model = dict(
type='TopDown',
pretrained=None,
backbone=dict(
type='CPM',
in_channels=3,
out_channels=channel_cfg['num_output_channels'],
feat_channels=128,
num_stages=6),
keypoint_head=dict(
type='TopDownMultiStageHead',
in_channels=channel_cfg['num_output_channels'],
out_channels=channel_cfg['num_output_channels'],
num_stages=6,
num_deconv_layers=0,
extra=dict(final_conv_kernel=0, ),
),
train_cfg=dict(),
test_cfg=dict(
flip_test=True,
post_process=True,
shift_heatmap=True,
unbiased_decoding=False,
modulate_kernel=11),
loss_pose=dict(type='JointsMSELoss', use_target_weight=True))

data_cfg = dict(
image_size=[368, 368],
heatmap_size=[46, 46],
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,
bbox_thr=1.0,
use_gt_bbox=True,
image_thr=0.0,
bbox_file='',
)

train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='TopDownRandomFlip', flip_prob=0.5),
dict(
type='TopDownGetRandomScaleRotation', rot_factor=30,
scale_factor=0.25),
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', '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', 'flip_pairs'
]),
]

test_pipeline = val_pipeline

data_root = 'data/jhmdb'
data = dict(
samples_per_gpu=32,
workers_per_gpu=2,
train=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub1_train.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=train_pipeline),
val=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub1_test.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=val_pipeline),
test=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub1_test.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=val_pipeline),
)
145 changes: 145 additions & 0 deletions configs/top_down/cpm/jhmdb/cpm_jhmdb_sub2_368x368.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
log_level = 'INFO'
load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=1)
evaluation = dict(interval=1, metric=['PCK', 'tPCK'], key_indicator='Mean PCK')

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=[20, 30])
total_epochs = 40
log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])

channel_cfg = dict(
num_output_channels=15,
dataset_joints=15,
dataset_channel=[
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
],
inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])

# model settings
model = dict(
type='TopDown',
pretrained=None,
backbone=dict(
type='CPM',
in_channels=3,
out_channels=channel_cfg['num_output_channels'],
feat_channels=128,
num_stages=6),
keypoint_head=dict(
type='TopDownMultiStageHead',
in_channels=channel_cfg['num_output_channels'],
out_channels=channel_cfg['num_output_channels'],
num_stages=6,
num_deconv_layers=0,
extra=dict(final_conv_kernel=0, ),
),
train_cfg=dict(),
test_cfg=dict(
flip_test=True,
post_process=True,
shift_heatmap=True,
unbiased_decoding=False,
modulate_kernel=11),
loss_pose=dict(type='JointsMSELoss', use_target_weight=True))

data_cfg = dict(
image_size=[368, 368],
heatmap_size=[46, 46],
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,
bbox_thr=1.0,
use_gt_bbox=True,
image_thr=0.0,
bbox_file='',
)

train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='TopDownRandomFlip', flip_prob=0.5),
dict(
type='TopDownGetRandomScaleRotation', rot_factor=30,
scale_factor=0.25),
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', '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', 'flip_pairs'
]),
]

test_pipeline = val_pipeline

data_root = 'data/jhmdb'
data = dict(
samples_per_gpu=32,
workers_per_gpu=2,
train=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub2_train.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=train_pipeline),
val=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub2_test.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=val_pipeline),
test=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub2_test.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=val_pipeline),
)
Loading