illustration of a cellphone displaying photos of rashes

Credit: Johns Hopkins Magazine

Lyme selfies

Researchers look to AI to detect Lyme disease earlier

Long before the COVID-19 pandemic prompted a surge in telemedicine, John Aucott's patients would text and email him photos of their rashes. "My kids used to joke: 'Don't look at dad's phone because it's got pictures of people's body parts,'" Aucott says. "Every time my phone pinged, it felt like Groundhog Day because it was the same, over and over."

His phone is still pinging, but Aucott, director of the Johns Hopkins Lyme Disease Research Center, wants to see the photos—because he knows that untreated Lyme disease can portend debilitating long-term medical consequences, including damage to the heart, joints, and nervous system.

"You really have only one chance to diagnose Lyme early, and that's when you have the rash."
John Aucott
Director of the Lyme Disease Research Center

Lyme disease, first identified in the 1970s in Lyme, Connecticut—hence the name—is caused by the bacterium Borrelia burgdorferi, transmitted to humans by the bite of a blacklegged tick. Initial symptoms include fever, headache, fatigue, and a characteristic skin rash called erythema migrans, which sometimes looks like a target or bull's-eye. At this stage, which lasts anywhere from a few days to weeks, treatment with antibiotics can prevent chronic complications.

About 30,000 cases are reported to the Centers for Disease Control and Prevention annually by state health departments, though this is only a fraction of the cases diagnosed and treated around the country, according to the CDC.

Aucott can identify a Lyme rash from a photo, but most people can't. Many believe a Lyme rash always resembles a bull's-eye or target, but this happens in only about 20% of cases, he says. With the rest, the rash is round and uniformly red, and often dismissed as a spider bite. "People always misdiagnose their rashes, or they forget about them once the rash goes away," he says.

Images of rashes, including the erythema migrans rash associated with Lyme disease

Image caption: Examples of correct and incorrect visual identifications of the erythema migrans (EM) rash commonly seen in patients with Lyme disease. The images in the top right quadrant actually are EM (true positives). The upper left photos are false negatives, the lower left are false positives and the lower right were correctly ruled out as EM (true negatives). A new AI/deep learning technique from Johns Hopkins Medicine and the Johns Hopkins Applied Research Laboratory greatly increases the chances of correctly identifying EM in photographs.

Image credit: Johns Hopkins Medicine

"You really have only one chance to diagnose Lyme early, and that's when you have the rash."

To that end, he is collaborating with Philippe Burlina, a principal scientist at the Intelligent Systems Center in the Johns Hopkins Applied Physics Laboratory, using artificial intelligence to develop a smartphone app that can scan a selfie, recognize a Lyme rash, and alert patients when they need to see a doctor. "Everyone has a phone," Aucott says. "Even in places where they don't have computers, they have phones."

Burlina is an expert in artificial intelligence and deep learning, a subfield of machine learning where computers are taught to turn data into decisions—disease diagnostics, for example.

In this case, the scientists are training the computer with thousands of images of Lyme disease rashes, other skin conditions, and normal skin, and teaching it to distinguish among them. The early results, published in October 2020's Computers in Biology and Medicine, have been encouraging. "The machine analyzes patterns suggestive of a disease," Burlina says. "You teach the machine like you would teach a child, showing it by example."

The app won't be available anytime soon—right now the scientists are focused on the research—but they hope ultimately it will be an early warning system to motivate individuals to schedule in-person medical checkups. The idea is not to diagnose but to alert patients that their rashes need further scrutiny. "It's better to have an app check you than not have anything check you," Burlina says. "Being able to take a picture of your lesion and get an answer can prompt people to take care of it, which would be fantastic."

SciFri · Controlling The Lyme Disease Epidemic

The two scientists began working together in 2017 after a dinner party where Aucott met Sezin Palmer, APL's mission area executive for national health, who told him of the Lab's work using deep learning to identify inflammatory muscle diseases. "I asked whether something like that could work for Lyme rashes," Aucott recalls. "She put me in touch with Phil, and we started."

To train the computer, the researchers used skin rash images downloaded from the internet and photos from Aucott's clinical research. Most were taken "in the wild," meaning they were not shot in a studio setting by professionals, Aucott says. "You want the computer to train on all sorts of images so it will work well on cellphones," he says.

Several challenges remain, chief among them compensating for the lack of available images of rashes on dark-toned skin. The computer can't learn to detect Lyme rashes on dark skin if it isn't primed to do so; Aucott says of the thousands of images they found, fewer than a dozen were of dark skin. "The machine makes more mistakes when you present it with images of people with dark skin," Burlina says. "We want it to be as good for dark skin as it is for light skin."

Any app they eventually develop will likely need approval from the Food and Drug Administration. But the two scientists believe the technology, once in widespread use, could potentially spare many individuals the misery wrought by Lyme's chronic effects. "We would love to get this into people's hands," Aucott says.