LiWentomng/OrientedRepPoints

预训练模型不匹配

Opened this issue · 1 comments

2022-07-08 10:56:37,311 - mmdet - INFO - load model from: work_dirs/swin_tiny_patch4_window7_224_torch1_4.pth
2022-07-08 10:56:37,507 - 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

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

加载该预训练模型不完全匹配 且精度为76.2%达不到论文里的77.6% 请问一下是啥问题吗

@zack2020-star 上面的提示的不匹配信息是正常的。

按照提供的swin-tiny的 config默认设置,4 GPU,可以达到78.11的结果。具体结果如下:
mAP: 0.7811115629963165
ap of each class: plane:0.8869824055320612, baseball-diamond:0.8404591146489188, bridge:0.573374138252922, ground-track-field:0.7460058185240421, small-vehicle:0.8178457956880836, large-vehicle:0.8412193176830997, ship:0.8800826910103363, tennis-court:0.9076617572050741, basketball-court:0.8687596706802145, storage-tank:0.8752927349151276, soccer-ball-field:0.6482638786646695, roundabout:0.6817482393358247, harbor:0.7680666777746015, swimming-pool:0.7484314457783111, helicopter:0.6324797592514606

如果不是采用4gpu,对应的学习率应该需要调整一下。另外一个可能原因是图片裁剪方式不同,不知是否采用提供的代码进行裁剪。