Pneumonia detection

Pneumonia Detection using Machine Learning

 

Pneumonia is an infection that inflames the air sacs in one or both lungs. The air sacs may fill with fluid or pus (purulent material), causing cough with phlegm or pus, fever, chills, and difficulty breathing. A variety of organisms, including bacteria, viruses and fungi, can cause pneumonia.

Pneumonia can range in seriousness from mild to life-threatening. It is most serious for infants and young children, people older than age 65, and people with health problems or weakened immune systems.

Pneumonia is often diagnosed with chest X-Rays and kills around 50,000 people each year. With computer-aided diagnosis of pneumonia specifically, physicians can more accurately and efficiently diagnose the disease. In this project, we hope to train a model using the dataset described below to help physicians in making diagnoses of pneumonia in chest X-Rays.

Our problem is thus a binary classification where the inputs are chest X-ray images and the output is one of two classes: pneumonia or non-pneumonia

This project will help an individual to test whether human being has Pneumonia by simple uploading his chest X-ray and the model will predict whether the human being is infected or not.

With Ignite IT & Education Services, Dharamshala(H.P.),I got my first chance to build a Pneumonia detection project from scratch, I accepted the assignment without having second thoughts!

 

Planning phase-

We decided to use Google Colaboratory cloud platform for developing ourproject. The Google Colab is free cloud service provided by Google for academicians and learners like us for machine learning.Initially the technology was looking little bit complicated but soon after few days of working, I was getting comfortable. Soon the project started andwhen the approach was shared, I was feeling enthusiastic and fully ready to take on the project.

We decided to use Fast.Ai, a PyTorch based framework which is used to solve deep learning and machine learning related problems, along with Python and Pytorch for coding. Also we need a good computational power and storage which is provided by  GoogleColab.

We used dataset compiled by the NIH which contains 5,800+ chest X-ray images from unique patients.The dataset is available from Kaggle site with labelled images for Normal and Pneumonia.

Design phase-

In designing phase, we used top to down approach to solve this problem. We made small DFD(Data flow Diagrams) to understand the problem better. So, the next step was to write the code in Google Colab. We did coding using Fast.aiimage processing templatewhich helped me a lot to understand the codes and to know the inner working of deep neural network. The coding was done within 2 weeks.

 

Test Phase-

After the coding phase, the next step was to test the code. The code was working fine but the accuracy was less than 75%.  After some fine tuning and changing the parameters we couldreach the level of 95%accuracy. The accuracy was good and was matching global standards. Later, wetried various untrained test images to the model successfully.

 

Deployment Phase-

The most exciting phase was to deploy the Pneumonia detection model onto a website for the public use. All one need to do is to upload chest X-Rays image on the given URL and results are displayed instantly online by using our trained machine learning model and any user will come to know if that image is diagnosed positive with Pneumonia for further treatment!!

So overall a great sense of achievement, good feeling of satisfaction and solid learning we have while building this project!!

 

Divyam Dogra.

Govt. PG college Dharamshala.