agrawal-rohit / opencv-facial-filters

Real-time selfie filters using facial keypoints regression and opencv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCV Facial Filters

bleh

Overview

This project demonstrates the creation of Snapchat-like facial filters using Deep Learning and OpenCV. It involves facial keypoint detection to superimpose themed filters on a face in real time. I came up with the idea for the project on 21 December 2018, Hence the Christmas theme :P.

Detailed methodology and insights can be found in this Medium article.

Dataset

Utilized the Facial Keypoints Detection dataset from Kaggle.

Methodology

  • Data Augmentation: Flipped images and key points for diversity.
  • Model Architecture:
    • CNN: Acts as a feature extractor.
    • ANN: A fully connected network for facial keypoint regression.
  • Training:
    • Loss Metric: Mean Absolute Loss.
    • Performance: Achieved ~0.0113 after 300 epochs with the Adam optimizer.
  • Implementation:
    • Real-time Data Capture: Used OpenCV for live webcam feed.
    • Preprocessing: Standardized input before feeding into the model.
    • Output Utilization: Keypoint positions determined the placement and scale of thematic filters.

About

Real-time selfie filters using facial keypoints regression and opencv


Languages

Language:Python 100.0%