A web application for real-time face detection using Flask and OpenCV.
This web application captures video from your webcam and performs real-time face detection using the OpenCV library. It then displays the video feed with rectangles drawn around detected faces on a web page built with Flask.
This web application uses openCV pre-trained models haarcascade_frontalface_default.xml for face detection and haarcascade_smile.xml for smile detection
- Clone the repository:
git clone https://github.com/Asirwad/Face-Detection-OpenCV.git cd Face-Detection-OpenCV
- Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the required dependencies:
pip install -r requirements.txt
- For CLI version
python main_CLI.py
- For flask version
Then goto browser and open:
python flask_main.py
http://127.0.0.1:5000/