Differential Evolution for Self-adaptive Triangular Brushstrokes - - PowerPoint PPT Presentation

differential evolution for self adaptive triangular
SMART_READER_LITE
LIVE PREVIEW

Differential Evolution for Self-adaptive Triangular Brushstrokes - - PowerPoint PPT Presentation

Differential Evolution for Self-adaptive Triangular Brushstrokes Uro s Mlakar, Janez Brest, Ale s Zamuda University of Maribor { uros.mlakar,janez.brest,ales.zamuda } @um.si Student Workshop on Bioinspired Optimization Methods and their


slide-1
SLIDE 1

Differential Evolution for Self-adaptive Triangular Brushstrokes

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda

University of Maribor {uros.mlakar,janez.brest,ales.zamuda}@um.si

Student Workshop on Bioinspired Optimization Methods and their Applications (BIOMA 2014) 13th International Conference on Parallel Problem Solving from Nature (PPSN 2014) Ljubljana, Slovenia, September 13, 2014

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 1 / 20

slide-2
SLIDE 2

Overview

1

Motivation and Related Work

2

Differential Evolution

3

The Proposed Method Encoding Genotype → Phenotype Rendering Fitness Evaluation

4

Results

5

Conclusion

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 2 / 20

slide-3
SLIDE 3

Motivation: Line Strokes

Riley et al. (WCCI Barcelona, July 2010) compared 2 representations

variable-length classic genetic algorithm and tree-based genetic algorithm.

Line strokes to generate evolved images

best fitness was ∼ 9.4% of the original image, using a tree-based algorithm.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 3 / 20

slide-4
SLIDE 4

Motivation: Triangular Brushstrokes

Izadi et al. (AJCAI, Adelaide, December 2010) used GP for the creation of non-photorealistic animations

unguided and guided searches: the guided yields better results, filled and empty brushstrokes, reported results are:

unguided: ∼ 5% guided: ∼ 2% - requires the source image in the phenotype rendering.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 4 / 20

slide-5
SLIDE 5

Differential Evolution (DE)

A floating-point encoding EA for global optimization over continuous spaces,

through generations, the evolution process improves population of vectors, iteratively by combining a parent individual and several other individuals of the same population.

We choose the strategy jDE/rand/1/bin

mutation: vi,G+1 = xr1,G + F × (xr2,G − xr3,G), crossover: ui,j,G+1 =

  • vi,j,G+1

if rand(0, 1) ≤ CR or j = jrand xi,j,G

  • therwise

, selection: xi,G+1 =

  • ui,G+1

if f (ui,G+1) < f (xi,G) xi,G

  • therwise

, includes mechanism of F and CR control parameters self-adaptation.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 5 / 20

slide-6
SLIDE 6

The Proposed Method (Encoding)

An individual encoded image is stored into a DE vector: x = (x1, x2, ..., x8T max, F, CR, T L, T U), size is D + 4, D = 8T max, the scaling factor F and crossover rate CR as used by the jDE, then T L and T U follow. The parameters T L and T U define the number of triangles Ti:

Ti rendered in the evolved image, T L and T U updated similarly as the F control parameter.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 6 / 20

slide-7
SLIDE 7

The Proposed Method (Genotype → Phenotype Rendering) 1/3

DE vector xi, ∀i ∈ {1, ...NP} constituting a genotype rendered into a phenotype image zi (to be compared against z∗). Each brushstroke is represented as (cx, cy, r, α1, α2, bY , bCb, bCr):

cx ∈ [0, ..., Rx), cy ∈ [0, ..., Ry), r ∈

  • 0,

Rx √Tmax

  • ,

α1 ∈ [0◦, 360◦), α2 ∈ [0◦, 180◦), bY ∈ [16, 236), bCb ∈ [16, 241), bCr ∈ [16, 241).

cx and cy define the center of the triangle to be rendered, r defines its circumscribed circle, α1, α2 define the points of the triangle on the circumscribed triangle, bY ,bCb,bCr are the color components of its brush.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 7 / 20

slide-8
SLIDE 8

The Proposed Method (Genotype → Phenotype Rendering) 2/3

