longitudinal/AGENTS.md
Furen Xiao 77653e4018 refactor(impact): replace KonfAI pip runtime with Docker elastix_impact image
Migrate register_impact from impact-reg-konfai (pip + one-time glibc/LibTorch
shim) to the vboussot/elastix_impact Docker image running a rigid 6-DOF
EulerTransform with MIND + TotalSegmentator static features and a Mattes-MI
secondary metric. Delete scripts/setup_impact_konfai.sh.

Vendor ImpactLoss (vboussot/ImpactLoss) into src/impact_loss.py and add
impact_loss as a per-case semantic scoring metric in the benchmark runner.

Update docs (AGENTS.md, REGISTRATION_BENCHMARK.md) to reflect the
all-rigid pipeline set and the new Docker-based IMPACT runtime.
2026-09-30 21:23:18 +08:00

1.7 KiB

AGENTS.md

Environment

This project uses a conda environment named longitudinal-313 (Python 3.13).

Activate with:

source /opt/conda/etc/profile.d/conda.sh && conda activate longitudinal-313

Key packages: torch 2.14 (+cu126), torchvision, monai 1.6 (pip, Pipeline C), numpy, scipy, pandas, scikit-learn, scikit-image, matplotlib, nibabel, SimpleITK. Registration toolkits (benchmark, see REGISTRATION_BENCHMARK.md): itk + itk-elastix, antspyx, niftyreg 1.5.69 (conda install -c conda-forge niftyreg, provides reg_aladin), plus the Docker images freesurfer/synthmorph and vboussot/elastix_impact (IMPACT; rigid MIND + TotalSegmentator config, feature models under data/impact_models). The benchmark's ImpactLoss scoring metric uses src/impact_loss.py (vendored from vboussot/ImpactLoss; runs on the env's torch).

Project

Longitudinal (repeated-measures) analysis of medical imaging data. Repo is at an early stage — see README.md for any project notes.

All path config lives in config/paths.json — the external data roots the code reads or writes (data, lee, m6, ntuh_register_inv). Code resolves them through src.common (PATHS dict, path(name) lookup, DATA/d() for data/... paths). To move any dataset, only edit config/paths.json; the repo root is derived from the code location (override with LONGITUDINAL_ROOT if needed).

Conventions

  • All Python commands must run inside the longitudinal-313 conda environment.
  • GPU is available (CUDA 12.6); use torch.device('cuda') when appropriate. Multi-GPU stages of Pipelines A and C run via torchrun --standalone --nproc_per_node N (rank = GPU).
  • No lint/test tooling is configured yet; run scripts directly with python <script> from the repo root.