DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Setting Up a Data Catalog With Azure Purview and Collibra: What Three Attempts Taught Me
  • We Went Multi-Cloud and Almost Drowned: Lessons From Running Across AWS, GCP, and Azure
  • 5 Ways Azure AI Search Enhances Enterprise RAG Architectures
  • Training a Neural Network Model With Java and TensorFlow

Trending

  • How to Write for DZone Publications: Trend Reports and Refcards
  • A Walk-Through of the DZone Article Editor
  • How AI Is Rewriting Full-Stack Java Systems: Practical Patterns with Spring Boot, Kafka and WebSockets
  • Engineering LLMOps: Building Robust CI/CD Pipelines for LLM Applications on Google Cloud
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Eye Disease Detection Using TensorFlow and Azure's CustomVision.ai

Eye Disease Detection Using TensorFlow and Azure's CustomVision.ai

Explore an AI-based system that uses the Azure Cognitive Services CustomVision tool to predict the probability of the existence of eye diseases.

By 
Raghu N T user avatar
Raghu N T
·
Nov. 29, 19 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
7.6K Views

Join the DZone community and get the full member experience.

Join For Free

Image of persons blue eye

Eye Disease Detection Using TensorFlow and Azure's CustomVision.ai

Synopsis

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

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

You may also enjoy:  How to Build Custom Image Classifiers in Java With Minimal ML Experience

Preparing Data

Navigate to the following URL to download the full normal eye dataset of 300 images.

Use the following URL to download BinRushed.zip file containing all Glaucoma Images.

Deep Dive Into Azure CustomVision.ai

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

Image title

Creating a New Project

Create a new project by entering the mandatory details below.

Image title

Leave all radio buttons to default except for the 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.

Image title

You should now see the page below.

Image title

Adding New Tags

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

Image title

Uploading Images

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

Image title


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

Image title

Image title

Next, upload 200 images from the cataractdataset\dataset\1_normal folder. Click on Add Images, select 200 out of 300 files, select the Normal-Eye tag, and hit upload.

Image title

Training the Model

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

Image title

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.

Image title

Image title

Quick Test of the Model

Hit the Quick Test button at the top and then “Browse Local Files.” Select any image from the folder cataractdataset\dataset\1_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.

Image title

Image title

Image title

Click “Browse Local Files” and select any Glaucoma positive images from BinRushed\BinRushed1.

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

Image title

Image title

Adding Cataract and Retina Disease Detection

Next, add a new Tag called “Cataract Eye” and upload 90 images from cataractdataset\dataset\2_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.

Image title

Image title

Image title

Image title

Image title

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

Image title

Image title

Image title

Image title

Image title

Altogether

Image title

Image title

Image title

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.

Thanks for reading!

Further Reading

Various Uses of TensorFlow

azure TensorFlow

Opinions expressed by DZone contributors are their own.

Related

  • Setting Up a Data Catalog With Azure Purview and Collibra: What Three Attempts Taught Me
  • We Went Multi-Cloud and Almost Drowned: Lessons From Running Across AWS, GCP, and Azure
  • 5 Ways Azure AI Search Enhances Enterprise RAG Architectures
  • Training a Neural Network Model With Java and TensorFlow

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook