this demo includes three notebook.
windows 10, python 3.6.
before run this demo,you'd better to install these lib
- Anaconda3 for windows
download Anaconda3-5.1.0-Windows-x86_64.exe
just install - TensorFlow
In cmd
runconda create -n tensorflow pip python=3.6
runactivate tensorflow
If there is no gpu in your laptop.
runpip install --ignore-installed --upgrade tensorflow
If there is gpu in your laptop.
runpip install --ignore-installed --upgrade tensorflow-gpu
- Keras
runsudo pip install keras
- opencv for python
In cmd just runconda install -c conda-forge opencv
- install jupyter notebook,numpy,matlibplot, hdf5 and someother lib in env(tensorflow)
you can use your laptop camera or plugin a usb camera,
if no camera, two videos are necessary.
one includes your face, other one includes some faces except you.
I have not try video,you may experience by yourself.
you should run the files as below sequence:
- face_recogniton_get_data.ipynb
you can get face data with this file from camera or video. - face_recogniton_train_model.ipynb
you can use this file to train a simple deeplearning model. - face_recognition.ipynb
now you can use this file distinguish your face from other faces.
note: you have to change cascade_path
by yourself.
WORKSPACE_DIR(.)
PRJ_NAME.ipynb
PRJ_NAME_get_data.ipynb
PRJ_NAME_train_model.ipynb
DATA_PATH(datasets)PRJ_NAME
TRAIN_DIR(train)
CLASS_1_DIR
CLASS_n_DIR
VALIDATION_DIR(validation)
CLASS_1_DIR
CLASS_n_DIR
TEST_DIR(test)
CLASS_1_DIR
CLASS_n_DIR
MODEL_PATH(models)
PRJ_NAME
Image_PATH(images)
PRJ_NAME
LOG_PATH(logs)
PRJ_NAME