fabien pierre
play

Fabien Pierre. University of Lorraine (France), LORIA, INRIA team - PowerPoint PPT Presentation

Coupling Variational Method with CNN for Image Colorization Fabien Pierre. University of Lorraine (France), LORIA, INRIA team MAGRIT. Variational methods and optimization in imaging. To the memory of our dear friend and colleague Mila Nikolova


  1. Coupling Variational Method with CNN for Image Colorization Fabien Pierre. University of Lorraine (France), LORIA, INRIA team MAGRIT. Variational methods and optimization in imaging. To the memory of our dear friend and colleague Mila Nikolova 2019.02.04 Joint work with : Marie-Odile Berger and Thomas Mouzon. 1 / 31

  2. General problem of colorization Input. Output. 2 / 31

  3. The YUV color space Definition of the gray-scale channel from RGB : Y = 0 . 299 R + 0 . 587 G + 0 . 114 B . Chrominance channel : U and V , enable to recover the RGB image ; invertible linear map between YUV and RGB . Challenge. Recovering an RGB image from the luminance channel alone is an ill-posed problem and requires additional chrominance information. 3 / 31

  4. The manual colorization Two approaches : fully manual (polygonal masks) ; automatic diffusion. Input Levin et al. SIGGRAPH Colorization with 2004. masks 4 / 31

  5. The manual colorization 5 / 31

  6. Exemplar-based colorization Source Target Research of the "closest" patch. Extract the color. Welsch et al. 2002. 6 / 31

  7. Exemplar-based colorization Gupta et al. 2012. 7 / 31

  8. Exemplar-based colorization Compute Φ Target Luminance YUV YUV image decomposition inversion Source Colorized image image Use Φ Source UV Mapped UV Chrominance Chrominance Persch et al. 2017. 8 / 31

  9. Image database-based colorization Authors Color space Structure of the network Data base Cost function G. Larsson et al. 2006 HCL VGG ImageNet Cross Entropy R. Zhang et al. 2016 Lab VGG ImageNet Cross Entropy S. Iizuka et al. 2016 Lab U-Net + Classifier MIT Places L2 + Cross Entropy S. Guadarrama et al.2017 YCbCr Pixel CNN ImageNet L1 + Cross Entropy Y. Cao et al. 2017 YUV cGAN LSUN Adv A. Royer et al. 2017 Lab Pixel CNN ImageNet CIFAR10 Cross Entropy A. Deshpande et al.2017 Lab VAE + MDN ImageNet MD F. Baldassarre et al.2017 Lab U-Net + Classifier ImageNet L2 R. Zhang et al. 2017 Lab U-Net + LHN + GHN ImageNet Huber Loss P. Isola et al. 2017 Lab cGAN ImageNet L1 Y. Xiao et al. 2018 Lab U-Net + LHN + GHN MIT Places Huber Loss Z. Su et al. 2018 YUV VGG MIT Places L1 + L2 K. Nazeri et al. 2018 Lab cGAN MIT Places CIFAR10 L1 9 / 31

  10. Lack of regularization with CNN Target (input) Result of Zhang et al. , 2016 Our model Limitation of Zhang et al. , 2016. halo effects ; mixing of colors. Based on a variational model, our method is able to remove such artifacts. 10 / 31

  11. Naive approach CNN method TV-L2 color Zhang et al, 2016 post-processing Too simple ! ! 11 / 31

  12. CNN of Zhang et al. , 2016 Lightness 256x256 64x64 64x64 64x64 Downsampling 32x32 32x32 32x32 32x32 32x32 256 512 512 512 512 256 313 Pixel-wise color 64 1 distribution over 313 colors. Annealed mean. Lab2RGB u* : chromaticity RGB image This CNN computes color distribution on each pixel. 12 / 31

  13. CNN of Zhang et al. , 2016 Set of the “labels”. 13 / 31

  14. CNN of Zhang et al. , 2016 Definition of annealed-mean exp(log( w i ) / T ) w ∗ i = � j exp(log( w j ) / T ) 14 / 31

  15. CNN of Zhang et al. , 2016 Lightness 256x256 64x64 64x64 64x64 Downsampling 32x32 32x32 32x32 32x32 32x32 256 512 512 512 512 256 313 64 1 Pixel-wise color distribution over 313 colors. Upsampling Initialize w* : binary Pixel- wise color (u*, w*)=argmin F(u,w) distribution. u* : chromaticity Lab2RGB RGB image A CNN computes color distribution on each pixel that feeds a variational method. 15 / 31

  16. Coupled total variation Inspired of Pierre et al. 2015 SIAM journal of Imaging Sciences. Color regularization. u = ( ˆ U , ˆ ˆ V ) = argmin ( U , V ) TV Y data ( U , V )+ � | U ( x ) − U data ( x ) | 2 + | V ( x ) − V data ( x ) | 2 dx , α Ω with � � γ |∇ Y data | 2 + |∇ U | 2 + |∇ V | 2 dx . TV Y data ( U , V ) := Ω 16 / 31

  17. 1D interpretation √ γ a 2 + b 2 γ a 2 + � � TV Y data = ≤ TV Y data = b 2 17 / 31

  18. Chrominance inpainting u = ( ˆ U , ˆ ˆ V ) = argmin ( U , V ) TV Y data ( U , V )+ � | U ( x ) − U data ( x ) | 2 + | V ( x ) − V data ( x ) | 2 � � M dx , α Ω with � � γ |∇ Y data | 2 + |∇ U | 2 + |∇ V | 2 dx . TV Y data ( U , V ) := Ω M a mask, and ( U data , V data ) some color scribbles given by the user. Scribbles No coupling. With coupling. 18 / 31

  19. Intuition about coupling Scribbles. γ = 0. γ = 1. γ = 10. Parameter influence. γ small : chrominance contours have low perimeters. 19 / 31

  20. Variational model for color regularization Let us minimize the following functional with respect to ( u , w ) : C F ( u , w ) := TV C ( u ) + λ � � w i � u ( x ) − c i ( x ) � 2 2 dx 2 Ω i = 1 + χ R ( u ( x )) + χ ∆ ( w ( x )) . (1) The central part of this model is based on the term C � � w i ( x ) � u ( x ) − c i ( x ) � 2 2 dx . (2) Ω i = 1 20 / 31

  21. Variational model for color regularization Assume that u ∗ is a uniform real-valued random variable over the set [ 0 , 255 ] 2 . Let us denote E the canonical basis of R C . The set of minimizers of C � w i � u ∗ − c i � 2 � 2 + χ ∆ ( w ) (3) Ω i = 1 is reduced to a point w ∗ ( u ∗ ) almost everywhere ( a.e. ). Moreover, the one of : C � w i � u ∗ − c i � 2 � 2 + χ E ( w ) (4) Ω i = 1 is reduced to a point w ∗∗ ( u ∗ ) a.e. . When these two minimizers are unique then w ∗∗ ( u ∗ ) = w ∗ ( u ∗ ) . 21 / 31

  22. Minimization algorithm Primal-dual algorithm inspired by Chambolle and Pock 2011. 1: u 0 ← � C i = 1 w n + 1 c i 0 2: for n > 0 do p n + 1 ← P B ( p n + σ ∇ u n ) 3: w n + 1 ← P ∆ w n − ρλ ( � u n + 1 − c i � 2 � � 2 ) i 4: � � u n + τ  div( p n + 1 ) + λ � C i = 1 w n + 1  c i i u n + 1 ← P R 5:   1 + τλ u n + 1 ← 2 u n + 1 − u n 6: Parameters ρ , τ and σ are the time steps. No proof of convergence 22 / 31

  23. Regularize the regularizer Smoothing of the regularizer for a convergent numerical scheme (Tan, Pierre and Nikolova, preprint 2018). Introducing some regularity for the total variation : � � max { 1 , γ |∇ Y data | 2 } + |∇ U | 2 + |∇ V | 2 dx . TV Y data ( U , V ) := Ω 23 / 31

  24. Minimization algorithm Inertial Bregman-based proximal gradient descent for image colorization 1: u 0 ← � C i = 1 w n + 1 c i 0 2: u 1 ← u 0 3: for n > 0 do u n ← 2 u n − u n − 1 4: u n ← 2 u n − u n − 1 ˆ 5: u n − τ ∇ TV C ( u n ) + τλ � C � � i = 1 w n + 1 ˆ c i u n + 1 ← P R i 6: 1 + τλ � � j = 1 � u n + 1 − c j � 2 − σλ � C w n i exp 2 w n + 1 ← 7: � � j = 1 � u n + 1 − c j � 2 � C − σλ � C i = 1 w n i exp 2 Convergence guaranteed. No need of projection onto simplex. 24 / 31

  25. Energy comparison 10 7 10 7 1.9 1.609 1.6085 1.85 1.608 1.6075 1.8 1.607 1.6065 1.75 1.606 1.7 1.6055 1.605 1.65 1.6045 1.604 1.6 0 200 400 600 800 1000 250 300 350 400 450 500 550 600 650 Energy Zoom (yellow : ASAP, Primal-dual : red) 10 5 10 5 6 7 6 5 5 4 4 3 3 2 2 1 1 0 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1.2 Weights, n=500 (ASAP) Weights, n=500 (Primal-dual) 25 / 31

  26. Original image Zhang et al. 2016 Our result 0.12 Zhang et al. 2016 Ours 0.1 0.08 0.06 0.04 0.02 0 0 0.2 0.4 0.6 0.8 1 Results of Zhang et al. 2016 vs our (histogram of the saturation). Average of saturation : our= 0.4228 ; Zhang et al. = 0.3802 . 26 / 31

  27. Halo removal Target (input) Result of Zhang et al. 2016 Our model Toy example proof of concept ; ability to remove the halo effects of Zhang et al. 2016. 27 / 31

  28. Target (input) Result of Zhang et al. 2016 Our model 28 / 31

  29. Target (input) Result of Zhang et al. 2016 Our model 29 / 31

  30. Limitation. The results depend on the database. Zhang et al. ECCV Larsson et al. ECCV Iizuka et al. SIGGRAPH, 2016, (1.3 2016, ImageNet 2016, Places (2.5 mil- ImageNet millions images) lions images) 30 / 31

  31. Conclusion and future works : Conclusion : system able to colorize images without user intervention ; coupling of CNN and variational model. Further improvement : convergence for standard total variation with primal-dual approach and biconvex functions ; debiasing of the results. 31 / 31

  32. Coupling Variational Method with CNN for Image Colorization Fabien Pierre. University of Lorraine (France), LORIA, INRIA team MAGRIT. Variational methods and optimization in imaging. To the memory of our dear friend and colleague Mila Nikolova 2019.02.04 Many thanks for your attention. 31 / 31

Recommend


More recommend