Glaucoma, Cataract and Retina Disease Detection

Using TensorFlow based model using CustomVision (Azure Cognitive Services)

Synopsis

Globally more than 1 billion people are affected by vision impairment or blindness due to unaddressed cataract (65.2 million), glaucoma (6.9 million), retina disease (3 million).

Proposed here is the development of an AI based system using Azure Cognitive Services CustomVision tool to predict the probability of existence of one of chronic conditions in an eye scan.

Preparing data

Navigate to the url below and download the full normal eye dataset of 300 images

https://www.kaggle.com/jr2ngb/cataractdataset/version/2

Use the url below to download BinRushed.zip file containing all Glaucoma Images

https://deepblue.lib.umich.edu/data/concern/data_sets/3b591905z?locale=en

Deepdiving into Azure CustomVision.ai

Navigate to CustomVision.ai and click on the New Project icon

Creating a new project

Create a new project by entering the mandatory details below

Leave all radio buttons to default except for Domains where you choose the domain of relevance to your task. Else General (compact) should be good.

Select Basic platforms under Export Capabilities which uses a Tensorflow based model.

You should see the newly created project page as below

Adding new tags

Hit the + button next to Tags and add 2 new tags : Glaucoma-Eye and Normal-Eye as shown below.

Uploading images

Upload all the 300 images in the BinRushed4 dataset. Click on Add Images , select all files

Click on MyTags textbox below and make sure that you click the Glaucoma-Eye tag before uploading all 357 files.

Next Upload 200 images from the cataractdatasetdataset1_normal folder. Click on Add Images , select 200 out of 300 files, select the Normal-Eye tag and hit upload

Training the model

Hit the green Train button on top , select Quick Training and click Train.

After the training is completed you should be able to see the Iteration details as below.

Click the info icon next to Precision, Recall and AP to understand these terms.

Quick Test of model

Hit the Quick Test button on top and then “Browse Local Files”, select any image from the folder cataractdatasetdataset1_normal from 201 to 300 (which has not been part of the training set)

Observe the Tag and Probability values for the image. It confirms that the Eye is normal.

Click “Browse Local Files”, select any Glaucoma positive image from BinRushedBinRushed1.

Observe Tag and Probability values. It confirms that the eye Glaucoma Positive

Adding Cataract and Retina Disease detection

Next add a new Tag called “Cataract Eye” and upload 90 images from cataractdatasetdataset2_cataract. Hit the train button to retrain the model and observe the performance values change.

Click on Quick Test and use one of the remaining 10 images in the untrained dataset to predict if it is a Cataract Eye or not.

Repeat all steps for Cataract Detection for Retina Disease and test with an Eye image that is positive for Retina Disease as below.

Altogether

The Journey Forward

Find as many images as possible on the web about Glaucoma, Cataract, Retina Disease and Normal Eye as possible, upload them to the appropriate tags and retrain the model.

Try sliding the Probability Threshold bar on the Performance tab to check if you get more accurate predictions.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: