San Francisco turns to AI to avoid collisions between ships and whales searching for food
SAN FRANCISCO (AP) — Ferries, cargo ships and tankers cut through choppy waters in the San Francisco Bay Tuesday as a whale surfaced nearby, its spout barely visible against the white caps. Until now, whales could easily go unnoticed by mariners, but an AI-powered detection network launched this week is designed to track them day and night.
The system, called WhaleSpotter, scans the bay around the clock for whale blows and heat signatures up to 2 nautical miles away, alerting mariners to slow down or reroute when whales are nearby.
“They'll be able to make adjustments way before they get anywhere close,” said Thomas Hall, director of operations for San Francisco Bay Ferry. “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 effort comes amid an alarming rise in gray whale deaths in the bay. Last year, 21 dead gray whales were found in the wider Bay Area — the highest number in 25 years, according to The Marine Mammal Center — with at least 40% killed by ship strikes. At least 10 more have died in the Bay Area so far this year.
Scientists say those figures likely underestimate the true toll as many whale carcasses sink or are swept back out to sea before they are ever found or reported.
Gray whales have long migrated along the California coast on their roughly 12,000-mile (19,300-kilometer) journey between breeding lagoons in Mexico and feeding grounds in the Arctic.
But instead of simply passing offshore, increasing numbers are now diverting into San Francisco Bay and lingering for days or even weeks inside the crowded estuary — a shift scientists increasingly link to climate change. Warming temperatures and shifts in sea ice in the Arctic are disrupting the food web gray whales rely on during summer feeding months, according to a 2023 study in Science, leaving many malnourished during migration.
Many whales now concentrate in a high traffic corridor between Angel Island, Alcatraz and Treasure Island, directly overlapping with ferry routes and shipping lanes.
“It’s the worst place possible in terms of all the ship traffic,” said Rachel Rhodes, a project scientist at the Benioff Ocean Science Laboratory who led the initiative. There have been so many collisions that “the teams responding to strandings said they ran out of places to even land dead whales.”
The eastern North Pacific gray whale population was once hailed as a conservation success story after rebounding from commercial whaling and being removed from the Endangered Species Act in 1994. But numbers have since plummeted, decreasing by half over the last 10 years, according to the National Oceanic and Atmospheric Administration. Just 13,000 remain.
“They may not be getting the quality or quantity of food they’re used to in the Arctic,” Rhodes said. “That means they’re starting this incredibly long migration at a disadvantage.”
Artificial intelligence automatically flags potential whale sightings, which are then verified by trained marine mammal observers before alerts are sent via radio to ferry operators, vessel traffic controllers and posted publicly on the Whale Safe website.
WhaleSpotter systems are already used on vessels and fixed installations such as lighthouses and coastal towers in the United States, Canada and Australia. But researchers say the San Francisco Bay network is the first to directly integrate land-based and vessel-mounted detections with official mariner alerts, allowing whale sightings to be relayed in near-real time to ships navigating the bay.
The first hours of testing produced an immediate flood of detections.
“Suddenly to have a full sense of how much whale activity is in this space honestly put me a little bit on edge,” said Douglas McCauley, director of the Benioff lab. “But we're going to use that data and we're going to be smart about how we use that space and share it with the whales.”
Researchers say the system’s biggest advantage is constant monitoring. Unlike human observers, thermal cameras can operate through the night and in many foggy conditions common in the bay.
One camera was installed on Angel Island and a second will soon be fixed aboard a ferry traveling between downtown San Francisco and Vallejo to create what Rhodes described as a “moving data collection platform.” Scientists hope additional cameras on the Golden Gate Bridge and Alcatraz could eventually expand coverage across the bay.
A severe marine heat wave lingering off the California coast is shrinking the band of cold, nutrient-rich water where krill, anchovies and sardines thrive. As offshore waters warm, humpback whales are increasingly following that prey closer to shore, where California’s Dungeness crab fishery operates.
The fishery uses tens of thousands of vertical lines that connect traps on the seafloor to surface buoys, creating entanglement hazards for whales migrating and feeding along the coast.
This spring, regulators again closed parts of the fishery off central California to conventional gear, a measure that has become increasingly common in recent years as warming waters increase whale overlap with crab fishing seasons.
While grey whales are also at risk, humpbacks are most vulnerable.
“Humpbacks are curious and they’ll scratch their backs on the gear,” said Kathi George, director of cetacean conservation biology at The Marine Mammal Center. “If they get a line caught on their body, they’ll breach and they’ll roll and end up entangling themselves.”
Whales can drag heavy gear for months, unable to dive or feed properly, leading to starvation, infection and drowning.
Thirty-six whales were confirmed entangled off the West Coast in 2024 — the highest number since 2018, according to NOAA — though scientists caution most cases go undocumented.
California approved commercial use of ropeless pop-up crab fishing gear for the first time this spring, which will allow fishermen to continue harvesting through the end of the season.
Instead of floating surface buoys tethered to traps, the system stores ropes and buoys on the seafloor until fishermen return and trigger an acoustic release that brings the gear to the surface.
Supporters say the technology allows fishermen to continue harvesting crab while dramatically reducing the risk to whales.
As climate change reshapes ocean conditions and whale migration patterns, scientists expect the overlap between whales, ships and fishing gear to persist.
“We will have to continue to be adaptive and science driven in terms of our management to reduce wildlife risk and keep fishermen on the water,” said Caitlynn Birch, Oceana’s Pacific campaign manager and a marine scientist. “California has been a national leader in developing whale-safe fishing technologies and we hope that model can help guide other fisheries on the West Coast and nationally.”
___
Follow Annika Hammerschlag on Instagram: @ahammergram.
___
The Associated Press receives support from the Walton Family Foundation for coverage of water and environmental policy. The AP is solely responsible for all content. For all of AP’s environmental coverage, visit https://apnews.com/hub/climate-and-environment
© Copyright The Associated Press. All rights reserved. The information contained in this news report may not be published, broadcast or otherwise distributed without the prior written authority of The Associated Press.



