Duankaiwen / PyCenterNet

199 stars 24 forks source link

the pretrained model #1

Open slowlypasser opened 2 years ago

slowlypasser commented 2 years ago

can you provide the pretrained model of the swin-l?thanks a lot!

Duankaiwen commented 2 years ago

@slowlypasser swin_large_patch4_window12_384_22k.pth

slowlypasser commented 2 years ago

@slowlypasser swin_large_patch4_window12_384_22k.pth

thanks!

slowlypasser commented 2 years ago

@slowlypasser swin_large_patch4_window12_384_22k.pth

thanks!

i use the pretrained model to train my own datasets,but something goes wrong. `2022-04-21 13:03:33,441 - mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: norm.weight, norm.bias, head.weight, head.bias, layers.0.blocks.1.attn_mask, layers.1.blocks.1.attn_mask, layers.2.blocks.1.attn_mask, layers.2.blocks.3.attn_mask, layers.2.blocks.5.attn_mask, layers.2.blocks.7.attn_mask, layers.2.blocks.9.attn_mask, layers.2.blocks.11.attn_mask, layers.2.blocks.13.attn_mask, layers.2.blocks.15.attn_mask, layers.2.blocks.17.attn_mask

missing keys in source state_dict: norm0.weight, norm0.bias, norm1.weight, norm1.bias, norm2.weight, norm2.bias, norm3.weight, norm3.bias`

what's more, it throws the error IndexError: The shape of the mask [3437280] at index 0 does not match the shape of the indexed tensor [42966] at index 0

Duankaiwen commented 2 years ago

Don't worry about the WARNING. On line 105 in configs/pycenternet/pycenternet_swin_l_fpn_giou_mstrain_3x_coco.py, replace dict(type='LoadRPDV2Annotations'), with dict(type='LoadRPDV2Annotations', num_classes=xxx), where xxx is the num_classes in your dataset.

slowlypasser commented 2 years ago

thanks for your reply!i replace it ,and it works well!

wlf-darkmatter commented 2 years ago

Thanks so much, it works too.