MIDS Capstone Project Spring 2024


Problem & Motivation

With advancements in Generative AI, it is becoming increasingly easy to generate extremely realistic images of people who don’t exist, or possibly worse, fake images of people who do exist. In the hands of the wrong people, generative AI technology can be used to scam unwary people or to spread false information. Experts estimated that 90% of online content is expected to be AI-generated by 2026, so it’s possible for this to be a huge, widespread issue online. 

Our Product

Web Application

The AuthentiFace minimum viable product (MVP) is a web application where a user can upload an image. Every face detected in the image will pass through our facial authenticity prediction model. Upon a successful classification, the user should be able to view the classification result and a level of confidence as shown in the images on the left. If unsuccessful, the user can view the reason for the failure. This labeling method aligns with our team’s research findings that both online media employees and researchers believe that labeling online content as AI-generated is a good solution for combating fraud and misinformation.


As part of the MVP, users will have the ability to connect to an API which can process millions of images per day, use API keys for authentication and usage tracking, accepts image files, urls, and base64 encoded images, and can batch process these images. It is our team’s hope that this API will be used by our customers to label images. An inference container could also be provided to social media companies who prefer to run the model on prem. This will enable connecting our solution into online media platforms, which would align with our team’s research findings that internet users would use this product if it was free and built into online media platforms.

Data Sources

There are five Kaggle datasets of both real and AI-Generated faces that constitute our training data. In addition to these data sources, our team generated around 23 thousand additional images to produce more variety in the models used for generation of our AI-Generated faces class. 19 thousand of these images were generated using Realistic Vision V5.1 and four thousand using Stable Diffusion XL.

Our final dataset can be found on Huggingface; it contains 85 thousand real faces and 110 thousand AI-Generated faces and is split into train, test, and validation sets.

Below are the five Kaggle datasets we utilized. Please note that the links are to the raw datasets, the images of which have been post-processed, augmented, and undersampled in our final dataset:

Data Science Approach

Various forms of machine learning are used in our project, including object (face) detection, zero-shot classification for demographic label derivation, AI image generation, and image classification. Our main focus was fine-tuning an image classification model to classify between real and AI generated faces. For this, we trained on a variety of models including ViT-base, ViT-large, Dino-vit, Base Swin transformer, and ResNet-50. Ultimately, we chose ResNet-50 due to its high accuracy and inference efficiency.

Our strategy was to train the aforementioned models on half of our dataset to determine which architecture best performed with our data. After selecting ResNet-50 as our model, we trained on the full dataset until convergence.


We evaluated our models using classic metrics such as accuracy, precision, recall, and F1. Our model yielded an accuracy of 99.3% on our test set of 20 thousand images. Overall, there’s a similar high precision and recall across the board, but our model has a  slightly higher precision when detecting fake faces compared to real faces.

We also evaluated with user testing, asking individuals to upload a variety of images, including user-chosen images.

Finally, to better understand the model’s behavior, we implemented integrated gradients on a sample of images and found that the model does in fact focus on facial features for its classification task, but results varied in the intuitiveness of this evaluation approach.

Key Learnings

Interpretation of our model’s results show that our model excels on real and fake faces similar to our dataset, but underperforms on styles never seen by our model, scoring a 99% recall in-domain and an 87% recall out-of-domain. These findings are consistent with recent publications, such as “Finding AI-Generated Faces in the Wild” by LinkedIn and Berkeley, where their model had a recall of 98% on their in-domain test set, but a recall of 84% on their out-of-domain test set.

This issue is caused by the overall non-existence of public real face datasets, given ethical concerns of training on people’s faces without their permission. This limitation forced us to use the only two researchy real face datasets out there, both of which followed the same imperfect, consumer image style. For example, these datasets did not contain high-quality professional headshots, so our model often classifies these as fake. 

Nevertheless, our model’s results highly surpass the average accuracy for human evaluation of real vs. AI-Generated faces. In general, AuthentiFace can detect fake images better than people can.


The areas where this technology can make the biggest impact are social media platforms, digital advertising platforms, and dating app platforms, and these companies are our target users. 

Based on our market research, our product has the potential to make a huge impact in the world. In the social media space, there are over 5 billion social media users worldwide. For digital advertising, the projected ad spending on digital advertising is expected to be over $700bn by 2024. Finally, dating apps are also projected to have over $3bn in revenue by 2024. 


Our team would like to acknowledge our Capstone section instructors Joyce Shen and Kevin Hartman for their continued support and valuable feedback throughout the semester. We truly could not have done this without their consistent mentorship and guidance.

AuthentiFace Logo
AuthentiFace Logo
Web App - High Level Process
Web App - High Level Process
Machine Learning in AuthentiFace
Machine Learning in AuthentiFace
AuthentiFace Machine Learning Pipeline
AuthentiFace Machine Learning Pipeline


AuthentiFace (Demo)

AuthentiFace (Demo)

If you require video captions for accessibility and this video does not have captions, click here to request video captioning.

Last updated:

April 17, 2024