Download Latest Version Segmentation Models - v0.6.0 source code.zip (4.6 MB) Google Add to Preferred Sources
Home / v0.6.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-10-26 7.1 kB
Segmentation Models - v0.6.0 source code.tar.gz 2026-10-26 4.5 MB
Segmentation Models - v0.6.0 source code.zip 2026-10-26 4.6 MB
Totals: 3 Items   9.2 MB 0

⚠️ Breaking changes

  • Python 3.10+ is required, and the minimum dependency versions went up: torch>=1.11, torchvision>=0.12, numpy>=1.21.2, pillow>=8.4 (#1281).
  • Encoder weights are downloaded only from the Hugging Face Hub. The old fallback to the original download URLs is gone, along with smp.encoders.pretrained_settings. If you can't reach the Hub, set HF_ENDPOINT to a mirror or load weights from a local file (#1398).
  • tu- encoders now warn when encoder_weights is a string. Use True or None, and choose the pretrained variant in the name, e.g. tu-convnext_tiny.fb_in22k (#1269).

Highlights

Freeze and unfreeze the encoder

:::python
model = smp.Unet("resnet34")
model.freeze_encoder()    # also stops BatchNorm running-stat updates
...
model.unfreeze_encoder()
  • Add encoder_freeze method to SegmentationModel by @ricber in [#1220]

Losses

  • class_weights for DiceLoss, JaccardLoss, TverskyLoss and FocalLoss (multiclass and multilabel modes): python loss = smp.losses.DiceLoss("multiclass", class_weights=[0.2, 1.0, 3.0])
  • FocalLoss accepts probabilities via from_logits=False, with an eps parameter like DiceLoss.
  • JaccardLoss supports ignore_index.
  • Losses work on non-contiguous tensors.

Models and encoders

  • Transformer-style tu- encoders work in UnetPlusPlus and Linknet (#1294).
  • PSPNet exports to ONNX (#1270).
  • Fixed an MPS float tensor ValueError (#1199).

What's Changed

New Contributors

Full Changelog: https://github.com/qubvel-org/segmentation_models.pytorch/compare/v0.5.0...v0.6.0

Source: README.md, updated 2026-10-26