AutoMorph from Local Repo to HPC/SSH

One reproducible, publication-ready workflow for running the official M0-M3 pipeline at small or large scale.

Local path: quick setup, debugging, smaller batches
HPC path: scalable runs, cleaner data separation, long jobs
Calibration: use resolution_information.csv for micron units
Orchestration: run.sh executes M0 to M3 in fixed order

1) What AutoMorph does

AutoMorph is an open pipeline for color fundus photographs that generates quantitative retinal phenotypes.

M0Input standardization
M1Gradable subset
M2Segmentation masks
M3CSV phenotypes

2) Local setup (official pattern)

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-deps

Place images in images/, provide resolution_information.csv, then run:

sh run.sh

3) HPC/SSH setup (recommended for scale)

git clone https://github.com/rmaphoh/AutoMorph.git
cd AutoMorph
conda create -n automorph python=3.11 -y
conda activate automorph
pip install -r requirement.txt

Keep data outside the repository:

mkdir -p $HOME/retina_all/images
export AUTOMORPH_DATA=$HOME/retina_all

Generate spacing file for micron calibration:

python generate_resolution.py 0.008

Run 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_*.log
Important: run.sh cleans Results/ at start. Run one job per data root at a time.

4) Expected outputs and verification

$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/*.csv
ls -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' | sort

5) Reproducibility checklist

6) Copy-ready methods text

We used AutoMorph to extract retinal vascular phenotypes from color fundus images. The official run.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.

7) Authoritative references