This repository contains a pipeline for classifying and segmenting geographic atrophy (GA) from FAF images.
The project includes:
ga_classifier/: FAF image classification model and inference scriptga_segmentation/: SAM-based segmentation inference using a pretrained modelmodels/: pretrained model weights for classification and segmentationDockerfileanddocker-compose.yml: containerized environment for reproducible executionrun_pipeline.sh: wrapper script that runs classification followed by segmentation
Build the container:
docker compose up --buildImportant files to download separately:
models: folder to create to store modelsmodels/classification_model_weights.ckpt: classification model weightsmodels/segmentation_model_weights.pth: segmentation model weightsimgs/: folder where images can be placed - if images are somewhere else, mount the location in the docker-compose file
Important input file:
FAF_files.csv: example input CSV file (this is the default name, change it in the docker-compose)
Other files:
ga_classifier/classify.py: main classification scriptga_classifier/classify.sh: sample classifier launch scriptga_classifier/tensors/: cache directory for preprocessed image tensorsga_segmentation/GASegPureInference.py: segmentation inference scriptga_segmentation/segment_ga.sh: sample segmentation launcherrun_pipeline.sh: example full pipeline invocationresults/: expected output directory for segmentation masks
- The classification script caches preprocessed image tensors under
ga_classifier/tensors/. - Segmentation outputs are written to
results/ga_segmentations/by default. - If your environment does not have a GPU, update the
--gpuargument inrun_pipeline.shand the corresponding script variables to use CPU-only execution. - Verify that the expected model weights exist in
models/before running inference.