Skip to content

This repository contains a Python script that leverages the OpenCV library to perform real-time face detection through your computer's webcam.

Notifications You must be signed in to change notification settings

Frankelly-Guzman/Face-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Face Detection with OpenCV

This is a simple Python script that uses OpenCV to perform real-time face detection through your computer's webcam. It captures video frames, detects faces in the frames, and draws rectangles around the detected faces.

Prerequisites

Before you run the script, you'll need to install the required Python library:

pip install opencv-python

How to Use

  1. Clone the repository:
git clone https://github.com/Frankelly-Guzman/Face-Detection.git
cd Face-Detection
  1. Run the face detection script:
python face_detection.py

This will open your computer's webcam and start detecting faces in real-time. To exit the program, press the 'q' key.

Customization You can customize the face detection parameters by modifying the script. For example, you can adjust the scaleFactor, minNeighbors, and minSize values to fine-tune the face detection accuracy and performance.

Example of modifying face detection parameters

faces = faceCascade.detectMultiScale(
    gray,
    scaleFactor=1.1,        # Adjust this value
    minNeighbors=5,         # Adjust this value
    minSize=(30, 30),       # Adjust this value
    flags=cv2.CASCADE_SCALE_IMAGE
)

Credits

This project uses the OpenCV library for face detection.

Author This Face Detection project was created by Frankelly Guzman.

If you have any questions or feedback, please feel free to contact me.

Enjoy experimenting with Face Detection using OpenCV!

About

This repository contains a Python script that leverages the OpenCV library to perform real-time face detection through your computer's webcam.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages