金子邦彦研究室人工知能Windows で動く人工知能関係 Pythonアプリケーション,オープンソースソフトウエア)顔検出と表情推定(SanjayMarreddi/Emotion-Investigator,Python,TensorFlow を使用)(Windows 上)

顔検出と表情推定(SanjayMarreddi/Emotion-Investigator,Python,TensorFlow を使用)(Windows 上)

要約】 SanjayMarreddi の Emotion-Investigator は,顔検出と,Happy, Sad, Disgust, Neutral, Fear, Angry, Surprise の表情推定を行う.WindowsでSanjayMarreddi/Emotion-Investigatorをインストールするには,前準備の後,Emotion-Investigatorをクローンし,必要なPythonパッケージをインストール.動作確認は,python main.pyでサーバーを起動し,Web ブラウザでhttp://127.0.0.1:5000/を開く.

目次

  1. 前準備
  2. SanjayMarreddi/Emotion-Investigator のインストール(Windows 上)
  3. 顔検出と表情推定

Emotion-Investigator

SanjayMarreddi の Emotion-Investigator は,顔検出 (face detection)と,Happy, Sad, Disgust, Neutral, Fear, Angry, Surprise の表情推定を行う.

関連する外部ページ

前準備

Git のインストール(Windows 上)

Gitは,バージョン管理システム.ソースコードの管理や複数人での共同に役立つ.

サイト内の関連ページ

Windows での Git のインストール: 別ページ »で説明している.

関連する外部ページ

Git の公式ページ: https://git-scm.com/

Python のインストール(Windows 上)

サイト内の関連ページ

関連する外部ページ

Python の公式ページ: https://www.python.org/

SanjayMarreddi/Emotion-Investigator のインストール(Windows 上)

TensorFlow のインストール(Windows 上)

Windows での TensorFlowKeras のインストール: 別ページ »で説明

(このページで,Build Tools for Visual Studio 2022,NVIDIA ドライバ, NVIDIA CUDA ツールキットNVIDIA cuDNNのインストールも説明している.)

SanjayMarreddi/Emotion-Investigator のインストール(Windows 上)

  1. Windows で,コマンドプロンプト管理者として実行

    コマンドプロンプトを管理者として実行: 別ページ »で説明

  2. SanjayMarreddi/Emotion-Investigator のインストール

    ※ 「 python -m pip install ...」は,Python パッケージをインストールするためのコマンド.

    cd %HOMEPATH%
    rmdir /s /q Emotion-Investigator
    git clone --recursive https://github.com/SanjayMarreddi/Emotion-Investigator
    python -m pip install Flask Keras-Preprocessing matplotlib opencv-python pandas Pillow tensorflow==2.10.1 numpy urllib3 werkzeug
    

    [image]

顔検出と表情推定

  1. Windows で,コマンドプロンプトを実行
  2. サーバの起動

    cd %HOMEPATH%
    cd Emotion-Investigator
    python main.py
    
  3. 画面の指示に従い Web ブラウザで http://127.0.0.1:5000/ を開く
  4. パソコンのカメラを使うときは,「Real time image 」の下の「Real Time Image」をクリック

    [image]

    [image]
  5. 画像ファイルを使うときは,「Manually Upload Image」の下の「Manually Upload Image」をクリック

    [image]

    [image]

    [image]