Skip to content

Detects a person’s age range, gender, and facial landmarks in real time via webcam or from uploaded images.

License

Notifications You must be signed in to change notification settings

gbennnn/facial-landmarks-detection

Repository files navigation

Age, Gender & Facial Landmark Detection Web App

A web-based application built with Flask, OpenCV, and MediaPipe to detect age, gender, and facial landmarks from images or live camera feed.

Features

  • Realtime Camera Detection

    • Uses your webcam directly in the browser.
    • Performs live detection of age, gender, and facial landmarks.
  • Image Upload Detection

    • Upload an image from your device.
    • The app processes the image and returns the detection result.
  • Modern UI

    • Styled with Tailwind CSS via CDN.
    • Responsive and minimal interface.

Preview

Preview

Tech Stack

  • Backend: Python, Flask
  • Computer Vision: OpenCV, MediaPipe
  • ML Models: Pre-trained Age & Gender detection models
  • Frontend: HTML, Tailwind CSS

Installation

1. Clone Repository

git clone https://github.com/gbennnn/facial-landmarks-detection.git
cd facial-landmarks-detection

2. Create Virtual Environment

python -m venv venv
source venv/bin/activate   # Linux / Mac
venv\Scripts\activate      # Windows

3. Install Dependencies

pip install -r requirements.txt

4. Prepare Models

Download the pre-trained models and place them in the model/ folder:

  • deploy.prototxt
  • res10_300x300_ssd_iter_140000.caffemodel
  • age_deploy.prototxt
  • age_net.caffemodel
  • gender_deploy.prototxt
  • gender_net.caffemodel

Usage

Run the Flask App

python app.py

Open your browser and go to:

http://127.0.0.1:5000/

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Detects a person’s age range, gender, and facial landmarks in real time via webcam or from uploaded images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published