Inspiration
In the midst of a pandemic, we sense the grave urgency of patient treatment in order to prevent reaching full patient capacity in hospitals. As data scientists who are passionate about health and medicine, we wanted an easy tool that can be used by doctors and nurses to easily determine the severity of a patient's respiratory status based on chest radiographs. Our teammates who are experienced with front-end development are passionate about making the tool as user-friendly and accessible as possible.
What it does
We have developed a web app to detect both the occurrence of COVID and pneumonia in patients from their chest radiographs. To do this we have trained a series of machine learning algorithms (random forest, support vector machines, and logistic regression) to detect the presence of COVID; and a VGG16-based CNN (convolutional neural network) to detect the presence of pneumonia from the scans. We achieved validation (training, validation, test) AUC of 0.99 and 0.97 for both predictions respectively. From a user perspective, a user would upload their x-ray image in .jpeg format and the web app returns a data-table of predictions from each model.
How we built it
We sourced an open-source chest x-ray data set with labels for normal and pneumonia, and a subset of these individuals had labels for normal and COVID (n=6263, n=166). We used python sklearn, tensorflow and keras to build our machine and deep learning models. We employed a random forest, support vector machine, and logistic regression model to predict the occurrence of COVID (since the data subset was small). We additionally built a VGG16 model for the pneumonia classification model. We then built a web app using Flask and React. By using a React framework to create a web app, and using a Flask framework as the 'middleman', we are able to connect the machine learning model to the frontend React.js website. Also, we utilized Render.com to deploy our REST API, which allows us to get prediction results from the model when the user uploads an image at the frontend website.
Challenges we ran into
Within our team we had different domains of technical expertise and we found it difficult to blend the two. Half of our team were not familiar with frontend application whereas the other half were unfamiliar with machine learning. Needing to conduct our own research to ensure that both parts of our product was cohesive was a major challenge that we faced.
Accomplishments that we're proud of
Despite our varying skillsets, we're proud that we were able to learn from each other to understand how we could work on our own sections of the project that would make it easier for the other half of the team.
What we learned
The teammates who primarily work with machine learning have learnt about the use of .pkl files and Flask to deploy their models onto a web app, whereas the team members who worked on the front-end learnt how to retrieve data input from the user interface, feed them into the models and display the output results. We also learned that it is beneficial to have half the team working in a different timezone so that everyone can get some sleep at different times whilst always having someone working on the project.
What's next for X-Detect COVID
This innovative web app has the potential to be incredibly useful for hospital staff to sieve through thousands of x-ray scans daily to easily identify patients who need urgent treatment. However, a lot of work still has to be done including further testing to increase the accuracy of our predictions by using more testing samples or bootstrapping our models for them to be deployed to increase training time.
Log in or sign up for Devpost to join the conversation.