Exact (unregularized) optimal transport and assignment between point clouds, with costs
|x−y|p: the optimal sparse plan, its exact cost and the Kantorovich potentials,
which certify optimality. The solver is a network simplex that never stores the cost matrix,
started by a multiscale scheme and parallel sweeps of a domain decomposition, with forward and
reverse auctions for assignment problems and a dedicated solver for images and volumes.
Memory is linear and time almost linear in the number of points, which brings
problems of millions of points within reach of a workstation.
Header-only C++17 with no dependency, NumPy and PyTorch bindings (pip install deblais)
with a cost differentiable with respect to the points and the masses, and an automatic mode that
picks the algorithm and its parameters. A browser demo moves
ten million grains from the streets of Paris to those of London
(full screen,
film).
deblais and remblais are twin libraries: deblais computes the exact
optimal plan on CPUs, remblais smooth entropic losses to minimize on GPUs. Take deblais for a plan,
an assignment or a reference value, remblais for a loss to minimize. The names come from
Monge (1781), who asked how to move a pile of earth, the déblais, into a hole,
the remblais, at the lowest cost.
License: MIT or Apache-2.0
Materials:
github,
documentation,
PyPI