image Modified image Source image (X) Style image (Y) Source image after color transfer J. Rabin Wasserstein Regularization Optimal transport framework Sliced Wasserstein projection Applications Application to Color Transfer Source image (X) Sliced Wasserstein projection of X to style image color statistics Y Optimal transport framework Sliced Wasserstein projection Applications Application to Color Transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer J. Rabin Wasserstein Regularization Colors distribution: each pixel point in R3
distance: Projection on statistical constraints: Proj C (f) = Y Wp (µX, µY )p = i ||Xi Y (i) ||p Metric on the space of distributions. C = {f \ µf = µY } Discrete distributions: Optimal Assignments Optimal assignment: Xi Y (i) µX µY µX = 1 N N i=1 Xi
µ = i pi Xi ⇥ = i qi Yi Wp (µ, )p solution of a linear program. Arbitrary distributions: Computing Transport Distances Xi Yi Explicit solution for 1D distribution (e.g. grayscale images): sorting the values, O(N log(N)) operations. O(N5/2 log(N)) operations. intractable for imaging problems.
distributions arbitrary number of points µ, = P RN1 N2 \ P 0, P1 = p, P 1 = q If N1 = N2 , permutation matrix: i ||Xi Y (i) ||p = i,j Pi,j ||Xi Yj ||p Defined even if N1 = N2 . Takes into account weights. Linear objective. Coupling Matrices µ = N1 i=1 pi Xi q p P = P = ( i (j) ) i,j
min N ||f0 f1 ⇥ || T : f0 (x) R3 f1 ( (i)) R3 ˜ f0 = T(f0 ) ˜ f0 = f1 Color Histogram Equalization ⇥i = 1 N x fi(x) T Optimal transport framework Sliced Wasserstein projection Applications Application to Color Transfer Source image (X) Sliced Wasserstein projection image color statistics Y Optimal transport framework Sliced Wasserstein projection Applications Application to Color Transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer J. Rabin Wasserstein Regularization Application to Color Transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer J. Rabin Wasserstein Regularization f0 T(f0 ) µ1 f1 µ0 µ1 f0 T
of class C1 and SW(µX, µY )2 = || ||=1 W(µX , µY )2d E(X) = Xi Y⇥ (i) , d . Sliced-Wasserstein Distance Key idea: replace transport in Rd by series of 1D transport. Xi Xi, Sliced Wasserstein distance: Projected point cloud: X = { Xi, ⇥}i . [Rabin, Peyr´ e, Delon & Bernot 2010] where N are 1-D optimal assignents of X and Y . Possible to use SW in variational imaging problems. Fast numerical scheme : use a few random .
Y )2 Step 1: choose at random. Step 2: X( ) converges to C = {X \ µX = µY }. X( +1) = X( ) E (X( )) Sliced Wasserstein Transportation N , X = Y Theorem: X( ) Proj C (X(0)) Numerical observation: Final assignment X is a local minimum of E ( X ) = SW ( µX , µY ) 2
Color Transfer Application to Color Transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer Application to Color Transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer
⇥ Y Source image (X) Style image (Y) X ⇥ Y Source image (X) Style image (Y) X ⇥ Y Source image (X) Style image (Y) X ⇥ Y Y ⇥ X Input image f0 Target image f1 Transfered image ˜ f0
not regular. Color Transfer Artifacts Application to Color Transfer Source image (X) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer Source image (X) Style image (Y) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer ansport framework Sliced Wasserstein projection Applications plication to Color Transfer Source image (X) Sliced Wasserstein projection of X to style image color statistics Y Source image after color transfer Input image f0 Target image f Transfered image ˜ f0 T amplifies noise.
(µ1 , µ ) W 2 (µ 2 ,µ ) W2 (µ3 ,µ ) If µi = Xi , then µ = X X = i iXi Generalizes Euclidean barycenter. i i = 1 Barycenter of {(µi, i )}L i=1 : µ argmin µ L i=1 iW2 (µi, µ)2 if µ1 does not vanish on small sets, Wasserstein Barycenter [Agueh, Carlier, 2010] µ2
solves min X i i SW(µX, µXi )2 Ei (X) = SW(µX, µXi )2 X( +1) = X( ) ⇥ L i=1 i Ei (X( )) Sliced Wasserstein Barycenter µX is a sum of N Diracs. Sliced-barycenter: Smooth optimization problem.
Application: Color Harmonization . Step 1: compute Sliced-Wasserstein Barycenter of color statistics; . Step 2: compute Sliced-Wasserstein projection of each image onto the Barycenter; Raw image sequence J. Rabin – GREYC, University of Caen Approximate Wasserstein Metric for Texture Synthesis and Mixing . Step 1: compute Sliced-Wasserstein Barycenter of color statistics; . Step 2: compute Sliced-Wasserstein projection of each image onto the Barycenter; Raw image sequence J. Rabin – GREYC, University of Caen Approximate Wasserstein Metric for Texture Synthesis and Mixing . Step 1: compute Sliced-Wasserstein Barycenter of color statistics; . Step 2: compute Sliced-Wasserstein projection of each image onto the Barycenter; Raw image sequence J. Rabin – GREYC, University of Caen Approximate Wasserstein Metric for Texture Synthesis and Mixing Wasserstein Barycenter Sliced Wasserstein Barycenter Experimental results Applications Conclusion Color transfer Color harmonization of several images . Step 1: compute Sliced-Wasserstein Barycenter of color statistics; . Step 2: compute Sliced-Wasserstein projection of each image onto the Barycenter; asserstein Barycenter Sliced Wasserstein Barycenter Experimental results Applications Conclusion Color transfer Color harmonization of several images . Step 1: compute Sliced-Wasserstein Barycenter of color statistics; . Step 2: compute Sliced-Wasserstein projection of each image onto the Barycenter; serstein Barycenter Sliced Wasserstein Barycenter Experimental results Applications Conclusion olor transfer Color harmonization of several images . Step 1: compute Sliced-Wasserstein Barycenter of color statistics; . Step 2: compute Sliced-Wasserstein projection of each image onto the Barycenter;
N1 N2 N3 Images Videos Gaussian model: m RN d, RNd Nd X µ = N(m, ) Texture synthesis: given (m, ), draw a realization f = X( ). highly under-determined problem. Factorize = AA (e.g. Cholesky). Compute f = m + Aw where w drawn from N(0, Id). Texture analysis: from f0 RN d, learn (m, ). f0 RN d Gaussian Texture Model N1 N2
covariance: i,j = 1 N x f0 (i + x) f0 (j + x) Rd d ˆ y( ) = ˆ( ) ˆ f( ) y = f computed as where ˆ f( ) = x f(x)e 2ix1⇥1 N1 + 2ix2⇥2 N2 = 0, ˆ( ) = ˆ f0 ( ) ˆ f0 ( ) Cd d is a spot noise = 0, ˆ( ) is rank-1. MLE of : Maximum likelihood estimate (MLE) of m from f0 : i, mi = 1 N x f0 (x) Rd Spot Noise Model [Galerne et al.]