https://github.com/adithyaselv/face-expression-detect
利用条件などは利用者において確認してください
【サイト内の関連ページ】:
先人に感謝
GitHub の aithyaselv / face-expression-detect の Webページ: https://github.com/adithyaselv/face-expression-detect
システム Python を使うことができる(その場合,Python のインストールは行わない)
システム Python を用いるときは,pip, setuptools の更新は次のコマンドで行う.
sudo apt -y update sudo apt -y install python3-pip python3-setuptools
Ubuntu で,システム Python 以外の Python をインストールしたい場合は pyenv が便利である: 別ページで説明している.
Python の URL: http://www.python.org/
【Python, pip の使い方】
Python, pip は,次のコマンドで起動できる.
【Python 開発環境のインストール】
JupyterLab, spyder, nteract (Python 開発環境) のインストールは, Windows でコマンドプロンプトを管理者として実行し, 次のコマンドを実行.
python -m pip install -U pip setuptools jupyterlab jupyter jupyter-console jupytext nteract_on_jupyter spyder
詳しくは,: 別ページで説明している.
JupyterLab, spyder, nteract (Python 開発環境) のインストール: : 別ページで説明している.
Dlib は c:\dlib にインストールされているとして,以下,説明する.
GitHub の asithyaselv/face-expression-detect で公開されているプログラムを試してみる.
mkdir c:\pytools cd c:\pytools rmdir /s /q face-expression-detect
cd c:\pytools git clone https://github.com/adithyaselv/face-expression-detect cd face-expression-detect
cd c:\pytools\face-expression-detect copy c:\dlib\python_examples\shape_predictor_68_face_landmarks.dat .
※ 「c:\dlib」は,Dlib をインストールしたディレクトリに読み替えること。
※ まだ Dlib のインストールを行っていないときは、Dlib のインストールを行うこと.
Windows でのインストール手順は、 別のWebページで説明している.(このWebページにある「前準備」も行うこと)
テスト用の画像 t1.jpg, t2.jpg, t3.jpg, t4.jpg, t5.jpg の5つについて,プログラムを実行してみる.
cd c:\pytools\face-expression-detect py EmoDetect.py -i t1.jpg py EmoDetect.py -i t2.jpg py EmoDetect.py -i t3.jpg py EmoDetect.py -i t4.jpg py EmoDetect.py -i t5.jpg