LoginSignup
10
7

More than 5 years have passed since last update.

HoloLensで猫の顔を認識する Dlib FaceLandmark Detector #アセットアドカレ

Posted at

はじめに

この記事は Unity Assets Advent Calendar 2016 10日目の記事になります。

本日は前日のOpenCV for Unityと同パブリッシャーであるEnox SoftwareさんのDlib FaceLandmark Detectorをご紹介します。

Dlib FaceLandmark Detector 1.0.5

image

Dlib FaceLandmark Detector | DlibFaceLandmarkDetector can ObjectDetection and ShapePrediction using Dlib C++ Library.
https://enoxsoftware.com/dlibfacelandmarkdetector/

Dlib FaceLandmark Detectorについて

OpenCVとは別物で、Dlib FaceLandmark DetectorはDlibという機械学習アルゴリズムや画像処理を含むオープンソースのC++ライブラリです。
Dlib19.0からObjectDetectionとShapePredictionをUnityで使えるようになるアセットです。

参考
UnityでDlibFaceLandmarkDetectorを利用した顔器官検出アプリ事始め
http://qiita.com/utibenkei/items/2f392d6fa00960f39e45

OpenCVよりナウいライブラリらしい。

アセットについて

  • Texture2D、WebCamTexture、画像バイト列から、正面を向いた人の顔と68ポイントの顔のランドマークを検出が可能。

    • Texture2DSample、WebCamTextureSampleのデモシーン image
  • 訓練データファイルを差し替えることで任意のオブジェクトの検出が可能。

    • CatDetectionSampleのデモシーンで猫顔を検知 image

HoloLensで猫の顔を認識する

環境

サンプルのCatDetectionSampleをHoloLensに対応する

  1. DlibFaceLandmarkDetectorの初期設定。 image
  2. CatDetectionSampleを開く
  3. 下の図のように設定する image
  4. 完成

※なお猫アレルギーのためテストは実施しない。

犬の顔も認識できる

How to extract the shape predictor from "mmod_dog_hipsterizer.dat"
https://enoxsoftware.com/dlibfacelandmarkdetector/how-to-extract-the-shape-predictor-from-mmod_dog_hipsterizer-dat/

10
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
7