Project 5: Facial Keypoint Detection with Neural Networks!

Anuja Lohia

Overview

The goal of the project was to get familiar with facial detection using neural networks in pytorch.

Part 1: Nose Point Detection

Below are some samples taken from the validation set after using training the data with a neural net containing 3 convolution layers. Also shown below is the graph of the training vs test loss. The first two are successes, the second two are failures.

I suspect the failure cases did not work due to the heads not being centered in the image. Since relative points cannot be taken into account in the detection of a single point this is the issue that we run into.

Below is the training vs test loss from 25 epochs.

By tuning the hyperparameters such as the learning rate, batch size and number of epochs we found that: if we make the learning rate too high we overfit the data and the difference between ground truth and predicted becomes vaster as pictured in an example below. Increasing the channel size/filter size/ number of layers on the other hand did not have much of an effect.


Part 2: Facial Keypoint Detection

Below are some samples taken from the validation set after using training the data with a neural net containing 5 convolution layers and two linear layers. Max pools were only added after the relus of the first two convolution layers. The channels were between 12-40 and the batch size was 4 with a learning rate of 1e^-3. Also shown below is the graph of the training vs test loss. The first two are successes, the second two are failures.

I suspect the failure cases did not work due to the heads not being centered in the image. In one case it is too much on the left and in the other it is too low.

Below is the training vs test loss from 25 epochs.