Mscard: a longitudinal MS MRI report that calibrates itself on the patient's own scan

I have released mscard (pip install mscard, MIT), which turns two or more MRI visits (T1w and FLAIR, plus lesion masks from LST-AI or your own) into one self-contained page per subject: new, enlarging, shrinking and resolved lesions, slowly expanding lesion candidates (Elliott et al. 2019 rule), lesion volume change and brain volume change from the deformation field. Registration and tracking come from lesiontrack, injection of known truth from bidsgate.

The part I think is new: before the page is written, the pipeline is run on the subject’s own baseline with known changes injected (a 2 % whole-brain contraction, 12 new lesions placed away from the existing ones, a small repositioning, gain drift and noise), and every number on the page carries a badge stating how much of that truth the same pipeline recovered on that scan. A badge is green when the number can be read at face value, amber when it should be read with the calibration table, red when the pipeline could not recover that kind of change here.

On the 24 usable longitudinal subjects of the public MSLesSeg dataset (expert masks): 1 false enlarging or shrinking call in 551 baseline lesions, 0 false resolved, brain-volume recovery 1.07 to 1.34 (median 1.18), and a median 1.07 SEL candidates per lesion with no true expansion, which is the noise floor a SEL count should be read against. Every report is online at mscard gallery and the code and cohort table are at GitHub - CedricConday/mscard: The longitudinal multiple sclerosis MRI report that grades itself · GitHub .

It is research software, not a device, and the calibration is a floor rather than a validation (synthetic lesions are ellipsoids, the contraction is uniform, a synthetic year has no scanner change). I would value criticism of the grade design in particular: which report lines should carry which test, and what the bands should be.