Skip to content

PyTorch Toolbelt 0.2.0

Compare
Choose a tag to compare
@BloodAxe BloodAxe released this 04 Oct 21:04
· 1000 commits to master since this release
cc5e997

PyTorch Toolbelt 0.2.0

This release dedicated to housekeeping work. Dice/IoU metrics and losses have been redesigned to reduce amount of duplicated code and bring more clarity. Code is now auto-formatted using Black.

pip install pytorch_toolbelt==0.2.0

Catalyst contrib

  • Refactor Dice/IoU loss into single metric IoUMetricsCallback with a few cool features: metric="dice|jaccard" to choose what metric should be used; mode=binary|multiclass|multilabel to specify problem type (binary, multiclass or multi-label segmentation)'; classes_of_interest=[1,2,4] to select for which set of classes metric should be computed and nan_score_on_empty=False to compute Dice Accuracy (Counts as a 1.0 if both y_true and y_pred are empty; 0.0 if y_pred is not empty).
  • Added L-p regularization callback to apply L1 and L2 regularization to model with support of regularization strength scheduling.

Losses

  • Refactor DiceLoss/JaccardLoss losses in a same fashion as metrics.

Models

  • Add Densenet encoders
  • Bugfix: Fix missing BN+Relu in UNetDecoder
  • Global pooling modules can squeeze spatial channel dimensions if flatten=True.

Misc

  • Add more unit tests
  • Code-style is now managed with Black
  • to_numpy now supports int, float scalar types