
In the United States, there are approximately 4,000 unintentional drowning deaths each year, and drowning is the leading cause of death for children ages 1-4. While lifeguards play a crucial role in preventing these tragedies, individuals can still slip past their sight and beneath the surface. According to the National Drowning Alliance, 88% of child drownings happen when at least one adult is present. Having lifeguards or adults watching the pool is often not enough.
At crowded water parks, cruise ships with multiple pools, and busy hotel chains, it’s nearly impossible to keep track of every swimmer. This makes a lifeguard’s job both high-stakes and incredibly stressful. Just this week, a 9-year-old child drowned in the wave pool at Hersheypark, despite lifeguard supervision.
Drowning can happen in seconds. While it may take up to three minutes for a person to lose consciousness, lifeguards have only moments to respond. Panic can accelerate oxygen loss, making early detection critical.
There are 10.7 million residential pool owners in the U.S., many of whom rely on alarms to monitor when someone enters the pool. But these systems only detect entry; they cannot track what’s happening once someone is in the water or alert anyone if the person remains submerged.
Computer vision, particularly systems powered by deep learning, offers a powerful solution for early drowning detection. Whether supporting lifeguards at public pools or acting as a security layer at private homes, these systems can detect when someone goes underwater, start a timer, and trigger alerts if they remain submerged too long. This can prompt immediate attention from a lifeguard or notify emergency responders when no one is on duty.
Lifeguards will always be essential for monitoring swimmers and responding in emergencies. Computer vision can act as an extra set of eyes, helping track everyone in the water and flag irregular behavior. It adds a vital layer of protection in environments where safety can never be taken for granted. To better understand how this technology can be built and deployed in the real world, I developed my own computer vision drowning detection system using Roboflow’s tools. Here’s how I did it.
How to Build an AI-Powered Drowning Detection System
I used Roboflow’s RF-DETR model to train a computer vision system that detects when someone remains underwater for over 30 seconds, triggering an alert to notify a lifeguard to monitor that individual.
To start, I collected training footage by filming myself treading water and submerging for different time intervals. I could have also used publicly available footage, such as lifeguard training videos that show swimmers both above and below the surface.
Once I had my footage, I uploaded it to Roboflow’s Batch Creator and used the video-splicing tool to generate 300 still frames. I then applied box prompts to detect myself in each frame and annotated whether my head was above or below the surface, labeling each image as either “above” or “below.” As the model improved, I accelerated the process by leveraging Roboflow’s auto-labeling capabilities.

After training my model to distinguish between above and below surface states, I used Roboflow’s Workflows to test my model’s performance and add logic for real-world deployment. I included a detection filter and a time in zone block, so that whenever the model detected a “below” label, it started a time. If I stayed underwater for more than 30 seconds, the model was trained to trigger an alert to notify a lifeguard or security system of suspicious underwater activity.

With my Roboflow workflow, I tested my model by uploading new footage of myself above and below the water to see if it could correctly detect the difference and trigger an alert when I was submerged. A short demo of my final deployed model using the new RF-DETR model is shown below:
Computer Vision’s Life-Saving Larger Implications
The commercial potential of a drowning detection model is significant. In the section below, I’ll explore how, and why, this technology can be applied across home security providers, cruise ships, water parks, universities, and gyms.
Home Security Providers
The home security industry is highly competitive, with major players like ADT, Brinks, and Vivint Home Security battling for market share. These companies, alongside smaller providers, have an opportunity to differentiate their offerings by integrating computer vision into existing camera systems. This goes beyond basic motion detection or identifying movement between rooms. With computer vision, systems can identify what triggered an event, such as recognizing that a dog, not an intruder, opened a doolr, and tailor alerts based on the context.
Beyond these enhanced capabilities, computer vision also presents a more powerful opportunity: helping protect America’s 10.7 million residential pool owners. By enabling cameras to detect when someone is underwater and how long they remain submerged, these systems can trigger alerts if a person is underwater for over a minute. Parents of young children are already investing in safety products like fences, alarms, and covers, with the global pool safety equipment market valued at $1.3 billion in 2023 and projected to double by 2030. Their concern is justified, as 23% of child drownings occur during family gatherings near pools.
Insurance companies also stand to benefit. By incorporating drowning detection into their offerings, they can appeal to parents investing in their children’s safety while reducing risk, lowering liability, and offering discounted premiums. And for security providers, the barrier to implementation is low, especially with software like Roboflow’s which can directly integrate within existing camera systems.
Cruise Ships and Water Parks
Cruise ships and water parks operate multiple pools that often become crowded, especially during peak seasons. While lifeguards play a vital role, they cannot watch everyone at once. Computer vision adds a critical layer of support, detecting when someone is beneath the surface too long, and assisting lifeguards in monitoring large, busy areas.
An average cruise ship may have one or two pools, but larger vessels like Royal Caribbean’s Icon of the Seas boasts as many as seven. Despite this, many lines, including the largest cruise line Carnival, do not hire lifeguards. Carnival could use their existing onboard security cameras to implement this technology and help ensure tragedies such as a six-year-old boy drowning on a Carnival ship never happen again.
Universities and Gyms
Universities and gyms with pools should also invest in computer vision drowning detection. During high school, I taught swim lessons at a private pool while a lifeguard was on duty. One day, I noticed someone struggling to stay afloat on the other side of the pool. The lifeguard didn’t see it, and I swam over and pulled the person up just in time. Had I not been there, the outcome might have been very different. For every fatal drowning, two non-fatal drownings occur, which can lead to brain damage from lack of oxygen. Hence, even when a life is saved, catching a drowning person earlier can mean the difference between full recovery and lasting harm.
An extra set of eyes can mean the difference between life and death, even if they come in the form of software.
Cite this Post
Use the following entry to cite this post in your research:
Sylvie Goldner. (Jul 28, 2025). Building a Drowning Detection Model with Computer Vision. Roboflow Blog: https://blog.roboflow.com/building-a-drowning-detection-model/