An open API service indexing awesome lists of open source software.

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😁

Awesome Lists containing this project

README

          

Face Detection using openCV

![Python](https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9-blue?logo=python&logoColor=white)
![Flask](https://img.shields.io/badge/Flask-1.1.2-green?logo=flask&logoColor=white)
![OpenCV](https://img.shields.io/badge/OpenCV-4.5.2.54-red?logo=opencv&logoColor=white)

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/