diff options
Diffstat (limited to 'docs/source/auto_examples/plot_otda_mapping_colors_images.rst')
-rw-r--r-- | docs/source/auto_examples/plot_otda_mapping_colors_images.rst | 76 |
1 files changed, 50 insertions, 26 deletions
diff --git a/docs/source/auto_examples/plot_otda_mapping_colors_images.rst b/docs/source/auto_examples/plot_otda_mapping_colors_images.rst index 2afdc8a..26664e3 100644 --- a/docs/source/auto_examples/plot_otda_mapping_colors_images.rst +++ b/docs/source/auto_examples/plot_otda_mapping_colors_images.rst @@ -1,6 +1,12 @@ +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + Click :ref:`here <sphx_glr_download_auto_examples_plot_otda_mapping_colors_images.py>` to download the full example code + .. rst-class:: sphx-glr-example-title -.. _sphx_glr_auto_examples_plot_otda_mapping_colors_images.py: + .. _sphx_glr_auto_examples_plot_otda_mapping_colors_images.py: ===================================================== @@ -19,8 +25,7 @@ estimation [8]. - -.. code-block:: python +.. code-block:: default # Authors: Remi Flamary <remi.flamary@unice.fr> @@ -29,7 +34,6 @@ estimation [8]. # License: MIT License import numpy as np - from scipy import ndimage import matplotlib.pylab as pl import ot @@ -56,17 +60,17 @@ estimation [8]. + Generate data ------------- - -.. code-block:: python +.. code-block:: default # Loading images - I1 = ndimage.imread('../data/ocean_day.jpg').astype(np.float64) / 256 - I2 = ndimage.imread('../data/ocean_sunset.jpg').astype(np.float64) / 256 + I1 = pl.imread('../data/ocean_day.jpg').astype(np.float64) / 256 + I2 = pl.imread('../data/ocean_sunset.jpg').astype(np.float64) / 256 X1 = im2mat(I1) @@ -87,12 +91,12 @@ Generate data + Domain adaptation for pixel distribution transfer ------------------------------------------------- - -.. code-block:: python +.. code-block:: default # EMDTransport @@ -128,7 +132,9 @@ Domain adaptation for pixel distribution transfer .. rst-class:: sphx-glr-script-out - Out:: + Out: + + .. code-block:: none It. |Loss |Delta loss -------------------------------- @@ -167,12 +173,13 @@ Domain adaptation for pixel distribution transfer 10|3.639419e+02|-3.209753e-05 + + Plot original images -------------------- - -.. code-block:: python +.. code-block:: default pl.figure(1, figsize=(6.4, 3)) @@ -192,7 +199,8 @@ Plot original images .. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_colors_images_001.png - :align: center + :class: sphx-glr-single-img + @@ -201,8 +209,7 @@ Plot pixel values distribution ------------------------------ - -.. code-block:: python +.. code-block:: default pl.figure(2, figsize=(6.4, 5)) @@ -226,8 +233,9 @@ Plot pixel values distribution -.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_colors_images_003.png - :align: center +.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_colors_images_002.png + :class: sphx-glr-single-img + @@ -236,8 +244,7 @@ Plot transformed images ----------------------- - -.. code-block:: python +.. code-block:: default pl.figure(2, figsize=(10, 5)) @@ -277,28 +284,45 @@ Plot transformed images -.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_colors_images_004.png - :align: center +.. image:: /auto_examples/images/sphx_glr_plot_otda_mapping_colors_images_003.png + :class: sphx-glr-single-img + + +.. rst-class:: sphx-glr-script-out + + Out: + .. code-block:: none + /home/rflamary/PYTHON/POT/examples/plot_otda_mapping_colors_images.py:173: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. + pl.show() -**Total running time of the script:** ( 3 minutes 14.206 seconds) +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 2 minutes 24.007 seconds) + + +.. _sphx_glr_download_auto_examples_plot_otda_mapping_colors_images.py: + + .. only :: html .. container:: sphx-glr-footer + :class: sphx-glr-footer-example + - .. container:: sphx-glr-download + .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_otda_mapping_colors_images.py <plot_otda_mapping_colors_images.py>` - .. container:: sphx-glr-download + .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_otda_mapping_colors_images.ipynb <plot_otda_mapping_colors_images.ipynb>` @@ -307,4 +331,4 @@ Plot transformed images .. rst-class:: sphx-glr-signature - `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_ + `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_ |