CS 470 Final Presentation

Steven Becke

Optimization of Transform

Co-efficients

via Genetic Algorithm

System Overview

Goal
- Evolve via GA forward and reverse transform
coefficients with better MSE than D4 but same
level compression
- Test whether they are generalizable
- Worked with Brendan Babb
- Client: Dr Moore
- Port to C# with more usable GUI
- Client: Myself

Why?
- The inherent size of raw images makes
compression a necessity
- Wavelet transforms have been shown to be
very effective at compressing image
(FBI fingerprint DB, jpeg 2000)
- Dr Moore has shown that when images are
quantized better coefficients can be found
via genetic algorithm than the standard
wavelet transforms

Overview of Image Compression / Decompression via Wavelet Transforms

original image

Forward transform

scaling coefficients

wavelet coefficients

010101
101010

010101

Quantize

0101
1010

0101

0101
1010

0101

Dequantize

010101
101001

010101

Reverse transform

scaling coefficients

wavelet coefficients

restored image

Overview of process

original image

Forward transform

scaling coefficients

wavelet coefficients

010101
101010

010101

compressed data

Quantize

0101
1010

0101

0101
1010

0101

Dequantize

010101
101001

010101

compressed data

Reverse transform

scaling coefficients

wavelet coefficients

restored image

Overview of process

original image

Forward transform

scaling coefficients

wavelet coefficients

010101
101010

010101

compressed data

Quantize

0101
1010

0101

0101
1010

0101

Dequantize

010101
101001

010101

compressed data

Reverse transform

scaling coefficients

wavelet coefficients

restored image

Data Files

Standard RGB Bitmap images.
- Loaded into memory as a 2D array
- converted to YUV colorspace

Coefficient config file.
- text file with special format to specify transforms
Name val; Hlen val; Glen, val;
H1 val, val, ... ; H2 val, val,...;
G1 val, val, ... ; G2 val, val,...;

Data Structures

Each potential solution consists of an array of 16 doubles,
- the 1st 8 holding the forward transform coefficients,
- the 2nd 8 holding the reverse transform coefficients.

Population will consist of an array of the above solution arrays
- A typical population size would be 200 to 500 potential solutions.

Images in YUV form 3 2d arrays of doubles
(one 2d array each for Y, U and V components)

System Architecture

Load image(s)

Choose Transform Settings

Initiate Transform

Return in 12 hours to check your results

Genetic Algorithm

G = 0;	{Start at Generation 0}

initpop(P);	{create a population P of random solutions}

while not (G == max) do (

G++;	{increment to next Generation}

eval(P);	{evaluate the fitness of all solutions in P}

P' = select(P);	{randomly select members of P but	weighted in proportion to their	fitness}

crossOver(P');	{swap random portions of the	solutions in P' with other solutions}

mutate(P');	{mutate solutions}

P = P';

)

Fitness

Forward D4 transform copy of original image with evolved forward co-efficients

Quantize image

Estimate compressed image size

Dequantize image

Reverse D4 transform with evolved reverse co-efficients

Calculate MSE from original Image

Calculate fitness as a function of MSE & compressed image size.

Fitness Function

The sum of
100*MSE/MSEoriginal
and
400*(1 + abs(FS% - FS / FSoriginal)^2)

Results

Generalization

Evolving against Baboon over 500 generations
- 6.65% improvement in MSE over D4 at quantization 64.
- applied to other images:
average: 6.64%
lowest: 4.9%
highest: 7.4%.

Evolving against Susie over 500 generations
- 8% improvement in MSE over D4 at quantization 64.
- applied to other images:
average: 6.96%
lowest: 5.4%
highest: 8.6%.

Conclusion

Achieved desire research goals
- better MSE at same level of compression
- evolved coefficients were generalizable

I learned
- C++ (pointers and memory leaks),
- C# (images and GUIs)
- Genetic Algorithms
- Wavelets
- Working in unfamiliar language, with someone
else undocumented code, is a nightmare

Questions?

2005-04-11T08:36:43