Machine learning has many applications in healthcare. We thought it would be beneficial to combine our AI and computer science knowledge to create something that could help healthcare professionals and save lives.

There are over 1 million hospitalizations due to pneumonia in the US every year, and over 50,000 lives are lost each year. Our project could help healthcare professionals detect and treat pneumonia faster.

What it does

We have a basic UI where people can input an Xray image to the web app. The image then gets passed through the neural network, which then outputs a value of 0 (normal) or 1 (pneumonia detected).

How we built it

We used HTML/CSS/Javascript for the frontend, and Python with Flask for the backend. Our neural network was built and trained using Pytorch, which is a machine learning framework. Our neural network architecture is Resnet-18, which primarily consists of residual blocks, which allow for depth without having to worry about the vanishing gradient problem, and convolutional layers, which are commonly used in image classification tasks. Convolutional layers are particularly useful because they allow the model to create a "feature map" and look for specific features within the image.

Challenges we ran into

We ran into a lot of trouble with the neural network. Our training data included significantly more pneumonia images than normal images, which affected our accuracy. We weren't able to solve this problem, but given more time, we would add a weight to our optimizer.

Accomplishments that we're proud of

We're proud that the neural network was able to detect pneumonia fairly accurately.

What we learned

We had never used Flask before, so we learned how to implement a successful web application using the framework. We're also relatively new to Pytorch and machine learning in general, so there was a lot of trial and error involved.

What's next for Pneumonitor

In the future, we are looking to add a multi-file upload feature that will allow doctors or other health care professionals to use our web app with multiple x-ray images. We also hope to experiment with different architectures to achieve higher accuracies.

Share this project: