Skip to content

adnan119/Facial-keypoint-Detection-using-OpenCV-and-Neural-Networks

Repository files navigation

Facial-keypoint-Detection-using-OpenCV-and-Neural-Networks

Facial Keypoint Detection

Project Overview

In this project, you’ll combine your knowledge of computer vision techniques and deep learning architectures to build a facial keypoint detection system. Facial keypoints include points around the eyes, nose, and mouth on a face and are used in many applications. These applications include: facial tracking, facial pose recognition, facial filters, and emotion recognition. Your completed code should be able to look at any image, detect faces, and predict the locations of facial keypoints on each face; examples of these keypoints are displayed below.

Facial Keypoint Detection

The project will be broken up into a few main parts in four Python notebooks, only Notebooks 2 and 3 (and the models.py file) will be graded:

Notebook 1 : Loading and Visualizing the Facial Keypoint Data

Notebook 2 : Defining and Training a Convolutional Neural Network (CNN) to Predict Facial Keypoints

Notebook 3 : Facial Keypoint Detection Using Haar Cascades and your Trained CNN

Notebook 4 : Fun Filters and Keypoint Uses

Project Instructions

All of the starting code and resources you'll need to compete this project are in this Github repository. Before you can get started coding, you'll have to make sure that you have all the libraries and dependencies required to support this project. If you have already created a cv-nd environment for exercise code, then you can use that environment! If not, instructions for creation and activation are below.

Note that this project does not require the use of GPU, so this repo does not include instructions for GPU setup.

Local Environment Instructions

  1. Clone the repository, and navigate to the downloaded folder. This may take a minute or two to clone due to the included image data.
git clone https://github.com/cezannec/P1_Facial_Keypoints.git
cd P1_Facial_Keypoints
  1. Create (and activate) a new environment, named cv-nd with Python 3.6. If prompted to proceed with the install (Proceed [y]/n) type y.

    • GPU (CUDA):
    conda env create -f environment-cuda.yaml
    conda activate cvnd-faces
    
    • CPU:
    conda env create -f environment.yaml
    conda activate cvnd-faces
    

    At this point your command line should look something like: (cvnd-faces) <User>:P1_Facial_Keypoints <user>$. The (cvnd-faces) indicates that your environment has been activated, and you can proceed with further package installations.

Data

All of the data you'll need to train a neural network is in the P1_Facial_Keypoints repo, in the subdirectory data. In this folder are training and tests set of image/keypoint data, and their respective csv files. This will be further explored in Notebook 1: Loading and Visualizing Data, and you're encouraged to look trough these folders on your own, too.

Notebooks

  1. Navigate back to the repo. (Also, your source environment should still be activated at this point.)
cd
cd P1_Facial_Keypoints
  1. Open the directory of notebooks, using the below command. You'll see all of the project files appear in your local environment; open the first notebook and follow the instructions.
jupyter lab

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published