The CDR - Profiler is an innovative software tool designed to extend and enhance the traditional Cup-to-Disc Ratio (CDR) measurement used in ophthalmic imaging. Unlike conventional methods that typically provide a single vertical or horizontal CDR value, this tool offers a comprehensive profile of CDR values around the entire optic disc.
We'll use Anaconda to create a new Python environment and handle all the required dependencies.
-
Install Anaconda following the official guidelines.
-
Clone this repo to your machine.
-
Open a new Anaconda terminal (Windows) or a normal terminal window (Linux/MacOS) and cd to the directory of the cloned repo:
cd <repo_directory>
-
Open a new Anaconda terminal and create a new environment:
conda create -n pcdr python=3.12
-
Activate your newly create environment:
conda activate pcdcr
-
Install the required libraries to run CDR-Profiler:
pip install -r requirements.txt
-
Install Pytorch using
pip
-
Modify the configuration parameters found in
cfg/config.ini
to suit your needs. -
Place all your images in the input folder you've set in the previous step. The software uses
data/
as the default folder to look for input images. -
Run
main.py
-
Check the ouput folder (default is
results/
) for the results. The folder should contain a file calledresults.csv
with all the measurements. Images with the segmentations and CDR-Profiles will also be saved there if saving the result image is set asTrue
in the config file.
Current implementation uses automatic segmentation of fovea, disc and cup. In future releases, the software will accept user generated masks.