Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

How can I get "human-pose-estimation-3d-0001.xml"?

Anonymous101
Beginner
3,733 Views

Hi,

https://docs.openvinotoolkit.org/latest/_demos_python_demos_human_pose_estimation_3d_demo_README.html

How can  I get "human-pose-estimation-3d-0001.xml"?

It cannot be acquired the file by Model downloader.
Version : openvino_2020.1.033 on Windows10
Thanks a lot,

--------

C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\tools\model_downloader>python downloader.py  --name human-pose-estimation-3d-0001  --output_dir C:\Users\USERNAME\Documents\Intel\OpenVINO\
################|| Downloading models ||################

========== Downloading C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001\human-pose-estimation-3d-0001.tar.gz
... 100%, 17990 KB, 8402 KB/s, 2 seconds passed

################|| Post-processing ||################

========== Unpacking C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001\human-pose-estimation-3d-0001.tar.gz

C:\Users\USERNAME>cd  C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001

C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001>dir
 Volume in drive C is OSDisk
 Volume Serial Number is 828F-8868

 Directory of C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001

2020/02/06  15:32    <DIR>          .
2020/02/06  15:32    <DIR>          ..
2019/10/08  22:55        20,509,788 human-pose-estimation-3d-0001.pth
2019/10/11  19:49    <DIR>          model
               1 File(s)     20,509,788 bytes
               3 Dir(s)  30,012,047,360 bytes free

C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001>cd model

C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001\model>dir
 Volume in drive C is OSDisk
 Volume Serial Number is 828F-8868

 Directory of C:\Users\USERNAME\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001\model

2019/10/11  19:49    <DIR>          .
2019/10/11  19:49    <DIR>          ..
2019/10/08  20:10             1,237 conv.py
2019/10/11  19:45             8,016 with_mobilenet.py
2019/10/08  21:32                56 __init__.py
               3 File(s)          9,309 bytes
               2 Dir(s)  30,012,047,360 bytes free

 

0 Kudos
1 Solution
JesusE_Intel
Moderator
3,733 Views

Hi, 

As Vladimir mentioned, the model downloader will download the PyTorch model. Use the following model optimizer command to convert to ONNX and then ONNX to IR format.

python <Installation_Dir>\openvino\deployment_tools\tools\model_downloader\pytorch_to_onnx.py --model-name=PoseEstimationWithMobileNet --weights=human-pose-estimation-3d-0001.pth --input-shape=1,3,256,448 --output-file=human-pose-estimation-3d-0001.onnx --output-names=features,heatmaps,pafs --input-names=data --model-param=is_convertible_by_mo=True --import-module=model
python <Installation_Dir>\intel\openvino\deployment_tools\model_optimizer\mo_onnx.py --input=data --mean_values=data[128.0,128.0,128.0] --scale_values=data[255.0,255.0,255.0] --output=features,heatmaps,pafs --input_model=human-pose-estimation-3d-0001.onnx

The required parameters can be found in the model.yaml on the Open Model Zoo.

Regards,

Jesus

View solution in original post

0 Kudos
12 Replies
Vladimir_Dudnik
Employee
3,733 Views

Hello,

you use downloader script, which only download models (for public models it download them in source framework format). To get an OpenVINO IR from it you need to run converter script as a next step. It will convert model to OpenVINO IR through Model Opetimizer.

Regards,
  Vladimir

0 Kudos
JesusE_Intel
Moderator
3,734 Views

Hi, 

As Vladimir mentioned, the model downloader will download the PyTorch model. Use the following model optimizer command to convert to ONNX and then ONNX to IR format.

python <Installation_Dir>\openvino\deployment_tools\tools\model_downloader\pytorch_to_onnx.py --model-name=PoseEstimationWithMobileNet --weights=human-pose-estimation-3d-0001.pth --input-shape=1,3,256,448 --output-file=human-pose-estimation-3d-0001.onnx --output-names=features,heatmaps,pafs --input-names=data --model-param=is_convertible_by_mo=True --import-module=model
python <Installation_Dir>\intel\openvino\deployment_tools\model_optimizer\mo_onnx.py --input=data --mean_values=data[128.0,128.0,128.0] --scale_values=data[255.0,255.0,255.0] --output=features,heatmaps,pafs --input_model=human-pose-estimation-3d-0001.onnx

The required parameters can be found in the model.yaml on the Open Model Zoo.

Regards,

Jesus

0 Kudos
pmx
Novice
3,733 Views

Hi,

The instructions of Jesus E. allowed me to convert the model in IR format.

Now I get the following error when I try to run the 3D Human Pose Estimation Python Demo on my ubuntu 18.04.

