Last year I started developing a Face Recognition model. I started with static pictures and using Wolfram Mathematica. This year I found out we can do the same job using OpenCV in Python, or creating specific filters in R and applying Weierstrass and Gaussian transformation.

There are lots of difficulties in recognizing faces of the same person, like: position, rotation of face, age, feeling, brightness, gamma, contrast, gamma, saturation, obstacles like hands,hair and so on.

Beginning with a static picture, my idea was to identify Kristen Stewart among 4 possibilities.

Image Key Points were identified and face was highlighted:

Adjustments to grayscale were done and image parameters were adjusted

And then, we have the output based in the Key Points and K Nearest Neighbors:

Below and example of Find Faces in a group of people in Python using OpenCV:

Find Faces is not a hard problem, Mathematica and Python do this task automatically. The big issue is to compare an existing photo to another one, like comparing the photo below, of Jennifer Lawrence, with the Jennifer Lawrence above, wher there is clearly a difference of age:

You can find, for instance, the pixel difference between two pictures:

Then, by comparing Key Points and centroids, the algorithm identifies Jennifer Lawrence:

My next step was to identify a given face in movement, using a YouTube video. Mathematica and Python make simple to find faces:

The hard work is to identify the actress in movement. In this case, I used the simple difference between images and matching image key points, but one can also use K Nearest Neighbor or even better, a Convolutional Neural Network to increase accuracy, but I didn't have a GPU. I got the following result: no mistakes, but the face has to be in a specific position to be recognized.

Another possibility is to do sentiment analysis based in face recognition:

Check the level of stress in the faces:

And assign a specific centroid to each feeling so that they can be classified. According to the euclidean distances of the face centroid, you have a certain amount of a given feeling. For instance, the person centroid can be closer to Happy, but it can be also close to angry. So, she is 80% happy and 15% angry. This finding create a HUGE opportunity to identify consumer confidence, emotional involvement and satisfaction.

This last model used a Machine Learning technique (K Nearest Neighbor) and pictures were used to train the model, in a supervised Machine Learning task, given that the output was known.

© 2020 Data Science Central ® Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

**DSC Podcast**

- Data Science Fails – If It Looks Too Good To Be True…

You’ve probably seen amazing AI news headlines such as: AI can predict earthquakes. Using just a single heartbeat, an AI achieved 100% accuracy predicting congestive heart failure. AI can diagnose covid19 in seconds from a chest scan. A new marketing model is promising to increase the response rate tenfold. It all seems too good to be true. But as the modern proverb says, “If it seems too good to be true, it probably is”. Download now.

**Most Popular Content on DSC**

To not miss this type of content in the future, subscribe to our newsletter.

- Book: Statistics -- New Foundations, Toolbox, and Machine Learning Recipes
- Book: Classification and Regression In a Weekend - With Python
- Book: Applied Stochastic Processes
- Long-range Correlations in Time Series: Modeling, Testing, Case Study
- How to Automatically Determine the Number of Clusters in your Data
- New Machine Learning Cheat Sheet | Old one
- Confidence Intervals Without Pain - With Resampling
- Advanced Machine Learning with Basic Excel
- New Perspectives on Statistical Distributions and Deep Learning
- Fascinating New Results in the Theory of Randomness
- Fast Combinatorial Feature Selection

**Other popular resources**

- Comprehensive Repository of Data Science and ML Resources
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- 100 Data Science Interview Questions and Answers
- Cheat Sheets | Curated Articles | Search | Jobs | Courses
- Post a Blog | Forum Questions | Books | Salaries | News

**Archives:** 2008-2014 |
2015-2016 |
2017-2019 |
Book 1 |
Book 2 |
More

**DSC Podcast**

- Data Science Fails – If It Looks Too Good To Be True…

You’ve probably seen amazing AI news headlines such as: AI can predict earthquakes. Using just a single heartbeat, an AI achieved 100% accuracy predicting congestive heart failure. AI can diagnose covid19 in seconds from a chest scan. A new marketing model is promising to increase the response rate tenfold. It all seems too good to be true. But as the modern proverb says, “If it seems too good to be true, it probably is”. Download now.

**Most popular articles**

- Free Book and Resources for DSC Members
- New Perspectives on Statistical Distributions and Deep Learning
- Time series, Growth Modeling and Data Science Wizardy
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- How to Automatically Determine the Number of Clusters in your Data
- Fascinating New Results in the Theory of Randomness
- Hire a Data Scientist | Search DSC | Find a Job
- Post a Blog | Forum Questions

## You need to be a member of Data Science Central to add comments!

Join Data Science Central