Ferries, cargo ships and tankers cut through choppy waters in the San Francisco Bay on Tuesday as a whale surfaced nearby. Until now, large whales could easily go unnoticed by mariners, but an AI-powered detection network launched this week is designed to track them day and night, providing crews with enough advance warning to avoid deadly collisions.

MSI previously reported that local officials and researchers had been warning that the animals were at greater risk from shipping traffic as the bay’s whale population grew in recent years.

The system, called WhaleSpotter, scans the bay using overhead cameras and thermal sensors for whale blows and heat signatures up to 2 nautical miles away, alerting mariners to slow down or reroute when the animals are nearby.

Thomas Hall, director of operations for San Francisco Bay Ferry, said the system represents a major improvement over the current method of relying on spotters or chance sightings from the bridge.

“They’ll be able to make adjustments way before they get anywhere close,” Hall told the Associated Press. “It will also allow us to track data over time and see where the whales are camping out so we can adjust our routes during whale season to avoid those areas completely.”

The deployment of WhaleSpotter comes as a marine heat wave in the Pacific Ocean has pushed whales closer to shore and into busy shipping lanes in search of food.

A spike in whale deaths along the California coast — with ship strikes documented as a leading cause of mortality for species such as humpback and blue whales — has accelerated efforts to develop technological solutions.

Researchers at the National Oceanic and Atmospheric Administration have documented elevated whale mortality numbers along the West Coast in recent months. Scientists have attributed part of the increase to the warming ocean, which shifts the distribution of the krill and small fish that whales feed on, pulling the animals across routes used by the region’s heavy vessel traffic.