There are approximately 30 million OCT (optical coherence tomography) scans are performed each year. OCT is a non-invasive imaging test that uses light waves to take cross-section picture of human retina. Analysing, interpretating, and labeling these 30 million images can take significant amount of time and resource.
This web app is able to predict three popular retina diseases and normal retina using unlabeled OCT images. These popular diseases are CNV (Choroidal Neovascularization), DME (Diabetic Mascular Edema), and DRUSEN.
Resource
The Retinal OCT images can be downloaded in the following links:
The model was created using the SimCLR (Simple Framework for Contrstive Learning). Please refer to acknowledgements for additional reading.
The following tools were used to setup the MLOPs deployment pipeline:
- Fastapi: Main RestAPI Framework
- Docker: Images and Containers
- Streamlit: Frontend UI
The results from the semi-supervised learning was highly comparable to the SOTA supervised learning models.
Supervised Learning Model
| Model | Train Acc. | Val Acc. | Test Acc. |
|---|---|---|---|
| VGG16 | 90.5% | 89.1% | 93.1% |
| InceptionV3 | 71.5% | 75.7% | 67.6% |
| Resnet50 | 91.7% | 88.7% | 96.4% |
Semi-Supervised Learning
| Model | Train Acc. | Val Acc. | Test Acc. |
|---|---|---|---|
| simCLR 1% labeled images | 98.97% | 93.26% | 87.5% |
| simCLR 10% labeled image | 96.96% | 93.23% | 97.10% |
Create a new conda environment by running the following command.
conda create --name myenv python=3.9.2
(python version 3.9.2 was used to create the app)
Clone the Retinal OCT repository by running the following command.
git clone git@github.com:(your profile)/Retinal_OCT.git
cd Retinal_OCT
docker-compose build
if successful, the following outputs will appear.
docker-compose up
if successful, the following output will appear.
User can test the model via fastapi using swaggerUI by visiting http://localhost:8000/docs
User can also use the app using Streamlit by visiting http://localhost:8501/
After launching the EC2 and git cloning the repo, run the app by typing the following commands from the terminal.
cd Retinal_OCT
docker-compose build
docker-compose up
Network URL: http://(your ip address):8501 External URL: http://(your ip address):8501
App will launch on the External URL
Model
- Extensive finetuning for SimCLR model has not been performed due to time and resource. Additional epochs and batch selections will be performed during the next phase release.
Prediction
- Currently the app is predicting one image at a time. Batch prediction will be implemented during the next phase release.






