Inspiration

Pneumonia is an infection of lungs that may be caused by bacteria, viruses, or fungi. Reading X-ray images requires a lot of professional knowledge and experience. It is also "labour-intensive" since it requires doctors to analyze the images. During the outbreak of coronavirus, we are always short of resources and manpower. It would be nice if the deep learning algorithm can help us analyze chest X-ray images so the patients can get their chest results back almost the same time.

What it does

This web app allows users to upload an X-ray chest image and detects whether the chests are infected by Pneumonia.

How I built it

For the model, I built CNN using Keras to predict Pneumonia. I followed the structure of CNN: Conv -> MaxPool -> Conv -> MaxPool -> Conv -> MaxPool -> Conv -> MaxPool -> Dropout ->Fully Connected Layer Finally, the CNN classifier achieved an accuracy of 92%.

To deploy my project, I used flask to create a web app with basic functions of detecting Pneumonia. I never had any web development experience before and this was the first web app I made. It basically allows patients to upload their X-ray images and tell them the results, which can facilitate rapid referrals for the patients.

Challenges I ran into

The accuracy of the first CNN model I built was around 75%, which was relatively low compared to 92%. The reason was the dataset was a little unbalanced. To solve this problem, I used data augmentation which was a powerful technique to improve the dataset and balance the distribution. Also, my first CNN model was very simple. To improve my CNN model, I read some articles to learn how to improve the CNN model. Then, I added more layers, adjusted the parameters and changed the optimizers. Finally, I achieved an accuracy of 92%.

What's next for Pneumonia Detection

I believed there will be more AI medical applications in the future with some more bio-medical imaging datasets. Deep learning may produce a revolution in the world of medical image detection. In the future, doctors may not be required to analyze X-ray images, since machines can give us more accurate and objective results. However, at the same time, a series of problems may occur such as the responsibility of misdiagnosing. There is still a long way for AI medical detection to go.

Built With

Share this project:

Updates