Skip to content

AI-based Face Recognition Web Application with Flask & Deployment: A facial recognition deep dive into greyscale, image processing with OpenCV, Eigen images & theory. Utilizing Python, classification with SVMs, Flask (Jinja Template, HTML, CSS, HTTP Methods), pipeline model, Heroku & more.

Notifications You must be signed in to change notification settings

MayCooper/Facial-Recognition-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Facial-Recognition-App

AI-based Face Recognition Web Application with Flask & Deployment: A facial recognition deep dive into greyscale, image processing with OpenCV, Eigen images & theory. Utilizing Python, classification with SVMs, Flask (Jinja Template, HTML, CSS, HTTP Methods), pipeline model, Heroku & more.

The model development process involves creating a streamlined pipeline for data preprocessing, analysis, model training, and parameter tuning.

Once developed, the face recognition model is integrated into a Flask application and then deployed to Heroku. The entire project is structured to ensure an end-to-end understanding of developing and deploying a machine learning-based web application, starting from scratch.

A snapshot of the process

Downloading dependencies:

image

EDA

Mapping out the image sizes

image

Gender distribution

image

Exploring Grayscale for Facial Recognition

image

Creating a grayscale color map

image

image

Getting OpenCV, one of the most facial recognition modules

image

Testing face detection

image

image

image

We will now be extracting female and male faces and putting them into their respective categories

image

Cropping images & grayscale

image image

Using PCA & Eigen Images

image

Using GridSearchCV for looping through params for the ML model

image

image

Checking ROC Curve for Model

image

Creating dataframe to represent the ML

image

Unleashing Facial Recognition on Video

image

Known issues

  • Some issues that can be addressed in future projects:
    • Bright spots are considered faces sometimes
    • Some side faces not being picked up as a face
    • Not every frame is picked up as a face (but this could depend on frame rate and tuning)
    • Some faces with strange masks on (i.e, Captain America mask) is not being detected as a possible face
    • A very-much covered face is undetectable, is it possible to create face detection with question marks for a human to review

image

Not all side-faces go un-detected

image

Example of masked face going un-detected

image

Creating the Flask App base template:

image

Gender classification code for the Flask App:

image

Flask App

Beginning

image

image

Homepage code

image

Home page, on the Flask app

image

After some basic styling, Flask app look & feel:

image

image

Testing the front-end gender classification model

Choosing file:

image

Execution & Result:

image

Example of more results for females:

image

image

Gender Classification for males:

image

image

image

About

AI-based Face Recognition Web Application with Flask & Deployment: A facial recognition deep dive into greyscale, image processing with OpenCV, Eigen images & theory. Utilizing Python, classification with SVMs, Flask (Jinja Template, HTML, CSS, HTTP Methods), pipeline model, Heroku & more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published