New AI Listens to Toilet Sounds to Detect Diarrhea
Dec. 27, 2022 — Artificial intelligence has achieved another milestone: Discerning the sound of an unhealthy bowel movement.
A design for a “Diarrhea Detector” that could alert health officials to disease outbreaks like cholera was recently presented by engineers from the Georgia Tech Research Institute. Someday, the AI could even be used with home smart devices to monitor one’s bowel health.
A prototype accurately identified diarrhea 98% of the time in tests, the engineers told a conference of the Acoustical Society of America in Nashville. Even with background noise, it was correct 96% of the time.
Cholera infects millions of people each year, killing up to 143,000 who become dehydrated from severe diarrhea, according to the World Health Organization. Many deaths could be avoided with an oral rehydration solution if the outbreak is spotted fast enough. Cholera can be lethal within 24 hours after symptoms start.
The device could be installed in public toilets where inadequate plumbing raises the risk for a cholera outbreak.
“Cholera typically has a more watery sound to it — it can sound a lot like urination and it doesn’t have a lot of the flatulence notes in general,” says project co-lead Maia Gatlin, an aerospace engineer and PhD candidate at the Georgia Tech Research Institute. “That someone is having severe diarrhea, and that they are having a lot of it — that can be captured.”
The idea grew out of conversations about how COVID-19 can be monitored by analyzing sewage, says project co-lead Alexis Noel, PhD, a biomechanics engineering researcher at the institute.
Other researchers have considered video analysis to look for diarrhea.
“I was curious if we could detect diarrhea using sound,” Noel says, “as some folks are a little wary about having a camera pointed at their bum in the toilet.”
First, the researchers gathered 350 publicly available audio samples of bathroom sounds from YouTube and Soundsnap. Some clips had up to 10 hours of diarrhea noises.
The researchers listened to the samples to establish authenticity.
“We didn’t know these people, we didn’t know how they recorded, so we had to listen to a good bit,” Gatlin says. “There were definitely lots of fart sounds where we were like, ‘That’s not a fart, that’s someone blowing into their elbow.’”
The sounds of defecation, urination, flatulence, and diarrhea were converted into spectrogram images. A computer analyzed those images for about 10 hours using a “convolutional neural network.” The software, using trial and error, teaches itself how to identify the subtle similarities between diarrhea spectrograms and how they differ from other toilet sounds.
For example, urination has a consistent tone and defecation may have a singular tone. Diarrhea’s sound is more random.
Once the AI learning process was complete, the researchers loaded the diarrhea-decoding algorithm onto a Raspberry Pi, a computer roughly the size of a credit card that costs less than $50. Georgia Tech student Cade Tyler 3D-printed a case for the motherboard with a microphone connection, a series of lights (green for acquiring a signal, red for diarrhea, and orange for “other”), and the words “Diarrhea Detector” inscribed on the surface.
The computer takes a 10-second audio recording, which is converted to a spectrogram and fed to the algorithm. The whole process takes only seconds.
The next iteration of the device would send a report via Wi-Fi or other wireless communication signal to a database, so public health officials can monitor for disease outbreaks.
“We’re not collecting anything identifiable about people,” Gatlin says.
The researchers have not yet determined how many of these devices would be needed to cover a community, or where the ideal placement would be.
The algorithm still needs to be refined using better audio data collected in controlled conditions, from people who have provided informed consent, Gatlin says. Gatlin also hopes to train the AI to work in outdoor latrines, which are common in areas without functioning sewage systems.