🚀 A futuristic deep learning project that predicts Age from faces in both local images and real-time webcam streams.
Built with TensorFlow and OpenCV.
- 🧑🤖 Continuous Age Prediction (not classification).
- 📷 Works on local images or live webcam feed.
- ⚡ Real-time performance with OpenCV Haar Cascades.
- 🎨 Futuristic visualization with bounding boxes + age labels.
- 🔥 Plug & Play: drop your trained
.kerasmodel and run instantly.
| Local Image Prediction | Real-Time Webcam |
|---|---|
![]() |
![]() |
├── final_age_regression_model.keras # Pretrained model ├── predict_from_img.py # Run on single image ├── predict_realtime.py # Run on webcam ├── requirements.txt ├── .gitignore ├── README.md
yaml Copy code
1️⃣ Clone Repository
git clone https://github.com/piyush241203/age_detection.git
cd age_detection
2️⃣ Create Virtual Environment (Recommended)
bash
Copy code
python -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
3️⃣ Install Dependencies
bash
Copy code
pip install -r requirements.txt
4️⃣ Add Pretrained Model
Place your trained model file here:
bash
Copy code
final_age_regression_model.keras
🚀 Usage
🔹 Run on Local Image
bash
Copy code
python predict_from_img.py
🔹 Run in Real-Time (Webcam)
bash
Copy code
python predict_realtime.py
⚙️ Tech Stack
🧠 TensorFlow/Keras – Age regression model
🎥 OpenCV – Face detection + image preprocessing
🐍 Python – Main glue language
🤝 Contributing
Contributions are welcome!
🌟 Star this repo if you find it useful
🔧 Fork it & improve
📝 Submit pull requests
