Face Recognition for Age Estimation
This project focuses on building an intelligent facial recognition system designed for stores that sell alcohol and need to verify customer age automatically.
CLIENT:
Retail Store
DATE:
June 01, 2025
PROJECT:
Data Exploration
The dataset included 7,600 facial images, each matched to a real age value from an accompanying CSV file. Using ImageDataGenerator, I efficiently loaded and preprocessed all images for training.
The exploratory data analysis revealed that the dataset was heavily centered around young adults, ages ranged from 1 to 100 years, with an average of 31. About 25% of the data represented people under 20, while 75% were below 41. This imbalance suggested the model would naturally perform better for adult predictions than for children or seniors.
Model Training
For this task, I trained a ResNet50 convolutional neural network pre-trained on ImageNet, adapting it for age regression. I applied a ReLU activation function in the final layers and Global Average Pooling 2D to reduce dimensionality and prevent overfitting.
Training ran for 20 epochs on a GPU, using Mean Squared Error (MSE) for optimization and Mean Absolute Error (MAE) as the evaluation metric. The final model achieved a test MAE of 6.13 years, indicating the model’s predictions differ from actual ages by roughly six years on average. Given the age imbalance, this result is considered strong — and would likely improve with more data from younger individuals.

