Abstract
In the realm of home safety, the heightened risk of injury among unsupervised children, particularly from window-related falls, represents a significant challenge. This study introduces an innovative solution to mitigate such risks through a novel integration of technology and artificial intelligence. We propose a comprehensive system that harnesses the power of Deep Learning, specifically utilizing the YOLOv8n algorithm, in conjunction with a Raspberry Pi platform for real-time hazard detection. To address the critical aspect of data transfer, our system employs Firebase for efficient and timely communication between components. Acknowledging the limitations posed by initial model inaccuracies, our approach involved augmenting our dataset to ensure diversity and mitigate the risk of overfitting, thereby enhancing the model's predictive accuracy. This paper details our experimentation with various configurations, including an attempt to utilize YOLOv8x, which was ultimately revised to YOLOv8n due to computational constraints of the Raspberry Pi. The robustness of our system was rigorously tested across diverse scenarios involving windows and doors, establishing a comprehensive dataset that underscores the system's effectiveness. By integrating real-time detection with an intuitive user interface, our system offers a proactive tool for parents to enhance home safety for their children.
Introduction
Despite significant advancements in domestic safety technology, unsupervised children remain at high risk for severe injuries. In the United States, over four million children suffer injuries annually while home alone, with falls from windows being among the most critical incidents. While traditional CCTV systems are common, they often lack the "intelligence" required to autonomously identify specific hazards in real-time. This research addresses the gap by developing a system capable of distinguishing a child's proximity to hazards like windows and doors, operating on low-power hardware accessible to the average consumer.
System Architecture and Methodology
The proposed solution utilizes a three-tiered architecture designed for low latency and high reliability. The core of the system is an edge computing node—a Raspberry Pi—which performs the heavy lifting of computer vision and logic processing.
1. Target Detection and Data Capture
The system employs a Raspberry Pi equipped with a PiCamera. The software stack uses OpenCV for image handling and the YOLOv8n (Nano) model for object detection. While the more robust YOLOv8x was initially considered, the team pivoted to the Nano version to maintain a functional frame rate on the Raspberry Pi’s limited hardware resources.
2. Logic Layer and Hazard Detection
Beyond simple object identification, the system implements a Bounding Box Collision Detection algorithm. This logic calculates whether the bounding box identified as a "child" overlaps with or enters a predefined critical distance of a "window" or "door" bounding box. This spatial analysis is what transforms a standard camera into a proactive safety monitor.
3. Data Synchronization and User Interface
When a hazard is detected, the event data and associated images are stored as Binary Large Objects (BLOBs) in Firebase. This serverless backend facilitates real-time data synchronization with a mobile application developed using FlutterFlow. This ensures that parents receive near-instant push notifications regardless of their location.
Datasets and Training
To ensure high accuracy, the model was trained on two primary datasets sourced from Roboflow Universe:
- Window Detection: 9,515 images featuring diverse structures and lighting conditions (88% training, 8% validation, 4% testing).
- Door Detection: 1,000 images showcasing various designs in urban and rural settings (70% training, 20% validation, 10% testing).
Data cleaning was a critical step to help the model distinguish between doors and windows, which often share similar structural features. Increasing dataset diversity proved more effective for accuracy than simply increasing model complexity.
Results and Discussion
The system demonstrated strong performance in controlled environments. Window detection achieved an accuracy of 94.57%, while door detection reached 86.48%. The lower accuracy for doors is attributed to the smaller dataset and the greater visual variety inherent in door designs. The F1-confidence curve peaked at 0.846, indicating a successful balance between precision (minimizing false alarms) and recall (ensuring no hazards are missed).
A key insight from this work is the "Edge Computing Trade-off." The transition from YOLOv8x to YOLOv8n highlights that in safety-critical applications, latency is as important as accuracy; a highly accurate model is ineffective if it cannot process frames fast enough to prevent an accident.
Conclusion and Future Work
This study successfully integrates Deep Learning and IoT to create a proactive child safety tool. While effective, future iterations will focus on improving the frame rate through model pruning and quantization. Additionally, the authors plan to implement privacy-preserving mechanisms to anonymize video feeds and transition to native Flutter development for more robust notification handling and feature sets.
Summary updated