Daniil-Osokin / lightweight-human-pose-estimation-3d-demo.pytorch

Real-time 3D multi-person pose estimation demo in PyTorch. OpenVINO backend can be used for fast inference on CPU.
Apache License 2.0
656 stars 138 forks source link

an error when running an optimizer #19

Closed kaishijeng closed 4 years ago

kaishijeng commented 4 years ago

Got an error when running optimizer below. Any idea why this happens:

python /opt/intel/openvino_2020.2.120/deployment_tools/model_optimizer/mo.py --input_model human-pose-estimation-3d.onnx --input=data --mean_values=data[128.0,128.0,128.0] --scale_values=data[255.0,255.0,255.0] --output=features,heatmaps,pafs

Model Optimizer arguments: Common parameters:

Daniil-Osokin commented 4 years ago

Hi, No node with name features means that MO did not found features node, which was specified as one of output node above. You can check if onnx model has it (by looking at conversion output). Did you use scripts/convert_to_onnx.py for conversion to onnx?

kaishijeng commented 4 years ago

Yes, I used scripts/convert_to_onnx.py for conversion to onnx. I grep features from conversion output and it seems features is there:

%628 : Float(1, 128, 32, 56) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%627, %Pose3D.prediction.feature_maps.0.0.weight, %Pose3D.prediction.feature_maps.0.0.bias) # /home/fc/anaconda3/envs/directron2/lib/python3.6/site-packages/torch/nn/modules/conv.py:342:0 %features : Float(1, 57, 32, 56) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%629, %Pose3D.prediction.feature_maps.1.0.weight, %Pose3D.prediction.feature_maps.1.0.bias) # /home/fc/anaconda3/envs/directron2/lib/python3.6/site-packages/torch/nn/modules/conv.py:342:0 return (%features, %heatmaps, %pafs)

Daniil-Osokin commented 4 years ago

So it looks like an internal error in MO. Try to use official model downloader and converter, model name is human-pose-estimation-3d-0001.

kaishijeng commented 4 years ago

I will download the model and try it out.

Thanks

ZlodeiBaal commented 4 years ago

Same problem here. Fix it with roll back to torch 1.4 version (from 1.5). "human-pose-estimation-3d-0001" and OpenVino affected as well.

Daniil-Osokin commented 4 years ago

Thanks for the solution, @ZlodeiBaal!

Daniil-Osokin commented 4 years ago

@ZlodeiBaal BTW, Anton, really love your posts on habr! :crown:

ZlodeiBaal commented 4 years ago

@Daniil-Osokin
Thank you, Daniil! You have a really cool git! Already several times while googling I have found answers and interesting ideas here :)