How To Develop A Pose Estimation Application

About the project

Heads on to metaverse!

Project info

Difficulty: Easy

Platforms: IntelLinuxMouser

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Story

In our last Blog of 3 Edge-AI Metaverse Interaction Solutions for Potential Killer Applications using OpenNCC, we introduce a POSE ESTIMATION application using OpenNCC and OpenVINO. This blog will show how to develop this application.

Details

Here we go!


Part 1: Configure the PC


The following commands are operated on the PC. Currently, we support Ubuntu versions greater than 16.04.

  • Install libusb and ffmpeg

$ sudo apt-get update

$ sudo apt-get install libgl1-mesa-dev -y

$ sudo apt-get install unixodbc -y

$ sudo apt-get install libpq-dev -y

$ sudo apt-get install ffmpeg -y

$ sudo apt-get install libusb-dev -y

$ sudo apt-get install libusb-1.0.0-dev -y

  • Install OpenVINO

Download the Intel Distribution of OpenVINO Toolkit from the Intel website:

https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit-download.html

Version:2020.3LTS

Installation procedure reference:

https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_linux.html#

The installation path: /opt/intel/openvino_<version>

After the installation is successful, open a terminal and see that the OpenVINO environment is initialized.

  • Clone OpenNCC repo

$ git clone https://github.com/EyecloudAi/openncc.git


  • Update File

1. Clear the original folder ‘human_pose_estimation_demo‘

$ sudo rm -r /opt/intel/ openvino_<version>/inference_engine/demos/human_pose_estimation_demo/


2. Copy the human_pose_estimation_demo folder in openncc_cdk folder

$ sudo cp -r ~/openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/human_pose_estimation_demo/ /opt/intel/ openvino_<version>/inference_engine/demos/

Part 2: Compilate

  • Enter this path:

$ cd /opt/intel/ openvino_<version>/inference_engine/demos/

  • Edit the “build_samples.sh” script file

Change “cmake -DCMAKE_BUILD_TYPE=Release” to “cmake -DCMAKE_BUILD_TYPE=Debug”

$ sudo vim build_samples.sh

//cmake -DCMAKE_BUILD_TYPE=Debug

  • Exit after saving

$ :wq!

  • Execute compile command

$ sudo ./build_samples,sh

  • Compilation result

$cd ~/omz_demos_build/intel64/Debug/

$ ls


If you can see the human_pose_estimation_demo file, the compilation is successful, otherwise, you will have to rule out the failure for the cause and recompile it.

Part 3: Deployment the configuration

  • Copy the module folder in openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/Debug folder to omz_demos_build/intel64 folder

$ sudo cp -r ~/openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/Debug/module/ ~/ omz_demos_build/intel64/

  • Copy the moviUsbBoot file in openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/Debug folder to omz_demos_build/intel64/Debug folder

$ sudo cp ~/openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/Debug/moviUsbBoot ~/ omz_demos_build/intel64/Debug/

  • Copy the fw folder in openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/Debug to /omz_demos_build/intel64 folder

$ sudo cp -r ~/openncc_cdk/SDK/Example/Linkage_demo/work_with_OpenVINO/Debug/fw ~/ omz_demos_build/intel64/

  • Enter ~/openncc_cdk/SDK/Tools/deployment folder,Obtain the permission to access a USB device

$ cd ~/openncc_cdk/SDK/Tools/deployment

$ sudo ./install_NCC_udev_rules.sh

  • Reboot the PC


Part 4: Run Program

  • Go to the ‘omz_demos_build/intel64/Debug’ folder

$ cd ~/ omz_demos_build/intel64/Debug


  • Execute the script to run the model

$ ./human_pose_estimation_demo -i cam -m ../module/human-pose-estimation-0001.xml -d CPU


Credits

Leave your feedback...