CamSecure V1
A comprehensive, multi-mode video surveillance and threat detection system built with Python, OpenCV, DeepFace, and PyQt5. CamSecure V1 supports live feed monitoring, room scanning, thermal vision, and advanced intruder heatmap analysis, with audio prompts and logging.
Table of Contents
- Features
- Architecture & Modules
- Prerequisites
- Installation
- Configuration
- Usage
- Directory Structure
- Code Documentation
- Voice Commands
- License
- Repository
Features
Architecture & Modules
- app.py / main.py: Entry point; initializes PyQt5
MainWindow and starts the application loop.
- Detector: Core class handling camera capture, frame processing, motion detection, face recognition, thermal and advanced threat analysis.
- CameraWorker (QThread): Continuously fetches and processes frames across modes in a separate thread.
- MainWindow: PyQt5 GUI, sets up layouts, buttons, panels, video frames, log console, and integrates
Detector and CameraWorker.
- NetworkMeter & DeviceRadar: Custom QWidget classes for network speed gauge and device sweep radar.
Prerequisites
- Python 3.8+
- OpenCV
cv2
- DeepFace
- PyQt5
- pyttsx3
- SpeechRecognition
- NumPy
- SciPy
- Requests
Install dependencies via pip:
pip install opencv-python deepface pyqt5 pyttsx3 SpeechRecognition numpy scipy requests
Additionally, ensure you have:
- A working microphone for voice control
- A webcam for video capture
Installation
Clone the repository:
git clone https://github.com/BOSS294/CamSecure-V1.git
cd CamSecure-V1
2. Install the prerequisites as shown above.
3. Create necessary directories (if not auto-generated):
```bash
mkdir recordings logs screenshots known_faces recordings/live_feed recordings/room_scan recordings/thermal recordings/paranormal
mkdir recordings/advanced_feed threats
Configuration
- VIDEO_OUTPUT_DIR: Base directory for recording videos. Default:
recordings
- LOG_DIR: Directory for session logs. Default:
logs
- SCREENSHOT_DIR: Directory for saved screenshots. Default:
screenshots
- KNOWN_FACES_DIR: Directory to store registered face images.
- DeepFace Threshold: Cosine similarity threshold (0.7) for face matching.
- Frame Modes: Mode indices 0-3 correspond to live, room, thermal, and advanced respectively.
Edit constants at the top of main.py to modify paths or thresholds.
Usage
python main.py
- Click ▶ Start Detection to begin processing frames.
- ■ Stop Detection stops recording and merges videos.
- Register My Face captures and registers your face so it isn't flagged as unknown.
- Background Mode hides the GUI; say "open panel" to restore.
- Audio Command toggles voice control for commands.
- Use the mode buttons (Live Feed, Room Scan, Thermal Vision, Intruder Heatmap) to switch view.
Directory Structure
CamSecure-V1/
├── main.py
├── recordings/
│ ├── live_feed/
│ ├── room_scan/
│ ├── thermal/
│ ├── paranormal/
│ └── advanced_feed/
├── logs/
├── screenshots/
└── known_faces/
Code Documentation
Detector Class
CameraWorker (QThread)
- Runs
Detector.process_frame in a loop for each mode and emits frames.
MainWindow Class
- Sets up PyQt5 dark-themed GUI, video labels, control buttons, and log console.
- Connects button events to start/stop detection, register face, toggle modes, and voice commands.
update_frame: Receives frames from CameraWorker and displays them.
show_motion_analysis: Updates motion summary label and log.
Voice Commands
- "Analyse the room": Switch to Room Scan mode
- "Tell me about network": Reports network status
- "Last detection": Reads last detection summary
- "Open panel": Restores GUI in background mode
- "Export report": Copies log report to
recordings/report.txt
- "Register my face": Captures and registers face
License
This project is released under the MIT License. See LICENSE for details.
Repository
For full source code, issues, and contribution guidelines, visit:
https://github.com/BOSS294/CamSecure-V1