This is the code for our paper entitled:
"Spatial regularisation for improved accuracy and interpretability in keypoint-based registration"
Our code has been run with Python 3.12.4 and relies on the dependencies listed in requirements.
-
spatial_regularisation: this is the main folder containing all training/testing functions:
- training.py: contains code to train keypoint-based unsupervised affine/rigid registration methods with the proposed regularisation terms.
- predict.py: prediction and testing on given pairs of fixed/moving scans.
- predict_time_series.py: prediction and testing on time series, where the goal is to align all time frames to the first one.
- losses.py: implementation of the three proposed spatial regularisation terms.
- spatial_moments.py: computation of the first and second order moments of volumetric fields.
-
scripts: this folder contains 4 scripts showing:
- how we trained/tested a regularised EquiTrack for rigid motion tracking in foetal time series,
- how we trained/tested a regularised KeyMorph for affine registration of adult brain MRIs
-
requirements.txt: list of required libraries to tun this code