This project utilizes OpenCV and deep learning models to detect and classify the age and gender of faces in images or video streams. It provides a real-time demonstration of age and gender recognition capabilities using pre-trained models.
- Python 3.x
- OpenCV
- NumPy
- argparse
- Clone the repository:
git clone https://github.com/rajveersinghcse/Age-and-Gender-Detection-System.git
- Install the required packages:
pip install -r requirements.txt
- The necessary model files (
*.pb
,*.prototxt
,*.caffemodel
) are already included in theconstants/
directory. You don't need to download them separately.
- Run the script to start the age and gender detection:
python age_gender_detection.py --input path/to/input_file.ext --device cpu/gpu
--input
: Path to an input image or video file. Skip this argument to capture frames from a camera.--device
: Specify the device for inference (cpu
orgpu
).
- The program will display the input stream with bounding boxes indicating detected faces along with their predicted age and gender.
This project is based on the OpenCV library and utilizes pre-trained deep learning models for face detection, age estimation, and gender classification.
This project is licensed under the MIT License.
Feel free to customize any part of this README.md file to better suit your project's details or style!