One reproducible, publication-ready workflow for running the official M0-M3 pipeline at small or large scale.
resolution_information.csv for micron unitsrun.sh executes M0 to M3 in fixed orderAutoMorph is an open pipeline for color fundus photographs that generates quantitative retinal phenotypes.
Use the maintainer guide: LOCAL.md.
conda update conda
conda create -n automorph python=3.11 -y
conda activate automorph
git clone https://github.com/rmaphoh/AutoMorph.git
cd AutoMorph
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia -y
pip install --ignore-installed certifi
pip install -r requirement.txt
pip install efficientnet_pytorch==0.7.1 --no-depsPlace images in images/, provide resolution_information.csv, then run:
sh run.shgit clone https://github.com/rmaphoh/AutoMorph.git
cd AutoMorph
conda create -n automorph python=3.11 -y
conda activate automorph
pip install -r requirement.txtKeep data outside the repository:
mkdir -p $HOME/retina_all/images
export AUTOMORPH_DATA=$HOME/retina_allGenerate spacing file for micron calibration:
python generate_resolution.py 0.008Run detached over SSH:
nohup bash run.sh > "$AUTOMORPH_DATA/automorph_run_$(date +%F_%H%M).log" 2>&1 & disown
tail -f "$AUTOMORPH_DATA"/automorph_run_*.logrun.sh cleans Results/ at start. Run one job per data root at a time.$AUTOMORPH_DATA/
├── images/
├── resolution_information.csv
└── Results/
├── M1/
│ ├── results_ensemble.csv
│ └── Good_quality/
├── M2/
│ ├── Vessel_binary/
│ ├── Artery_vein/
│ └── Disc_cup/
└── M3/
├── Disc_centred/*.csv
├── Macular_centred/
│ ├── Macular_Zone_B_Measurement.csv
│ └── Macular_Zone_C_Measurement.csv
└── Whole_image/*.csvls -1 "$AUTOMORPH_DATA/Results/M1/Good_quality" | wc -l
find "$AUTOMORPH_DATA/Results/M2" -maxdepth 2 -type f | head -n 20
find "$AUTOMORPH_DATA/Results/M3" -maxdepth 2 -type f -name '*.csv' | sortAUTOMORPH_DATA path used at runtimeresolution_information.csvrun.sh orchestrator was executed from M0 to M3 (preprocessing, quality grading, vessel/artery-vein/disc-cup segmentation, and feature extraction for disc-centred, macular Zone B, macular Zone C, and whole-image regions). Pixel resolution was provided through resolution_information.csv, generated with generate_resolution.py when per-image metadata were unavailable.LOCAL.md): https://github.com/rmaphoh/AutoMorph/blob/main/LOCAL.mdrun.sh): https://github.com/rmaphoh/AutoMorph/blob/main/run.sh