Hzzone / pytorch-openpose

pytorch implementation of openpose including Hand and Body Pose Estimation.
2.03k stars 390 forks source link

runtime error for demo.jpg -- RuntimeError: Given groups=1, weight of size [256, 512, 3, 3], expected input[1, 3, 46, 32] to have 512 channels, but got 3 channels instead #2

Open ehartz01 opened 5 years ago

ehartz01 commented 5 years ago

Any idea what's happening?

SED-ML-0148% python demo1.py Traceback (most recent call last): File "demo1.py", line 17, in candidate, subset = body_estimation(oriImg) File "python/body.py", line 46, in call Mconv7_stage6_L1, Mconv7_stage6_L2 = self.model(data) File "/Users/ehartz01/Desktop/SignPhonologizer/nicey/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, kwargs) File "python/model.py", line 108, in forward out1 = self.model0(x) File "/Users/ehartz01/Desktop/SignPhonologizer/nicey/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, *kwargs) File "/Users/ehartz01/Desktop/SignPhonologizer/nicey/lib/python2.7/site-packages/torch/nn/modules/container.py", line 92, in forward input = module(input) File "/Users/ehartz01/Desktop/SignPhonologizer/nicey/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(input, kwargs) File "/Users/ehartz01/Desktop/SignPhonologizer/nicey/lib/python2.7/site-packages/torch/nn/modules/conv.py", line 320, in forward self.padding, self.dilation, self.groups) RuntimeError: Given groups=1, weight of size [256, 512, 3, 3], expected input[1, 3, 46, 32] to have 512 channels, but got 3 channels instead

JiageWang commented 5 years ago

I got the same error. The code uses all the OrderedDict in the wrong way, you can just turn the parameter from dict to list to remove the bug. snipaste_2019-03-04_16-30-09

ehartz01 commented 5 years ago

Did you change every block to a list?

souljaboy764 commented 4 years ago

It would be nice to have this updated in the code