This project includes a Python-based human detection model that utilizes the MobileNet SSD model for detecting humans in real-time video streams. It processes video from a connected webcam or camera, detects human figures, and highlights them with bounding boxes.
- Real-time human detection
- Bounding box around detected humans
- Audio alert (beep sound) when a human is detected
- Frame skipping and resizing for optimized performance
- Python 3.x
- OpenCV
- Numpy
-
Clone the Repository
git clone https://github.com/japneetsingh035/HumanDetectionModel.git
-
Install Dependencies
Make sure you have Python installed. Then, install the required libraries using pip:
pip install opencv-python numpy
-
Download Pre-trained Model Files
You need the MobileNet SSD model and config files. Download them from the following links:
Place these files in the
path/to/
directory or adjust the paths in the script accordingly. -
Update Script Paths
Ensure the paths to the model and config files in the script are correctly set:
model = "path/to/MobileNetSSD_deploy.caffemodel" config = "path/to/MobileNetSSD_deploy.prototxt"
-
Run the Script
Execute the script to start human detection:
python human_detection.py
-
Viewing Output
The video feed will display with bounding boxes drawn around detected humans. The script will beep when a human is detected.
-
Stopping the Script
Press 'q' while the video window is active to stop the script.
- No Frame Captured: Ensure your webcam or camera is properly connected and accessible. Adjust the
VideoCapture
index if needed. - Model Loading Issues: Verify that the model and config file paths are correct and that the files are not corrupted.
Feel free to fork the repository and submit pull requests. For issues or feature requests, please open an issue on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.