Tensorflow pipeline to recognize faces for python 3.6.
Run the following command.
git clone https://github.com/davidsandberg/facenet.git
export PYTHONPATH=~/<facenet_path>/src:~/<facenet_path>/contributed
- Replace <facenet_path> with the facenet installation folder.
Run the following command.
pip install -r requirements.txt
Run the following command.
for N in {1..4}; do python ~/<facenet_path>/src/align/align_dataset_mtcnn.py ~/<lfw_path>/raw ~/<lfw_path>/lfw_mtcnnpy_160 --image_size 160 --margin 32 --random_order --gpu_memory_fraction 0.25 & done
- Replace <facenet_path> with the facenet installation folder.
- Replace <lfw_path> with the lfw installation folder.
Run the following command.
cp ~/<lfw_path>/lfw_mtcnnpy_160/* ~/<repo_path>/datasets
- Replace <repo_path> with this repository installation folder.
- Replace <lfw_path> with the lfw installation folder.
Run the following command.
~/<repo_path>/bin/add_new_face
- Replace <repo_path> with this repository installation folder.
Run the following command.
python ~/<facenet_path>/src/classifier.py TRAIN ~/<repo_path>/datasets ~/<repo_path>/models/20170512-110547/20170512-110547.pb ~/<repo_path>/classifier/face_classifier.pkl --batch_size 1000 --min_nrof_images_per_class 40 --nrof_train_images_per_class 40
- Replace <facenet_path> with the facenet installation folder.
- Replace <repo_path> with this repository installation folder.
Run the following command.
python server.py