This project implements a real-time object detection system using YOLO (You Only Look Once) and OpenCV. It captures video from a DroidCam, processes the frames to detect objects, and triggers an alarm if a person is detected.
- Real-time object detection using YOLOv3.
- Alarm system that plays a sound when a person is detected.
- Adjustable frame size and FPS settings.
- Full-screen mode for the video display.
- Toggle alarm mode and stop alarm sound with keyboard inputs.
-
Clone the repository:
git clone https://github.com/Anthony01M/DroidCamMovementDetector.git cd DroidCamMovementDetector
-
Install the required dependencies:
pip install -r requirements.txt
-
Download YOLOv3 weights and configuration files:
-
Download COCO names file:
- Download the COCO names file from here.
- Place this file in the
models/yolo
directory.
-
Download Alert Sound:
- Download an alert sound file (e.g.,
alarm.wav
) from here - Place this file in the
alert
directory.
- Download an alert sound file (e.g.,
-
Install DroidCam Client:
- Download and install the DroidCam Application on your Android device from here.
-
Fix Configuration:
- Open the
config.yml
file and update every filed as needed.
- Open the
-
Run the script:
python main.py
-
Keyboard Controls:
- Press
t
to toggle alarm/detection mode. - Press
g
to stop the alarm sound. - Press
f2
to toggle full-screen mode. - Press
q
to quit the application.
- Press
This project is intended for educational purposes only. It should not be used for any malicious activities or to invade anyone's privacy. The authors are not responsible for any misuse of this software.
This project is licensed under the MIT License. See the LICENSE file for details.