How to Diagnose Covid Today
Testing for and detecting the COVID-19 strains of Coronavirus is an emerging science. There are multiple symptoms and with more cases every day, testing via blood tests, swabs, etc. are becoming better (see e.g. serology here). Another approach is taking CT scans and X-rays of patients’ chests. X-rays are appealing because they take little time and cost less, whereas performing CT scans on infected patients can be painful and difficult.
How can chest X-rays be used for reliable diagnosis at scale? One approach is Machine Learning where large datasets of diagnostic images may be used to train learning models. A few weeks ago, DarwinAI researchers released COVID-Net, a Tensorflow-based Deep Neural Network, which can help identify COVID-19 patients using chest X-ray radiographs at 88.9% accuracy, now up to 92.6% as shown here. The code and image sets are all open source. See also details of the science and the COVID-Net collaboration.
Weaveworks decided to make a packaged application version of COVID-Net available for use by both doctors and software developers. The Weaveworks tool is called fk-covid and it provides a user interface, APIs and packaging to run COVID-Net on Kubernetes. The application can run on your own machines or on our partners, AWS and Azure.
The hope is that this may accelerate the development of COVID-Net as a useful tool for demonstrating how low cost non-invasive Coronavirus and perhaps other X-ray diagnostics could work in the future.
Let’s dig in and see how it works.
COVID-Net: Machine Learning for Covid X-rays
COVID-Net was created by a team at DarwinAI - see their blog post here. The software allows a chest X-ray image to be analysed and compared with previous cases using a neural network. A positive diagnosis is made if the image demonstrates known patterns associated with Covid-19 infection. The team said:
“Researchers trained and tested COVID-Net using the COVIDx dataset, which consists of almost 6,000 chest X-ray images from 2,839 patients from the COVID chest X-ray dataset; and the Kaggel chest X-ray images (pneumonia) dataset which covers bacterial pneumonia, non-COVID19 viral pneumonia, and no pneumonia classes. DarwinAI this week updated the COVIDx dataset, which now has 16,756 chest X-rays across 13,645 patient cases.”
As set out by the DarwinAI team, this is a work in progress:
“The hope is that the open access COVID-Net, along with the description on constructing the open source COVIDx dataset, will be leveraged and built upon by both researchers and citizen data scientists alike to accelerate the development of highly accurate yet practical deep learning solutions for detecting COVID-19 cases and accelerate treatment of those who need it the most.”
Trying Out fk-covid
Fk-covid is an open source application for running COVID-Net. The Web-based UI has been tested in Chrome browsers. You can run the backend application on your own laptop or clusters (Linux only please), or you can run it on Amazon EKS or Azure Kubernetes Service.
To run fk-covid yourself on your own hardware, you have two options:
- Download and run the fk-covid application package here
- For developers on GitHub: fork, clone and run fk-covid here (see also this guide)
To run fk-covid on the cloud, you currently have two options:
You should be able to connect to a web UI that looks like the screenshot at the top of this blog post. If any of this doesn’t work please email us at email@example.com
The following video shows how can we install and start using the fk-covid application:
What’s Inside fk-covid
Fk-covid is a single system. But under the hood, quite a lot is going on. Let’s take a look:
- The main package runs on our Firekube bundle for Kubernetes
- A simplified version of our portable MLops profile runs Tensorflow / Kubeflow
- COVID-Net is from the DarwinAI team
- A user interface system (“Firekube COVID-Net UI”) is built on Backstage, a UI framework from our friends at Spotify.
- A REST API wrapping around the COVID-Net model and connecting with an S3 compatible object storage, MinIO
- All of these are packaged as a covid-profile, which also runs on EKS using EKSctl, and on Azure Kubernetes Service
This is wired up as shown below.
Please note the following before you try out fk-covid.
This product is not a medical device and does not have an intended medical purpose. Also COVID-Net is not intended as a replacement for the current COVID-19 test process. It is to complement the current process, and to make an alternative accessible to medical staff when the test is not an option.
According to the project, COVID-Net (and also this tool) is not for self-diagnosis. If you need medical assistance, please consult your general practitioners.
The interface (UI) is based on Spotify Backstage and works well on most mobile phones but not some iPhones. We have tested it in Chrome. Email us on firstname.lastname@example.org with UI issues and reports that we can share with the Backstage team.
As stated above, the backend of fk-covid runs on Linux.
We want to say a big thank-you to the Azure and AWS teams for their help with this project.
Please note that fk-covid is fully open source. If you would like to contribute to fk-covid or any of these components, visit https://github.com/weaveworks/covid-ml-profile.