facenet环境安装

157 阅读1分钟

 


安装tensorflow:


安装anaconda:linux:sh An...sh  设置环境变量:export PATH=/anconda3/bin:$PATH


开始菜单->Anaconda3—>Anaconda Prompt
conda list
conda config --add channels mirrors.tuna.tsinghua.edu.cn/anaconda/pk…
conda config --set show_channel_urls yes
conda create -n tensorflow python=3.6
pip install --upgrade --ignore-installed tensorflow
activate tensorflow
linux: source activate tensorflow


所需依赖:
scipy
scikit-learn
opencv-python
h5py
matplotlib
pillow
requests
psutil


安装opencv-python:
pip install opencv-python


linux: yum -y install git
安装facenet:
git clone github.com/davidsandbe…


设置环境变量:
PYTHONPATH = C:\Users\hbw\facenet\src


训练模型


python compare.py 20170511-185253 1.jpg 2.jpg


以下为linux报错:


linux: ModuleNotFoundError: No module named 'cv2': pip install bleach  pip install tensorboard
ImportError: libSM.so.6: cannot open shared object file: No such file or directory解决: yum install -y python-qt4


后台运行:nohup python compare.py &