<?php include("../header.php"); ?>

<h1 style="text-align:center"> Texture Synthesis with <br/> Patch Optimal Transport </h1>


<p style="width:500px;text-align:center;margin-left:auto;margin-right:auto">
	<a href="#presentation">Presentation</a> &nbsp; - &nbsp;
	<a href="#papers">Papers</a> &nbsp; - &nbsp;
	<a href="results.php">Results</a> &nbsp; - &nbsp;
	<a href="https://plmlab.math.cnrs.fr/aleclaire/texto">Git</a> &nbsp; - &nbsp;
	<a href="#codes">Source codes</a> <br/>
	<a href="#dpp">DPP Acceleration</a> &nbsp; - &nbsp;
	<a href="multilayer.php">Multilayer</a>
	<!-- <a href="http://ipolcore.ipol.im/demo/clientApp/demo.html?id=198" target="_blank">Online demo</a> &nbsp; - &nbsp; 
	<a href="tuto_gaussian_inpainting/">Tutorial</a> &nbsp; - &nbsp; 
	<a href="#credits">Credits</a> -->
</p>

<h2 style="margin-left:50px" id="presentation">Presentation</h2>

<p>
&emsp; In this work, we propose to address exemplar-based texture synthesis with a model based on optimal transport in the patch space.
More precisely, starting from a Gaussian random field at coarse scale, we propose to apply several local transformations in order to reimpose geometric features in a way which is statistically compliant to the patch distribution of the input texture.
These local transformations operate on the 3x3 patches at multiple scales and are designed to solve a semi-discrete optimal transport problem in the patch space.
They essentially consist of weighted nearest neighbor assignments, that are able to reimpose the empirical patch distribution of the exemplar at multiple scales.
</p>

<div style="margin-top:20px;margin-bottom:20px;margin-left:auto;margin-right:auto;width:500px" class="noborder">
<table>
 <tr>
  <td width="80"><img src="example/original.png" width="40" style="vertical-align:middle" alt="Original" title="Original"/>
   <br/><br/> Original </td>
  <td><img src="example/synthesis.png" width="320" style="vertical-align:middle" alt="Synthesis" title="Synthesis"/> 
   <br/><br/> Synthesis</td>
 </tr>
</table>
</div>

<h2 style="margin-left:50px" id="papers">Papers</h2>

<p>&emsp;
The texture model is described in the papers
</p>

<p style="width:500px;margin-left:auto;margin-right:auto">
<b>"A Texture Synthesis Model Based on Semi-discrete Optimal Transport in Patch Space"</b><br/> 
(Bruno Galerne, Arthur Leclaire, Julien Rabin), <br/>
<i>SIAM Journal on Imaging Sciences</i>, vol. 11, no. 4, pp. 2456-2493, 2018. <br/>
<a href="https://hal.archives-ouvertes.fr/hal-01726443">Hal preprint</a>.
<a href="https://doi.org/10.1137/18M1175781">doi</a>.
</p>

<p style="width:500px;margin-left:auto;margin-right:auto">
<b>"Semi-Discrete Optimal Transport in Patch Space for Enriching Gaussian Textures"</b><br/> 
(Bruno Galerne, Arthur Leclaire, Julien Rabin),
<i>Geometric Science of Information (GSI)</i>. <br/>
<a href="http://www.math-info.univ-paris5.fr/~aleclair/papers/otpatch_gsi_revised2.pdf">Revised Preprint</a>.
<a href="https://hal.archives-ouvertes.fr/hal-01560785">Hal</a>.
</p>

<p>
&emsp; The experiments shown in this paper can be reproduced using the codes available below.
</p>

<h2 style="margin-left:50px" id="results">Results</h2>

<p>
&emsp; 
Several high-resolution texture synthesis results can be seen <a href="results.php">here</a>.
</p>

<h2 style="margin-left:50px" id="git">Git Repository</h2>

<p> &emsp; This project is linked to a <a href="https://plmlab.math.cnrs.fr/aleclaire/texto">Git repository</a>.</p>

