Open aquachieh opened 4 years ago
I used your trained model and ran the "inference.py" , but the output is different from yours, like this what can I modify?
thank you a lot !
That's really strange. Personally, the only thing I can do is to check our environment is the same, but I don't think these can cause a huge difference. Here is the version of packages in my server.
pytorch 1.4.0
torchvision 0.5.0
pillow 6.2.0
numpy 1.17.2
Also, let's check the md5 of model parameters to make sure that your model is correct, it should be:
md5sum best_model.pth
ddb7c2728d2e9b4414d00e72e47b2102 best_model.pth
Besides, the output of inference.py
should be:
save output to images/sample_out.jpg
[[99, 84], [90, 87], [78, 93], [69, 93], [58, 90], [81, 75], [64, 78], [58, 84], [55, 90], [75, 67], [61, 64], [49, 67], [37, 69], [75, 61], [58, 55], [49, 49], [37, 49], [72, 58], [61, 49], [52, 43], [46, 37]]
Thank you so much for your reply! I solved it by changing the packages version:
pillow '7.0.0' --> 6.2.0
numpy '1.18.1' --> 1.17.2
I used your trained model and ran the "inference.py" , Here is the version of packages in my server.
pytorch 1.4.0 torchvision 0.5.0 pillow 6.2.0 numpy 1.17.2 but the output is different from yours, like this
@l976308589 did you solve this problem?
just found the solution, in inference.py
change to:
if __name__ == "__main__":
# *********************** Parameter ***********************
parser = argparse.ArgumentParser()
parser.add_argument('--resume', default='weights/best_model.pth', help='trained model dir')
parser.add_argument('--image_dir', default='images/', help='path for folder')
args = parser.parse_args()
# ******************** build model ********************
# Limb Probabilistic Mask G1 & 6
model = CPMHandLimb(outc=21, lshc=7, pretrained=False)
if cuda:
model = model.cuda()
model = nn.DataParallel(model, device_id)
state_dict = torch.load(args.resume, map_location={'cuda:2':'cuda:1'})
model.load_state_dict(state_dict)
coordinate = hand_pose_estimation(model)
print(coordinate)
just found the solution, in
inference.py
change to:if __name__ == "__main__": # *********************** Parameter *********************** parser = argparse.ArgumentParser() parser.add_argument('--resume', default='weights/best_model.pth', help='trained model dir') parser.add_argument('--image_dir', default='images/', help='path for folder') args = parser.parse_args() # ******************** build model ******************** # Limb Probabilistic Mask G1 & 6 model = CPMHandLimb(outc=21, lshc=7, pretrained=False) if cuda: model = model.cuda() model = nn.DataParallel(model, device_id) state_dict = torch.load(args.resume, map_location={'cuda:2':'cuda:1'}) model.load_state_dict(state_dict) coordinate = hand_pose_estimation(model) print(coordinate)
thanks,when I test in cpu,change this code: state_dict = torch.load(args.resume,map_location=torch.device('cpu')) and the output is Error(s) in loading state_dict for CPMHandLimb: Missing key(s) in state_dict: "vgg19.backbone.0.weight", "vgg19.backbone.0.bias", "vgg19.backbone.2.weight", "vgg19.backbone.2.bias", "vgg19.backbone.5.weight", "vgg19.backbone.5.bias", "vgg19.backbone.7.weight", "vgg19.backbone.7.bias", "vgg19.backbone.10.weight", "vgg19.backbone.10.bias", "vgg19.backbone.12.weight", "vgg19.backbone.12.bias", "vgg19.backbone.14.weight", "vgg19.backbone.14.bias", "vgg19.backbone.16.weight", "vgg19.backbone.16.bias", "vgg19.backbone.19.weight", "vgg19.backbone.19.bias", "vgg19.backbone.21.weight", "vgg19.backbone.21.bias", "vgg19.backbone.23.weight", "vgg19.backbone.23.bias", "vgg19.backbone.25.weight", "vgg19.backbone.25.bias", "vgg19.conv5_1.weight", "vgg19.conv5_1.bias", "vgg19.conv5_2.weight", "vgg19.conv5_2.bias", "vgg19.conv5_3.weight", "vgg19.conv5_3.bias", "stage1.stage1_1.weight", "stage1.stage1_1.bias", "stage1.stage1_2.weight", "stage1.stage1_2.bias", "stage2.Mconv1.conv.weight", "stage2.Mconv1.conv.bias", "stage2.Mconv2.conv.weight", "stage2.Mconv2.conv.bias", "stage2.Mconv3.conv.weight", "stage2.Mconv3.conv.bias", "stage2.Mconv4.conv.weight", "stage2.Mconv4.conv.bias", "stage2.Mconv5.conv.weight", "stage2.Mconv5.conv.bias", "stage2.Mconv6.weight", "stage2.Mconv6.bias", "stage2.Mconv7.weight", "stage2.Mconv7.bias", "stage3.Mconv1.conv.weight", "stage3.Mconv1.conv.bias", "stage3.Mconv2.conv.weight", "stage3.Mconv2.conv.bias", "stage3.Mconv3.conv.weight", "stage3.Mconv3.conv.bias", "stage3.Mconv4.conv.weight", "stage3.Mconv4.conv.bias", "stage3.Mconv5.conv.weight", "stage3.Mconv5.conv.bias", "stage3.Mconv6.weight", "stage3.Mconv6.bias", "stage3.Mconv7.weight", "stage3.Mconv7.bias", "stage4.Mconv1.conv.weight", "stage4.Mconv1.conv.bias", "stage4.Mconv2.conv.weight", "stage4.Mconv2.conv.bias", "stage4.Mconv3.conv.weight", "stage4.Mconv3.conv.bias", "stage4.Mconv4.conv.weight", "stage4.Mconv4.conv.bias", "stage4.Mconv5.conv.weight", "stage4.Mconv5.conv.bias", "stage4.Mconv6.weight", "stage4.Mconv6.bias", "stage4.Mconv7.weight", "stage4.Mconv7.bias", "stage5.Mconv1.conv.weight", "stage5.Mconv1.conv.bias", "stage5.Mconv2.conv.weight", "stage5.Mconv2.conv.bias", "stage5.Mconv3.conv.weight", "stage5.Mconv3.conv.bias", "stage5.Mconv4.conv.weight", "stage5.Mconv4.conv.bias", "stage5.Mconv5.conv.weight", "stage5.Mconv5.conv.bias", "stage5.Mconv6.weight", "stage5.Mconv6.bias", "stage5.Mconv7.weight", "stage5.Mconv7.bias", "stage6.Mconv1.conv.weight", "stage6.Mconv1.conv.bias", "stage6.Mconv2.conv.weight", "stage6.Mconv2.conv.bias", "stage6.Mconv3.conv.weight", "stage6.Mconv3.conv.bias", "stage6.Mconv4.conv.weight", "stage6.Mconv4.conv.bias", "stage6.Mconv5.conv.weight", "stage6.Mconv5.conv.bias", "stage6.Mconv6.weight", "stage6.Mconv6.bias", "stage6.Mconv7.weight", "stage6.Mconv7.bias". Unexpected key(s) in state_dict: "module.vgg19.backbone.0.weight", "module.vgg19.backbone.0.bias", "module.vgg19.backbone.2.weight", "module.vgg19.backbone.2.bias", "module.vgg19.backbone.5.weight", "module.vgg19.backbone.5.bias", "module.vgg19.backbone.7.weight", "module.vgg19.backbone.7.bias", "module.vgg19.backbone.10.weight", "module.vgg19.backbone.10.bias", "module.vgg19.backbone.12.weight", "module.vgg19.backbone.12.bias", "module.vgg19.backbone.14.weight", "module.vgg19.backbone.14.bias", "module.vgg19.backbone.16.weight", "module.vgg19.backbone.16.bias", "module.vgg19.backbone.19.weight", "module.vgg19.backbone.19.bias", "module.vgg19.backbone.21.weight", "module.vgg19.backbone.21.bias", "module.vgg19.backbone.23.weight", "module.vgg19.backbone.23.bias", "module.vgg19.backbone.25.weight", "module.vgg19.backbone.25.bias", "module.vgg19.conv5_1.weight", "module.vgg19.conv5_1.bias", "module.vgg19.conv5_2.weight", "module.vgg19.conv5_2.bias", "module.vgg19.conv5_3.weight", "module.vgg19.conv5_3.bias", "module.stage1.stage1_1.weight", "module.stage1.stage1_1.bias", "module.stage1.stage1_2.weight", "module.stage1.stage1_2.bias", "module.stage2.Mconv1.conv.weight", "module.stage2.Mconv1.conv.bias", "module.stage2.Mconv2.conv.weight", "module.stage2.Mconv2.conv.bias", "module.stage2.Mconv3.conv.weight", "module.stage2.Mconv3.conv.bias", "module.stage2.Mconv4.conv.weight", "module.stage2.Mconv4.conv.bias", "module.stage2.Mconv5.conv.weight", "module.stage2.Mconv5.conv.bias", "module.stage2.Mconv6.weight", "module.stage2.Mconv6.bias", "module.stage2.Mconv7.weight", "module.stage2.Mconv7.bias", "module.stage3.Mconv1.conv.weight", "module.stage3.Mconv1.conv.bias", "module.stage3.Mconv2.conv.weight", "module.stage3.Mconv2.conv.bias", "module.stage3.Mconv3.conv.weight", "module.stage3.Mconv3.conv.bias", "module.stage3.Mconv4.conv.weight", "module.stage3.Mconv4.conv.bias", "module.stage3.Mconv5.conv.weight", "module.stage3.Mconv5.conv.bias", "module.stage3.Mconv6.weight", "module.stage3.Mconv6.bias", "module.stage3.Mconv7.weight", "module.stage3.Mconv7.bias", "module.stage4.Mconv1.conv.weight", "module.stage4.Mconv1.conv.bias", "module.stage4.Mconv2.conv.weight", "module.stage4.Mconv2.conv.bias", "module.stage4.Mconv3.conv.weight", "module.stage4.Mconv3.conv.bias", "module.stage4.Mconv4.conv.weight", "module.stage4.Mconv4.conv.bias", "module.stage4.Mconv5.conv.weight", "module.stage4.Mconv5.conv.bias", "module.stage4.Mconv6.weight", "module.stage4.Mconv6.bias", "module.stage4.Mconv7.weight", "module.stage4.Mconv7.bias", "module.stage5.Mconv1.conv.weight", "module.stage5.Mconv1.conv.bias", "module.stage5.Mconv2.conv.weight", "module.stage5.Mconv2.conv.bias", "module.stage5.Mconv3.conv.weight", "module.stage5.Mconv3.conv.bias", "module.stage5.Mconv4.conv.weight", "module.stage5.Mconv4.conv.bias", "module.stage5.Mconv5.conv.weight", "module.stage5.Mconv5.conv.bias", "module.stage5.Mconv6.weight", "module.stage5.Mconv6.bias", "module.stage5.Mconv7.weight", "module.stage5.Mconv7.bias", "module.stage6.Mconv1.conv.weight", "module.stage6.Mconv1.conv.bias", "module.stage6.Mconv2.conv.weight", "module.stage6.Mconv2.conv.bias", "module.stage6.Mconv3.conv.weight", "module.stage6.Mconv3.conv.bias", "module.stage6.Mconv4.conv.weight", "module.stage6.Mconv4.conv.bias", "module.stage6.Mconv5.conv.weight", "module.stage6.Mconv5.conv.bias", "module.stage6.Mconv6.weight", "module.stage6.Mconv6.bias", "module.stage6.Mconv7.weight", "module.stage6.Mconv7.bias".
Thank you very much. I have solved the problem
just found the solution, in
inference.py
change to:if __name__ == "__main__": # *********************** Parameter *********************** parser = argparse.ArgumentParser() parser.add_argument('--resume', default='weights/best_model.pth', help='trained model dir') parser.add_argument('--image_dir', default='images/', help='path for folder') args = parser.parse_args() # ******************** build model ******************** # Limb Probabilistic Mask G1 & 6 model = CPMHandLimb(outc=21, lshc=7, pretrained=False) if cuda: model = model.cuda() model = nn.DataParallel(model, device_id) state_dict = torch.load(args.resume, map_location={'cuda:2':'cuda:1'}) model.load_state_dict(state_dict) coordinate = hand_pose_estimation(model) print(coordinate)
thanks,when I test in cpu,change this code: state_dict = torch.load(args.resume,map_location=torch.device('cpu')) and the output is Error(s) in loading state_dict for CPMHandLimb: Missing key(s) in state_dict: "vgg19.backbone.0.weight", "vgg19.backbone.0.bias", "vgg19.backbone.2.weight", "vgg19.backbone.2.bias", "vgg19.backbone.5.weight", "vgg19.backbone.5.bias", "vgg19.backbone.7.weight", "vgg19.backbone.7.bias", "vgg19.backbone.10.weight", "vgg19.backbone.10.bias", "vgg19.backbone.12.weight", "vgg19.backbone.12.bias", "vgg19.backbone.14.weight", "vgg19.backbone.14.bias", "vgg19.backbone.16.weight", "vgg19.backbone.16.bias", "vgg19.backbone.19.weight", "vgg19.backbone.19.bias", "vgg19.backbone.21.weight", "vgg19.backbone.21.bias", "vgg19.backbone.23.weight", "vgg19.backbone.23.bias", "vgg19.backbone.25.weight", "vgg19.backbone.25.bias", "vgg19.conv5_1.weight", "vgg19.conv5_1.bias", "vgg19.conv5_2.weight", "vgg19.conv5_2.bias", "vgg19.conv5_3.weight", "vgg19.conv5_3.bias", "stage1.stage1_1.weight", "stage1.stage1_1.bias", "stage1.stage1_2.weight", "stage1.stage1_2.bias", "stage2.Mconv1.conv.weight", "stage2.Mconv1.conv.bias", "stage2.Mconv2.conv.weight", "stage2.Mconv2.conv.bias", "stage2.Mconv3.conv.weight", "stage2.Mconv3.conv.bias", "stage2.Mconv4.conv.weight", "stage2.Mconv4.conv.bias", "stage2.Mconv5.conv.weight", "stage2.Mconv5.conv.bias", "stage2.Mconv6.weight", "stage2.Mconv6.bias", "stage2.Mconv7.weight", "stage2.Mconv7.bias", "stage3.Mconv1.conv.weight", "stage3.Mconv1.conv.bias", "stage3.Mconv2.conv.weight", "stage3.Mconv2.conv.bias", "stage3.Mconv3.conv.weight", "stage3.Mconv3.conv.bias", "stage3.Mconv4.conv.weight", "stage3.Mconv4.conv.bias", "stage3.Mconv5.conv.weight", "stage3.Mconv5.conv.bias", "stage3.Mconv6.weight", "stage3.Mconv6.bias", "stage3.Mconv7.weight", "stage3.Mconv7.bias", "stage4.Mconv1.conv.weight", "stage4.Mconv1.conv.bias", "stage4.Mconv2.conv.weight", "stage4.Mconv2.conv.bias", "stage4.Mconv3.conv.weight", "stage4.Mconv3.conv.bias", "stage4.Mconv4.conv.weight", "stage4.Mconv4.conv.bias", "stage4.Mconv5.conv.weight", "stage4.Mconv5.conv.bias", "stage4.Mconv6.weight", "stage4.Mconv6.bias", "stage4.Mconv7.weight", "stage4.Mconv7.bias", "stage5.Mconv1.conv.weight", "stage5.Mconv1.conv.bias", "stage5.Mconv2.conv.weight", "stage5.Mconv2.conv.bias", "stage5.Mconv3.conv.weight", "stage5.Mconv3.conv.bias", "stage5.Mconv4.conv.weight", "stage5.Mconv4.conv.bias", "stage5.Mconv5.conv.weight", "stage5.Mconv5.conv.bias", "stage5.Mconv6.weight", "stage5.Mconv6.bias", "stage5.Mconv7.weight", "stage5.Mconv7.bias", "stage6.Mconv1.conv.weight", "stage6.Mconv1.conv.bias", "stage6.Mconv2.conv.weight", "stage6.Mconv2.conv.bias", "stage6.Mconv3.conv.weight", "stage6.Mconv3.conv.bias", "stage6.Mconv4.conv.weight", "stage6.Mconv4.conv.bias", "stage6.Mconv5.conv.weight", "stage6.Mconv5.conv.bias", "stage6.Mconv6.weight", "stage6.Mconv6.bias", "stage6.Mconv7.weight", "stage6.Mconv7.bias". Unexpected key(s) in state_dict: "module.vgg19.backbone.0.weight", "module.vgg19.backbone.0.bias", "module.vgg19.backbone.2.weight", "module.vgg19.backbone.2.bias", "module.vgg19.backbone.5.weight", "module.vgg19.backbone.5.bias", "module.vgg19.backbone.7.weight", "module.vgg19.backbone.7.bias", "module.vgg19.backbone.10.weight", "module.vgg19.backbone.10.bias", "module.vgg19.backbone.12.weight", "module.vgg19.backbone.12.bias", "module.vgg19.backbone.14.weight", "module.vgg19.backbone.14.bias", "module.vgg19.backbone.16.weight", "module.vgg19.backbone.16.bias", "module.vgg19.backbone.19.weight", "module.vgg19.backbone.19.bias", "module.vgg19.backbone.21.weight", "module.vgg19.backbone.21.bias", "module.vgg19.backbone.23.weight", "module.vgg19.backbone.23.bias", "module.vgg19.backbone.25.weight", "module.vgg19.backbone.25.bias", "module.vgg19.conv5_1.weight", "module.vgg19.conv5_1.bias", "module.vgg19.conv5_2.weight", "module.vgg19.conv5_2.bias", "module.vgg19.conv5_3.weight", "module.vgg19.conv5_3.bias", "module.stage1.stage1_1.weight", "module.stage1.stage1_1.bias", "module.stage1.stage1_2.weight", "module.stage1.stage1_2.bias", "module.stage2.Mconv1.conv.weight", "module.stage2.Mconv1.conv.bias", "module.stage2.Mconv2.conv.weight", "module.stage2.Mconv2.conv.bias", "module.stage2.Mconv3.conv.weight", "module.stage2.Mconv3.conv.bias", "module.stage2.Mconv4.conv.weight", "module.stage2.Mconv4.conv.bias", "module.stage2.Mconv5.conv.weight", "module.stage2.Mconv5.conv.bias", "module.stage2.Mconv6.weight", "module.stage2.Mconv6.bias", "module.stage2.Mconv7.weight", "module.stage2.Mconv7.bias", "module.stage3.Mconv1.conv.weight", "module.stage3.Mconv1.conv.bias", "module.stage3.Mconv2.conv.weight", "module.stage3.Mconv2.conv.bias", "module.stage3.Mconv3.conv.weight", "module.stage3.Mconv3.conv.bias", "module.stage3.Mconv4.conv.weight", "module.stage3.Mconv4.conv.bias", "module.stage3.Mconv5.conv.weight", "module.stage3.Mconv5.conv.bias", "module.stage3.Mconv6.weight", "module.stage3.Mconv6.bias", "module.stage3.Mconv7.weight", "module.stage3.Mconv7.bias", "module.stage4.Mconv1.conv.weight", "module.stage4.Mconv1.conv.bias", "module.stage4.Mconv2.conv.weight", "module.stage4.Mconv2.conv.bias", "module.stage4.Mconv3.conv.weight", "module.stage4.Mconv3.conv.bias", "module.stage4.Mconv4.conv.weight", "module.stage4.Mconv4.conv.bias", "module.stage4.Mconv5.conv.weight", "module.stage4.Mconv5.conv.bias", "module.stage4.Mconv6.weight", "module.stage4.Mconv6.bias", "module.stage4.Mconv7.weight", "module.stage4.Mconv7.bias", "module.stage5.Mconv1.conv.weight", "module.stage5.Mconv1.conv.bias", "module.stage5.Mconv2.conv.weight", "module.stage5.Mconv2.conv.bias", "module.stage5.Mconv3.conv.weight", "module.stage5.Mconv3.conv.bias", "module.stage5.Mconv4.conv.weight", "module.stage5.Mconv4.conv.bias", "module.stage5.Mconv5.conv.weight", "module.stage5.Mconv5.conv.bias", "module.stage5.Mconv6.weight", "module.stage5.Mconv6.bias", "module.stage5.Mconv7.weight", "module.stage5.Mconv7.bias", "module.stage6.Mconv1.conv.weight", "module.stage6.Mconv1.conv.bias", "module.stage6.Mconv2.conv.weight", "module.stage6.Mconv2.conv.bias", "module.stage6.Mconv3.conv.weight", "module.stage6.Mconv3.conv.bias", "module.stage6.Mconv4.conv.weight", "module.stage6.Mconv4.conv.bias", "module.stage6.Mconv5.conv.weight", "module.stage6.Mconv5.conv.bias", "module.stage6.Mconv6.weight", "module.stage6.Mconv6.bias", "module.stage6.Mconv7.weight", "module.stage6.Mconv7.bias".
@l976308589 i got the same error...can you let me know how you solve this issue ?
just found the solution, in
inference.py
change to:if __name__ == "__main__": # *********************** Parameter *********************** parser = argparse.ArgumentParser() parser.add_argument('--resume', default='weights/best_model.pth', help='trained model dir') parser.add_argument('--image_dir', default='images/', help='path for folder') args = parser.parse_args() # ******************** build model ******************** # Limb Probabilistic Mask G1 & 6 model = CPMHandLimb(outc=21, lshc=7, pretrained=False) if cuda: model = model.cuda() model = nn.DataParallel(model, device_id) state_dict = torch.load(args.resume, map_location={'cuda:2':'cuda:1'}) model.load_state_dict(state_dict) coordinate = hand_pose_estimation(model) print(coordinate)
thanks,when I test in cpu,change this code: state_dict = torch.load(args.resume,map_location=torch.device('cpu')) and the output is Error(s) in loading state_dict for CPMHandLimb: Missing key(s) in state_dict: "vgg19.backbone.0.weight", "vgg19.backbone.0.bias", "vgg19.backbone.2.weight", "vgg19.backbone.2.bias", "vgg19.backbone.5.weight", "vgg19.backbone.5.bias", "vgg19.backbone.7.weight", "vgg19.backbone.7.bias", "vgg19.backbone.10.weight", "vgg19.backbone.10.bias", "vgg19.backbone.12.weight", "vgg19.backbone.12.bias", "vgg19.backbone.14.weight", "vgg19.backbone.14.bias", "vgg19.backbone.16.weight", "vgg19.backbone.16.bias", "vgg19.backbone.19.weight", "vgg19.backbone.19.bias", "vgg19.backbone.21.weight", "vgg19.backbone.21.bias", "vgg19.backbone.23.weight", "vgg19.backbone.23.bias", "vgg19.backbone.25.weight", "vgg19.backbone.25.bias", "vgg19.conv5_1.weight", "vgg19.conv5_1.bias", "vgg19.conv5_2.weight", "vgg19.conv5_2.bias", "vgg19.conv5_3.weight", "vgg19.conv5_3.bias", "stage1.stage1_1.weight", "stage1.stage1_1.bias", "stage1.stage1_2.weight", "stage1.stage1_2.bias", "stage2.Mconv1.conv.weight", "stage2.Mconv1.conv.bias", "stage2.Mconv2.conv.weight", "stage2.Mconv2.conv.bias", "stage2.Mconv3.conv.weight", "stage2.Mconv3.conv.bias", "stage2.Mconv4.conv.weight", "stage2.Mconv4.conv.bias", "stage2.Mconv5.conv.weight", "stage2.Mconv5.conv.bias", "stage2.Mconv6.weight", "stage2.Mconv6.bias", "stage2.Mconv7.weight", "stage2.Mconv7.bias", "stage3.Mconv1.conv.weight", "stage3.Mconv1.conv.bias", "stage3.Mconv2.conv.weight", "stage3.Mconv2.conv.bias", "stage3.Mconv3.conv.weight", "stage3.Mconv3.conv.bias", "stage3.Mconv4.conv.weight", "stage3.Mconv4.conv.bias", "stage3.Mconv5.conv.weight", "stage3.Mconv5.conv.bias", "stage3.Mconv6.weight", "stage3.Mconv6.bias", "stage3.Mconv7.weight", "stage3.Mconv7.bias", "stage4.Mconv1.conv.weight", "stage4.Mconv1.conv.bias", "stage4.Mconv2.conv.weight", "stage4.Mconv2.conv.bias", "stage4.Mconv3.conv.weight", "stage4.Mconv3.conv.bias", "stage4.Mconv4.conv.weight", "stage4.Mconv4.conv.bias", "stage4.Mconv5.conv.weight", "stage4.Mconv5.conv.bias", "stage4.Mconv6.weight", "stage4.Mconv6.bias", "stage4.Mconv7.weight", "stage4.Mconv7.bias", "stage5.Mconv1.conv.weight", "stage5.Mconv1.conv.bias", "stage5.Mconv2.conv.weight", "stage5.Mconv2.conv.bias", "stage5.Mconv3.conv.weight", "stage5.Mconv3.conv.bias", "stage5.Mconv4.conv.weight", "stage5.Mconv4.conv.bias", "stage5.Mconv5.conv.weight", "stage5.Mconv5.conv.bias", "stage5.Mconv6.weight", "stage5.Mconv6.bias", "stage5.Mconv7.weight", "stage5.Mconv7.bias", "stage6.Mconv1.conv.weight", "stage6.Mconv1.conv.bias", "stage6.Mconv2.conv.weight", "stage6.Mconv2.conv.bias", "stage6.Mconv3.conv.weight", "stage6.Mconv3.conv.bias", "stage6.Mconv4.conv.weight", "stage6.Mconv4.conv.bias", "stage6.Mconv5.conv.weight", "stage6.Mconv5.conv.bias", "stage6.Mconv6.weight", "stage6.Mconv6.bias", "stage6.Mconv7.weight", "stage6.Mconv7.bias". Unexpected key(s) in state_dict: "module.vgg19.backbone.0.weight", "module.vgg19.backbone.0.bias", "module.vgg19.backbone.2.weight", "module.vgg19.backbone.2.bias", "module.vgg19.backbone.5.weight", "module.vgg19.backbone.5.bias", "module.vgg19.backbone.7.weight", "module.vgg19.backbone.7.bias", "module.vgg19.backbone.10.weight", "module.vgg19.backbone.10.bias", "module.vgg19.backbone.12.weight", "module.vgg19.backbone.12.bias", "module.vgg19.backbone.14.weight", "module.vgg19.backbone.14.bias", "module.vgg19.backbone.16.weight", "module.vgg19.backbone.16.bias", "module.vgg19.backbone.19.weight", "module.vgg19.backbone.19.bias", "module.vgg19.backbone.21.weight", "module.vgg19.backbone.21.bias", "module.vgg19.backbone.23.weight", "module.vgg19.backbone.23.bias", "module.vgg19.backbone.25.weight", "module.vgg19.backbone.25.bias", "module.vgg19.conv5_1.weight", "module.vgg19.conv5_1.bias", "module.vgg19.conv5_2.weight", "module.vgg19.conv5_2.bias", "module.vgg19.conv5_3.weight", "module.vgg19.conv5_3.bias", "module.stage1.stage1_1.weight", "module.stage1.stage1_1.bias", "module.stage1.stage1_2.weight", "module.stage1.stage1_2.bias", "module.stage2.Mconv1.conv.weight", "module.stage2.Mconv1.conv.bias", "module.stage2.Mconv2.conv.weight", "module.stage2.Mconv2.conv.bias", "module.stage2.Mconv3.conv.weight", "module.stage2.Mconv3.conv.bias", "module.stage2.Mconv4.conv.weight", "module.stage2.Mconv4.conv.bias", "module.stage2.Mconv5.conv.weight", "module.stage2.Mconv5.conv.bias", "module.stage2.Mconv6.weight", "module.stage2.Mconv6.bias", "module.stage2.Mconv7.weight", "module.stage2.Mconv7.bias", "module.stage3.Mconv1.conv.weight", "module.stage3.Mconv1.conv.bias", "module.stage3.Mconv2.conv.weight", "module.stage3.Mconv2.conv.bias", "module.stage3.Mconv3.conv.weight", "module.stage3.Mconv3.conv.bias", "module.stage3.Mconv4.conv.weight", "module.stage3.Mconv4.conv.bias", "module.stage3.Mconv5.conv.weight", "module.stage3.Mconv5.conv.bias", "module.stage3.Mconv6.weight", "module.stage3.Mconv6.bias", "module.stage3.Mconv7.weight", "module.stage3.Mconv7.bias", "module.stage4.Mconv1.conv.weight", "module.stage4.Mconv1.conv.bias", "module.stage4.Mconv2.conv.weight", "module.stage4.Mconv2.conv.bias", "module.stage4.Mconv3.conv.weight", "module.stage4.Mconv3.conv.bias", "module.stage4.Mconv4.conv.weight", "module.stage4.Mconv4.conv.bias", "module.stage4.Mconv5.conv.weight", "module.stage4.Mconv5.conv.bias", "module.stage4.Mconv6.weight", "module.stage4.Mconv6.bias", "module.stage4.Mconv7.weight", "module.stage4.Mconv7.bias", "module.stage5.Mconv1.conv.weight", "module.stage5.Mconv1.conv.bias", "module.stage5.Mconv2.conv.weight", "module.stage5.Mconv2.conv.bias", "module.stage5.Mconv3.conv.weight", "module.stage5.Mconv3.conv.bias", "module.stage5.Mconv4.conv.weight", "module.stage5.Mconv4.conv.bias", "module.stage5.Mconv5.conv.weight", "module.stage5.Mconv5.conv.bias", "module.stage5.Mconv6.weight", "module.stage5.Mconv6.bias", "module.stage5.Mconv7.weight", "module.stage5.Mconv7.bias", "module.stage6.Mconv1.conv.weight", "module.stage6.Mconv1.conv.bias", "module.stage6.Mconv2.conv.weight", "module.stage6.Mconv2.conv.bias", "module.stage6.Mconv3.conv.weight", "module.stage6.Mconv3.conv.bias", "module.stage6.Mconv4.conv.weight", "module.stage6.Mconv4.conv.bias", "module.stage6.Mconv5.conv.weight", "module.stage6.Mconv5.conv.bias", "module.stage6.Mconv6.weight", "module.stage6.Mconv6.bias", "module.stage6.Mconv7.weight", "module.stage6.Mconv7.bias".
@l976308589 i got the same error...can you let me know how you solve this issue ?
That is simply because you cannot use nn.DataParallel() in CPU. Here are some solutions: https://blog.csdn.net/yangzhengzheng95/article/details/88574200 (Chinese Version)
@l976308589 Ok thank you got it
I used your trained model and ran the "inference.py" , but the output is different from yours, like this what can I modify?
thank you a lot !