Open wm901115nwpu opened 5 years ago
You have to download the detectron_pt_coco detections and run:
python run.py -e 80 -k detectron_pt_coco -arc 3,3,3,3,3
In addition, for that model we removed the third detection coordinate (the keypoint probability) since it had a bad effect on predictions in the wild due to the different resolution/aspect ratio. To achieve the same effect, replace this line with
kps = normalize_screen_coordinates(kps[..., :2], w=cam['res_w'], h=cam['res_h'])
That is that the detectron_pt_coco_detections isn't be trained by myself.
I have already got the result, but when I use the video contained speeding action ; such as do gymnastics; some results were bad, Can you give me some advice about it?
When I finish training the inference module pretrained_h36m_detectron_coco.bin
using:
python run.py -e 40 -k detectron_pt_coco -arc 3,3,3
and then test on a custom .npz
predicted by detectron2 following https://github.com/darkAlert/VideoPose3d_with_Detectron2 using:
python run.py -d custom -k myvideos -arc 3,3,3 -c checkpoint --evaluate epoch_40.bin --render --viz-subject detectron2 --viz-action custom --viz-camera 0 --viz-video ./data/pose2d-detectron2/input_video.mp4 --viz-output myvideos_output.mp4 --viz-size 6 --viz-no-ground-truth
it occures a size mismatch error while loading module:
Traceback (most recent call last):
File "run.py", line 209, in <module>
model_pos_train.load_state_dict(checkpoint['model_pos'])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 830, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for TemporalModelOptimized1f:
size mismatch for expand_conv.weight: copying a param with shape torch.Size([1024, 51, 3]) from checkpoint, the shape in current model is torch.Size([1024, 34, 3]).
How can I address this problem, please?
When I finish training the inference module
pretrained_h36m_detectron_coco.bin
using:python run.py -e 40 -k detectron_pt_coco -arc 3,3,3
and then test on a custom
.npz
predicted by detectron2 following https://github.com/darkAlert/VideoPose3d_with_Detectron2 using:python run.py -d custom -k myvideos -arc 3,3,3 -c checkpoint --evaluate epoch_40.bin --render --viz-subject detectron2 --viz-action custom --viz-camera 0 --viz-video ./data/pose2d-detectron2/input_video.mp4 --viz-output myvideos_output.mp4 --viz-size 6 --viz-no-ground-truth
it occures a size mismatch error while loading module:
Traceback (most recent call last): File "run.py", line 209, in <module> model_pos_train.load_state_dict(checkpoint['model_pos']) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 830, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for TemporalModelOptimized1f: size mismatch for expand_conv.weight: copying a param with shape torch.Size([1024, 51, 3]) from checkpoint, the shape in current model is torch.Size([1024, 34, 3]).
How can I address this problem, please?
I retrain it replacing the line with
kps = normalize_screen_coordinates(kps[..., :2], w=cam['res_w'], h=cam['res_h'])
and it works well. Thank you for your work!
how to train pretrained_h36m_detectron_coco.bin model? If I want to train myself, how to do it ?