Help us understand the problem. What is going on with this article?

OpenVinoで顔関係のライブラリがだいぶそろっている

この記事を書いた後に、有用な記事を見つけました。
有効な参考情報先 OpenVINO の 顔検出・分析デモを Pythonでやってみる

それを読めば、この記事は不要です。


先にOpenCV だけで顔検出から顔照合まで完結していることを書いた。

OpenVinoでも顔関係のライブラリが充実していることに気づいたので、メモを示す。
OpenVinoの場合にはIntelのデバイスを使える環境ならば、同じ学習済みのモデルが使えるので、実行環境の移植性が格段に向上する。

Intelのデバイスが使える環境というのは、以下の環境です。

  • Intel のCPUが使える環境(Linux, Windows)
  • IntelのCPUに付随するGPUの使える環境
  • Intelのmovidius neural compute stick 2 を使える環境
    • Raspberry Pi + movidius neural compute stick 2
  • IntelのFPGA(旧AleraのFPGA)が使える環境

https://github.com/intel-iot-devkit/smart-video-workshop/blob/master/advanced-video-analytics/multiple_models.md

# Intel® Movidius™ Neural Compute stick を使って顔検出だけをする例
# Run the face demo, face detection only, on the Intel® Movidius™ Neural Compute stick

$ ./interactive_face_detection_demo -i cam -m $models/Retail/object_detection/face/sqnet1.0modif-ssd/0004/dldt/FP16/face-detection-retail-0004.xml -d MYRIAD

# 顔検出に加えて年齢と性別を加える. CPUで動作。
# Now we add (to the face detection) also an age and gender detection, running on the CPU

$ ./interactive_face_detection_demo -i cam -m $models/Retail/object_detection/face/sqnet1.0modif-ssd/0004/dldt/FP16/face-detection-retail-0004.xml -d MYRIAD -m_ag $models/Retail/object_attributes/age_gender/dldt/FP32/age-gender-recognition-retail-0013.xml -d_ag CPU 

# 頭部向き推定を加える GPUで動作.
# Now let’s add head position detection running on GPU.

$ ./interactive_face_detection_demo -i cam -m $models/Retail/object_detection/face/sqnet1.0modif-ssd/0004/dldt/FP16/face-detection-retail-0004.xml -d MYRIAD -m_ag $models/Retail/object_attributes/age_gender/dldt/FP32/age-gender-recognition-retail-0013.xml -d_ag CPU -d_ag CPU -m_hp $models/Transportation/object_attributes/headpose/vanilla_cnn/dldt/FP16/head-pose-estimation-adas-0001.xml -d_hp GPU

# 表情検出を加える CPUで動作
# Now we’ll add an emotion detector, running on the CPU

$ ./interactive_face_detection_demo -i cam -m $models/Retail/object_detection/face/sqnet1.0modif-ssd/0004/dldt/FP16/face-detection-retail-0004.xml -d MYRIAD -m_ag $models/Retail/object_attributes/age_gender/dldt/FP32/age-gender-recognition-retail-0013.xml -d_ag CPU -d_ag CPU -m_hp $models/Transportation/object_attributes/headpose/vanilla_cnn/dldt/FP16/head-pose-estimation-adas-0001.xml -d_hp GPU -m_em $models/Retail/object_attributes/emotions_recognition/0003/dldt/INT8/emotions-recognition-retail-0003.xml -d_em CPU

#顔特徴点の検出を加える。CPUで動作
# Now let's add facial landmarks detector, running on the CPU

$ ./interactive_face_detection_demo -i cam -m $models/Retail/object_detection/face/sqnet1.0modif-ssd/0004/dldt/FP16/face-detection-retail-0004.xml -d MYRIAD -m_ag $models/Retail/object_attributes/age_gender/dldt/FP32/age-gender-recognition-retail-0013.xml -d_ag CPU -d_ag CPU -m_hp $models/Transportation/object_attributes/headpose/vanilla_cnn/dldt/FP16/head-pose-estimation-adas-0001.xml -d_hp GPU -m_em $models/Retail/object_attributes/emotions_recognition/0003/dldt/INT8/emotions-recognition-retail-0003.xml -d_em CPU -m_lm  $models/Transportation/object_attributes/facial_landmarks/custom-35-facial-landmarks/dldt/FP32/facial-landmarks-35-adas-0002.xml -d_lm CPU



OpenVinoでは以下の pre-trained model が使用できます。

Overview of OpenVINO™ Toolkit Pre-Trained Models

自分で何かモデルを作ろうとする際には、ぜひ既存のモデルを上手に活用してください。

また、OpenVinoはcaffeやtensorflowの学習済みモデルをOpenVino用に変換するツールを持っています。

顔照合関係の学習済みモデル

https://github.com/onnx/models/tree/master/vision/body_analysis/arcface

https://github.com/MekkaSiekka/Face-Recognition-with-OpenVino-Toolkit

https://software.intel.com/en-us/iot/reference-implementations/facial-recognition


参考URL
Install Intel® Distribution of OpenVINO™ toolkit for Linux*

以下の記事は実際にPythonのコードを示している記事です。
OpenVINO の 顔検出・分析デモを Pythonでやってみる

OpenVINO で Face re-identification (顔再識別)

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away