Facial Keypoint Detection
Webapp with OpenCV
app directory contains web application which serves as a demo to show how face
features are detected by using a webcam.
App uses OpenCV with HAAR cascade to detect features on faces.
Jupyter Notebook (CV_project.ipynb)
- First part shows how to use OpenCV to work with face recognition
- Second part uses Tensorflow to build CNN and achieve similar outcomes as OpenCV
Create (and activate) a new environment with Python 3.5 and the
- Linux or Mac:
conda create --name aind-cv python=3.5 numpy source activate aind-cv
conda create --name aind-cv python=3.5 numpy scipy activate aind-cv
- Option 1: To install TensorFlow with GPU support, follow the guide to install the necessary NVIDIA software on your system.
pip install tensorflow-gpu==1.1.0
- Option 2: To install TensorFlow with CPU support only:
pip install tensorflow==1.1.0
pip install keras -U
Switch Keras backend to TensorFlow.
- Linux or Mac:
KERAS_BACKEND=tensorflow python -c "from keras import backend"
set KERAS_BACKEND=tensorflow python -c "from keras import backend"
Install a few required pip packages (including OpenCV).
pip install -r requirements.txt
All of the data you'll need to train a neural network is in the subdirectory
data. In this folder are a zipped training and test set of data.
- Navigate to the data directory
- Unzip the training and test data (in that same location). If you are in Windows, you can download this data and unzip it by double-clicking the zipped files. In Mac, you can use the terminal commands below.
unzip training.zip unzip test.zip
You should be left with two
.csv files of the same name. You may delete the zipped files.
Troubleshooting: If you are having trouble unzipping this data, you can download that same training and test data on Kaggle.
Now, with that data unzipped, you should have everything you need!