-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
139742f
add jhmdb dataset
jin-s13 21a6ae1
add cfg
jin-s13 4f6a901
add cfg
jin-s13 a5b8b62
add cfg
jin-s13 e339813
add cfg
jin-s13 127c2e0
add cfg
jin-s13 9442dd4
add cfg
jin-s13 259e3ca
add torso normalization
jin-s13 bee18b5
shift 1 pixel
jin-s13 2652aeb
add tPCK for evaluation
jin-s13 ccc024a
add tPCK for evaluation
jin-s13 4452bb9
add doc
jin-s13 91e4107
upload models
jin-s13 39fbc84
resolve comments
jin-s13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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), | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
sub-
mean?There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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