【目次】
Gitは,バージョン管理システム.ソースコードの管理や複数人での共同に役立つ.
【サイト内の関連ページ】
Windows での Git のインストール: 別ページ »で説明している.
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
【サイト内の関連ページ】
【関連する外部ページ】
Python の公式ページ: https://www.python.org/
Windows での TensorFlow,Keras のインストール: 別ページ »で説明
(このページで,Build Tools for Visual Studio 2022,NVIDIA ドライバ, NVIDIA CUDA ツールキット, NVIDIA cuDNNのインストールも説明している.)
コマンドプロンプトを管理者として実行: 別ページ »で説明
※ 「 python -m pip install ...」は,Python パッケージをインストールするためのコマンド.
python -m pip install -U tensorflow==2.10.1 python -m pip install -U deepface
cd %HOMEPATH% rmdir /s /q deepface git clone --recursive https://github.com/serengil/deepface
顔認識
deepface find img38.jpg .
表情や性別や年齢の推定
deepface analyze -d retinaface img38.jpg
ディレクトリ内の全画像ファイルを顔データベースとして,画像とかおデータベースを用いた顔認識 (face recognition)を行い,顔データベースの各画像との距離を表示.
Python プログラムの実行
Python プログラムの実行
Python 開発環境(Jupyter Qt Console, Jupyter ノートブック (Jupyter Notebook), Jupyter Lab, Nteract, Spyder, PyCharm, PyScripterなど)も便利である.
Python のまとめ: 別ページ »にまとめ
from deepface import DeepFace import pandas as pd import os # カレントディレクトリを %HOMEPATH% + "/deepface" に homepath = os.environ.get('HOMEPATH') os.chdir(os.path.join(homepath, 'deepface')) df = DeepFace.find(img_path="./tests/dataset/img38.jpg", db_path="./tests/dataset", distance_metric='euclidean')[0] a = df.sort_values('VGG-Face_euclidean') print(a)
Python プログラムの実行
Python プログラムの実行
Python 開発環境(Jupyter Qt Console, Jupyter ノートブック (Jupyter Notebook), Jupyter Lab, Nteract, Spyder, PyCharm, PyScripterなど)も便利である.
Python のまとめ: 別ページ »にまとめ
from deepface import DeepFace import pandas as pd import os # カレントディレクトリを %HOMEPATH% + "/deepface" に homepath = os.environ.get('HOMEPATH') os.chdir(os.path.join(homepath, 'deepface')) obj = DeepFace.analyze(img_path = "./tests/dataset/img38.jpg", actions = ['age', 'gender', 'emotion']) print(obj)