Skip to content

Detection of facial keypoints. Jupyter notebook (OpenCV and CNN), website demo (OpenCV implementation)

License

Notifications You must be signed in to change notification settings

ivarprudnikov/facial-keypoints

Repository files navigation

Facial Keypoint Detection

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.

Read more

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

Requirements

  1. Create (and activate) a new environment with Python 3.5 and the numpy package.

    • Linux or Mac:
    conda create --name aind-cv python=3.5 numpy
    source activate aind-cv
    
    • Windows:
    conda create --name aind-cv python=3.5 numpy scipy
    activate aind-cv
    
  2. Install/Update TensorFlow.

    • 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
    
  3. Install/Update Keras.

pip install keras -U
  1. Switch Keras backend to TensorFlow.

    • Linux or Mac:
    KERAS_BACKEND=tensorflow python -c "from keras import backend"
    
    • Windows:
    set KERAS_BACKEND=tensorflow
    python -c "from keras import backend"
    
  2. Install a few required pip packages (including OpenCV).

pip install -r requirements.txt

Data

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.

  1. Navigate to the data directory
cd data
  1. 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!

About

Detection of facial keypoints. Jupyter notebook (OpenCV and CNN), website demo (OpenCV implementation)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •