This project involved designing and developing a real time/live Smart Intrusion Detection System (SIDS) using Python, OpenCV and a pretrained YOLOv4-tiny model. The system was designed to analyse CCTV footage, detect people and vehicles, and identify suspicious movement inside a custom intrusion zone. Suspicious movement was classified as either loitering or intrusions to support situational awareness and security responses from potential clients.
The system used OpenCV’s DNN module to load YOLOv4-tiny model files and process pre recorded attempted break in footages. For testing purposes I chose a CCTV recording published by the Daily Mail. I defined a polygon based “no go zone” and used point in polygon logic to determine whether a detected object had entered the restricted area. I also filtered out unwanted COCO classes that interfered with the footage, used Non Maximum Suppression to reduce overlapping detections, and applied frame skipping to balance playback speed with detection accuracy.
The project went beyond basic object detection by adding event state logic. Within the main build’s code I integrated Pushover’s API to achieve this workflow: When a person entered the monitored zone, the system displayed a loitering alert, logged the event, sent a Pushover notification to the client’s phone or desktop and saved a timestamped snapshot to a secure local directory. If the person remained in the zone for a longer period (more than 5 seconds), the alert escalated to an intrusion event with a red alert appearing on the screen as well has a notification push with an alarm tone. After this, evidence is captured for audit and review.
A key challenge was achieving smoother playback without sacrificing detection quality. I addressed this by using CUDA GPU acceleration, adjusting detection thresholds, tuning the intrusion zone boundaries and reducing unnecessary processing. The result was a working intrusion detection system (with an alert system) ready to be deployed.
Below is a comprehensive walkthrough of my SIDS: