Smart Pool Rescue System is an end-to-end First AI and IoT-based drowning detection and automated rescue system in Egypt. It uses computer vision to detect when someone is drowning in time. Unlike many detection-only solutions, it integrates AI detection, automated rescue, cloud communication, and human verification into a single emergency response
# 🏊 Smart Pool Rescue System
**An end-to-end AI & IoT platform for real-time drowning detection and automated rescue.**
---
## 📖 Overview
Smart Pool Rescue is an end-to-end AI and IoT platform that detects drowning incidents in real time and automatically triggers a physical rescue response. Most existing solutions stop at detection and alerting — this project goes a step further by closing the loop: **AI detection → cloud sync → automated hardware rescue → human verification**, all in a single pipeline.
A fixed above-water camera continuously monitors the pool. Computer vision models track swimmers and classify their behavior as normal swimming or potential drowning. When a drowning event is confirmed, the system pushes the event to Firebase, activates an ESP32-controlled motorized rescue net, and instantly notifies the lifeguard through a mobile app — who can review the alert and reset the system once the swimmer is safe.
## 🚨 Problem Statement
Traditional pool safety relies on continuous human observation, which is vulnerable to fatigue, distraction, and delayed reaction time — drowning can happen silently within seconds. Existing AI-based solutions typically focus only on detection and notification, still depending on a human to physically respond in time. Smart Pool Rescue closes that gap by automating the rescue action itself, while keeping a lifeguard in the loop for final verification.
## 🎯 Objectives
- Real-time drowning detection using deep learning
- Swimmer detection and tracking with YOLO
- Automatic activation of a motorized rescue net via ESP32
- Real-time cloud synchronization through Firebase
- Instant push notifications to lifeguards via a mobile app
- Human verification and system reset after rescue
## 🏗️ System Architecture
```
Above-Water Camera
│
▼
YOLOv8 Detection & Tracking → identifies and tracks swimmers
│
▼
Deep Learning Classifier (ResNet50 / MobileNetV2)
│ (drowning vs. swimming)
▼
Decision Logic → Fir …