This repository contains Python code for an age and gender detection project using the video stream from the camera. The model is trained on the UTKFace dataset, which provides labeled images with age and gender annotations.
The UTKFace dataset used for training and evaluation can be downloaded from the following link: UTKFace Dataset. It consists of facial images of various individuals with age and gender labels.
The model architecture used for age and gender detection is based on deep learning techniques. The specific architecture details are mentioned in the code.
To run the code in this repository, you'll need the following dependencies:
- Python 3.x
- TensorFlow
- Keras
- OpenCV
- NumPy
You can install the required packages using pip
:
pip install tensorflow keras opencv-python numpy
- Clone this repository to your local machine:
git clone https://github.com/your-username/your-repository.git
cd your-repository
-
Download the UTKFace dataset from the provided link and place it in the appropriate directory.
-
Use the provided code to train the age and gender detection model.
-
Run the script to detect age and gender from the video stream:
python detect_age_gender.py
Make sure you have a camera connected to your machine for the live stream.
The age and gender detection model, trained on the UTKFace dataset, can accurately estimate the age and gender of individuals from the video stream. The code can be further customized or improved to enhance the performance.
- The UTKFace dataset used in this project was sourced from Kaggle: UTKFace Dataset.
This project is licensed under the MIT License.