AravinthKumar24/Real_Time_Face_Segmentation_for_Movie_Cast_Identification
0
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐ฌ Real-Time Face Segmentation for Movie Cast Identification
๐ Project Overview
This project focuses on detecting and segmenting human faces in movie scenes using deep learning techniques. The goal is to enable a "Pause-and-Identify" feature in streaming platforms, where users can instantly view actor details.
๐ Features
- Face segmentation using U-Net architecture
- MobileNetV2 encoder (transfer learning)
- Real-time inference using Streamlit
- Image upload and webcam support
- Performance dashboard with metrics
- Downloadable logs and results
๐ง Problem Statement
Streaming platforms need a system that can:
- Detect faces in complex movie scenes
- Segment faces accurately
- Identify actors in real-time
๐ผ Business Use Cases
- ๐ฅ Pause & Identify actors
- ๐ฏ Personalized recommendations
- ๐ก Content moderation
- ๐ข Targeted advertising
๐ Dataset
- Movie scene images
- Corresponding binary face masks
- Preprocessing:
- Resize to 256x256
- Data augmentation (flip, rotate, brightness)
๐ Model Architecture
- U-Net architecture
- MobileNetV2 as encoder
- Skip connections for better localization
- Custom Dice Loss function
โ๏ธ Training Details
- Optimizer: Adam
- Loss: Dice Loss + Binary Crossentropy
- Metrics: Dice Coefficient, IoU
- Techniques:
- Early Stopping
- Model Checkpoint
- Learning Rate Scheduling
๐ Evaluation Metrics
๐ Results
- High accuracy in face segmentation
- Works well in crowded scenes
- Real-time performance achieved
๐ฅ Streamlit App
Features:
- Upload images
- Real-time webcam detection
- Visualization of masks
- Metrics dashboard
Run App:
streamlit run app.py๐ฆ Installation
git clone <repo_url>
cd project
pip install -r requirements.txt๐ Project Structure
โโโ data/
โโโ models/
โโโ notebooks/
โโโ app.py
โโโ requirements.txt
โโโ README.md๐ Future Improvements
- Add face recognition (actor identification)
- Improve inference speed
- Deploy on cloud (AWS / HuggingFace)
๐งโ๐ป Tech Stack
- Python
- OpenCV
- TensorFlow / Keras
- Streamlit
- NumPy, Pandas, Matplotlib
๐ Acknowledgements
- Open-source community
- TensorFlow & Streamlit contributors
