:orphan: ==================== Gallery of examples ==================== These self-contained examples showcase the features of the :mod:`geomloss` module. .. raw:: html
.. raw:: html
Kernel vs. Hausdorff vs. Sinkhorn -------------------------------------- See the difference between our **kernel**, **hausdorff** and **sinkhorn** loss functions: .. raw:: html
.. raw:: html
.. only:: html .. image:: /_auto_examples/comparisons/images/thumb/sphx_glr_plot_gradient_flows_1D_thumb.png :alt: :ref:`sphx_glr__auto_examples_comparisons_plot_gradient_flows_1D.py` .. raw:: html
Gradient flows in 1D
.. raw:: html
.. only:: html .. image:: /_auto_examples/comparisons/images/thumb/sphx_glr_plot_gradient_flows_2D_thumb.png :alt: :ref:`sphx_glr__auto_examples_comparisons_plot_gradient_flows_2D.py` .. raw:: html
Gradient flows in 2D
.. raw:: html
The multiscale Sinkhorn algorithm ------------------------------------- **Outperform** the baseline Auction and Sinkhorn algorithms by a factor **x50-100** with adaptive coarse-to-fine strategies: .. raw:: html
.. raw:: html
.. only:: html .. image:: /_auto_examples/sinkhorn_multiscale/images/thumb/sphx_glr_plot_epsilon_scaling_thumb.png :alt: :ref:`sphx_glr__auto_examples_sinkhorn_multiscale_plot_epsilon_scaling.py` .. raw:: html
1) Blur parameter, scaling strategy
.. raw:: html
.. only:: html .. image:: /_auto_examples/sinkhorn_multiscale/images/thumb/sphx_glr_plot_kernel_truncation_thumb.png :alt: :ref:`sphx_glr__auto_examples_sinkhorn_multiscale_plot_kernel_truncation.py` .. raw:: html
2) Kernel truncation, log-linear runtimes
.. raw:: html
.. only:: html .. image:: /_auto_examples/sinkhorn_multiscale/images/thumb/sphx_glr_plot_optimal_transport_cluster_thumb.png :alt: :ref:`sphx_glr__auto_examples_sinkhorn_multiscale_plot_optimal_transport_cluster.py` .. raw:: html
3) Optimal Transport in high dimension
.. raw:: html
.. only:: html .. image:: /_auto_examples/sinkhorn_multiscale/images/thumb/sphx_glr_plot_transport_blur_thumb.png :alt: :ref:`sphx_glr__auto_examples_sinkhorn_multiscale_plot_transport_blur.py` .. raw:: html
4) Sinkhorn vs. blurred Wasserstein distances
.. raw:: html
Optimal Transport ---------------------- Use the **sinkhorn** loss as an affordable, drop-in replacement for the Wasserstein distance: .. raw:: html
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_model_fitting_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_model_fitting.py` .. raw:: html
Optimization routines
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_plot_interpolation_3D_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_plot_interpolation_3D.py` .. raw:: html
Creating a fancy interpolation video between 3D meshes.
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_plot_optimal_transport_2D_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_plot_optimal_transport_2D.py` .. raw:: html
Optimal Transport in 2D
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_plot_optimal_transport_color_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_plot_optimal_transport_color.py` .. raw:: html
Color transfer with Optimal Transport
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_plot_optimal_transport_labels_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_plot_optimal_transport_labels.py` .. raw:: html
Label transfer with Optimal Transport
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_plot_wasserstein_barycenters_1D_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_plot_wasserstein_barycenters_1D.py` .. raw:: html
Wasserstein barycenters in 1D
.. raw:: html
.. only:: html .. image:: /_auto_examples/optimal_transport/images/thumb/sphx_glr_plot_wasserstein_barycenters_2D_thumb.png :alt: :ref:`sphx_glr__auto_examples_optimal_transport_plot_wasserstein_barycenters_2D.py` .. raw:: html
Wasserstein barycenters in 2D
.. raw:: html
Performances ---------------- Select the hyper-parameters that are best suited to your data: .. raw:: html
.. raw:: html
.. only:: html .. image:: /_auto_examples/performances/images/thumb/sphx_glr_benchmarks_ot_solvers_thumb.png :alt: :ref:`sphx_glr__auto_examples_performances_benchmarks_ot_solvers.py` .. raw:: html
Utility routines for benchmarks on OT solvers
.. raw:: html
.. only:: html .. image:: /_auto_examples/performances/images/thumb/sphx_glr_plot_benchmarks_ot_3D_thumb.png :alt: :ref:`sphx_glr__auto_examples_performances_plot_benchmarks_ot_3D.py` .. raw:: html
Wasserstein distances between large point clouds
.. raw:: html
.. only:: html .. image:: /_auto_examples/performances/images/thumb/sphx_glr_plot_benchmarks_samplesloss_3D_thumb.png :alt: :ref:`sphx_glr__auto_examples_performances_plot_benchmarks_samplesloss_3D.py` .. raw:: html
Benchmark SamplesLoss in 3D
.. raw:: html
.. only:: html .. image:: /_auto_examples/performances/images/thumb/sphx_glr_plot_profile_thumb.png :alt: :ref:`sphx_glr__auto_examples_performances_plot_profile.py` .. raw:: html
Profile the GeomLoss routines
.. raw:: html
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. .. raw:: html
.. raw:: html
.. only:: html .. image:: /_auto_examples/brain_tractograms/images/thumb/sphx_glr_track_barycenter_thumb.png :alt: :ref:`sphx_glr__auto_examples_brain_tractograms_track_barycenter.py` .. raw:: html
Create an atlas using Wasserstein barycenters
.. raw:: html
.. only:: html .. image:: /_auto_examples/brain_tractograms/images/thumb/sphx_glr_tract_io_thumb.png :alt: :ref:`sphx_glr__auto_examples_brain_tractograms_tract_io.py` .. raw:: html
Input-Output with brain tractograms
.. raw:: html
.. only:: html .. image:: /_auto_examples/brain_tractograms/images/thumb/sphx_glr_transfer_labels_thumb.png :alt: :ref:`sphx_glr__auto_examples_brain_tractograms_transfer_labels.py` .. raw:: html
Transferring labels from a segmented atlas
.. raw:: html
.. toctree:: :hidden: :includehidden: /./_auto_examples/comparisons/index.rst /./_auto_examples/sinkhorn_multiscale/index.rst /./_auto_examples/optimal_transport/index.rst /./_auto_examples/performances/index.rst /./_auto_examples/brain_tractograms/index.rst .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: _auto_examples_python.zip ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: _auto_examples_jupyter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_