Skip to main content

Subscribe to Smithsonian magazine and get a FREE tote.

Gray Whales Are Getting Struck by Ships in San Francisco Bay. Could This New A.I.-Powered Tech Save Them?

A light-colored box that says WhaleSpotter on the side
The technology uses thermal cameras and artificial intelligence to detect whales based on the water spewed from their blowholes, which is slightly warmer than the surrounding water. WhaleSpotter

As they make their 5,000-mile migration from Alaskan waters to Mexico’s coast each fall, gray whales occasionally make a pitstop in San Francisco Bay. But these detours often turn deadly, with ships striking and killing the whales.

Now, scientists have come up with a possible tech-driven solution to this problem. They’ve created a new whale detection system that can be used to alert vessels in the area, prompting their captains to reduce their speed or alter their route to avoid colliding with the marine mammals. The team launched the system, which currently involves two thermal cameras monitoring the Bay, in late May.

The technology was developed over the last 15 years by researchers at the Woods Hole Oceanographic Institution, who created a company called WhaleSpotter to commercialize it. Other collaborators on the project include the U.S. Coast Guard’s Vessel Traffic Service, the nonprofit Marine Mammal Center and the University of California, Santa Barbara’s Benioff Ocean Science Laboratory.

It uses artificial intelligence and thermal cameras to identify whales up to four miles away.

Once alerted, the crew on a vessel nearing an animal will “be able to make adjustments way before they get anywhere close,” Thomas Hall, director of operations for San Francisco Bay Ferry, tells the Associated Press’ Annika Hammerschlag. “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.”

Did you know? Gray whale populations

Two populations of gray whales live in the North Pacific Ocean. One group lives near East Asia and Russia and is considered endangered by the International Union for Conservation of Nature, with an estimated 102 to 144 mature individuals remaining. The other lives along the West Coast of North America; it’s not endangered according to the IUCN, but it has suffered severe population losses in recent years.

Using hundreds of thousands of thermal images, researchers trained an A.I. tool to recognize temperature differences between the chilly ambient water in the Bay and the water spewed from the whales’ blowholes, which tends to be a few degrees warmer. When the technology detects an animal, a WhaleSpotter researcher first confirms the sighting before issuing an alert to nearby ships.

“Shipping is not going to disappear,” Daniel Zitterbart, an ocean physicist and the chief scientist of WhaleSpotter, tells Science News’ Carolyn Gramling. “We need to have a tech that allows us to use the ocean but also allows the whales to go about their lives.”

So far, researchers have installed one thermal camera on Angel Island and the other on the MV Lyra passenger ferry that runs between downtown San Francisco and Vallejo, reports Caelyn Pender for the Bay Area News Group. The cameras operate around the clock, and they can function in fog, darkness and other instances of poor visibility.

“It gives us eyes on the water 24 hours a day,” Kathi George, director of cetacean conservation biology at the Marine Mammal Center, tells the Bay Area News Group. “Whales don’t disappear at night or in the fog. This camera helps close that gap. It allows us to detect whales where we previously couldn’t.”

The collaborators hope to install additional cameras at sites like the Golden Gate Bridge, Alcatraz Island or other ferries. The dream, researchers say, is to create a network that could track individual whales “the same way you can track a bus as you’re waiting at the bus station with its approach, the arrival of your Amazon delivery truck, your Waymo,” Douglas McCauley, an ecologist who leads UC Santa Barbara’s Benioff Ocean Science Laboratory, tells the Bay Area News Group. “If we could do it for Amazon delivery trucks, we ought to be able to do it for, arguably, a more important use case.”

Researchers suspect gray whales have been venturing into San Francisco Bay because they are hungry. They spend their summers in the nutrient-rich waters of the Arctic, where they eat small protein-packed crustaceans called amphipods. But as climate change heats up the Arctic, amphipods are declining—which means gray whales are struggling to find enough food to power their long migrations to their breeding grounds near Mexico. As they travel along the coast of California, the starving and malnourished whales are ducking into San Francisco Bay in search of a meal.

However, many of the gray whales that swim into the Bay wind up dead. A study published in April in the journal Frontiers in Marine Science found that 18 percent of the identifiable whales that entered the Bay from 2018 to 2025 did not survive. Around 40 percent of the whale carcasses the team found during that time showed that the animals suffered lethal injuries from collisions with vessels. And those were just the instances scientists could confirm—they suspect the true number of fatalities is even higher.

The Bay is “the worst place possible in terms of all the ship traffic,” Rachel Rhodes, a data scientist at UC Santa Barbara’s Benioff Ocean Science Laboratory, tells the AP.

Overall, the gray whales that migrate along the West Coast, known as the eastern North Pacific population, have declined to about 13,000 individuals in recent years, the lowest number since the 1970s. That’s a sharp decrease from the 27,000 individuals estimated in 2016, so efforts to reduce human-caused whale deaths have taken on added urgency.

“Every single whale that comes in the Bay, we gotta get back out,” McCauley tells National Geographic’s Annie Roth. “If ever there was a moment to even be doing incremental gains, it would be right now.”

Get the latest stories in your inbox every weekday.

Email Powered by Salesforce Marketing Cloud (Privacy Notice / Terms & Conditions)