Affordable home surveillance systems increasingly require on-device intelligence to mitigate privacy risks, network dependency, and response latency associated with cloud-based video analytics. This research develops an edge-based person detection system utilizing a quantized MobileNetV2 architecture (α = 0.1) deployed on an ESP32-CAM module, integrated with the Message Queuing Telemetry Transport (MQTT) protocol for real-time alert delivery. To construct the dataset, image data were collected via a motion-triggered acquisition setup employing a passive infrared (PIR) sensor, resulting in a total of 500 manually labeled images categorized into person and non-person classes. The model was trained in over 40 epochs with a learning rate of 0.001, utilizing data augmentation and INT8 quantization to optimize embedded deployment. Performance was evaluated using a 23% testing split (116 unseen images), yielding an overall accuracy of 78.45%. For the person class, the model achieved 90.00% precision, 77.78% recall, and an 83.44% F1-score. On-device deployment via TensorFlow Lite required a peak RAM of 485.4 KB and 102.1 KB of flash memory. The average inference time was recorded at 1018 ms per frame, which limits continuous high-framerate processing but remains feasible for basic surveillance at approximately 1 frame per second. Finally, MQTT communication via an EMQX broker successfully transmitted detection alerts and image links to a mobile application for real-time monitoring and storage.
Copyrights © 2026