Facial Keypoint Detection Using PyTorch
First of, happy new year! I can't believe I spent the entire 2020 sitting at home. But I'd have to admit I was a bit productive in terms of gearing up my technical skills. Knowing me tho, I tend to forget a whole bunch of them in a snap. That is why I am blogging them on here so I can go back to these notes any time I want. I hope you find this useful as well.
As I have mentioned in my previous blog, I have been partaking this really cool nanodegree program on Computer Vision by Udacity. And this post shall be dedicated to my first project, which is Facial Keypoint Detection. This might be a long post.
Поехали!
This project will be all about defining and training a convolutional neural network to perform facial keypoint detection, and using computer vision techniques to transform images of faces.
Facial keypoints (also called facial landmarks) are the small magenta dots shown on each of the faces in the image above. In each training and test image, there is a single face and 68 keypoints, with coordinates (x, y), for that face. These keypoints mark important areas of the face: the eyes, corners of the mouth, the nose, etc. These keypoints are relevant for a variety of tasks, such as face filters, emotion recognition, pose recognition, and so on. Here they are, numbered, and you can see that specific ranges of points match different portions of the face.
This set of image data has been extracted from the YouTube Faces Dataset, which includes videos of people in YouTube videos. These videos have been fed through some processing steps and turned into sets of image frames containing one face and the associated keypoints.
Training and Testing Data
This facial keypoints dataset consists of 5770 color images. All of these images are separated into either a training or a test set of data.
- 3462 of these images are training images
- 2308 are test images
- Define a CNN with images as input and keypoints as output
- Construct the transformed FaceKeypointsDataset, just as before
- Train the CNN on the training data, tracking loss
- See how the trained model performs on test data
- If necessary, modify the CNN structure and model hyperparameters, so that it performs well
Comments
Post a Comment