Smart Surveillance System is a desktop application for real-time face detection and recognition.
It frees security personnel from routine monitoring by automatically detecting, identifying, and alerting on “wanted” individuals in live camera feeds.
• Real-time face detection (MTCNN, Dlib HOG, Haar-cascade)
• Face embedding via FaceNet (128-dimensional vectors + triplet-loss)
• Face classification with SVM (trained on embeddings)
• Add new suspects: capture name, metadata, profile image
• “Align” & “Train” workflows to preprocess and fit new faces into the model
• User management with login (SQLite backend)
• Simple PyQt5 GUI: Start/Pause stream, Add/Search/Train suspects, Manage accounts
• Instant pop-up of recognized suspect’s full profile
Hardware
• Logitech (or equivalent) webcam, 30 fps, ≥340×240
• PC with ≥2 GHz CPU, ≥8 GB RAM, GPU recommended for TensorFlow
Software
• Python 3.7+
• OpenCV
• TensorFlow
• MTCNN (npy models)
• Dlib
• PyQt5
• SQLite3
• NumPy, SciPy
• scikit-learn
- Clone the repo:
- Create and activate a virtual environment:
- Install dependencies:
- Download pretrained MTCNN (
det1.npy,det2.npy,det3.npy) into./models/mtcnn/ - Download FaceNet model (
20180402-114759.pb) into./models/facenet/ - Initialize the SQLite database:
- Launch the GUI:
- Login with an existing account or create a new one via the “Add Account” tab.
- Add Suspect: enter name, gender, race, birth year, criminal record, profile image & training folder.
- Align: preprocess all raw images into aligned faces.
- Train: build/update the SVM classifier (
classifier.pkl) on all aligned embeddings. - Start: begin live video stream; recognized faces will trigger a pop-up with full profile.
- Pause: temporarily halt detection/recognition.
- Search: retrieve any suspect’s stored profile by ID, name, or race.
- Face Detection
• MTCNN: 3-stage CNN (P-Net, R-Net, O-Net) for fast, accurate bounding-box + landmarks
• Dlib HOG + linear SVM
• OpenCV Haar cascades - Feature Extraction
• FaceNet maps each face → 128-dimensional vector
• Triplet loss minimizes same-identity distances, maximizes different-identity distances - Classification
• SVM (linear kernel, probability outputs) over embeddings
• Decision boundary defined by support vectors
• Unit & integration tests for database, detection, embedding, classification
• Accuracy evaluations on held-out video sequences
• Real-time performance stress tests at 30 fps
