from Image Processing to Machine Learning Dr. Yu-Kun Lai, Cardiff - - PowerPoint PPT Presentation

β–Ά
from image processing to machine
SMART_READER_LITE
LIVE PREVIEW

from Image Processing to Machine Learning Dr. Yu-Kun Lai, Cardiff - - PowerPoint PPT Presentation

Non-photorealistic Rendering of Images: from Image Processing to Machine Learning Dr. Yu-Kun Lai, Cardiff University GAMES webinar 4/7/2019 Non-Photorealistic Rendering A well researched topic that mimics artistic styles using computer


slide-1
SLIDE 1

Non-photorealistic Rendering of Images: from Image Processing to Machine Learning

  • Dr. Yu-Kun Lai, Cardiff University

GAMES webinar 4/7/2019

slide-2
SLIDE 2

Non-Photorealistic Rendering

A well researched topic that mimics artistic styles using computer algorithms

Photo Cartoon Painting Pen & Ink

slide-3
SLIDE 3

Non-Photorealistic Rendering: Applications Technical illustrations Scientific visualisation

slide-4
SLIDE 4

Our Work: Traditional Methods

Dedicated algorithms are developed to create specific styles.

Rosin & Lai, Graphical Models, 2013. Rosin & Lai, Computational Aesthetics, 2013. Rosin & Lai, Computational Aesthetics, 2015. Lai & Rosin, IEEE Trans. Image Processing, 2014.

slide-5
SLIDE 5

Artistic Minimal Rendering Key observations:

Using a small number of tones Simple primitives: lines and tonal blocks

Artistical minimal rendering with lines and blocks, Graphical Models, 2013. Portrait by Andy Warhol Input Single-scale Multi-scale

slide-6
SLIDE 6

Artistic Minimal Rendering: Pipeline

slide-7
SLIDE 7

Artistic Minimal Rendering: 3-tone lines

Input Lines only (2-tone) 3-tone posterised into 3 levels

slide-8
SLIDE 8

Artistic Minimal Rendering: Tonal Blocks

slide-9
SLIDE 9

Artistic Minimal Rendering: Tone Overlay

slide-10
SLIDE 10

Results and Extensions

slide-11
SLIDE 11

Results and Extensions

slide-12
SLIDE 12

GAN-based Image Synthesis Pix2Pix CycleGAN

slide-13
SLIDE 13

CartoonGAN We address cartoon stylisation of images

Using unpaired content and style image sets Training data easy to obtain

Content: normal photos from Flickr Style: key frames from cartoon films CartoonGAN: Generative Adversarial Networks for Photo Cartoonization. CVPR, 2018.

slide-14
SLIDE 14

CartoonGAN: architecture Network architecture

Generator: similar to [Johnson et al. 2016] Discriminator: differentiate real and synthesised images

slide-15
SLIDE 15

CartoonGAN: content loss Content loss:

Use L1 instead of L2 to cope with local large differences (recover flat shading)

slide-16
SLIDE 16

CartoonGAN: adversarial loss Adversarial loss

Edges are often lost since they only cover a small number of pixels We add an edge promoting term in adversarial loss by penalising cartoon images with edges smoothed

slide-17
SLIDE 17

CartoonGAN: initialisation Initialisation

Traditional random initialisation does not give good results To avoid the GAN model stuck at poor local minima, we start generator learning that only aims to reconstruct the content of the input images.

slide-18
SLIDE 18

CartoonGAN: Results

slide-19
SLIDE 19

CartoonGAN: Results

slide-20
SLIDE 20

APDrawingGAN Portrait drawings: a longstanding and distinct art form, which typically use a sparse set of continuous graphical elements (e.g., lines) to capture the distinctive appearance of a person

APDrawingGAN: Generating Artistic Portrait Drawings from Face Photos with Hierarchical GANs. CVPR, 2019 (oral).

slide-21
SLIDE 21

APDrawingGAN: Challenges Artistic portrait drawings (APDrawings) are substantially different from painting styles studied in previous work:

Highly abstract, sparse but continuous graphical elements Stronger semantic constraints for portrait Different rendering for different facial parts Elements not located precisely by artists Conceptual lines not directly related to low level features

slide-22
SLIDE 22

APDrawingGAN: Challenges

slide-23
SLIDE 23

APDrawingGAN: Method APDrawingGAN Highlights:

Hierarchical structure Novel distance transform (DT) loss A new APDrawing Dataset

slide-24
SLIDE 24

APDrawingGAN: Hierarchical Structure

We propose a hierarchical structure for both generator and discriminator, each of which includes a global network and six local networks.

slide-25
SLIDE 25

APDrawingGAN: Hierarchical Generator G

slide-26
SLIDE 26

APDrawingGAN: Hierarchical Discriminator D

slide-27
SLIDE 27

APDrawingGAN: Loss Function There are four terms in the loss function:

Adversarial Loss Pixel-wise Loss Distance Transform Loss

𝑀 𝐻, 𝐸 = 𝑀𝑏𝑒𝑀 𝐻, 𝐸 + πœ‡1𝑀ℒ1 𝐻, 𝐸 + πœ‡2π‘€πΈπ‘ˆ 𝐻, 𝐸 + πœ‡3π‘€π‘šπ‘π‘‘π‘π‘š 𝐻, 𝐸

Local transfer Loss

slide-28
SLIDE 28

APDrawingGAN: Distance Transform (DT) loss Motivation: elements in APDrawings are not located precisely.

Small misalignments exist!

L1 loss:

Penalize minor misalignments. Treat small misalignments and big misalignments as the same…

DT loss:

Based on distance. Tolerate small misalignments Penalize big misalignments

slide-29
SLIDE 29

APDrawingGAN: Dataset

We build an artistic portrait drawing dataset containing 140 pairs of high-resolution portrait photos and corresponding professional artistic drawings.

slide-30
SLIDE 30

APDrawingGAN: Pre-training

Face photo NPR result NPR result Ours with jaw line

6655 pairs of face photos and NPR results for pre-training.

slide-31
SLIDE 31

APDrawingGAN: Results on photos without GT

slide-32
SLIDE 32

APDrawingGAN: Results on photos without GT

slide-33
SLIDE 33

APDrawingGAN: Results on photos without GT

slide-34
SLIDE 34

APDrawingGAN: Results on photos without GT

slide-35
SLIDE 35

APDrawingGAN: Ablation study

slide-36
SLIDE 36

APDrawingGAN: Comparison with Gatys, CycleGAN, Pix2Pix

slide-37
SLIDE 37

APDrawingGAN: Comparison with CNNMRF, Deep Image Analogy and Headshot Portrait

slide-38
SLIDE 38

APDrawinGAN: More Results

slide-39
SLIDE 39

APDrawingGAN: User study

Method Rank 1 Rank 2 Rank 3 CycleGAN 14.45% 30.90% 54.65% Pix2Pix 14.16% 44.92% 40.92% Ours 71.39% 24.18% 4.43% ANOVA boxplot

slide-40
SLIDE 40

Conclusions We show how traditional image processing techniques and machine learning can be used for non-photorealistic rendering of images Machine learning is more flexible to cope with different styles We demonstrate that they can be combined to perform effective non-photorealistic rendering Many challenges remain

Quality of results Robustness Evaluation

slide-41
SLIDE 41

Conclusions Quality evaluation

Subjective, typically using a few examples to demonstrate the method works One approach is to create benchmark datasets

Rosin et al. Benchmarking Non- Photorealistic Rendering of Portraits, Expressive, 2017 Mould & Rosin, An image stylization benchmark, Expressive 2016

slide-42
SLIDE 42

Thank you!