mks0601 / Integral-Human-Pose-Regression-for-3D-Human-Pose-Estimation

PyTorch implementation of "Integral Human Pose Regression", ECCV 2018
194 stars 25 forks source link

Sizing on custom images #18

Closed bhavingpt closed 4 years ago

bhavingpt commented 5 years ago

I'm attempting to run the pretrained model #2 on a custom image and running into sizing issues. The image is RGB of size 256x256 (so the tensor is 3x256x256).

How do you edit the config file to enable these images to be run? The model expects 64x3x7x7 tensors. I edited the config to (256x256) images of depth 3, and I'm getting the following error:

File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallelModel:
    size mismatch for module.head.final_layer.weight: copying a param of torch.Size([54, 256, 1, 1]) from checkpoint, where the shape is torch.Size([1152, 256, 1, 1]) in current model.
    size mismatch for module.head.final_layer.bias: copying a param of torch.Size([54]) from checkpoint, where the shape is torch.Size([1152]) in current mod
mks0601 commented 5 years ago

Did you check the number of keypoints? It depends on dataset. If your pre-trained model on dataset A and the number of keypoints of dataset is K_A, it does not be used directly to other datasets B whose the number of keypoints is K_B (K_B \neq K_A).