There is a severe shortage of qualified healthcare practitioners in the continent of Africa. According to WHO(World Health Organization) Report on the state of healthcare in Africa, There is a ratio of 5 healthcare workers per 10,000 population which seriously affects the access a large number of the population have to quality healthcare. There is a need to bring quality healthcare closer to the underserved people of Africa and PneumoDoc aims at contributing towards this cause by providing state of the art examination of X-rays to predict diseases.
What it does
PneumoDoc predicts if a patient has pneumonia or not from X-rays. The Doctor or Radiologist can signup to the platform and make predictions on the X-ray images by uploading the images to the webapp and the model runs inference on the image and returns the prediction. This is a very useful feature in regions where qualified radiologists are scarce.
How we built it
The model was built using tensorflow and keras in google colab. Data collection wasn't much of an issue as Kaggle already provided a dataset of chest X-ray with Pneumonia which was used to train the model. The dataset contained 5,856 images of which contained 4,273 pneumonia images compared to 1,583 images of normal X-rays. Different models were used to train the data to find the one that would give the best results and Densenet121 model was used to train the model while freezing the first few layers. An accuracy of 91% was obtained. After model was built and exported, it was served using tensorflow serving and Docker to containerize the model image after which it was deployed on google cloud and kubernetes. The webapp built then makes calls to the api once an image is uploaded for inference and returns the predictions.
Challenges we ran into
Getting a decent dataset for training the neural network proved an issue especially due to limitations in compute power and Internet access. For such a demanding task, a much larger dataset should have been utilized but due to limitations with Internet access that couldn't be accomplished. The dataset used was also unbalanced and the class weights needed to be adjusted in the ratio of the classes to help normalize this effect.
Accomplishments that we are proud of
I worked on this project alongside 4 brilliant Engineers who worked tiredlessly to make this project a reality and I am very proud to have worked with them. Most of the Machine learning projects we usually work on don't usually make it to the deployment stage we just work on them and once the accuracy is good enough it basically ends there but this project was built from scratch to becoming an app that can be used by Healthcare workers to make predictions on X-rays really makes us proud and it's only a matter of time before we build an app utilizing AI for social good that would take the world by storm.
What we learned
Working on this project was for some of us the first time trying out some Computer vision techniques. While trying out different model architectures that would make the best predictions on the dataset, we tried implementing transfer learning and it was our first time trying it out and it proved useful as Densenet121 architecture proved the best architecture for making good predictions. We also learned how best to deploy machine learning models into production. Tensorflow serving proved really useful in deployment and I got a firsthand experience with it. I also learnt the DevOps side of machine learning.
What's next for PneumoDoc
The model currently being used by the webapp can still be improved. Currently the model has an accuracy of 91% but in using deep learning for delicate tasks like predicting diseases, predictions have to be spot on most of the times and with improved data collection by users of the app, the model would be improved to make better predictions. We also intend to give it a tryout with healthcare practictioners so they can understand how deep learning can make their jobs easier and collaborate with them on more projects so the platform can be expanded from just pneumonia prediction to many more diseases.