This repository contains a Streamlit application for webcam-based face detection. The application uses OpenCV and a Haar Cascade classifier to detect faces from the webcam feed.
LICENSE
: License file for the project.README.md
: This file. Provides an overview of the project.Streamlit_cam.py
: Main Streamlit application script.haarcascade_frontalface_default.xml
: Haar Cascade XML file for frontal face detection.webcam.log
: Log file for webcam operations.webcam_cv3.py
: Python script for webcam operations using OpenCV3.
-
Clone the repository:
git clone https://github.com/himankgupta1/Face-Detection-Application.git cd Face-Detection-Application
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages
-
To run the Streamlit application:
streamlit run Streamlit_cam.py
or
python -m streamlit run Streamlit_cam.py
-
The application will start and can be accessed at
http://localhost:8501
in your web browser.
- Streamlit_cam.py: This is the main script for the Streamlit application. It initializes the webcam, captures the video stream, and applies the Haar Cascade classifier to detect faces.
- haarcascade_frontalface_default.xml: Pre-trained Haar Cascade model for detecting frontal faces.
- webcam.log: Log file capturing the webcam activity and any errors encountered during the execution.
- webcam_cv3.py: An alternative script for handling webcam feed using OpenCV3 directly. It can be used for testing and debugging purposes.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.