A full-stack web application that uses deep learning to detect age and gender from facial images. Built with React frontend and Python Flask backend, powered by a custom MobileNet V2 model.
- Face Detection: Automatic face detection using OpenCV Haar Cascade
- Age Prediction: Estimates age from facial features
- Gender Classification: Determines gender (male/female) with confidence score
- Modern UI: Beautiful React interface with Tailwind CSS and shadcn-ui
- Real-time Analysis: Fast inference using optimized MobileNet V2 architecture
- Framework: Python Flask
- Model: Custom MobileNet V2 with age and gender prediction heads
- Face Detection: OpenCV Haar Cascade
- API: RESTful API with CORS support
- Framework: React + TypeScript
- Build Tool: Vite
- UI Library: shadcn-ui components
- Styling: Tailwind CSS
- Python 3.11+
- Node.js 18+ and npm
- pip (Python package manager)
git clone https://github.com/AlyHesham22/Image-Processing-Project.git
cd Image-Processing-Projectpip install -r requirements.txtnpm installpython app.pyThe backend will run on http://localhost:5000
Open a new terminal:
npm run devThe frontend will run on http://localhost:5173 (or similar port)
python Test.py├── app.py # Flask backend server
├── Test.py # Direct model testing script
├── best_model.pth # Trained model weights
├── requirements.txt # Python dependencies
├── package.json # Node.js dependencies
├── src/ # React frontend source
│ ├── components/ # React components
│ ├── pages/ # Page components
│ └── ...
└── supabase/ # Supabase configuration (optional)
- Base Model: MobileNet V2 (ImageNet pre-trained)
- Task: Multi-task learning (Age regression + Gender classification)
- Input: 224x224 RGB face images
- Output:
- Age: Continuous value
- Gender: Probability score (sigmoid)