Outils pour utilisateurs

Outils du site


pose_estimation_avec_intel_ncs2_et_openvino

Ceci est une ancienne révision du document !


Intel Neural Compute Stick 2

Le Intel Neural Compute Stick 2, NCS2 fonctionne ave OpenVINO, un fork de OpenCV adapté à ce stick.

OpenVINO

Intel Neural Compute Stick 2 est un calculateur, adapté aux produits Intel, dixit Intel.
IL a été concu pour être un calculateur sur un PC sans GPU, genre Raspberry Pi.

OpenVINO est un fork de OpenCV, optmisé pour les produits Intel:

Installation de OpenVINO

Operating Systems

  • Ubuntu 18.04.x long-term support (LTS), 64-bit
  • Ubuntu 20.04.0 long-term support (LTS), 64-bit
  • CentOS 7.6, 64-bit (for target only)
  • Yocto Project v3.0, 64-bit (for target only and requires modifications)

Le tuto a été réalisé sur Xubuntu 18.04

Installation

Suivre à la lettre ce tuto Intel: * Install Intel® Distribution of OpenVINO™ toolkit for Linux*

Faire l'installation avec:

sudo ./install_GUI.sh

et installer tout.

Extrait du bash_history

cd /media/data/exclude/l_openvino_toolkit_p_2021.3.394/
sudo ./install_GUI.sh 
cd /opt/intel/openvino_2021/install_dependencies
sudo -E ./install_openvino_dependencies.sh
sudo  ./install_openvino_dependencies.sh
source /opt/intel/openvino_2021/bin/setupvars.sh
nano .bashrc
cd /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites
sudo ./install_prerequisites.sh
sudo ./install_prerequisites_caffe.sh
cd /opt/intel/openvino_2021/install_dependencies/
sudo -E su
sudo usermod -a -G users "$(whoami)"
sudo cp /opt/intel/openvino_2021/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo ldconfig

Steps for Intel® Processor Graphics (GPU)

cd /opt/intel/openvino_2021/install_dependencies/
sudo -E su
./install_NEO_OCL_driver.sh
Checking processor generation...
Intel® Graphics Compute Runtime for OpenCL™ Driver installation skipped because current version greater or equal to 19.41.14441
Installation of Intel® Graphics Compute Runtime for OpenCL™ Driver interrupted.

Steps for Intel® Neural Compute Stick 2

sudo usermod -a -G users "$(whoami)"
sudo cp /opt/intel/openvino_2021/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo ldconfig

Vérification de l'export du .bashrc

python3
>>> import cv2
>>> print(cv2.__version__)
4.5.2-openvino

Les scripts python doivent être lancés depuis un terminal, pas depuis le Run D'un EDI.
A l'ouverture d'un terminal, vous devez avoir:

[setupvars.sh] OpenVINO environment initialized

Création des fichiers bin et xml à partir du caffemodel

Convert a Caffe* Model to produce an optimized Intermediate Representation (IR) of the model based on the trained network topology, weights, and biases values Convert Model From Caffe.

Dans le dossier du caffemodel:

python3 /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo.py --input_model pose.caffemodel --input_proto pose.prototxt

Les fichiers .caffemodel et .prototxt doivent avoir les mêmes noms.
Les Input Layers ne sont pas définis dans le .prototxt. J'ai improvisé avec [1, 3, 270, 270] !

Utilisation de OpenVino avec Realsense D455

Fichier à: opencv_skeleton de * Détection d'un squelette dans une image avec OpenCV

CPU avec OpenCV                                                                   fps = 1.1  MSI      fps = 1.7
CPU avec OpenCV et model light                                                    fps = 1.4
CPU avec OpenCV et body_25                                                        fps = 0.4
CPU avec OpenVINO                                                                 fps = 1.6
CPU avec OpenVINO Light                                                           fps = 2.2
GPU                                                                     GTX1060   fps = 2.5
GPU et model light                                                      GTX1060   fps = 3.7  MSI      fps = 2.0
Intel NCS2 Stick Intel® Neural Compute Stick 2 (Intel® NCS2)                      fps = 1.6
Intel NCS2 Stick Intel® Neural Compute Stick 2 (Intel® NCS2) et model light       fps = 2.0

Human pose estimation

Ressources sur ce wiki

Intel

pose_estimation_avec_intel_ncs2_et_openvino.1625390344.txt.gz · Dernière modification : 2021/07/04 09:19 de serge