CARLSBAD — A recent study of Instagram photos found that Carlsbad ranks among the happiest U.S. beach cities of its size.
Beach.com collected 100,000 photos from the social media platform and ran them through an artificial intelligence model called DeepFace to identify expressiveness and happiness in coastal communities. The study analyzed 100 beach towns and cities within 25 miles of a coast and with fewer than 250,000 residents.
Carlsbad ranked 10th on the list, just ahead of neighboring Oceanside, which placed 13th.
DeepFace is an open-source facial recognition system developed by researchers at Facebook.
Noah Holtgraves, lead data journalist for Beach.com, said DeepFace recognizes seven broad emotions and assigns each a confidence score. The emotion with the highest confidence score is considered the primary emotion. If multiple people were expressing happiness in a photo, that helped boost the overall score.
“The more happy faces, the higher the score. The more confident AI is in that happiness, the higher the score,” Holtgraves said.
For each municipality — the 100 most populous with fewer than 250,000 residents and within 25 miles of the coast — researchers collected the 1,000 most recently posted public, geo-tagged photos. They discarded images without faces, leaving 85,019 photos to process, according to the study.
The population and location limits excluded coastal cities like Solana Beach, Encinitas, and Del Mar, but included San Marcos and Escondido, ranking 22nd and 37th, respectively, among the happiest coastal cities.
Holtgraves said the strong showing from North County San Diego reflects what locals already know.
“We’re looking for places that are not just gorgeous,” he said. “Not just perfect coastal escapes that look great in pictures, but where the community, the locals and the visitors also feel that sort of happiness.”
Carlsbad Mayor Keith Blackburn said that message fits with what the city offers.
“Carlsbad’s beaches and the seawall are where people come to connect, whether they’re walking at sunrise and sunset, surfing, or simply enjoying the ocean views,” Blackburn said in a statement. “That connection is what makes Carlsbad not only a beautiful beach city to visit, but a wonderful place to call home.”
In addition to overall happiness, the analysis found that Carlsbad was an expressive city. Holtgraves said DeepFace had little difficulty identifying emotions on people’s faces in Carlsbad, which ranked 11th in terms of expressiveness. Oceanside ranked fourth.
“AI was pretty easily able to detect which emotions it was seeing, and since it scored high overall, they were mostly happy ones,” he said.
Other top 10 cities for happiness included Charleston, South Carolina; Savannah, Georgia; and Huntington Beach.
