This Project allows you to real-time face detection through a webcam or video. It use the OpenCV library and a pre-trained Haarcascades face detector.
- Webcam
- Python 2.x (Not recommand)
- OpenCV library (
cv2)
- 2Ghz+ CPU
- Python 3.x
This script request OpenCV library, You can install the librarie using:
pip install opencv-python- Clone the repository or download the script.
- Connect your webcam to your computer
- Run the script using your IDE or the following command:
python main.pyYou 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
- press
qwhile the OpenCV window is in focus.