https://github.com/codehub001/age-and-gender-detection
This AI-powered project detects faces and predicts age & gender from images or video streams using OpenCV and deep learning. 🧠💡 🔹 Face Detection 👀 🔹 Gender Classification 🏷️ (Male/Female) 🔹 Age Estimation 📊 (from predefined age groups) 🔹 Live Video & Image Support 🎥🖼️
https://github.com/codehub001/age-and-gender-detection
argparse deep-learning numpy opencv pretrained-model python
Last synced: 2 months ago
JSON representation
This AI-powered project detects faces and predicts age & gender from images or video streams using OpenCV and deep learning. 🧠💡 🔹 Face Detection 👀 🔹 Gender Classification 🏷️ (Male/Female) 🔹 Age Estimation 📊 (from predefined age groups) 🔹 Live Video & Image Support 🎥🖼️
- Host: GitHub
- URL: https://github.com/codehub001/age-and-gender-detection
- Owner: codehub001
- License: mit
- Created: 2025-03-17T04:34:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T04:52:35.000Z (over 1 year ago)
- Last Synced: 2025-03-17T05:29:41.414Z (over 1 year ago)
- Topics: argparse, deep-learning, numpy, opencv, pretrained-model, python
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧑🤖 Age and Gender Detection using OpenCV & Deep Learning
## 🚀 Project Overview
This AI-powered project detects faces and predicts **age** & **gender** from images or video streams using OpenCV and deep learning. 🧠💡
🔹 **Face Detection** 👀
🔹 **Gender Classification** 🏷️ (Male/Female)
🔹 **Age Estimation** 📊 (from predefined age groups)
🔹 **Live Video & Image Support** 🎥🖼️
---
## 🛠️ Tech Stack & Dependencies
- **Python** 🐍
- **OpenCV** 🎭
- **Pre-trained Deep Learning Models** 🏗️
- **NumPy** 🔢
- **Argparse** 🏗️
### 📌 Install Dependencies
```bash
pip install opencv-python numpy argparse
```
---
## 📥 Pre-trained Models Used
This project leverages state-of-the-art **deep learning models** for accurate predictions:
📌 **Face Detection:** `opencv_face_detector.pbtxt` & `opencv_face_detector_uint8.pb`
📌 **Age Prediction:** `age_deploy.prototxt` & `age_net.caffemodel`
📌 **Gender Classification:** `gender_deploy.prototxt` & `gender_net.caffemodel`
Ensure these files are in your working directory. 📂✅
---
## 🎯 How to Use
### 🖼️ Run with an Image
```bash
python age_gender_detection.py --image path/to/image.jpg
```
### 🎥 Run with Live Webcam
```bash
python age_gender_detection.py
```
---
## ⚙️ How It Works
1️⃣ **Detect Faces** using OpenCV's deep learning module.
2️⃣ **Pre-process Images** for the model.
3️⃣ **Predict Gender & Age** using trained models.
4️⃣ **Overlay Results** on the image/video feed.
---
## 📌 Example Output
📝 The detected **age** and **gender** are displayed in the console and overlaid on the image.
---
## 📜 License
This project is open-source and available under the **MIT License**ok
---
## ✨ Author
👤 Modassir Ali
💼 My LinkedIn - https://www.linkedin.com/in/codehub01/
Enjoy building with AI! 🚀🤖