Repository navigation
Upgrade notes
- Recheck training and evaluation baselines. Corrected losses change values and
gradients; reconstruction and metric fixes can change masks and scores.
Network checkpoint shapes and names remain compatible unless noted below. - InstanSeg training now uses the shared classifier:
Loss("instanseg", pixel_classifier=network.probability_net). Optimize the
network, including that classifier. Replacew_coordwithw_instand retrain
models trained only with the old coordinate-MSE loss.
See the loss API. MSSSIMrequires matching floating BCHW maps on the same device and dtype;
its default window needs at least 161 pixels per axis. Setdata_range
(default 1). For standaloneSSIM, floating BHW targets are shared maps;
integer BHW targets are class labels. Set its range explicitly for comparisons.JointLossrequires one weight per loss;MultiTaskLossrequires weight keys
matching configured heads. Invalid configurations now raise errors.- Prefer CellVit's
hgsc_v1_samvit_base_patch16checkpoint name; the old
hgsc_v1_efficientnet_b5remains an alias. Enable the
installation extras for training
datasets, ONNX export or OpenSlide.
Removed
- Remove CPPNet and its checkpoints/export because borrowed sampling code lacks
an established redistribution license. Other model families remain available. - Remove Linformer attention and DCAN/DRFNS reconstruction, including DCAN head
names. Use exact attention and a supported model/reconstruction pair.
Changing from Linformer requires retraining, not checkpoint conversion. - Remove
datasets.Pannuke,utils.Downloaderand
FileHandler.extract_zips_in_folder. Use the README's
PanNuke download example, Hugging Face tools and
Python'szipfile.ZipFile. Training loaders remain intorch_datasets.
Features
- Add
training,onnxandopenslideinstallation extras. - Add ONNX export for CellPose, StarDist, HoVer-Net, CellVit and InstanSeg;
document Omnipose export throughexport_cellpose_onnx. Exports support fixed
spatial dimensions and optional variable batches; instance reconstruction stays
in Python. CellPose/StarDist export was contributed by Ajinkya Kulkarni. - Add calibrated
SlideReader.pixel_sizein(height, width)micrometers and
optional cuCIM CUDA reads withWsiSegmenter(read_device="cuda"). Decoded tiles
stay on GPU through normalization and model input; reconstruction and vector
export remain on CPU. CPU reads remain the default. - Add vector-only nucleus filtering after WSI stitching.
filter_level1–3
selects conservative, middle or strong area/thickness limits with physical
pixel calibration;0orNonedisables filtering by default.
Fixes
-
Correct Dice, IoU and Tversky spatial overlap, masking, weighting and spectral
regularization. Fix CE/Focal and BCE/SCE logit stability, BCE channel weighting
and binary smoothing, and MSE/MAE mixed-precision arithmetic. -
Correct MS-SSIM scale aggregation: identical maps now have zero loss. Stabilize
standalone SSIM precision, gradients and target handling; add range control. -
Align InstanSeg's shared-classifier membership, seed and instance losses with
reconstruction. Fix loss routing, spatial/uniform smoothing and weighted
multi-head sums; accept target-only edge-weight maps inMultiTaskLoss. -
Prevent CellVit float16 upsampling overflow, fixed-unpool bfloat16 dtype errors
and NaNs from zero-norm style vectors. Convert bfloat16 maps to float32 before
NumPy post-processing. Load StarDist ray counts from checkpoint weights. -
Reconstruct HoVer-Net/CellVit nuclei from binary foreground rather than class
numbers, retaining cell types for voting. -
Reconcile overlapping WSI polygons in vector space, preferring complete nuclei
from one tile while preserving unmatched detections and distinct overlapping
nuclei. Avoid artificial intersection objects, disconnected seam fragments and
coordinate-sensitive selection. Preserve IDs and attributes; reject existing
merge outputs and repair invalid contours after smoothing. -
Correct slide height/width scale ordering and level-zero polygon coordinates,
cuCIM pyramid scaling/padding, tile inference arguments and optional output
handling. Preserve foreground class 0 during vector export. -
Fix in-memory sliding-window padding, overlap normalization, boundary weighting
and optional maps; reject strides that leave gaps. Apply requested predictor
boundary weights to reconstruction and foreground maps.
(#69) -
Correct one-to-one instance matching below 0.5 IoU, swapped object FP/FN counts,
multiclass confusion counts and specificity. Support sparse IDs and masks
without background; retain absent-class handling and historical AJI matching
andaverage_precisionsemantics.
(#73) -
Keep auxiliary training targets aligned after augmentation, apply all sampled
StrongAugment operations, and correct HDF5 lengths and multi-mask target routing. -
Use built-in min-max normalization in the quick start with float32 output
(#78). Honor
percentile clipping bounds and avoid overflow for extreme finite min-max inputs.
Correct theNormalizationexport. -
Support Python 3.10–3.14, excluding 3.14.1 per torchvision. Refresh dependencies
with minimum-only runtime requirements, including NumPy 2.2.6+ and PyTorch
2.13+. Use headless OpenCV and leave transitive constraints to parent packages.
(#68) -
Allow inference imports without optional training or plotting packages.
Bundle third-party licenses and exclude tests/fixtures from distributions.