- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As pointed out in the release notes of the latest version of OpenVINO (2020.1), several new demos were added, including a "3D human pose estimation" demo. Such demo is located at /opt/intel/openvino_2020.1.023/deployment_tools/open_model_zoo/demos/python_demos/human_pose_estimation_3d_demo
When I try to execute the following command:
python3 human_pose_estimation_3d_demo.py -h
I get the following error:
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'
It seems as though a Python module of some sort is missing. How do I solve that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Francesco,
You will need to build the Native Python Extension module as stated in the Prerequisites. To Build the extension modules add -DENABLE_PYTHON=ON to the cmake command in the build script.
(cd "$build_dir" && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON "${extra_cmake_opts[@]}" "$DEMOS_PATH")
The build script is located in the /opt/intel/openvino/inference_engine/demos directory. Once you run the script you will need to export the PYTHONPATH as follows:
export PYTHONPATH="$PYTHONPATH:<bin_dir>/lib"
All the detailed steps can be found here:
https://github.com/opencv/open_model_zoo/blob/master/demos/README.md#build-the-demo-applications
Hope this helps!
Regards,
Jesus
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Francesco,
You will need to build the Native Python Extension module as stated in the Prerequisites. To Build the extension modules add -DENABLE_PYTHON=ON to the cmake command in the build script.
(cd "$build_dir" && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON "${extra_cmake_opts[@]}" "$DEMOS_PATH")
The build script is located in the /opt/intel/openvino/inference_engine/demos directory. Once you run the script you will need to export the PYTHONPATH as follows:
export PYTHONPATH="$PYTHONPATH:<bin_dir>/lib"
All the detailed steps can be found here:
https://github.com/opencv/open_model_zoo/blob/master/demos/README.md#build-the-demo-applications
Hope this helps!
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much Jesus!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where exactly is the pre-trained, converted model for this demo? All I can find is the 2D pose estimation model `human-pose-estimation-0001`. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Azmat,
You can download the PyTorch model with the Model Downloader tool using the following command:
python3 /opt/intel/openvino/deployment_tools/tools/model_downloader/downloader.py --name human-pose-estimation-3d-0001
Take a look at this thread for additional information on converting the PyTorch model to IR format.
Regards,
Jesus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi jesus !
I have build the Native Python Extension module as stated in the Prerequisites. still the same issue persists
from pose_extractor import extract_poses
ImportError: cannot import name 'extract_poses'
I have checked the files in the pose_extracter there are no python files. I can find a bunch of cpp files only even after the build was successful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Latest Openvino_2021.4.689 in windows 10 terminal . I am also facing the same issue:
> python human_pose_estimation_3d_demo.py -m ../../../../../public/human-pose-estimation-3d-0001/FP32/human-pose-estimation-3d-0001.xml -i face-demographics-walking.mp4 -h
Traceback (most recent call last):
File "<path>\OpenVINO Toolkit\openvino_2021.4.689\inference_engine\demos\human_pose_estimation_3d_demo\python\modules\parse_poses.py", line 18, in <module>
from pose_extractor import extract_poses
ImportError: cannot import name 'extract_poses' from 'pose_extractor' (unknown location)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "human_pose_estimation_3d_demo.py", line 25, in <module>
from modules.parse_poses import parse_poses
File "<path>\OpenVINO Toolkit\openvino_2021.4.689\inference_engine\demos\human_pose_estimation_3d_demo\python\modules\parse_poses.py", line 20, in <module>
raise ImportError("Module 'pose_extractor' not found. "
ImportError: Module 'pose_extractor' not found. Please build module according to documentation before usage.
Please rectify this issue soon. Or provide me correct way to resolve this.
Note: I have already build using build_demos_msvc.bat and it was showing successful. I have used
below for converter.py:
- python openvino_2021.4.689/deployment_tools/open_model_zoo/tools/downloader/converter.py --mo openvino_2021.4.689/deployment_tools/model_optimizer/mo.py --list openvino_2021.4.689/inference_engine/demos/human_pose_estimation_3d_demo/python/models.lst
- and following cmd for downloader.py :
- python openvino_2021.4.689/deployment_tools/open_model_zoo/tools/downloader/downloader.py --list openvino_2021.4.689/inference_engine/demos/humne 10an_pose_estimation_3d_demo/python/models.lst
- BOTH WERE SUCCESSFUL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Radhika_Goel have you noticed recommendation from @JesusE_Intel comment to add -DENABLE_PYTHON=ON cmake options when you build the demo? It is not set by default, to not distract customers, who only interested in C++ demo and may not have Python installed at all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Vladimir_Dudnik I have already noticed that recommendation from @JesusE_Intel , but I don't get that build scripts i.e open_model_zoo/demos/build_demos.sh with the installation package.
I am trying to highlight in the below SS, the files that I found common with Github directory at this github link: https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos. but there is no such file build_demos.sh
And I am also not able to find any other such script where I can edit this Suggested cmake cmd.
(cd "$build_dir" && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON "${extra_cmake_opts[@]}" "$DEMOS_PATH")
Kindly provide me the appropriate suggestion regarding this issue, please tell me if I am missing something. FYI, I am using this in Windows10 machine.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Radhika_Goel I thought it is obvious enough that on Windows you need to look for .BAT files rather then .SH, although that might be not stated clearly enough in Open Mode Zoo Demos documentation. You are not required to modify script or CMakeLists.txt files. Just call it with -DENABLE_PYTHON=ON command line option. For convenience, I've use simple BAT wrapper which set up required environment and call script to build demos, it's contains lines like in example, below
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
call C:\Miniconda3\condabin\activate py3.7-openvino-2021.4
call "C:\Program Files (x86)\IntelSWTools\openvino_2021.4.689\bin\setupvars.bat"
call c:\dev\DNN\open_model_zoo_fork\demos\build_demos_msvc.bat --target clean
call c:\dev\DNN\open_model_zoo_fork\demos\build_demos_msvc.bat -DENABLE_PYTHON=ON
You may correct this to match path for your OpenVINO installation. Note, as a prerequisite, I've created virtual Python environment, for OpenVINO 2021.4.1, using openvino-dev PyPi package. It is as simple as:
python -m pip install openvino-dev[caffe,caffe2,onnx,tensorflow2,pytorch,mxnet]
This will install all required Python dependencies for Model Zoo models conversion. To run Python demos, you may need to install some additional modules, see requirements.txt files in each demo subfolder.
Regards,
Vladimir
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page