Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
xin-li-67 committed Jul 4, 2023
1 parent 37a943f commit a6a8a1d
Show file tree
Hide file tree
Showing 3 changed files with 253 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
auto_scale_lr = dict(base_batch_size=256)

# hooks
default_hooks = dict(checkpoint=dict(save_best='coco/AP', rule='greater', interval=5))
default_hooks = dict(
checkpoint=dict(save_best='coco/AP', rule='greater', interval=5))

# codec settings
codec = dict(
Expand All @@ -38,16 +39,16 @@
# model settings
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='Uniformer',
type='TopdownPoseEstimator',
# pretrained='/path/to/hrt_small.pth', # Set the path to pretrained backbone here
data_preprocessor=dict(
type='PoseDataPreprocessor',
mean=[123.675, 116.28, 103.53],
std=[58.395, 57.12, 57.375],
bgr_to_rgb=True),
backbone=dict(
type='Uniformer',
embed_dim=[64, 128, 320, 512],
type='UniFormer',
embed_dims=[64, 128, 320, 512],
layers=[5, 8, 20, 7],
head_dim=64,
drop_path_rate=0.4,
Expand All @@ -56,13 +57,14 @@
hybrid=False,
init_cfg=dict(type='Pretrained', checkpoint='')),
head=dict(
type='TopdownSimpleHead',
type='HeatmapHead',
in_channels=512,
out_channels=17,
norm_cfg=norm_cfg,
# norm_cfg=norm_cfg,
extra=dict(final_conv_kernel=1, ),
loss=dict(type='JointMSELoss', use_target_weight=True),
decoder=codec),
loss=dict(type='KeypointMSELoss', use_target_weight=True),
decoder=codec,
init_cfg=[dict(norm_cfg=norm_cfg)]),
test_cfg=dict(
flip_test=True,
flip_mode='heatmap',
Expand Down
4 changes: 1 addition & 3 deletions projects/uniformer/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from .uniformer import * # noqa

__all__ = ['Uniformer']
from .uniformer import * # noqa
Loading

0 comments on commit a6a8a1d

Please sign in to comment.