Malaria Classification model execution in Nvidia Clara deploy

This is not for clinical use and should NOT be used for diagnostics purposes.

I will be using the Nvidia Clara Deploy to run a Nvidia GPU Cloud(NGC) model for classification of malaria in microscopy slides converted into png files.

The docker container for the model is in https://ngc.nvidia.com/catalog/containers/nvidia:clara:ai-malaria

As per above url, The network architecture used to train this model is based on the 2015 academic publication “Deep Residual Learning for Image Recognition” by He et. al.

I will be following this link to run a clara pipeline to classify microscopy slides. https://ngc.nvidia.com/catalog/resources/nvidia:clara:clara_ai_malaria_pipeline

I will use a clara deploy SDK running on AWS g4dn.xlarge instance. The description of how to install clara deploy on an AWS instance is in another post.

My running clara instance as shown by the running helm charts

Create a pipeline directory if you don’t have it already

mkdir -p ~/.clara/pipelines

Make sure you are connected to nvcr.io

Pull the malaria classification pipeline

Inspect the directory and unzip the input file to get the input images

This will create an input directory containing the png images to be classified

Unzip the model and related files in a common model directory. Create the /clara/common/models directory if you don’t have it created already

Create a pipeline utilizing the pipeline yaml file given. Inspect the pipeline yaml file, which builds a docker container as given in https://ngc.nvidia.com/catalog/containers/nvidia:clara:ai-malaria

Create a pipeline job for the pipeline we just created utilizing the input images to be classified as input

clara create jobs -n malaria-test -p 8f315a0453c6416bbca18bdff457ee26 -f ~/.clara/pipelines/clara_ai_malaria_pipeline/input/png

Start the job

Check the job status in Clara console using localhost:32002

You may download the output to look at the classified images locally. A stamp on the left corner of the classified out images will indicate a true (`T’) or false (`F`) classification for malaria.

You may also use Clara download to download the output in a directory

clara download 602d2d58adbe4476918d9fd73daa7768:/operators/ai-app-malaria/* /etc/clara/experiments/covidtest

Use `eog` to look at the output inference files

There you have it malaria inference using Clara deploy pipeline