The triangle vertices encoded by xi construct Ti triangles, each triangle Tk = (cx, cy, r, α1, α2) defines vertices as in Figure on the right, Eq. 1. For optimization, the YCbCr color space is used. For rendering, the brush color bYCbCr

k

is transformed to the RGB color space using the Eq. 2.

Figure: Triangle brush definition

  • Eq. 1
  • Eq. 2

P1,k =⌊(cx,k +rk cos α1,k ,cy,k +rk sin α1,k )⌋ bR

k =⌊1.164(bY k −16)+1.596(bCr k −128)⌋

P2,k =⌊(cx,k +rk cos(α1,k +π),cy,k +rk sin α1,k +π)⌋ bG

k =⌊1.164(bY k −16)−0.813(bCr k −128)−0.391(bCb k −128)⌋

P1,k =⌊(cx,k +rk cos α2,k ,cy,k +rk sin α2,k )⌋ bB

k =⌊1.164(bY k −16)+2.018(bCb k −128)⌋

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 8 / 20

slide-9
SLIDE 9

The Proposed Method (Genotype → Phenotype Rendering) 3/3

For each triangle Tk, a solid color is rendered,

  • ver the brush area with a transparency factor

1 Ti ,

which makes the color of the brush: bk = ⌊ 255

Ti bk RGB⌋;

this is analogous to blending each triangle as part-transparent triangle withing the evolved image:

zk

x,y =

  • Tkover(x,y)

⌊ 255

Ti bRGB k,x,y⌋.

Triangles defined over the edges of the image canvas are drawn by clipping away pixels outside of the canvas area.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 9 / 20

slide-10
SLIDE 10

Fitness Evaluation

After a phenotype image zi is rendered: it is compared to a reference image z∗

using the evaluation metric: f (z) = 100 ×

Ry −1

  • y=0

Rx −1

  • x=0

|z∗R

x,y−zR x,y|+|z∗G x,y −zG x,y|+|z∗B x,y −zB x,y|

3×255×RxRy

.

The obtained result is the similarity of the evolved image and the reference image. The goal of the evolutionary process is to minimize the function value f (z).

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 10 / 20

slide-11
SLIDE 11

Results (Experimental Setup)

The parameter sets are:

NP = {25, 50, 100}, Tmax = {10, 20, ..., 150}, RNi = {0, 1, ...51}, MAXFES = 1e+5.

A total of 45 parameter settings, 2340 independent runs. Rendering: GDI+. The experiments conducted on 4 images of size 100 × 100 pixels. Additional experiment: all images evolved up to MAXFES = 1e+6.

Baboon Liberty Palace Vegetables

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 11 / 20

slide-12
SLIDE 12

Results (Experiment)

Best fitness values for all parameter sets for all images, MAXFES = 1e+5

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 12 / 20

slide-13
SLIDE 13

Results (Fitness Convergence Graph)

5 10 15 20 25 30 35 40 500 1000 1500 2000 Fitness Generation Liberty Palace Vegetables Baboon

The fitness convergence graph of the best runs for all images.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 13 / 20

slide-14
SLIDE 14

Results (Ti Dynamics Graph)

5 10 15 20 25 30 35 40 45 50 500 1000 1500 2000 Ti Generation Liberty Palace Vegetables Baboon

The dynamics of the number of triangular brushstrokes in the best vectors.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 14 / 20

slide-15
SLIDE 15

Results (Image: Baboon)

Baboon

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 15 / 20

slide-16
SLIDE 16

Results (Image: Liberty)

Liberty

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 16 / 20

slide-17
SLIDE 17

Results (Image: Palace)

Palace

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 17 / 20

slide-18
SLIDE 18

Results (Image: Vegetables)

Vegetables

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 18 / 20

slide-19
SLIDE 19

Conclusion

An evolvable lossy image representation using a jDE algorithm. The performance of this encoding: competitive with the GA tree representation. Experiments show promising results on sample images. In the future we would like to address:

different evolutionary operators, change control-parameters updating, and testing on more images with different properties.

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 19 / 20

slide-20
SLIDE 20

Thank you. Questions?

Uroˇ s Mlakar, Janez Brest, Aleˇ s Zamuda (UM) DE triangular brusthstrokes evolution 20 / 20