This project predicts age and gender from facial images using deep learning models such as VGG16 and ResNet with transfer learning. It is based on the Adience Benchmark Dataset and demonstrates how CNNs can accurately classify gender and estimate age groups even under challenging lighting and pose conditions.
- Techniques used: Convolutional Neural Networks (CNNs), Transfer Learning, Data Augmentation
- Dataset: Adience benchmark dataset (publicly available)
- Accuracy achieved:
- Gender detection: 96.59%
- Age estimation: 62.73%
age-gender-detection/
├── project.ipynb
├── requirements.txt # Python dependencies
├── .gitignore # Files and folders to ignore in Git
├── LICENSE # License for reuse
├── Data/adience
git clone https://github.com/<Bharathyalagi>/<age-and-gender-detection-using-deep-learning>.git
cd <age-and-gender-detection-using-deep-learning>pip install -r requirements.txtThis project uses the Adience Benchmark Dataset for age and gender classification.
Download link:
[https://talhassner.github.io/home/projects/Adience/Adience-data.html]
[https://www.kaggle.com/datasets/ttungl/adience-benchmark-gender-and-age-classification]
After downloading, place the dataset in:
data/adience/Open project.ipynb in Jupyter/kaggle/collab Notebook and run all cells step-by-step.
All experiments and results were produced in a Kaggle notebook environment (GPU-enabled). If you want to reproduce the results locally, use Python 3.8+ and install the dependencies from requirements.txt. Some functionality (GPU training) will be faster on a CUDA-enabled GPU.
If you ran this project in a different environment, please update the environment details here.
The main evaluation metrics reported in the paper and produced by the notebook are:
Gender Detection
- Training accuracy: 96.59%
- Validation accuracy: 86.14%
- Epochs: 50
Gender Detection (Augmented)
- Training accuracy: 79.32%
- Validation accuracy: 81.25%
- Epochs: 100
Age Detection
- Training accuracy: 62.73%
- Validation accuracy: 58.42%
- Epochs: 200
Overall, the system performed strongly in gender detection due to its binary nature and the use of the Sigmoid function.
Age prediction achieved moderate accuracy because of overlapping facial features among age groups, but still demonstrated solid generalization with proper data augmentation.
Future improvements can focus on balanced age classes, larger datasets, and custom activation or ensemble models to further improve age prediction accuracy.
The notebook includes code to compute and display a confusion matrix, precision, recall and F1 scores for gender classification. See the Evaluation section of project.ipynb to reproduce these plots and tables.