How to install Openface in windows python

坚强是说给别人听的谎言 提交于 2021-02-17 22:49:07

问题


I am a newbie to Openface. Due to some reasons I want to install Openface in windows with python. It would be great if anyone could guide me through that. I have searched online, but not a single article talks about windows python installation. May be I am asking a very simple question but please help me through this.


回答1:


I'm not aware of OpenFace being used on Windows directly, but please contribute any changes necessary to the repository if you start working on this. I expect there to be a few compatibility issues with Linux-only features.

A workaround solution is to the prebuilt OpenFace Docker container on Windows with a Docker machine. Some of this is from the OpenFace setup guide. First start a Linux Docker machine on Windows. Then pull the OpenFace docker container from here:

docker pull bamos/openface
docker run -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash
cd /root/openface
./demos/compare.py images/examples/{lennon*,clapton*}
./demos/classifier.py infer models/openface/celeb-classifier.nn4.small2.v1.pkl ./images/examples/carell.jpg
./demos/web/start-servers.sh



回答2:


Steps to install openface in windows which worked for me.

  1. Download openface from this path- http://cmusatyalab.github.io/openface/
  2. Paste the folder openface into the path where python.exe file exist.
  3. Run the commnd python openface/setup.py install



回答3:


If you are using anaconda, then the following steps worked for me. The credit for the steps goes to nitish11 who posted them in github: https://gist.github.com/ageitgey/82d0ea0fdb56dc93cb9b716e7ceb364b

  1. Open the command line from within anaconda.
  2. If required, install git (conda install -c anaconda git)
  3. git clone https://github.com/cmusatyalab/openface.git
  4. cd openface
  5. pip install -r requirements.txt
  6. (sudo) python setup.py install

sudo may not be required in step 6.

Hope this helps.



来源:https://stackoverflow.com/questions/38020889/how-to-install-openface-in-windows-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!