Losers.jl

Author MolloiLab
Popularity
0 Stars
Updated Last
6 Months Ago
Started In
August 2021

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)