Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.39 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.39 KB

Losers

Loss functions for segmentation tasks in the field of computer vision.

Glass Notebook CI Stable CI Nightly Coverage

Features

  • Hausdorff Loss computations for 1D, 2D, and 3D data.
  • Dice Loss computations for 1D, 2D, and 3D data.

Getting Started

To get started, you'll need to import the Losers package:

using Losers

Usage

Hausdorff Loss

The Hausdorff loss can be used to compute the loss between two data structures. Here's an example for 1D data:

using DistanceTransforms: transform # Losers pairs nicely with this library

y = rand([0, 1], n)
ŷ = y
y_dtm = transform(y)
ŷ_dtm = transform(ŷ)
hausdorff_loss(ŷ, y, ŷ_dtm, y_dtm)

Dice Loss

Dice loss can be computed similarly. Here's an example for 1D data:

y = rand([0, 1], n)
ŷ = y
dice_loss(ŷ, y)