Skip to content

This Python script uses OpenCV and a pre-trained Keras deep learning model to perform real-time gender detection through a webcam.

Notifications You must be signed in to change notification settings

Randhir026/Gender-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gender-Detection

This Python script uses OpenCV and a pre-trained Keras deep learning model to perform real-time gender detection through a webcam.

πŸ“Œ About the Project

This project focuses on building an AI-powered gender detection system using facial images. It leverages a Convolutional Neural Network (CNN) to classify gender as either Male or Female based on facial features. The system is trained on the UTKFace dataset and includes both model training and real-time prediction through webcam using OpenCV.

The project has two main components:

Model Training Pipeline

Loads and preprocesses images.

Trains a CNN using TensorFlow/Keras.

Evaluates the model with accuracy metrics and plots.

Real-Time Gender Prediction

Uses Haar cascade to detect faces from a live webcam stream.

Loads the trained model.

Predicts and displays gender labels on detected faces in real time.

This can be used in smart surveillance, demographic analysis, and interactive systems requiring basic human profiling.

πŸ“‚ Dataset: UTKFace

The UTKFace Dataset is a large-scale facial dataset with over 20,000 images.

πŸš€ Usage

Follow the steps below to train the model and run real-time gender detection:

1️⃣ Clone the Repository

2️⃣ Install Dependencies

3️⃣ Download the Dataset

4️⃣ Train the Model

5️⃣ Run Real-Time Gender Detection

About

This Python script uses OpenCV and a pre-trained Keras deep learning model to perform real-time gender detection through a webcam.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published