Industrial Applications of Genetic Algorithms:Image-Calibration Transformation Matrix Solution Using a Genetic Algorithm

Previous | Table of Contents | Next

GA RESULTS

The sixteen test images were used to test the performance of the GA code. Each image was used as the reference, with the GA mapping the other sixteen images into the image-space of the reference. This provided a sampling of 256 different image mappings, including each image being used as a reference for itself, which should result in a transformation being the identity matrix.

Table 2.7 Parameters used for the GA.
Number of bits for each delta value | 10
Use gray-code encoding | False
Maximum generation | 17,000
Population size | 40
Percent chance of 1-point crossover | 20%
Percent chance of 2-point crossover | 40%
Percent chance of matrix-element crossover | 40%
Percent chance of mutation | 0.0002%
Number of no-change generations before comet-hit | 20
Hill-climbing iterations per generation | 50

Parameter Notes

The choice of 17,000 generations was chosen to give an average time of about 20 seconds if the GA did not converge.

Test-case Details

After a study of the problem, the originally stated target of 0.1 for the distance value was not required. A value of 0.4 is within the acceptable range for this problem. To provide a fair comparison, the original algorithm was also run with this relaxed distance target; with a resulting average per-run time of 20.0 seconds-with every value below the specified 0.4 figure. It should be noted that the time variance in the original method was very small; each run took the same time within a 10% tolerance.

The 256 test-case transformations were run ten times each, for a total of 2560 GA-based transformations. Table 2.8 shows the results looking at CPU time, GA generations, and the final fitness-function value (the sum of the distances squared). This value is considered by itself, and also as the best and the worst for each of the ten runs for an image pair.

Table 2.8 Summary of results from the GA run.
Measure | Minimum | Average | Maximum
--- | --- | --- | ---
CPU Time | 0.09 S | 13.5 S | 39.9 S
Generations | 62 | 11,359 | 17,000
(Sum of Distances)2 | 0.143 | 0.664 | 2.89
Best of 10 Sums | 0.143 | 0.40 | 0.99
Worst of 10 Sums | 0.40 | 1.07 | 2.89

Another look at the resulting data, Figure 2.11, shows the number of runs resulting in ranges of distance values; the tallest bar is in the range from 0.3 to 0.4.

Figure 2.11 Distance results of the 2560 test-case runs.

Examining the data as a whole, the GA algorithm ran in 9.6 hours versus 14.2 hours for the non-GA method. This is a reduction of 32% in time. The final values achieved did not fare as well, with an average convergence value of 0.664, 66% higher than the specified 0.4 value. As seen in Figure 2.11, over 1,028 runs achieved the 0.4 goal, with 50 of them jumping from above 0.4 to below 0.3 in a single generation-thus 42% of the runs achieved the specified 0.4 goal. The remaining 1,482 runs (58%) did not achieve the 0.4 goal, and are distributed in value ranges in decreasing amounts, with a single run at the largest final value of 2.89.

Looking at select individuals, there were some GA runs which finished in less than 100 mS. Figure 2.12 shows that 17.5% of the runs completed in less than 2.0 seconds and 29% of the runs completed in less than 4.0 seconds. The majority of the runs, 59%, completed in the range of 19.5 to 20.5 seconds. These results indicate that, if “lucky”, the GA algorithm will converge in a few seconds, but once the 2.0 second mark is passed, the chance that the GA will converge decreases, until at about 20 seconds the maximum generation count is reached. This timing spread results in an average run time of 13.5 seconds, with two groups: one around 2.0 seconds and a tighter group at 20 seconds.

Figure 2.12 Time results of the 2560 test-case runs.

The correlation between Figures 2.11 and 2.12 is that the 1,078 runs which achieved the distance goal in Figure 2.11 are spread out from 0 to 19 seconds in Figure 2.12, and the 1,482 runs around 20 seconds in Figure 2.12 are spread out above the distance of 0.4 in Figure 2.11. This led to the idea of implementing a Total-Comet-Strike every 4.0 seconds (0.2 * the maximum-generations), to take advantage of a completely fresh gene-pool, thinking that maintaining the best performer overshadowed a new comet-strike generated population and remaining in the area of the local minimum already found. This is essentially running five sequential GAs with MG = MG/5, with the run terminating if any of these sub-runs reaches the convergence value. Preliminary results implementing this additional capability look very promising, with an initial result over thirty-five runs as presented in Table 2.9. All three averages, CPU time, generations, and distance value, have improved from 2.1 to 6.4 percent. The downside is that the maximum distance value has grown to 4.8.

Table 2.9 Summary of results from the GA run.
Measure | Minimum | Average | Maximum
--- | --- | --- | ---
CPU Time | 1.37 S | 12.9 S | 20.9 S
Generations | 1139 | 10,628 | 17,000
(Sum of Distances)2 | 0.32 | 0.64 | 4.8

Previous | Table of Contents | Next

Copyright © CRC Press LLC