AI v Covid-19: How can AI assist with Covid-19 Tracking and Research?

2020 has been a strange year with the Covid-19 virus. Medical technicians and scientists all over the world are in the process of attempting to find a vaccine, and to contain it. This isn’t just important for human life, but for businesses and the impact, it has had globally. 

COVID-19

According to Coronavstats as of September 21 2020 in the UK there was currently 398,625 total infections and a death count of 41,788. The current death rate of just over 10% of total cases is alarming. It has been established that the spread is exponential. Therefore, containment is vital, in the tech world, AI is being used to assist in vaccine discovery and containment. AI can be used to find the right vaccinations faster by analysing prior ones based on similar protein structures of the infection and spread.

Health centres are increasingly using Artificial Intelligence. Chest X rays scanning systems can automatically detect the virus and make use of image recognition using AI capabilities. AI offers much faster processing. Regulators and government agencies then collect the data and make it available across multiple entities. Researchers and Microbiologists use that data, and other data for creating better drugs analysing the impact of medicines and identifying the virus and other bacteria, such as Médecins Sans Frontières.

Médecins Sans Frontières and Tenserflow Lite

TensorFlow

An example of the use of AI potential use in finding a vaccine can be found from current medical research into bacteria identification as seen in this YouTube Video. Médecins Sans Frontières is a charity providing medical care all over the world, prescribing a range of anti-biotics in over 70 countries. They have discovered an increasing number of patients are infected with multidrug-resistant bacteria. It is possible the same concept could be used for Covid-19, in their use of AI, and, Googles TensorFlow. TensorFlow is the free and open-source AI offering from Google and, TensorFlow Lite (used by Médecins Sans Frontières), the mobile version is available for download on iOS and Android.

What Médecins Sans Frontières discovered is that patients are often given the wrong antibiotics, due to an inability to exactly identify the exact virus a patient may be infected with. They use TensorFlow to help identify the correct antibiotics for their patients.  

This brings up several challenges. To identify bacteria, multiple tests are needed to know which type of bacteria they are dealing with. There is an additional step which is to interpret the results in many of the countries where Médecins Sans Frontières operate. Unfortunately, there are not enough experienced microbiologist staff to do these interpretations. AI might be a potential solution to this problem, in that rather than replacing microbiologist staff, they aid existing staff in interpreting diagnosis tests in a shorter timescale, by using TensorFlow lite which is available on a range of mobile phones, in all of their clinics. The application does not need to be online, so can be used in areas of poor signal area.

TensorFlow uses computer vision and machine learning using Python to detect interactions between bacteria and antibiotics, using solely an image of the petri dish. As a result of the use of this technology, Médecins Sans Frontières managed to train a testing model within a matter of days. It also proved to be surprisingly quick and easy to achieve. They have developed a prototype, with the aims of making diagnostic testing available, easy, and affordable all over the world. This application could be a game changer in helping millions of people all over the world, especially if it can be adapted in the hunt for a vaccine for Covid-19, as well as numerous other diseases. It can also help provide advice on best management practices.

It works through object detection, using pre-annotated images, of disease bacteria and performing comparisons with a photograph of a petri dish. It’s able to make predictions in less than one second. The beauty of the system that TensorFlow provides is that rather than having to write thousands of lines of code, there is a library of functions that allow the building of different architectures, in much less time. It can shrink these rural networks, to be able to fit on a mobile device. Human input is critical to the process. It can go through hundreds of millions of images very quickly and can be adapted to create different types of neural networks.

In the search for a vaccine for Covid-19, the strategy used by Médecins Sans Frontières could be a good place to start in the use of AI using TenserFlow.

TensorFlow Lite on Android Example

TensorFlow lets you run machine learning models on mobile devices with low latency quickly, so you can perform classifications without the need to make repeated network calls to a server. It’s available on Android and iOS via a C++ API.  There is a Java wrapper for Android devices which can support it.  The interpreter uses Android neural networks API for hardware acceleration.

The app is built using a mobile net model. Mobile nets are small and use little power. Models can be designed to meet several use cases such as object detection, such as various types of plants or trees. It provides fine-grained classification. There are several pre-trained, off the shelf models available to work with.

When first working with TensorFlow lite it is recommended that you work with these pre-built models. TensorFlow Lite however, does not yet support all the features of the full-blown TensorFlow.

To use TensorFlow on mobile you need to include the TensorFlow lite libraries. This is achieved by editing your builds gradle file to ensure you include them. The next step is to import a TensorFlow interpreter. The interpreter loads a model and allows you to run it by providing it with a set of inputs. TensorFlow lite executes the model and write the outputs. It is a simple process, even though the technology behind it is complex.

The model should be stored in the application assets. The code will then read the model directly from there, although a model can be loaded from anywhere. Once the model is loaded an interpreter can be instantiated.

In the case of the medical research, the application reads frames from the camera and turns those into images. These images (in the case of Médecins Sans Frontières, a petri dish) are used as inputs to the model, which outputs return values. These values are an index to the appropriate label (in this case bacteria identification), and the thousands of pre-prepared, annotated images would then match that label.

You can find out more about training TensorFlow models in this video guide to running TensorFlow Models on Android.

Covid-19 Detection using UiPath Fabric

Chest X-ray

UiPath is a company specialising in AI solutions for automation. Researchers at the University of Waterloo and Darwin have used UiPath Fabric which is an Open Source Initiative, to design a neural network model to detect COVID-19 cases, using chest X-Ray images. The model was trained on a publicly available data set consisting of 76 images from patients with covid 19 as illustrated in this You Tube video.

The workflow is simple, consisting of a file and an X-Ray image. These are sent to the machine learning model which outputs the results. The application requests an image. This all you need to train the model from people with no disease, and to distinguish between people with pneumonia and people with COVID-19. The output is a machine learning classification result.

So, for any chest X-Ray or CT scan image, the software provides a prediction that the image comes from a patient with Covid-19. At this stage of the research, it is not a production version, but a preliminary experiment.

AI is being used to assist in research to contain Covid-19 and possibly to discover a virus. Mobile apps, such as TensorFlow Lite can check if an individual has the virus by feeding in some user input, getting some data automatically about their location and rate them on a degree of risk. You can imagine a situation where if a confirmed patient’s mobile location is always known, the govt can alert people who have been in contact with said person. This is known as “Track and Trace”.

Bert, another Google AI initiative, is being applied to this vast data set to extract useful information about the virus, using Natural Language Processing (NLP). NLP can be used to understand the protein structure, and to develop potential vaccinations faster, including providing information on the areas where people are affected.

This should also help microbiologists understand treatment options, considering any adverse effects, and determine the correct dosage. Bert looks at words and sentences from both directions, left to right and right or left so that they can understand and identify particular words in a full context. So, with a combination of AI models, such as TensorFlow and Bert for Natural language processing to assist Microbiologists, maybe a vaccine for Covid-19 may not be too far away, but it is still a work in progress. AI is proving useful as these examples have shown, to provide a solution to a potential Covid-19 vaccine and tracking capability.

Andrew Carr


All-round, experienced IT specialist, working with databases (SQL Server, Oracle, MySQL) with CMS and Application Support skills/knowledge. Over 25 years of experience at top-rated companies. Mainly specialising in Moodle-based Learning websites in PHP and MySQL at the moment. Skillsets include script writing, programming and development in various databases, testing, and configuring servers and supporting various legacy and modern systems. I specialize mainly in databases, and Moodle CMS for Learning sites, but I am flexible on most things, including the writing of scripts or in Unix Shell, Dos batch, Powershell, Visual Basic, PHP, C#, and SQL in Oracle, MySQL, SQL Server, and others.