Shimingyi / MotioNet

A deep neural network that directly reconstructs the motion of a 3D human skeleton from monocular video [ToG 2020]
https://rubbly.cn/publications/motioNet/
BSD 2-Clause "Simplified" License
554 stars 82 forks source link

RuntimeError: Calculated padded input size per channel: (1). Kernel size: (3). Kernel size can't be greater than actual input size #56

Closed Risingabhi closed 8 months ago

Risingabhi commented 8 months ago

hi, Thanks for wonderful repo, i am facing concern in running the script with my own videos, i ran openpose to make 2d poses json file. but when i give that as input, i get this error below: Please help

(motionet) C:\Users\Risin\Desktop\MotioNet>python evaluate.py -r ./checkpoints/wild_gt_tcc.pth -i data/example
Building the network
name of folder ['data', 'example']
video_name example
filename data/example\testvideo\testvideo_000000000000_keypoints.json
filename data/example\testvideo\testvideo_000000000001_keypoints.json
filename data/example\testvideo\testvideo_000000000002_keypoints.json
filename data/example\testvideo\testvideo_000000000003_keypoints.json
filename data/example\testvideo\testvideo_000000000004_keypoints.json
filename data/example\testvideo\testvideo_000000000005_keypoints.json
filename data/example\testvideo\testvideo_000000000006_keypoints.json
filename data/example\testvideo\testvideo_000000000007_keypoints.json
filename data/example\testvideo\testvideo_000000000008_keypoints.json
filename data/example\testvideo\testvideo_000000000009_keypoints.json
filename data/example\testvideo\testvideo_000000000010_keypoints.json
Traceback (most recent call last):
  File "C:\Users\Risin\Desktop\MotioNet\evaluate.py", line 160, in <module>
    main(config, args, output_folder)
  File "C:\Users\Risin\Desktop\MotioNet\evaluate.py", line 136, in main
    export(args.input)
  File "C:\Users\Risin\Desktop\MotioNet\evaluate.py", line 116, in export
    pre_bones, pre_rotations, pre_rotations_full, pre_pose_3d, pre_c, pre_proj = model.forward_fk(poses_2d_root, parameters)
  File "C:\Users\Risin\Desktop\MotioNet\model\model.py", line 58, in forward_fk
    fake_bones = self.forward_S(_input)
  File "C:\Users\Risin\Desktop\MotioNet\model\model.py", line 41, in forward_S
    return self.branch_S(_input)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "C:\Users\Risin\Desktop\MotioNet\model\model_zoo.py", line 293, in forward
    x = self.drop(self.relu(layer(x)))
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\container.py", line 215, in forward
    input = module(input)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\conv.py", line 310, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "D:\anaconda3\envs\motionet\lib\site-packages\torch\nn\modules\conv.py", line 306, in _conv_forward
    return F.conv1d(input, weight, bias, self.stride,
RuntimeError: Calculated padded input size per channel: (1). Kernel size: (3). Kernel size can't be greater than actual input size
Risingabhi commented 8 months ago

Above error was coming due to very short video length. Thanks @Shimingyi