Technique based on artificial intelligence detects Chagas disease using images taken with smartphone

When Brazilian immunologist Helder Nakaya visited Evandro Chagas Institute in Belém (the capital of Pará state, Brazil) in 2017, there was a commotion because one of its best microscopists was retiring and much of the knowledge used for fast and accurate identification of the protozoan Leishmania would be lost.

“I was dismayed by the waste of losing all that expertise, which it had taken decades to acquire. We began researching and trying to train a computer program to use this professional’s knowledge to identify microorganisms cheaply,” Nakaya told Agência FAPESP.

Five years later, a group of researchers led by Nakaya and scientist Mauro César Cafundó de Morais published the findings of a study showing that artificial intelligence can be used to detect Trypanosoma cruzi, the parasite that causes Chagas disease, in images of blood samples taken with a smartphone camera and analyzed by optical microscope.

“We got good results in this machine learning initiative. The algorithm works well for Chagas and can be adapted for other purposes that depend on images, such as analyzing samples of feces, skin and colposcopies,” said Nakaya, a principal investigator at the Center for Research on Inflammatory Diseases (CRID), a Research, Innovation and Dissemination Center (RIDC) funded by FAPESP and hosted by the University of São Paulo’s Ribeirão Preto Medical School (FMRP-USP). Nakaya is also a researcher at Albert Einstein Jewish Hospital (HIAE), Scientific Platform Pasteur-USP (SPPU), and Instituto Todos pela Saúde (ITpS).

One of the techniques used to diagnose Chagas is performed by microscopists trained to detect the parasite in blood samples. This requires a professional microscope, which can be coupled to a high-resolution camera, but the method tends to be too expensive and unaffordable for low-income patients.

Classified by the World Health Organization (WHO) as one of 20 neglected tropical diseases (NTDs), Chagas is a chronic infectious condition whose prevention requires control of its vectors, the triatomines (kissing bugs), and hence a response by public health services.

Endemic in 21 countries in the Americas, infection by the parasite Trypanosoma cruzi affects some 6 million people, with an annual incidence of 30,000 new cases in the region, leading to 14,000 deaths per year on average. Some 70 million people are estimated to risk contracting the disease because they live in areas exposed to triatomines.

Deaths from Chagas are trending down in Brazil, but even so they averaged 4,000 in the past decade.

Machine learning

The machine learning approach developed by the researchers was based on a random forest algorithm trained to detect and count T. cruzi trypomastigotes in mobile phone images. Trypomastigotes are the extracellular form of the protozoan and the only stage that circulates in the bloodstream of patients with acute Chagas.

Images of blood smear samples taken with a camera capable of 12 megapixel resolution were analyzed to arrive at a set of features common to 1,314 parasites, including morphometric parameters (shape and size), color and texture.

In this part of the study, parasite specialists João Santana Silva, Paola Minoprio and Ricardo Gazzinelli trained the algorithm to recognize T. cruzi, assisted by machine learning and image processing specialists Roberto Marcondes César Jr. and Luciano da Fontoura Costa.

The features were divided into training and testing sets and classified using the random forest algorithm. The resulting values for accuracy and sensitivity were considered high (87.6% and 90.5% respectively).

The researchers also analyzed the area under the receiver operating characteristic curve (AUC-ROC), a graphical representation widely used to assess diagnostic accuracy and optimal test cut-off. The result was 0.942, considered outstanding (the higher the area under the curve, the more accurate the test).

The authors conclude that automating the analysis of images acquired with a mobile device is a viable alternative for reducing costs and gaining efficiency in the use of the optical microscope. “The point is to generate images and analyze them under a microscope that can be sent to remote parts of Brazil. The app itself must say whether they are images of the parasite that causes Chagas. It’s therefore important to have a robust and affordable microscope that can collect the images automatically,” Nakaya said.

The algorithm is open software so that the scientific community can contribute data and resources, he added, noting that obtaining a supply of low-cost microscopes is a challenge.