This Python application uses OpenCV to detect faces in images or video streams.
- Real-time face detection using webcam
- Supports multiple face detection
Before you begin, ensure you have met the following requirements:
- Python 3.6+
- pip (Python package manager)
git clone https://github.com/a7medmo7amady/face-detection.git
cd face-detection
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
pip install opencv-python numpy
If you encounter issues, you may need to install OpenCV using Homebrew:
brew install opencv
You might need to install additional dependencies:
sudo apt-get update
sudo apt-get install python3-opencv
- To detect faces in an image:
python detect_faces_image.py --image path/to/your/image.jpg
- To detect faces using your webcam:
python detect_faces_webcam.py
Contributions to this project are welcome. Please fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenCV community for their excellent computer vision library
- Haar Cascade classifier for face detection