https://github.com/asirwad/face-detection-opencv
🤖Face and Smile Detection using openCV using haarcascade_frontalface_default.xml and haarcascade_smile.xml pretrained models😁
https://github.com/asirwad/face-detection-opencv
compu flask-application mach opencv
Last synced: about 2 months ago
JSON representation
🤖Face and Smile Detection using openCV using haarcascade_frontalface_default.xml and haarcascade_smile.xml pretrained models😁
- Host: GitHub
- URL: https://github.com/asirwad/face-detection-opencv
- Owner: Asirwad
- Created: 2023-07-22T14:19:46.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T04:38:15.000Z (almost 3 years ago)
- Last Synced: 2025-01-21T06:13:26.785Z (over 1 year ago)
- Topics: compu, flask-application, mach, opencv
- Language: Python
- Homepage:
- Size: 177 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Face Detection using openCV



A web application for real-time face detection using Flask and OpenCV.
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
## 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](https://github.com/opencv/opencv/blob/master/data/haarcascades/haarcascade_frontalface_default.xml) for face detection and [haarcascade_smile.xml](https://github.com/opencv/opencv/blob/master/data/haarcascades/haarcascade_smile.xml) for smile detection
## Installation
1. Clone the repository:
```bash
git clone https://github.com/Asirwad/Face-Detection-OpenCV.git
cd Face-Detection-OpenCV
2. Create and activate a virtual environment (optional but recommended):
```bash
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
3. Install the required dependencies:
```bash
pip install -r requirements.txt
4. For CLI version
```bash
python main_CLI.py
5. For flask version
```bash
python flask_main.py
```
Then goto browser and open:
```bash
http://127.0.0.1:5000/