GeomLoss Logo
0.2.6
  • Getting started
  • Maths and algorithms
  • PyTorch API
  • Gallery of examples
    • Kernel vs. Hausdorff vs. Sinkhorn
    • The multiscale Sinkhorn algorithm
    • Optimal Transport
    • Performances
    • Scaling up to brain tractograms – with Pierre Roussillon
      • Kernel vs. Hausdorff vs. Sinkhorn
      • The multiscale Sinkhorn algorithm
      • Optimal Transport
      • Performances
      • Scaling up to brain tractograms – with Pierre Roussillon
GeomLoss
  • Gallery of examples
  • View page source

Gallery of examples

These self-contained examples showcase the features of the geomloss module.

Kernel vs. Hausdorff vs. Sinkhorn

See the difference between our kernel, hausdorff and sinkhorn loss functions:

Gradient flows in 1D

Gradient flows in 1D

Gradient flows in 2D

Gradient flows in 2D

The multiscale Sinkhorn algorithm

Outperform the baseline Auction and Sinkhorn algorithms by a factor x50-100 with adaptive coarse-to-fine strategies:

1) Blur parameter, scaling strategy

1) Blur parameter, scaling strategy

2) Kernel truncation, log-linear runtimes

2) Kernel truncation, log-linear runtimes

3) Optimal Transport in high dimension

3) Optimal Transport in high dimension

4) Sinkhorn vs. blurred Wasserstein distances

4) Sinkhorn vs. blurred Wasserstein distances

Optimal Transport

Use the sinkhorn loss as an affordable, drop-in replacement for the Wasserstein distance:

Optimization routines

Optimization routines

Creating a fancy interpolation video between 3D meshes.

Creating a fancy interpolation video between 3D meshes.

Optimal Transport in 2D

Optimal Transport in 2D

Color transfer with Optimal Transport

Color transfer with Optimal Transport

Label transfer with Optimal Transport

Label transfer with Optimal Transport

Wasserstein barycenters in 1D

Wasserstein barycenters in 1D

Wasserstein barycenters in 2D

Wasserstein barycenters in 2D

Performances

Select the hyper-parameters that are best suited to your data:

Utility routines for benchmarks on OT solvers

Utility routines for benchmarks on OT solvers

Wasserstein distances between large point clouds

Wasserstein distances between large point clouds

Benchmark SamplesLoss in 3D

Benchmark SamplesLoss in 3D

Profile the GeomLoss routines

Profile the GeomLoss routines

Scaling up to brain tractograms – with Pierre Roussillon

Use unbalanced, regularized Optimal Transport to process white matter fiber tracks. The scripts presented below should allow you to reproduce the experiments of the Miccai 2019 paper Fast and scalable Optimal Transport for brain tractograms by Jean Feydy*, Pierre Roussillon*, Alain Trouvé and Pietro Gori.

Create an atlas using Wasserstein barycenters

Create an atlas using Wasserstein barycenters

Input-Output with brain tractograms

Input-Output with brain tractograms

Transferring labels from a segmented atlas

Transferring labels from a segmented atlas

Download all examples in Python source code: _auto_examples_python.zip

Download all examples in Jupyter notebooks: _auto_examples_jupyter.zip

Gallery generated by Sphinx-Gallery

Previous Next

© Copyright 2019-2025, Jean Feydy. Last updated on Apr 18, 2025.

Built with Sphinx using a theme provided by Read the Docs.