from fastai2.vision.all import *
from fastai2.vision.widgets import *
This is a quick prototype developed for Lumiata Covid-19 Global AI hackathon event.This application loads the trained deep learning model and classifies the uploaded chest X-ray into any of the following category
Covid-19 data : https://github.com/ieee8023/covid-chestxray-dataset/tree/master/images (Joseph Paul Cohen and Paul Morrison and Lan Dao)
Normal Chest X-ray, Pneumonia Chest X-ray images: https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia (Kermany, Daniel; Zhang, Kang; Goldbaum, Michael (2018),)
When businesses reopen, we need a effective way to test masses. We need a tool to identiy covid-19 symptoms that is cheap, fast,easy to scale, and use existing infrastructure. Also after a successful diagnosis, we need to answer additional questions like:
Currently, our team is focused on building a diagnosis tool, and we are working on answering the above questions and add these additional features in our tool. In medical AI tools, it's important to be transparent about the model error metrics, data collection, peer review, and clinical study. We will be releasing these details along with our product.
from fastai2 import __version__
path = Path()
learn_inf = load_learner(path/'export.pkl', cpu=True)
btn_upload = widgets.FileUpload()
out_pl = widgets.Output()
lbl_pred = widgets.Label()
btn_run = widgets.Button(description='Analyse')
def on_click_classify(change):
img = PILImage.create(btn_upload.data[-1])
out_pl.clear_output()
with out_pl: display(img.to_thumb(128,128))
pred,pred_idx,probs = learn_inf.predict(img)
lbl_pred.value = f'Prediction: {pred}; Probability: {probs[pred_idx]:.04f}'
btn_run.on_click(on_click_classify)
display(VBox([widgets.Label('Select your X-ray'), btn_upload, btn_run, out_pl, lbl_pred]))
VBox(children=(Label(value='Select your X-ray'), FileUpload(value={}, description='Upload'), Button(descriptio…
The deep learning model was developed using fastai framework and deployed using voila and render.
In applications like using AI in medicine, it's highly important to understand the reason behind a model prediction. For this explainability, we have started with coloring the area where our model focuses more for making some prediction. In future, we are planning to combine this with natural language processing to generate more reasoning behind our model predictions
We would like to thank the dataset providers (cited above) for making the dataset available for public access, also thank you Jeremy Howard and Team for creating fastai and making it accessible to everyone. Finally, we would like to thank the hackathon mentors and organisers for giving us an opportunity to contribute something to a big global cause.