This project demonstrates face detection using OpenCV in Python.
To run this project, you need to have the following:
- Python 3
- OpenCV library (
cv2
) installed - Haar cascade file for face detection (
haarcascade_frontalface_default.xml
) - Test image file (
test.jpeg
)
-
Clone the repository:
git clone https://github.com/your-username/face-detection-project.git
-
Change into the project directory:
cd face-detection-project
-
Install the dependencies by passing the requirements.txt file to the Python package manager, pip. The -r flag specifies the location of requirements.txt file.
pip install -r requirements.txt
4.The script will load the test image, perform face detection, and display the image with rectangles around the detected faces.
5.Press any key to close the image window.
6.The resulting image with face detection rectangles will be saved as face_detection.jpg.
This project utilizes the following:
- OpenCV
- Feel free to adjust the content as per your project's specific requirements. Update the repository URL, credits, and license information accordingly.