Presentation is loading. Please wait.

Presentation is loading. Please wait.

Evolving Edge detection Final project by Rubshtein Andrey (303468490)

Similar presentations


Presentation on theme: "Evolving Edge detection Final project by Rubshtein Andrey (303468490)"— Presentation transcript:

1 Evolving Edge detection Final project by Rubshtein Andrey ( )

2 Introduction Is it possible for a living creature to evolve vision? Is it possible for a living creature to evolve vision? Is it possible for a living creature to evolve at least an edge detector? Is it possible for a living creature to evolve at least an edge detector?

3 A bit about Genetic Algorithms Simulates an environment in which there are “living creatures” Simulates an environment in which there are “living creatures” They are called Genomes. They are called Genomes. Each Genome has some parameters Each Genome has some parameters There exists a global fitness function which tells how successful a Genome is. There exists a global fitness function which tells how successful a Genome is. There exists a Population of some Genomes There exists a Population of some Genomes There are many Generations There are many Generations

4 More about Genetic Algorithms Each generation consist of 3 stages: Selection – The more fit are chosen. Selection – The more fit are chosen. Crossover – Some genomes are crossed, while inheriting their parents properties. Crossover – Some genomes are crossed, while inheriting their parents properties. Mutation – Some Genomes are randomly changed, with a slight variation. Mutation – Some Genomes are randomly changed, with a slight variation. We hope that after some generations, we get more fitted Genomes. We hope that after some generations, we get more fitted Genomes.

5 The Goal Assumptions: Each living creature can perform a convolution, with a constant mask, which is coded into his Genome. Each living creature can perform a convolution, with a constant mask, which is coded into his Genome. The creatures that detect edges better, survive better. The creatures that detect edges better, survive better. There exists an ideal edge detector. There exists an ideal edge detector.

6 More about the Goals Is it possible to develop, by means of natural selection, a good edge detector? Is it possible to develop, by means of natural selection, a good edge detector? Is it possible to achieve that using only convolution type edge detectors, while the perfect edge picture is not? Is it possible to achieve that using only convolution type edge detectors, while the perfect edge picture is not?

7 Ideal edge detector Canny’s edge detector was chosen as an ideal edge detector. Canny’s edge detector was chosen as an ideal edge detector. Why Canny? Has an impressive results, and uses much more advanced techniques than convolutions Why Canny? Has an impressive results, and uses much more advanced techniques than convolutions So it’s challenging to try to evolve to it. So it’s challenging to try to evolve to it.

8 About the simulation The genome structure A 3x3 Matrix A 3x3 Matrix Each of the cells is in the range [-255,255] Each of the cells is in the range [-255,255] A threshold value in the range [0,255] A threshold value in the range [0,255] Threshold = 50

9 Fitness

10 About similarity Measure Both images are binary after threshold Both images are binary after threshold The measure is : The measure is : Similarity[x,y]=Sum[x OR y] / Sum[ x AND y]

11 Why this measure is good? It is symmetric : Sim[x,y]=Sim[y,x] It is symmetric : Sim[x,y]=Sim[y,x] It has the range of [0,1] It has the range of [0,1] It is simple to implement It is simple to implement It is “reflexive” – Sim[x,x]=1 It is “reflexive” – Sim[x,x]=1 It doesn’t give extra points for pictures which have a common non-edge (0 ) pixel. It doesn’t give extra points for pictures which have a common non-edge (0 ) pixel. It reduces points for false positive edges, and false negative edges. It reduces points for false positive edges, and false negative edges.

12 Why this measure isn’t good A small movement in the picture results in a low similarity rate A small movement in the picture results in a low similarity rate The measure takes into account single pixels, which isn’t the goal in edge detection The measure takes into account single pixels, which isn’t the goal in edge detection A better measure would have been perhaps one that takes into account the shape of the edges (Geshtalt) A better measure would have been perhaps one that takes into account the shape of the edges (Geshtalt)

13 The Test Subjects

14 The numbers (The simplest)

15 The Guitar (Medium)

16 The dog (Hardest)

17 The results After a few generations, the Genomes learn to somehow detect edges. After a few generations, the Genomes learn to somehow detect edges. Yet even in the easy pictures, the evolution fails to get a good ratio of similarity ( Usually less than 0.3) Yet even in the easy pictures, the evolution fails to get a good ratio of similarity ( Usually less than 0.3) But, we see an impressive results, when looking with our eyes. But, we see an impressive results, when looking with our eyes.

18 Evolution of numbers (The ideal)

19 Generation 5 Sim=0.11

20 Generation 10 Sim=0.13

21 Generation 20 Sim=0.23

22 Generation 30 Sim=0.25

23 Generation 40 Sim=0.27

24 Generation 80 Sim=0.28

25 Generation 100 Sim=0.29

26 Generation 110 Sim=0.32

27 Results for easy pictures It is amazing that we’ve managed to evolve something close to the ideal It is amazing that we’ve managed to evolve something close to the ideal Then again, the similarity rate is low Then again, the similarity rate is low

28 Evolution of Dog (The ideal)

29 Generation 10 Sim=0.05

30 Generation 100 Sim=0.10

31 Generation 300 Sim=0.16

32 Results for hard pictures The evolution finds some solution, yet it isn’t as good as wanted The evolution finds some solution, yet it isn’t as good as wanted The similarity rate is very low The similarity rate is very low

33 Conclusions It is easy to evolve some kind of edge detector It is easy to evolve some kind of edge detector It is hard to evolve a good edge detector, in terms of similarity It is hard to evolve a good edge detector, in terms of similarity It seems that an edge detector evolved from one picture isn’t good for another picture. It seems that an edge detector evolved from one picture isn’t good for another picture.

34 Why the results are bad: Canny is a very sophisticated edge detector. Perhaps it’s impossible to imitate it using only convolutions? Canny is a very sophisticated edge detector. Perhaps it’s impossible to imitate it using only convolutions? Perhaps the similarity measure isn’t suitable for this problem. Perhaps using another similarity it’s possible to get better results. Perhaps the similarity measure isn’t suitable for this problem. Perhaps using another similarity it’s possible to get better results.

35 The end Thank you for listening :-)


Download ppt "Evolving Edge detection Final project by Rubshtein Andrey (303468490)"

Similar presentations


Ads by Google