This projects implement a convolutional neural network to predict diabetic retinopathy by retina images. This implementation includes image pre-processing techniques and many configurations of CNNs. In order to reduce computation time, pre-processing was run on a cluster, and the CNN was run on a Tesla K40 GPU.
Configuration files reside in the config folder. defualt.yaml, binary.yaml, binary_new.yaml specifies the dataset used to pre-process or train the CNN. Other configuration files specify the structure of the CNN.
prl_preprocess_selected.py is used to preprocess images. To run it, a batch job should be submitted with preprocess.slurm. The job array should be 0-99. prl_selected_cat.slurm calls pr_selected_cat.py to concatenate data generated by preprocess.
runner.py is the main file for training. However, the user should submit a batch job with runner_*.slurm to start training. There are many runners for various configurations of neural networks. The user can easily create his own .slurm file to run the runner.
post_process.py uses the model produced by training to make prediction on the test set. post process.slurm should be used to make prediction using GPU.
data_evaluation.ipynb can be used to calculate prediction metrics on the test set. inspect_image.ipynb can be used to inspect pre-processed images.