昨年「How old do I look?」[1]という, 顔画像から被写体の年齢を推定するサービスが話題になった.
試してみた方も結構多いのでは?
このサービスで利用されている顔検出技術「Microsoft Project Oxford Face APIs」[2]が, 昨年12月にV1.0になったようなので, Android用のFace Demoを試してみた.
1. 準備
1. 1 Keyの取得
a) Face APIsのSubscribeから入るが, Sign Inしてない場合はign Inを求められる.
b) Keyを取得する.
1.2 SDKのダウンロード
a) Face APIsのDownload SDKから入る.
b) Android版のSDKをダウンロードする.
2. サンプルアプリのビルド
a) face_Face-SDK-Android.zipを展開し, Android StudioでSampleプロジェクトを開く.
b) res/values/strings.xmlを開き, 取得したKEYを設定する.
<resources>
<!-- Please refer to http://oxford-portal.azurewebsites.net/doc/general/subscription-key-mgmt to get your subscription key -->
<!-- If you have one subscription key, you can add it here to use the service -->
<!--<string name="subscription_key">Please_add_the_subscription_key_here</string> -->
<string name="subscription_key">XXXXXXXXXXXXXXXXXXXXX</string>
<!-- Main activity -->
<string name="detection">Detection</string>
<string name="verification">Verification</string>
:
c) Make Projectする.
3. 動作例
今回はAKB48公式サイト[3]を使って, 各モードをテストしてみた.
Nexus 7(2013) / Android 6.01
3.1 Detection
3.2 Verification
3.3 Grouping
3.4 Find Similar Faces
このFace APIsを使って, 結構面白い事できるかも...
----
参照URL:
[1] How old do I look?
[2] Microsoft Project Oxford Face APIs
[3] AKB48公式サイト