The problem
Humans are unreliable at guessing age from a photograph, yet the cues are there — skin texture, facial proportions, hairline. The challenge is turning those subtle cues into a number with a stated uncertainty: most demos either hide their error or overclaim precision, and no accessible tool estimates age while being honest about how wrong it typically is. The DEX approach showed that combining an age-group classifier with an age regressor beats either alone, but the model is only as good as its data — datasets are skewed toward certain ethnicities and age ranges, occlusions and lighting wreck estimates, and several years of error is normal rather than exceptional. This project takes the honest route: a two-headed CNN evaluated with mean absolute error on a held-out split, with dataset bias and per-age-band error documented openly in the report. That honesty is the academic value — the student learns regression-vs-classification design, MAE evaluation and bias analysis instead of shipping a magic number.
Frequently asked questions
- How does the network estimate age? A ResNet-18 backbone extracts facial features, then two heads work together: a classifier predicts the age group and a regressor predicts the exact age. Combining both, as the DEX paper showed, beats either approach alone.
- Why is MAE the right metric here? Mean absolute error answers the question everyone asks — "on average, how many years off is it?" — in the original units. The notebook also logs the loss curves and per-band MAE that back it up.
- What dataset is used? UTKFace: 20,000+ face images spanning a wide age range, each labeled with an exact age (Zhang et al.). The report documents the age distribution and the stratified train/validation/held-out split.
- Can it give an exact age? No — and no honest system claims to. It gives an estimate with a documented expected error, plus an age-group confidence bar that shows how the network hedged.
- Is this project suitable for a final-year project? Yes. It suits B.E./B.Tech students in Computer Science, AI/ML and Data Science, demonstrating regression-vs-classification design, transfer learning, MAE evaluation, dataset-bias analysis and a face-photo demo.
- What will I receive? Complete source code, trained .pth weights, dataset download and split-configuration scripts, project report PDF, PPT presentation, viva Q&A document and a setup guide.
How it works
Dataset & model:
Dataset name: UTKFace.
Source: publicly released face dataset with exact age labels (Zhang et al.).
Task: apparent-age estimation (age-group classification plus age regression).
Classes: continuous age labels (20,000+ face images spanning a wide age range); the classification head uses age groups.
Model: ResNet-18 backbone (ImageNet pre-training via torchvision), fine-tuned in the DEX style with an age-group classifier head and an age regressor head, optimized with a combined loss.
Input: face photograph, auto-detected and aligned before estimation.
Prediction: age-group probabilities plus a continuous age estimate.
Output: predicted age with an age-group confidence bar.
Evaluation metrics: mean absolute error (MAE) on the held-out split, loss curves, per-age-band MAE — computed by the training notebook during the build.
Design target: ~5-6 years MAE on the held-out split. This is a design target, not a measured claim; the notebook computes the actual MAE during the build.
Working:
- Training phase: UTKFace images with exact age labels are split into train, validation and held-out sets with age-stratified sampling; faces are detected and aligned with a DNN-based face detector, then cropped to a standard size.
- A ResNet-18 backbone pre-trained on ImageNet is fine-tuned with two heads: an age-group classifier and an age regressor, optimized with a combined classification-plus-regression loss.
- Evaluation phase: the training notebook logs MAE on the held-out split after every epoch with loss curves, and computes per-age-band error analysis showing exactly where the model is strongest and weakest.
- Inference phase: the Flask app detects and aligns the face in each uploaded photo, runs inference and displays the predicted age with an age-group confidence bar.
- Group photos: the demo processes the most prominent detected face; multi-face batch processing is documented as a possible extension.
- All error figures in the report come from the buyer's own training run — the ~5-6 years figure is a design target, not a pre-measured claim.
Specifications:
Model | ResNet-18 CNN, age-group classification + regression head (DEX-style)
Dataset | UTKFace — 20,000+ face images labeled with age (Zhang et al.)
Reference | DEX, Rothe et al., ICCV 2015 (arXiv:1505.01814)
Metric | MAE on the held-out split, computed by the training notebook during the build
Design target | ~5-6 years MAE (design target, not a measured claim)
Input | Face photographs, auto-detected and aligned before estimation
Demo app | Flask web app with upload and age-group confidence bars
Weights | .pth file shipped with the build
Project features
[DEX-Style Two-Headed CNN] (implemented) — ResNet-18 backbone with an age-group classification head plus an age regression head, following the DEX approach (Rothe et al.).
[Face Detection & Alignment] (implemented) — A DNN-based face detector detects and aligns faces before estimation so the network sees consistent inputs.
[Predicted Age with Confidence Bar] (implemented) — The Flask demo returns the predicted age with an age-group confidence bar showing how the network hedged.
[MAE Evaluation] (implemented) — The training notebook logs mean absolute error on the held-out split and loss curves during the build.
[Per-Age-Band Error Analysis] (implemented) — Error is broken down by age band during the build, documenting exactly where the model is strongest and weakest.
[Exportable .pth Weights] (implemented) — The trained age-estimation weights ship as a .pth file for deployment-style demos.
[Configurable Confidence Display] (configurable) — The confidence display format can be adjusted for demo flexibility.
What is included
Complete source code (preprocessing, training, evaluation, Flask app)
Trained age-estimation weights (.pth)
Dataset download and split-configuration scripts
Project report PDF (background, DEX approach, methodology, evaluation, bias and error analysis)
PPT presentation for the final review
Viva Q&A preparation document (regression vs classification, MAE, transfer learning, dataset bias)
Setup guide (environment, dependencies, GPU guidance for training)
Limitations & prerequisites
Age estimates are probabilistic — several years of error is normal, and the report documents this openly rather than hiding it.
UTKFace is skewed toward certain ethnicities and age ranges; accuracy degrades outside them.
Occlusions (masks, sunglasses), heavy makeup and poor lighting all increase error.
Multiple faces in one photo: the demo processes the most prominent detected face.
All reported figures are design targets from the buyer's own training run; no pre-measured MAE is claimed.
This is an educational prototype with documented bias — it must never be used for identity verification, age-gating or legal decisions.
Frequently Asked Questions
How does the network estimate age?
A ResNet-18 backbone extracts facial features, then two heads work together: a classifier predicts the age group and a regressor predicts the exact age. Combining both, as the DEX paper showed, beats either approach alone.
Why is MAE the right metric here?
Mean absolute error answers the question everyone asks — "on average, how many years off is it?" — in the original units. The notebook also logs the loss curves and per-band MAE that back it up.
What dataset is used?
UTKFace: 20,000+ face images spanning a wide age range, each labeled with an exact age (Zhang et al.). The report documents the age distribution and the stratified train/validation/held-out split.
Can it give an exact age?
No — and no honest system claims to. It gives an estimate with a documented expected error, plus an age-group confidence bar that shows how the network hedged.
Is this project suitable for a final-year project?
Yes. It suits B.E./B.Tech students in Computer Science, AI/ML and Data Science, demonstrating regression-vs-classification design, transfer learning, MAE evaluation, dataset-bias analysis and a face-photo demo.
What will I receive?
Complete source code, trained .pth weights, dataset download and split-configuration scripts, project report PDF, PPT presentation, viva Q&A document and a setup guide.
Components & software requirements
Python 3.10
PyTorch and torchvision
OpenCV with DNN face detector
NumPy, scikit-learn
Matplotlib, Seaborn
Flask
UTKFace dataset (public; download and split-configuration scripts included)
GPU recommended for training (cloud-GPU guidance included); demo inference runs on CPU
Delivery information
Built to order — the source code, trained weights, project report, PPT and viva Q&A are prepared fresh for each buyer after the order is placed. The delivery schedule is confirmed at order time, and includes time for training the model and assembling the complete documentation kit.
Support terms
- Environment and dependency setup guidance, including GPU options for training.
- Viva preparation support covering regression vs classification, MAE, transfer learning and dataset bias.
- Explanation of the training notebook output and how to present the per-band error analysis in the review.
- Discussion of feasible customizations before ordering, such as multi-face batch processing (documented as an extension).