Dlibは,機械学習のアルゴリズムの機能を持つソフトウエア.
利用条件などは利用者において確認してください
【サイト内の関連ページ】
システム 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 にインストールされているとして,以下,説明する.
※ Windows での展開(解凍)のためのソフトには,「7-Zip」などがある.
※ c:\dlib が無いときは作る
c:\dlib\examples\faces の下の顔画像のファイルを確認する
利用条件などは各自で確認のこと
Python プログラムを動かすために, Windows では「python」, Ubuntu では「python3」などのコマンドを使う. あるいは, 開発環境や Python コンソール(Jupyter Qt Console,Spyder,PyCharm,PyScripter など)の利用も便利である.
cd c:\dlib\python_examples python face_alignment.py shape_predictor_68_face_landmarks.dat ..\examples\faces\2007_007763.jpg
増量は、学習で重要となる
cd c:\dlib\python_examples python face_jitter.py shape_predictor_68_face_landmarks.dat
元画像として何を使うかは、プログラム中で設定されている
cd c:\dlib\python_examples python face_landmark_detection.py shape_predictor_5_face_landmarks.dat ..\examples\faces
cd c:\dlib\python_examples python face_landmark_detection.py shape_predictor_68_face_landmarks.dat ..\examples\faces
cd c:\dlib\python_examples python face_recognition.py shape_predictor_5_face_landmarks.dat dlib_face_recognition_resnet_model_v1.dat ..\examples\faces
顔ごとに 128個の数値(特徴量ベクトル)が得られることを確認
cd c:\dlib\python_examples python face_recognition.py shape_predictor_68_face_landmarks.dat dlib_face_recognition_resnet_model_v1.dat ..\examples\faces
顔ごとに 128個の数値(特徴量ベクトル)が得られることを確認