> python3 human_pose_estimation_3d_demo.py -m ~/openvino_models/public/human-pose-estimation-3d-0001/human-pose-estimation-3d-0001.xml
Traceback (most recent call last):
  File "human_pose_estimation_3d_demo.py", line 25, in <module>
    from modules.parse_poses import parse_poses
  File "/opt/intel/openvino_2020.1.023/deployment_tools/open_model_zoo/demos/python_demos/human_pose_estimation_3d_demo/modules/parse_poses.py", line 18, in <module>
    from pose_extractor import extract_poses
ImportError: cannot import name 'extract_poses'

Note that when I built the Openvino demos , I have used the flag ENABLE_PYTHON=ON :

cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON /opt/intel/openvino/deployment_tools/inference_engine/demos

so that the pose_extractor.so was succesfully generated. But now I don't know how to make the connection between the "from pose_extractor import extract_poses" in parse_poses.py, with pose_extractor.so. Modidying the LD_LIBRARY_PATH to make it point to the directory where the .so is does not solve the problem. 

Any idea ? Thanks

0 Kudos
Kobu_Intel
Employee
3,733 Views

Hi Vladimir, Jesus,
IR model was created!
Though I need to work on one more step below on Windows10.
https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit/topic/844756
Thanks,
BR/Kobu

 

0 Kudos
Kobu_Intel
Employee
3,733 Views
0 Kudos
JesusE_Intel
Moderator
3,733 Views

Hi pmx,

You will need to export the PYTHONPATH to add the demo build directory, take a look at the steps in this thread. This is my export command after building the demos with the -DENABLE_PYTHON=ON.

export PYTHONPATH="$PYTHONPATH:/home/jesus/omz_demos_build/intel64/Release/lib"

Regards,

Jesus

0 Kudos
JesusE_Intel
Moderator
3,733 Views

Hi Kobu,

These are the steps for Windows, give it a try and let me know if it works for you.

Build the demos with the -DENABLE_PYTHON

cd C:\Program Files (x86)\IntelSWTools\openvino\inference_engine\demos
build_demos_msvc.bat -DENABLE_PYTHON=YES

Run the demo

cd C:\Program Files (x86)\IntelSWTools\openvino\inference_engine\demos\python_demos\human_pose_estimation_3d_demo
SET PYTHONPATH=%PYTHONPATH%;C:\Users\<USER_NAME>\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release
python human_pose_estimation_3d_demo.py -h

Regards,

Jesus

0 Kudos
Kobu_Intel
Employee
3,733 Views

Hi Jesus,

Worked at Windows10!!

I'll try Ubuntu next referring below.

 https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit/topic/844756

 Thanks a lot!!

BR/Kobu

 

0 Kudos
JesusE_Intel
Moderator
3,733 Views

Kobuna, Ryosuke (Intel) wrote:

FYI, typo:
https://docs.openvinotoolkit.org/latest/_demos_python_demos_human_pose_e...
python human_pose_"estination"_3d_demo.py \
 

Good catch, I've submitted a bug to have the documentation updated. Thanks!

Regards,

Jesus

0 Kudos
Pasteris__Paolo
Beginner
3,733 Views

After the previous usefully steps I obtained:

C:\Users\paolo.pasteris\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release>human_pose_estimation_demo.exe -i cam -m C:\Users\paolo.pasteris\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001\human-pose-estimation-3d-0001.xml -d CPU
InferenceEngine: 00007FF897434020
Parsing input parameters
[ ERROR ] C:\Users\paolo.pasteris\Documents\Intel\OpenVINO\public\human-pose-estimation-3d-0001\human-pose-estimation-3d-0001.xml: expected to have 2 outputs

Any suggestion?

Paolo

0 Kudos
Huiyan_C_Intel
Moderator
3,733 Views

It's weird! I got following error:

mo.utils.error.Error: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.front.user_data_repack.UserDataRepack'>): No node with name features.

when I tried to convert human-pose-estimation-3d-0001.onnx using

python <Installation_Dir>\intel\openvino\deployment_tools\model_optimizer\mo_onnx.py --input=data --mean_values=data[128.0,128.0,128.0] --scale_values=data[255.0,255.0,255.0] --output=features,heatmaps,pafs --input_model=human-pose-estimation-3d-0001.onnx

while I can see output nodes are features, heatmaps and pafs by opening human-pose-estimation-3d-0001.onnx with Netron.

Any ideas? Thanks!

 

0 Kudos
deven_patel
Beginner
3,733 Views

I could  fix this by downgrading pytorch from 1.5 to 1.4

Reply