謝辞:このページで紹介するソフトウエア等の作者に感謝します.
Python の URL: http://www.python.org/
インストール手順の詳細は: 別ページで説明している.
コマンドプロンプトを管理者として実行し,次のコマンドを実行.
python -m pip install -U pip setuptools python -m pip install -U jupyterlab jupyter jupyter-console jupytext nteract_on_jupyter spyder
システム Python を使用(インストール操作は不要)
端末で,次のコマンドを実行.
sudo apt -y install python3-dev python3-pip python3-setuptools sudo pip3 uninstall ptyprocess sniffio terminado tornado jupyterlab jupyter jupyter-console jupytext nteract_on_jupyter spyder sudo apt -y install jupyter jupyter-qtconsole spyder3 sudo apt -y install python3-ptyprocess python3-sniffio python3-terminado python3-tornado sudo pip3 install jupyterlab nteract_on_jupyter
URL: https://github.com/1adrianb/face-alignment
Windows での手順を下に示す.Ubuntu でも同様の手順になる.
mkdir c:\pytools cd c:\pytools rmdir /s /q face-alignment
cd c:\pytools git clone https://github.com/1adrianb/face-alignment cd face-alignment
scipy 1.4 か,それ以下が必要.
pip install scipy==1.4 pip install -r requirements.txt
python setup.py build python setup.py install
エラーメッセージが出ていないこと
エラーメッセージが出なければ OK.
cd c:\pytools cd face-alignment python test\facealignment_test.py
https://github.com/1adrianb/face-alignmentに記載のプログラムを実行
import face_alignment from skimage import io fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False) input = io.imread('./test/assets/aflw-test.jpg') preds = fa.get_landmarks(input) print(preds) import matplotlib.pyplot as plt plt.imshow(input) plt.scatter(preds[0][:,0], preds[0][:,1])
https://github.com/1adrianb/face-alignmentに記載のプログラムを実行
import face_alignment from skimage import io fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, flip_input=False) input = io.imread('./test/assets/aflw-test.jpg') preds = fa.get_landmarks(input) print(preds) plt.imshow(input) from mpl_toolkits import mplot3d import matplotlib.pyplot as plt ax = plt.axes(projection="3d") ax.scatter3D(preds[0][:,0], preds[0][:,1], preds[0][:,2]) plt.show()
本サイトは金子邦彦研究室のWebページです.サイトマップは,サイトマップのページをご覧下さい. 本サイト内の検索は,サイト内検索のページをご利用下さい.
問い合わせ先: 金子邦彦(かねこ くにひこ)