• Stars
    star
    1
  • Language
    Python
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Face Detection using OpenCV

Face Detection using OpenCV

This project is a simple face detection program using OpenCV in Python. It detects faces in real-time video stream from a webcam or a video file and marks the faces with green rectangles if they match the faces in a pre-defined list, and red rectangles if they don't match.

Getting Started

To get started with the project, you need to have OpenCV installed on your system. You can install OpenCV using pip: pip install opencv-python You also need to download the haarcascade_frontalface_default.xml file and save it in the same directory as the Python script. This file contains the pre-trained classifier for detecting frontal faces.

Usage

To run the program, execute the following command in the terminal: python face_detection.py

The program will open a video stream from your default webcam and start detecting faces in real-time. If you want to use a video file instead, you can modify the cap variable in the code:

cap = cv2.VideoCapture('path/to/video/file.mp4')

You can also modify the faces list to match the faces you want to detect. The list should contain the file paths of the images of the faces you want to detect.

Output

When the program detects a face that matches one of the faces in the faces list, it will mark the face with a green rectangle:

If the program detects a face that does not match any of the faces in the faces list, it will mark the face with a red rectangle:

The program also writes the file paths of the faces it detects to two text files: found.txt and notfound.txt. The found.txt file contains the file paths of the faces that were detected, while the notfound.txt file contains the file paths of the faces that were not detected.

Credits

The haarcascade_frontalface_default.xml file used in this project is part of the OpenCV library and was created by Rainer Lienhart and Jochen Maydt. The file can be found in the OpenCV GitHub repository.

License

This project is licensed under the terms of the MIT license.

More Repositories

1

zkteco

ZKTeco Package For Laravel. This package provides seamless integration with ZKTeco devices within Laravel applications, enabling communication with attendance devices such as fingerprint, face recognition, or RFID using UDP protocol.https://packagist.org/packages/jmrashed/zkteco
PHP
10
star
2

adibaicon

adibaIcon -Custome Icon Library
CSS
3
star
3

blood-donation-web-application-with-real-time-location-sharing

HTML
2
star
4

go-starter-kit

The Go Starter Kit is a foundational project for building a portfolio website using Go, structured to promote clean code and scalability. It employs the Gin web framework for routing and Viper for configuration management.
HTML
2
star
5

ecommerce

The E-commerce Toolkit for Laravel is a modular package providing essential features for building e-commerce websites. This package includes functionalities for managing product catalogs, carts, checkout systems, payment gateway integrations, and order management.
PHP
2
star
6

two-factor-auth

Laravel 2FA Authentication Package
PHP
2
star
7

phpmyadmin

phpmyadmin
PHP
2
star
8

laravel-automation-package

laravel-automation-package
PHP
1
star
9

laravel-installer

A complete web installer for Laravel applications, making the setup process simple and user-friendly.
PHP
1
star
10

rashed-games-javacript

Rashed's Game using HTML, CSS, and JavaScript
JavaScript
1
star
11

developing-restful-apis-with-python-and-flask

Developing RESTful APIs with Python and Flask
Python
1
star
12

Django-Python-Starter-Kit-for-Beginner

Django was invented by Lawrence Journal-World in 2003, Initial release to the public was in July 2005. Latest version of Django is 4.0.3 (March 2022). This repository will help you, when you will get ready.
Python
1
star
13

ResponsiveLoginForm

JavaScript
1
star
14

jmrashed

About Md Rasheduzzaman
HTML
1
star
15

Webcam-capture-using-Html5-getUserMedia

Webcam capture using Html5 getUserMedia
JavaScript
1
star
16

desktop-application-using-phpnative-for-zkteco

desktop-application-using-phpnative-for-zkteco
PHP
1
star
17

News-Flutter-UI-Kit

News Flutter UI Kit
Dart
1
star
18

dart-practice-problem-solutions

Welcome to the Dart Practice Problem Solutions repository! This is a dedicated space for daily practice to learn Dart deeply. Our goal is to solve at least one problem each day for 100 days, continuously improving our Dart skills.
Dart
1
star
19

login-ui-react-native-app

This is a React Native application for implementing a login and signup UI/UX.
JavaScript
1
star
20

geolocation

The geolocation package will provide user location
PHP
1
star
21

Email-List-Cleaning-Tool-Using-PHP

Email List Cleaning Tool Using PHP
PHP
1
star
22

hospital-management-system

The Hospital Management System is a comprehensive software solution designed to facilitate efficient management and operations within a hospital or healthcare facility.
PHP
1
star
23

google-maps-polyline-draw

Draw polyline on google map using latitude and longitude coordinates
JavaScript
1
star
24

university-management-system-php

The University Management System is a web-based application developed using PHP. It provides a comprehensive solution for managing various aspects of a university, including student management, course management, faculty management, and administrative tasks.
PHP
1
star
25

Install-Redis-on-Windows

Install Redis on Windows
1
star
26

break-weakness-with-angular

break-weakness-with-angular
HTML
1
star
27

express-openapi-generator

express-openapi-generator
EJS
1
star