Inspiration

Doctors are constantly operating in a high-stress environment having to diagnose medical conditions using imaging techniques such as X-rays. Misinterpretation of chest X-rays occurs even for highly-skilled doctors. Therefore, substantial research is being done by data scientists and researchers in leveraging deep learning techniques to build diagnostic tools for medical image processing that can be of valuable second opinion for doctors and improve the quality of diagnosis. These deep learning models need to be combined with user-friendly front-end that can reduce cognitive load and help expedite diagnosis.

Inspired by this and combined with my passion for AI as well as curiosity in developing a mobile app that incorporates AI technologies, I came up with this idea of building an Android application that can detect pneumonia when fed with chest X-ray images.

What it does

Users can upload a chest X-ray image by taking a picture of the image with the Pneumonia Detector or download it from their camera roll. When a chest X-ray image is uploaded into the Pneumonia Detector, it is fed into a trained deep learning model embedded within the application which will provide a prediction whether the patient has a Normal chest X-ray or is infected with Pneumonia as well as the probability.

How I built it

For this project, a convolutional neural network (CNN) was trained with Python and Tensorflow using Google Colab notebook and an Android application was developed using Flutter.

The key to the Pneumonia Detector is to train the CNN model to a high accuracy with a large volume of chest X-ray images. 5,863 chest X-Ray images (JPEG) that are classified into 2 categories (Pneumonia/Normal) were acquired from a public repository. Then, I leveraged a technique called transfer learning to train the CNN model that is able to predict if a chest X-ray is Normal or is infected with Pneumonia to an accuracy rate of 93%.

While the CNN model was being trained, I developed my application with Flutter. Once the CNN model is fully trained, it is then converted into Tensorflow lite so that the model can be deployed on the android application.  

Challenges I ran into

Since I have little experience in android development, the biggest challenge was developing the front-end application. I had to refer to documentations and coding tutorials along the way from setting up the development environment to the working product.

Accomplishments that I am proud of

Through this project, I managed to apply my deep learning skills on an entirely new dataset while learning how to develop an android application that incorporates AI algorithm from scratch.

What I learned

My biggest takeaways from this project are the basics in android application development using Flutter and learning about the technologies involved in incorporating AI algorithm in mobile and web applications.

What's next for Android Pneumonia Detector

This Pneumonia Detector can be extended to a more sophisticated diagnostic tool that does not only detect pneumonia but also identify and localize other chest abnormalities from chest radiographs.

Built With

Share this project:

Updates