models.json gives every model a per-layer receptive field (fov: [...], null for a model that sees whole images only) and the multiple its input must divide by, in place of the FOV formula. Dino/DinoV2_Small.pt returns the patch tokens of the whole slice (blocks 3, 6, 9, 12), the feature DINO-Reg registers with; the class-token export and DinoV2_Small_PatchTokens.pt go.
Let the 2D DINOv2 and SAM 2.1 models take slices of any size
DINOv2 interpolates its position embeddings; SAM 2.1 repeats its window embedding to cover the grid. Outputs at the sizes the old files took are unchanged (SAM bit-identical). Static mode, which feeds whole slices, now works in every engine. Adds Dino/DinoV2_Small_PatchTokens.pt (patch tokens of block 12).
Name every model's source and terms, and carry those licenses in full
NOTICE now covers the whole repository -- TotalSegmentator, MRSegmentator, SAM 2, DINOv2, VGG16 and MIND alongside anatomix -- with the upstream project, its license and its paper for each. LICENSES carries the Apache-2.0 and BSD-3-Clause texts those terms require to be distributed with the work.
Two limits are written down where they can be seen: TotalSegmentator offers part of its tasks under Apache-2.0 and the rest behind a license number, and only the open ones (total, total_mr, lung_vessels) are exported here; DINOv3's checkpoints fall under the DINOv3 License Agreement, so its export script builds them locally instead.
Script the DINOv2 wrapper so it keeps its defaults and reads the statistics it is passed
The export was traced with an empty stats tensor, which froze the normalisation on the image's own min and max and left all four arguments required. Scripting the wrapper keeps the branch live and the defaults, so a caller may pass the image alone. Same weights, same trunk, traced in evaluation mode.
Add the anatomix ViT encoder, trace both anatomix networks in evaluation mode
Anatomix/AnatomixDevViT.pt is the 32-feature PrimusV2 encoder anatomix-register.py uses by default; it takes a 128-voxel cube. Both anatomix exports are now traced in evaluation mode, so their normalisation layers read the learnt statistics, and wrapped in a scripted module, so their arguments keep their defaults and a caller may pass the image alone.
NOTICE and LICENSES carry the upstream terms: MIT for anatomix, Apache-2.0 for the dynamic-network-architectures blocks the ViT builds on.
Floor the MIND variance so a constant batch yields a flat descriptor
The variance MIND divides by was clamped between 0.001 and 1000 times its mean over the
batch. A batch of constant patches, as the online mode of the ITK metric sends over air,
has a mean of 0, so both bounds were 0 and the division gave NaN. A floor of 1e-6 is the
lower bound a whole image of mean variance 1e-3 already imposes on its flat patches; such
a batch now yields exp(0) = 1 on every channel. Textured batches are bit-identical to the
previous export, the floor never binds there.
The C++ wrapper inspects the TorchScript forward() schema and builds the
argument list accordingly, ensuring backward compatibility with legacy models
(forward(input) or forward(input, layers)) while supporting the new extended
signature:
forward(input, layersCount, imageStats, imageDirection)