1 / 51

Genetic Programming for Image Processing

Genetic Programming for Image Processing. Brian A. Smith 2007.04.18. Natural Evolution. Requirements for evolution: Representation Selection Pressure Recombination Diversity. Natural Evolution. Representation: DNA

kyna
Download Presentation

Genetic Programming for Image Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Genetic Programming for Image Processing Brian A. Smith 2007.04.18

  2. Natural Evolution Requirements for evolution: • Representation • Selection Pressure • Recombination • Diversity

  3. Natural Evolution • Representation: DNA • Selection Pressure: Survival, Reproduction (determined implicitly by environment) • Recombination: Mating, Replicating • Diversity: Population

  4. Natural Evolution:Panthera leo • Representation: • Linear DNA • Diploid cells • Selection Pressure: • Rate of Reproduction • Recombination: • Sexual reproduction • Diversity • Prides, with some inter-pride exchange Image courtesy of Wikimedia Commons. (CCA 2.0 License, author: “yaaaay”)

  5. Natural Evolution: Streptococcus pyogenes • Representation: • Circular DNA • Monoploid cells • Selection Pressure: • Rate of Reproduction • Recombination: • Binary fission (asexual) • Diversity • Very little • Occasional mutations Image courtesy of Center for Disease Control and Prevention, via Wikipedia. (Public domain image)

  6. Artificial Evolution: Genetic Algorithms • Genetic algorithms are arguably the simplest class of evolutionary algorithms • GAs make use of simple representation, reproduction, and diversity mechanisms • These aspects are usually independent of the problem domain

  7. Artificial Evolution: Genetic Algorithms • Representation: Linear chromosome (array of values) • Selection Pressure: Explicit fitness function, Selection algorithms • Recombination: Crossover, Mutation • Diversity: Fixed-size population

  8. Artificial Evolution: Genetic Algorithms • Representation: Linear chromosome (array of values) 0 1 1 0 1 1 0 1 0 1 0 1 0.5 1.2 0.0 0.2 1.0 -2.1 -1.0 0.5 -0.3 0.6 3.1 0.2

  9. Artificial Evolution: Genetic Algorithms • Representation: Linear chromosome (array of values) Chromosome can be Boolean-valued, integer-valued, real-valued, complex-valued, etc.

  10. Artificial Evolution: Genetic Algorithms • Selection Pressure: Explicit fitness function Fitness function is problem-specific. The only limits are those of imagination and practicality. The fitness function usually assigns a real-valued fitness score that does not change.

  11. Artificial Evolution: Genetic Algorithms • Selection Pressure: Selection algorithms Selection algorithms are usually applied to choose which individuals reproduce… and sometimes which individuals are culled.

  12. Artificial Evolution: Genetic Algorithms • Selection Pressure: Selection algorithms Common selection algorithms include: Roulette wheel selection, Rank-based selection, and Tournament selection (my favorite).

  13. Artificial Evolution: Genetic Algorithms • Recombination: Crossover Parent 0 One-point Xover Parent 1

  14. Artificial Evolution: Genetic Algorithms • Recombination: Crossover Parent 0 One-point Xover Parent 1 Child 0 Child 1

  15. Artificial Evolution: Genetic Algorithms • Recombination: Crossover Parent 0 Two-point Xover Parent 1 Child 0 Child 1

  16. Artificial Evolution: Genetic Algorithms • Recombination: Crossover Parent 0 Uniform Xover Parent 1 Child 0 Child 1

  17. Artificial Evolution: Genetic Algorithms • Recombination: Mutation Parent 0 Point Mutation Child 0

  18. Artificial Evolution: Genetic Algorithms • Recombination: Duplication Parent 0 Used for Elitism Child 0

  19. Artificial Evolution: Genetic Algorithms • Diversity: Fixed-size population Generational GAs use individuals from current generation to create an entirely new generation of the same size. Steady-state GAs replace individuals one or two at a time.

  20. GA Example: Noise Reduction Images courtesy of me.

  21. GA Example: Noise Reduction • Reasonable choices: • Pick a window size of n×n • Use a real-valued chromosome of length n2 • Use a blending crossover • Use a modest mutation operator • Apply mask to noisy images • Set fitness to the Euclidean distance between original images and noisy images

  22. GA Example: Noise Reduction • Would we expect the evolved solution to work well for B&W noise? • Would we expect the evolved solution to work well for images from other domains?

  23. GA Example: Noise Reduction • “You get what you evolve for!” • So write your fitness function carefully. • Diversity is very important.

  24. GA Example: Noise Reduction • Barring some much more creative way of using the linear chromosome, we can’t evolve a simple median filter using this representation. • Wouldn’t it be nice if we could evolve algorithms instead of masks or arrays?

  25. Artificial Evolution: Genetic Programs • Genetic programs are a (slightly) more complex class of evolutionary algorithms. • The main difference is in the representation, which allows for arbitrarily complex algorithms to evolve.

  26. Artificial Evolution: Genetic Programs • Representation: Program tree ^ * z if 4 if>0 y ~ 1 x exp y x x

  27. Artificial Evolution: Genetic Programs • Representation: Program tree The user must specify a function set and a terminal set. ^ if ~ x y z | v 1 0 A Boolean function set A Boolean terminal set

  28. Artificial Evolution: Genetic Programs • Representation: Program tree Chromosome can be Boolean-valued, integer-valued, real-valued, complex-valued, etc. Chromosome can also be null-valued: where nodes perform some action (such as moving a robot forward) but have no return value.

  29. Artificial Evolution: Genetic Programs • Representation: Program tree Chromosome can also be strongly-typed: where multiple node types are used subject to some constraints.

  30. Artificial Evolution: Genetic Programs • Selection Pressure: Explicit fitness function • Problem specific, same as GA • Selection Pressure: Selection algorithms • Same as GA

  31. Artificial Evolution: Genetic Programs • Recombination: Crossover Parent 0 Parent 1

  32. Artificial Evolution: Genetic Programs • Recombination: Crossover Parent 0 Parent 1 Child 0 Child 1

  33. Artificial Evolution: Genetic Programs • Recombination: Crossover Because crossover does not preserve the morphology of the tree, diversity is not as important in the GP paradigm.

  34. Artificial Evolution: Genetic Programs • Recombination: Mutation Grow an entire new subtree Parent 0 Child 0

  35. Artificial Evolution: Genetic Programs • Diversity: Population Generational and steady-state populations are common. Same as GA.

  36. GP Example: Landslide Detection • From Rosin and Hervás’ 2002 paper Image Thresholding for Landslide Detection by Genetic Programming.

  37. GP Example: Landslide Detection • Focused on the task of identifying landslide areas in an image using “before” and “after” satellite images from Veneto, Italy. • Desired output is a binary image with the pixels in the landslide area colored black and all other pixels white. • Previous work using more conventional image processing techniques were unsatisfactory.

  38. GP Example: Landslide Detection Images from Rosin and Hervás (2002).

  39. GP Example: Landslide Detection • Representation: Real-valued program tree • Function set: *, +, -, /, abs, sigmoid, min, max • Terminal set: random constants, difference image pixel values, smoothed difference values, pixel values from various other transforms • Maximum depth: 7

  40. GP Example: Landslide Detection • Interpretation: Positive = landslide Negative = no landslide 0? (not reported in paper) • Fitness function: % of correctly classified pixels • Selection algorithms: Not reported in paper • Recombination: Standard Xover and mutation

  41. GP Example: Landslide Detection • Diversity: Generational GP • Population size: 20,000 • # of generations: 200-300

  42. GP Example: Landslide Detection • Results: best-of-run • s10 is Gaussian smoothing with st. dev. of 10 • o15 is “opened” image with a 15x15 mask • dt is distance transformed pixel value • difference is the difference image pixel value

  43. GP Example: Landslide Detection Best-of-run result on entire image Ground truth Images from Rosin and Hervás (2002).

  44. GP Example: Landslide Detection • Problems with the methodology: • Very few details, would be difficult to reproduce • Only used a portion (3%) of a single image for training • Used the same image for evaluation!!! • Did not report fitness scores for experiments, rely instead on the reader’s subjective measure of accuracy

  45. GP Example: Landslide Detection • Strong points of the research: • Shows benefit of using pre-processed inputs • Evolved “better” classifier than the authors were able to design themselves • Shows that intuitive understanding of final result is unnecessary

  46. Concluding points • Evolutionary algorithms such as GP may be suitable for evolving, rather than designing, image processing algorithms • Evolutionary algorithms are not guaranteed to produce an optimal solution • Evolutionary algorithms may take a long time (hours, days, or even weeks) to complete

  47. Questions or comments?

  48. Resources • Dawkins, Richard. 1976. The Selfish Gene. Oxford University Press, Oxford, UK. • Introduces Dawkin’s selfish gene theory, which argues that the gene- not the individual or the species- is the unit of evolutionary selection. Extremely important for understanding natural evolution, with some ramifications for artificial evolution, as well. • Eiben, A.E. and J.E. Smith, ed. 1998. Introduction to Evolutionary Computing. Springer-Verlag, Berlin, Germany. • Provides very brief introductions to all of the major classes of evolutionary algorithms. Good for breadth, but not for depth.

  49. Resources • Goldberg, D.E. 1989. Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley. • The “bible” of the simple GA. Focuses on the Boolean (bit string) representation and gives theoretic justifications for its success. • Holland, J.H. 1975. Adaptation in Natural and Artificial Systems. The University of Michigan Press, Ann Arbor, MI. • From the man who is credited with inventing the genetic algorithm and birthing the field of evolutionary algorithms. (Though I have read that von Neumann suggested the idea of evolutionary algorithms in a letter decades earlier.) This work is the foundation of all future GA work.

  50. Resources • Koza, J.R. 1992. Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge, MA. • Introduces the genetic program. Some earlier work can arguably be said to fall under the title “genetic program,” but Koza was the first to treat it as a rigorous methodology. The work is a tour de force in the technique, using GPs to efficiently solve a broad range of problems. 800+ pages, but it reads very quickly. • Koza, J.R. 1992. Genetic Programming II: Automatic Discovery of Reusable Programs. MIT Press, Cambridge, MA. • Introduces the automatically defined function. ADFs allow for the evolution of functions with arbitrary arguments. Dramatically improves the performance of GPs in a number of domains.

More Related