en license:mit region:us
---
license: mit
language:
- en
---

## Model Description
Minimal dataset for manuscript PONE-D-23-21560

Please email the author on songyang.an@auckland.ac.nz describing the reason for access before sending an access request.

## Pre-requisites
1. The models and results require images from the UK Biobank dataset. 
2. The input files provided in this repository only contain the image names and simple accompanying metadata.
3. To gain access to the UK Biobank dataset, please apply for access using this link.
4. After access permission has been granted, follow the instructions from UK Biobank, https://biobank.ctsu.ox.ac.uk/crystal/ukb/docs/ukbfetch_instruct.html, in fetching the left (field ID 21015) and right (field ID 21016) fundus photographs.

## Getting started
1. Install required python packages by running pip install requirement.txt
2. Run "1. Generate dataset summary table.py" to recreate table 1
3. Run "2. Generate augmented images.py" with argument as the directory where the UK Biobank images are stored to create a local copy of the images captured in the test set.

   For example, if the images are stored in "c:\biobank images" then run console command in the following format: python.exe "2. Generate augmented images.py" "c:\biobank images"
   
5. Run "3. Evaluate.py" to generate the result tables 2 and 3
6. Run "4. Hypothesis test.py" to carry out the hypothesis tests in tables 2 and 3.

## Citation
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0295073
