DILITHIUM: MSS WNet, weakly supervised, single-axis MIP

3D WNet (MSS WNet) for cerebral vessel segmentation in 7T Time-of-Flight MRA, from the paper DILITHIUM: Deep learning with limited supervision for the segmentation of vessels in high-resolution 7T MRAs using unsupervised and weakly-supervised learning (citation to be added). Code: https://github.com/soumickmj/DILITHIUM

All six models: DILITHIUM collection. Step-by-step instructions for using these models on your own data, recalibrating the binarisation and training: see the GitHub README.

These weights are the models reported in the paper. They replace the earlier upload of this repository.

Contents

Five models, one per cross-validation fold (fold0 ... fold4). Each folder holds config.json, model.safetensors, the modelling code and postprocessing.json, the binarisation rule chosen for that fold.

fold validation volumes checkpoint epoch binarisation rule validation Dice (median)
fold0 sub007, sub018, sub020 32 c4 > q=0.993 47.4
fold1 sub015, sub009, sub012 48 c0 < q=0.993 52.8
fold2 sub005, sub011, sub008 48 c1 < q=0.995 53.9
fold3 sub017, sub004, sub014 42 c0 < q=0.997 53.7
fold4 sub006, sub019 49 c1 < q=0.995 54.6

Training

  • Data: StudyForrest 7T TOF-MRA (0.3 mm isotropic) with SMILE-UHURA annotations. 5-fold cross-validation on 14 volumes; each fold is validated on the volumes listed above and trained on the others. The four test volumes were never used for training, checkpoint selection or rule selection.
  • Loss: MIP loss (Focal Tversky, weight 0.1) on the axial (z) maximum intensity projection of the annotation, and perceptual reconstruction loss (weight 1.0).
  • 50 epochs, learning rate 1e-4, batch size 15, 32x32x32 patches (8,000 per epoch), each patch min-max normalised to [0, 1], 3 % histogram pre-threshold, mixed precision, gradient clipping at norm 1. The checkpoint with the lowest validation loss is released.

Inference, as in the paper

  1. Pre-threshold: build the intensity histogram of the volume and set voxels at or below 3 % of the intensity range to zero.
  2. Divide the volume by its maximum (one scale per volume; do not normalise patch by patch at inference).
  3. Run the encoder on 32x32x32 patches with an overlap of 16 voxels and average overlapping predictions. Outputs: 5 softmax channels (c0 ... c4) and a sigmoid single-channel map (feat).
  4. Binarise with the fold's postprocessing.json: threshold the named channel at the given per-volume quantile (computed on the subsample x[::5, ::5, ::3]; polarity < means the negated channel), remove connected components smaller than 32 voxels (skimage.morphology.remove_small_objects, connectivity 1) and dilate with skimage.morphology.ball(1).

Label-free binarisation (brightest arg-max cluster, or Otsu thresholding of feat) does not work for these models; the rule in postprocessing.json was chosen on two to three annotated validation volumes.

from transformers import AutoModel
model = AutoModel.from_pretrained("soumickmj/DILITHIUM_WeaklySup_WNetMSS3D_MIP", subfolder="fold0", trust_remote_code=True).eval()
class_probs, feature_map = model.model(patches, ops="enc")   # patches: (B, 1, 32, 32, 32), volume-normalised

Test results (paper, label-calibrated binarisation, Dice median [IQR] over folds x volumes)

  • Three artefact-free test volumes (15 segmentations): 60.9 [55.2, 64.6]
  • Test volume with wrap-around artefacts (5 segmentations): 35.0 [32.6, 35.9]

Alternative: calibration without 3D labels

Each postprocessing.json also holds alternative_2d_calibration: the output channel and polarity chosen on the axial MIPs of the validation annotations (2D only), and a threshold set per volume so that the final mask contains the expected vessel fraction of the volume (vessel_fraction, about 1.1 % of the voxels; median of the training annotations). Bisect the per-volume quantile until the post-processed mask has vessel_fraction x (number of voxels) voxels.

Paper results with this alternative (Dice median [IQR]): artefact-free test volumes 56.9 [55.0, 64.4]; test volume with wrap-around artefacts 36.1 [33.3, 36.5].

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including soumickmj/DILITHIUM_WeaklySup_WNetMSS3D_MIP