Skip to content

🤖Face and Smile Detection using openCV using haarcascade_frontalface_default.xml and haarcascade_smile.xml pretrained models😁

Notifications You must be signed in to change notification settings

Asirwad/Face-Detection-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Face Detection using openCV

Python Flask OpenCV

A web application for real-time face detection using Flask and OpenCV.

Table of Contents

Introduction

This web application captures video from your webcam and performs real-time face detection using the OpenCV library. It then displays the video feed with rectangles drawn around detected faces on a web page built with Flask.

Pre-trained-models

This web application uses openCV pre-trained models haarcascade_frontalface_default.xml for face detection and haarcascade_smile.xml for smile detection

Installation

  1. Clone the repository:
    git clone https://github.com/Asirwad/Face-Detection-OpenCV.git
    cd Face-Detection-OpenCV
    
  2. Create and activate a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate   # On Windows, use `venv\Scripts\activate`
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    
  4. For CLI version
    python main_CLI.py
    
  5. For flask version
    python flask_main.py
    Then goto browser and open:
    http://127.0.0.1:5000/  

About

🤖Face and Smile Detection using openCV using haarcascade_frontalface_default.xml and haarcascade_smile.xml pretrained models😁

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published