Skip to content

shadowsnow124/AI-Face-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Face Detection using AI

This Python script allows you to real-time face detection through a webcam or video. It use the OpenCV library and a pre-trained Haarcascades face detector.

Requirement

Minimum

  • Webcam
  • Python 2.x (Not recommand)
  • OpenCV library (cv2)

Recommand ( 60 fps )

  • 2Ghz+ CPU
  • Python 3.x

Installation

This script request OpenCV library, You can install the librarie using:

pip install opencv-python

Usage

  1. Clone the repository or download the script.
  2. Connect your webcam to your computer
  3. Run the script using your IDE or the following command:
python main.py

You can also use a video file instead of using the webcam by modifying the cap = cv2.VideoCapture(0) line in the script. and replace it with your video path

Control

  • press q while the OpenCV window is in focus.

Acknowledgments

This script is using the OpenCV library and pre-trained Haarcascades for face detector.

Feel free to use this project for anything =)