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

[Feature] LSTM Pose Machines #1312

Open
wants to merge 34 commits into
base: dev-0.26
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1625d31
add lstm_pm backbone
luminxu Nov 24, 2021
bf6dbb6
add backbone init
luminxu Nov 24, 2021
38226cd
add init_weights function
luminxu Dec 8, 2021
3401989
format
jin-s13 Dec 8, 2021
8cb55be
refactor
jin-s13 Dec 8, 2021
ed90d42
add lstm_pm detector
luminxu Dec 8, 2021
f6f65eb
Merge branch 'lstm_pm' of github.com:open-mmlab/mmpose into lstm_pm
luminxu Dec 8, 2021
0709ae6
rename detector
luminxu Dec 17, 2021
6457a46
update backbone
jin-s13 Jan 18, 2022
05874b2
add topdown_jhmdb_video_dataset
jin-s13 Jan 18, 2022
610762e
delete centermap in input
luminxu Jan 20, 2022
3986b98
modify jhmdb video dataset for lstm_pm
luminxu Jan 20, 2022
db3dcda
pipeline support list input
luminxu Jan 23, 2022
4b7f82e
target pipeline support list input
luminxu Jan 23, 2022
ea9edb8
modify lstm_pm detector
luminxu Jan 25, 2022
6917389
stack target for multi_stage_head
luminxu Jan 27, 2022
19ddf9d
add cfg
luminxu Mar 22, 2022
873f541
fix bug
luminxu Mar 23, 2022
cfc86be
fix bug when testing
luminxu Mar 23, 2022
934ca68
adjust log interval
luminxu Mar 23, 2022
026fcd3
fix val img_prefix
luminxu Apr 27, 2022
364acd3
reduce batch size
luminxu Apr 27, 2022
f35aa94
train stage1 mpii
luminxu Apr 28, 2022
8decb7c
rename cfg
luminxu Apr 28, 2022
ed8a7e6
input 368
luminxu Apr 28, 2022
51d4b80
train jhmdb 368 stage2
luminxu May 6, 2022
6082738
bs 16
luminxu May 6, 2022
d869be1
train 210 epoch
luminxu May 6, 2022
1def7df
train cpm jhmdb 50epoch
luminxu Jun 4, 2022
6939672
train cpm jhmdb 50epoch
luminxu Jun 4, 2022
b3ef167
train cpm jhmdb 20epoch
luminxu Jun 4, 2022
4e98c1a
train lstm pm stage1.5
luminxu Jun 4, 2022
35cdf15
train lstm pm stage1.5 210epoch
luminxu Jun 4, 2022
d30032d
train lstm pm stage2.5 210epoch
luminxu Jun 6, 2022
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
_base_ = ['../../../../_base_/datasets/jhmdb.py']
log_level = 'INFO'
load_from = None # 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'], save_best='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=[8, 15])
total_epochs = 20
log_config = dict(
interval=10,
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='TopdownHeatmapMultiStageHead',
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, ),
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
train_cfg=dict(),
test_cfg=dict(
flip_test=False,
post_process='default',
shift_heatmap=True,
modulate_kernel=11))

data_cfg = dict(
image_size=[256, 256],
heatmap_size=[32, 32],
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='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,
val_dataloader=dict(samples_per_gpu=32),
test_dataloader=dict(samples_per_gpu=32),
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,
dataset_info={{_base_.dataset_info}}),
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,
dataset_info={{_base_.dataset_info}}),
test=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub1_test.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=test_pipeline,
dataset_info={{_base_.dataset_info}}),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
_base_ = ['../../../../_base_/datasets/jhmdb.py']
log_level = 'INFO'
load_from = None # 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'], save_best='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='TopdownHeatmapMultiStageHead',
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, ),
loss_keypoint=dict(type='JointsMSELoss', use_target_weight=True)),
train_cfg=dict(),
test_cfg=dict(
flip_test=False,
post_process='default',
shift_heatmap=True,
modulate_kernel=11))

data_cfg = dict(
image_size=[256, 256],
heatmap_size=[32, 32],
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='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,
val_dataloader=dict(samples_per_gpu=32),
test_dataloader=dict(samples_per_gpu=32),
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,
dataset_info={{_base_.dataset_info}}),
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,
dataset_info={{_base_.dataset_info}}),
test=dict(
type='TopDownJhmdbDataset',
ann_file=f'{data_root}/annotations/Sub1_test.json',
img_prefix=f'{data_root}/',
data_cfg=data_cfg,
pipeline=test_pipeline,
dataset_info={{_base_.dataset_info}}),
)
Loading