Segmentation via Genetic Programming
Segmentation segments Splitting an image into segments §Hard problem ill-defined Conceptually ill-defined Segmentation
Segmentation Which segmentation is the correct one?
Segmentation
Segmentation
Segmentation §Tagging function: §Deciding function: Defining the problem
Segmentation §Berkley’s segmentation dataset and benchmark: Images + Human made segmentation maps Benchmark for segmentation algorithms The Dataset
Genetic Programming Bio-Inspired Bio-Inspired Artificial Intelligence method §Inspired by Darwin’s evolutionary principles What is Genetic Programming?
Genetic Programming Variety Variety of species individuals within the population Competition Competition for limited resources Overproduction Overproduction of offspring generation §Survival of the fittest Origin of Species, 1859 Darwin’s principles
Genetic Programming The computational model GnGnGnGn G n+1 = crossover mutation fitness
Segmentation via GP §Individuals are represented as LISP-like functions X2 (* x x) 2x-1 (- (* (+ 1 1) x) 1) Individual Representation
Segmentation via GP §Equivalent to tree representation Individual Representation
Segmentation via GP §Crossover Genetic Operators
Segmentation via GP §Mutation Genetic Operators
Segmentation via GP §Function Set: {+, -, *, %, neg, conv, opp, sqrt} §Terminal Set: {image, 0, 1, const, gradx, grady, ckernel} §Strongly-Typed GP: conv(matrix,kernel) +(matrix,matrix), +(kernel,kernel), +(kernel,number), … Building the trees
Segmentation via GP §An example: Gradient Magnitude (sqrt (+ (* (conv image gradx) (conv image gradx)) (* (conv image grady) (conv image grady)))) Building the trees
Segmentation via GP §Accuracy: §Modified Accuracy: Fitness measure
Segmentation via GP §Individuals produce ‘soft boundary maps’, need threshold value §Value too low – more points are reported (false positives) §Value too high – less points are reported (true negatives) Threshold
Segmentation via GP equal Berkley’s benchmark: split the threshold range into N equal parts, threshold and keep best. unequal My method: split the threshold range into N unequal parts, by equal increase in reported points, proportional to number of points in the human made segmentation map. Threshold
Segmentation via GP §Population size: §Generation count: unspecified §Crossover rate: 90% §Mutation rate: 10% §Selection: tournament of 3 §Tree depth: limited to 6-9 Sean Luke ’ s ECJ13 was used for running GP sessions Miscellaneous Evolutionary Parameters
Results A typical GP session
Results §Generation 0: best, 0.08 average §Generation 93: best, average §Fitness does not always increase! §Fitness leaps in best individual A typical GP session
Results Segmentation function (- (- (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0))) (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0)))) (- (- (- (conv image grady) (* )) (% (* ) )) (% (% (* ) (* )) (% (* ) (* ))))) Best Individual
Results Segmentation function gradx gradx grady gradxgradx grady grady (- (- (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0))) (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0)))) (- (- (- (conv image grady) (* )) (% (* ) )) (% (% (* ) (* )) (% (* ) (* ))))) Best Individual
Results Segmentation function (- (- (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0))) (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0)))) (- (- (- (conv image grady) (* )) (% (* ) )) (% (% (* ) (* )) (% (* ) (* ))))) Best Individual
Results Segmentation function (* (conv image gradx) (conv image gradx)) (* (conv image gradx) (conv image gradx)) (- (- (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0))) (conv (* (conv image gradx) (conv image gradx)) (- (- (kernel ) grady) (- (kernel ) 0.0)))) (- (- (- (conv image grady) (* )) (% (* ) )) (% (% (* ) (* )) (% (* ) (* ))))) Best Individual
Results Accuracy = (GM accuracy = 0.280) Best Individual
Results Accuracy = (GM accuracy = 0.193) Best Individual
Results Accuracy = (GM accuracy = 0.245) Best Individual
Results Accuracy = (GM accuracy = 0.119) Best Individual
Summary §It is possible to evolve segmentation functions using GP §Results are good, can be better §Evolved function ‘beats’ the gradient magnitude function §Improve results by more power Discussion
Summary §More CPU and RAM §More functions and terminals §Use ADFs §Evolve kernels separately §Evolve threshold function separately §Include more inputs: color images, textures, output of other edge detectors Future Work
References 1.The Berkley Segmentation Dataset and Benchmark 2.Koza, J. R.: Genetic Programming: On the programming of computers by natural selection. MIT press, Cambridge, Mass. (1992) 3.Tomassini M.: Evolutionary Algorithms. Swiss Scientific Computing Center, Manno. 4.Darwin, Charles: On the origin of species by means of natural selection. London, John Murray, Montana, D.J.: Strongly typed genetic programming. Evolutionary Computation 3 (1995) 199–230 6.Langdon, W.B.: Size fair and homologous tree genetic programming crossovers. Genetic Programming and Evolvable Machines 1 (2000) 95– Luke S.: ECJ 13 - a Java based Evolutionary Computation and Genetic Programming research system 8.Koza, J. R.: Genetic Programming II: Automatic Discovery of Reusable Programs. MIT press, Cambridge, Mass. (1994)