Identifying rip currents using artificial intelligence

NIWA and Surf Life Saving New Zealand are working together to develop a state-of-the-art, rip current identification tool underpinned by artificial intelligence (AI) and deep learning technologies.

NIWA and Surf Life Saving New Zealand (SLSNZ) are working together to develop a state-of-the-art, rip current identification tool underpinned by artificial intelligence (AI) and deep learning technologies. 

The two organisations signed a Memorandum of Understanding to formalise this collaboration in 2021.

Rip currents are narrow, fast-moving segments of water that travel away from the shore. They can reach speeds of 2.5 metres per second, which is quicker than the fastest Olympic swimmer. This means that rip currents can sweep even the strongest swimmers out to sea. 

Rip currents are reported as the most hazardous safety risk to beachgoers around the world. A study published in 2013 in Australia revealed that they have killed more people on Australian territory than bushfires, floods, cyclones and shark attacks combined.

“This is only the beginning of our research together and our goal is to build even more effective, accurate and reliable beach safety tools for New Zealand beaches. The development of a rip current identification system is important research, and if proven successful the next challenge will be to determine how this science can be incorporated into the operational practices of Surf Life Saving New Zealand.”  

Adam Wooler, SLSNZ Special Projects Manager

Consistent and accurate rip current identification

Identifying rip currents is notoriously difficult because they do not have set boundaries like other objects, such as cars, animals, or buildings. 

This means that thousands of images containing rip currents are needed to train an AI-based model to identify them. The team first trained a model to classify 1000 different categories in over a million images (a technique known as transfer-learning) and then refined the model to learn how to classify rip currents on data available from an open-access archive of 1700 rip-current images and 700 images without rips. Rain and fog are added to train the model to recognise rips in real-time footage regardless of weather conditions.

This technique led to over 90% accuracy in detecting video footage and images of rip currents. In the image below, the “warmer” colours are where the AI is focusing – it gives a probability score that shows, with various confidence, that a potentially deadly rip current is in that area.

Making lifeguard-patrolled beaches safer

If operationalised, the tool could help overcome the variability in the experience level of lifeguards by enabling them to identify rip currents consistently and accurately, something that often takes several years of practice and local knowledge.

There is also potential to use cameras located at beaches on surf life saving clubs or similar buildings and/or drones to patrol beaches and the tool to then scan the video footage for rips and to notify beach goers of the presence of rip currents through an app. 

This season, thanks to funding from TSB, one of SLSNZ’s sponsors, Charlotte Becconsall, a member of Warrington SLSC in the South Island, is partnering with SLSNZ and NIWA to trial the AI tool through an App that she has developed.

Automated rip current identification 

Eventually the tool could even be used on beaches without lifeguards and notify beach goers of rip currents through an app.