Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
528 Views

Running single pose estimation demo

I am trying to run the single pose estimation demo model using 

single_human_pose_estimation_demo.py --model_od mobilenet-ssd.xml --model_hpe human-pose-estimation-0001.xml

I keep getting error 

\Desktop\single_human_pose_estimation_demo\estimator.py", line 92, in __init__
    assert len(self.model.outputs) == 1, "Expected 1 output blob"
AssertionError: Expected 1 output blob

Why is this happeing

0 Kudos
12 Replies
Highlighted
528 Views

Hi Yasha,

To run the single-human-pose-estimation-demo, use single-human-pose-estimation-0001 model which is available to download using model downloader.

you can follow the below commands to convert the single-human-pose-estimation-0001.pth to IR files.:

python3 /opt/intel/openvino/deployment_tools/tools/model_downloader/pytorch_to_onnx.py --model-name=SinglePersonPoseEstimationWithMobileNet --weights=single-human-pose-estimation-0001.pth --input-shape=1,3,384,288 --output-file=single-human-pose-estimation-0001.onnx --output-names=heatmaps0,heatmaps1,heatmaps2,heatmaps3,heatmaps4,heatmaps --input-names=data --import-module=models

 

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_onnx.py --input=data --mean_values=data[123.675,116.28,103.53] --scale_values=data[58.395,57.12,57.375] --output=heatmaps --input_model=single-human-pose-estimation-0001.onnx

 

Then the run the single-human-pose-estimation-demo using the generated IR and object-detection model.

Hope this helps.

Regards,

Ram prasad

0 Kudos
Highlighted
Beginner
528 Views

Hi , running the first script gives an error : pytorch_to_onnx.py: error: unrecognized arguments: single-human-pose-estimation-0001.onnx ?

 

0 Kudos
Highlighted
528 Views

It seems there is a space in the first command mentioned. I have updated the command.

Can you please try once again?

Regards,

Ram prasad

0 Kudos
Highlighted
Beginner
528 Views

Hi Ram, 

Thank you so much for your help! it works

Sadly the detected FPS with NCS2 is less than 1.6 FPS so almost not usable. 

Are there any models that work at higher FPS?

0 Kudos
Highlighted
528 Views

Hi Yasha,

This is the only model that works for this demo.

The OpenVINO models are for the demonstration purpose. You can train and use your models for more accuracy.

Feel free to ask any other questions.

Regards,

Ram prasad

0 Kudos
Highlighted
Beginner
528 Views

python3 /opt/intel/openvino/deployment_tools/tools/model_downloader/pytorch_to_onnx.py --model-name=SinglePersonPoseEstimationWithMobileNet --weights=single-human-pose-estimation-0001.pth --input-shape=1,3,384,288 --output-file=single-human-pose-estimation-0001.onnx --output-names=heatmaps0,heatmaps1,heatmaps2,heatmaps3,heatmaps4,heatmaps --input-names=data --import-module=models


Module SinglePersonPoseEstimationWithMobileNet doesn't exist. Check if it is installed
No module named 'models'   

?????

0 Kudos
Highlighted
528 Views

Can you try to export the path to models directory using PYTHONPATH as mentioned below:

export PYTHONPATH=/opt/intel/openvino/deployment_tools/tools/model_downloader/public/single-human-pose-estimation-0001/single-human-pose-estimation-0001

Hope this helps.

Regards,

Ram prasad

0 Kudos
Highlighted
Beginner
528 Views

Ram prasad (Intel) wrote:

Hi Yasha,

To run the single-human-pose-estimation-demo, use single-human-pose-estimation-0001 model which is available to download using model downloader.

you can follow the below commands to convert the single-human-pose-estimation-0001.pth to IR files.:

python3 /opt/intel/openvino/deployment_tools/tools/model_downloader/pytorch_to_onnx.py --model-name=SinglePersonPoseEstimationWithMobileNet --weights=single-human-pose-estimation-0001.pth --input-shape=1,3,384,288 --output-file=single-human-pose-estimation-0001.onnx --output-names=heatmaps0,heatmaps1,heatmaps2,heatmaps3,heatmaps4,heatmaps --input-names=data --import-module=models

 

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_onnx.py --input=data --mean_values=data[123.675,116.28,103.53] --scale_values=data[58.395,57.12,57.375] --output=heatmaps --input_model=single-human-pose-estimation-0001.onnx

 

Then the run the single-human-pose-estimation-demo using the generated IR and object-detection model.

Hope this helps.

Regards,

Ram prasad

 

Hello Ram

When I run 

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_onnx.py --input=data --mean_values=data[123.675,116.28,103.53] --scale_values=data[58.395,57.12,57.375] --output=heatmaps --input_model=single-human-pose-estimation-0001.onnx

It shows 

zsh: no matches found: --mean_values=data[123.675,116.28,103.53]

What should I do?

(MacOS, Openvino 2020.3)

0 Kudos
Highlighted
Moderator
528 Views

zhang, zihao wrote:

Hello Ram

When I run 

python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_onnx.py --input=data --mean_values=data[123.675,116.28,103.53] --scale_values=data[58.395,57.12,57.375] --output=heatmaps --input_model=single-human-pose-estimation-0001.onnx

It shows 

zsh: no matches found: --mean_values=data[123.675,116.28,103.53]

What should I do?

(MacOS, Openvino 2020.3)

Try to run the complete command

python3 --input=data --mean_values=data[123.675,116.28,103.53] --scale_values=data[58.395,57.12,57.375] --output=heatmaps --input_model=single-human-pose-estimation-0001.onnx --reverse_input_channels --input_shape=[1,3,384,288]

Or if you are using the original PyTorch model of single-human-pose-estimation-0001, you could use the converter.py within openvino/deployment_tools/open_model_zoo/tools/downloader/ for full conversion over to ONNX and then further to IR.

Hope this helps.
Thanks.

0 Kudos
Highlighted
Beginner
267 Views

Module SinglePersonPoseEstimationWithMobileNet doesn't exist. Check if it is installed
No module named 'models'   


@SIRIGIRI_V_Intel wrote:

Can you try to export the path to models directory using PYTHONPATH as mentioned below:

export PYTHONPATH=/opt/intel/openvino/deployment_tools/tools/model_downloader/public/single-human-pose-estimation-0001/single-human-pose-estimation-0001

Hope this helps.

Regards,

Ram prasad


Hi, I have similar errors, but I am running in Windows 10 environment. How can I solve this since export or set pythonpath is not working for me

0 Kudos
Highlighted
Beginner
266 Views

Hi, I have similar errors, but I am running in Windows 10 environment. How can I solve this since export or set pythonpath is not working for me
0 Kudos
Highlighted
Beginner
217 Views

Hello,

Were you able to figure it out? Even I am using it in windows 10 environment and getting the same error.

Thanks!

0 Kudos