AutoMorph from Local Repo to HPC/SSH: one definitive guide
Published:
AutoMorph from Local Repo to HPC/SSH
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 order1) What AutoMorph does
AutoMorph is an open pipeline for color fundus photographs that generates quantitative retinal phenotypes.
- M0: preprocessing
- M1: image quality grading
- M2: vessel, artery-vein, and disc-cup segmentation
- M3: feature extraction for disc-centred, macular Zone B/C, and whole-image regions
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-depsPlace images in images/, provide resolution_information.csv, then run:
sh run.sh3) 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.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.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/*.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' | sort5) Reproducibility checklist
- AutoMorph commit hash and run date
- Python, PyTorch, CUDA versions
- GPU model and driver details
AUTOMORPH_DATApath used at runtime- Resolution source used in
resolution_information.csv - Total input images and M1 gradable count
6) Copy-ready methods text
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
- AutoMorph project page: https://rmaphoh.github.io/projects/automorph.html
- AutoMorph GitHub repository: https://github.com/rmaphoh/AutoMorph
- Local setup guide (
LOCAL.md): https://github.com/rmaphoh/AutoMorph/blob/main/LOCAL.md - Pipeline runner (
run.sh): https://github.com/rmaphoh/AutoMorph/blob/main/run.sh - TVST 2022 paper: https://tvst.arvojournals.org/article.aspx?articleid=2783477
- medRxiv preprint: https://www.medrxiv.org/content/10.1101/2022.05.26.22274795v1
