Question

I am trying to find how two images (let's say "image1" and "image2") match to each other. There are several parameters calculated for each possible position of "image2" relative to "image1". And I have empirical formula which gives "score" to each position depending on those parameters.

I tried to match image pars with help of neural networks, but failed : empirical formula works much better. From this I started thinking about to improve this formula with help of genetic algorithm.

So, the question is : I have a bunch of image pairs and for each pair I know "right" match position. Is genetic algorithm can be used in such things ? Any examples ?

Suggestions and links are appreciated.

Thanks.

Was it helpful?

Solution

Basically, yes! The parameters of your score function could be the parameters that your GA is going to evolve. You may want to use a real coded genetic algorithm or evolution strategy (CMA-ES) if your parameters are in the real domain.

There exist several possible choices for crossover:

  • Average / Intermediate
  • Blend-Alpha (BLX-a)
  • Blend-Alpha-Beta (BLX-a-b)
  • Discrete
  • Heuristic
  • Local
  • Random Convex
  • Simulated Binary (SBX)
  • Single Point

And also some mutation operators:

  • Normal distributed N(0, sigma) -> e.g. with adaptation to reduce sigma over time
  • Uniform distributed (in some positions)
  • Polynomial mutation

Another metaheuristic suitable for real coded problems is particle swarm optimization (PSO).

With genetic programming you're going to evolve a formula (e.g. a tree). I'm not so sure why you mention it, maybe I still misunderstand something. Clarify your problem, just in case.

EDIT:

Okay it seems it's not the weights that you want to optimize, but the whole formula. Still, genetic algorithms can be used for this representation as well. I want to mention HeuristicLab due to its good support for genetic programming.

I assume you have a more complex problem since you want to optimize the scoring function, and still have another algorithm for optimizing the placement according to that scoring function. You could try an easy approach and generate a dataset with several positions predefined and the features calculated accordingly. Then you could formulate a classification problem and find a model that allows you to identify those positionings that are optimal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top