<h2 style="margin-left:50px" id="codes"> Source codes</h2>

<p> &emsp; The Python source codes can be downloaded from the <a href="https://plmlab.math.cnrs.fr/aleclaire/texto">Git repository</a>.

<p> &emsp; The archive <a href="release.zip">release.zip</a> contains Matlab source codes for texture synthesis. 
See readme.txt for details about the usage.</p>

<p> &emsp;
This archive contains the main functions
<ul style="margin-left:100px;padding:0px;">
<li><b>texto_estimate.m</b> : estimate the model from an input texture</li>
<li><b>texto_synthesize.m</b> : sample the texture model</li>
<li><b>semi_discrete_ot_asgd.m</b> : compute semi-discrete optimal transport plan</li>
<li><b>sample_transport_plan.m</b> : sample the optimal transport plan</li>
</ul>
</p>
<p> &emsp; and also
<ul style="margin-left:100px;padding:0px;">
<li>a script file <b>texto_test.m</b> which allows to test the main functions</li>
<li>a folder <b>textures</b> containing input texture images </li>
<li>a folder <b>models</b> containing pre-estimated texture models </li>
</ul>
</p>

<p> &emsp; Besides, we provide a fast implementation based on CUDA/Matlab:
<ul style="margin-left:100px;padding:0px;">
<li><b>texto_synthesize_cuda.m</b> : sample the texture model</li>
<li><b>patch_transport.cu</b> : apply patch transport plan</li>
<li><b>patch_transport_upsample.m</b> : apply patch transport plan and upsample</li>
</ul>
</p>

<p> &emsp; If you find some bugs or mistakes in those codes, you can report them by email to Arthur Leclaire.</p>

<h2 style="margin-left:50px" id="dpp"> DPP Acceleration</h2>

<p> &emsp;
The synthesis algorithm presented above can be accelerated by exploiting a subsampling of the target patch distribution based on determinantal point processes (DPP). This acceleration was studied in the following paper.</p>

<p style="width:500px;margin-left:auto;margin-right:auto">
<b>"Determinantal Patch Processes for Texture Synthesis"</b><br/> 
(Claire Launay, Arthur Leclaire),
Actes du GRETSI, 2019.
<a href="https://hal.archives-ouvertes.fr/hal-02088725">Hal preprint</a>.
</p>

<p> &emsp; The archive <a href="release_dpp.zip">release_dpp.zip</a> contains the corresponding source codes.  
This file has the same structure that release.zip, with some additional files for the DPP simulation.
The main script is <b>texto_test_dpp.m</b>. 
Some pre-estimated models are available in the <b>textures</b> folder.
See readme.txt for details about the usage.</p>

<!-- <h2 style="margin-left:50px" id="ipol"> Online demo </h2>

<p> &emsp; An online demo has been submitted to <i>Image Processing on Line</i> and is available <a href="http://ipolcore.ipol.im/demo/clientApp/demo.html?id=198" target="_blank">here</a>. <br/> &emsp;
The C source code can be downladed <a href="codes/gti_1.0.zip">here</a>. </p> -->

<!--
<h2 style="margin-left:50px" id="credits">Credits</h2>

<p>&emsp; We would like to thank the researchers who provided the images used in our experiments.</p>

<p>&emsp; The images vondrick_* were taken from the article </p>

<p style="width:500px;margin-left:auto;margin-right:auto">
<b>Hoggles: Visualizing object detection features.</b> (C. Vondrick, A. Khosla, T. Malisiewicz, and A. Torralba), Proceedings of the IEEE ICCV, 2013.</p>

<p>&emsp; The images perez_* were taken from the article </p>

<p style="width:500px;margin-left:auto;margin-right:auto">
<b>Reconstructing an image from its local descriptors.</b> (P. Weinzaepfel, H. J&eacute;gou, and P. P&eacute;rez), Proceedings of the IEEE CVPR, 2011.</p>
-->

<?php include("../bottom.php"); ?>
  




