Scale Invariant Object Detection using a Hybrid Genetic Algorithm - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Scale Invariant Object Detection using a Hybrid Genetic Algorithm

Description:

Evaluate fitness of all initial individuals of population ... to calculate fitness for each ... Integrate the components. Compile Results on Different Images ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 19
Provided by: ayes1
Category:

less

Transcript and Presenter's Notes

Title: Scale Invariant Object Detection using a Hybrid Genetic Algorithm


1
Scale Invariant Object Detection using a Hybrid
Genetic Algorithm Fuzzy Logic Approach
  • Group 9
  • Ayesha Farrukh 04030004
  • Junaid Akhtar 04030019

2
Progress
  • Matlab Implementation Brute force Template
    Matching
  • Initialize Population
  • Crossover
  • Mutation
  • Fitness Function

3
Brute Force Results
Template
Reference Image
4
Cross Correlation Surface
5
Correlation Surface zoomed in
Peak value at (145, 171) Value 0.9666
6
Tic-Toc
  • This operation took 152.01 seconds

7
Other Matlab Functions Explored
  • DEC2BIN
  • BIN2DEC
  • RAND
  • CORR2

8
GA Pseudocode
  • StartGA( img, template )
  • // Initialize a random population of
    individuals
  • P initPopulation ( populationSize,
    imgDimension, scaleDimension )
  • // Evaluate fitness of all initial individuals
    of population
  • fitnessP, fuzzyClassifictaionP
    calcFitness ( P, img , template )
  • // test for termination criterion
    (Correlation Value gt THRESHOLD)
  • WHILE not done do
  • // select a sub-population for offspring
    production
  • selectedP selectparents( P )
  • // Crossover
  • newP crossover( selectedP )
  • // Mutate x OR y OR scale value randomly
  • mutatedP mutate( newP )

9
Chromosome Definition
  • 000110001 011111100 1001

x 49
y 252
Index of Scale to Use
10
512 x 512 Reference Image
11
Template Image
12
Scale
  • imresize
  • Bicubic Interpolation for resizing the template
    image

13
Initial Population
  • function initialPopulation, lengthImageDimension,
    lengthMaxScale initialize(populationSize,
    imageDimension, maxScale)
  • binaryImageDimension dec2bin(imageDimension)
  • binaryMaxScale dec2bin(maxScale)
  • lengthImageDimension length(binaryImageDimension
    )
  • lengthMaxScale length(binaryMaxScale)
  • bitsInitialPopulation (2 lengthImageDimension)
    lengthMaxScale
  • initialPopulation zeros(populationSize,
    bitsInitialPopulation)
  • for i 1populationSize
  • xLocation round(imageDimensionrand)
  • xLocation dec2bin(xLocation)
  • initialPopulation(i,length(binaryImageDimensio
    n) - length(xLocation) 1 length(binaryImageDime
    nsion)) xLocation - 48
  • yLocation round(imageDimensionrand)
  • yLocation dec2bin(yLocation)
  • initialPopulation(i,(2length(binaryImageDimen
    sion)) - length(yLocation) 1 2length(binaryIma
    geDimension)) yLocation - 48
  • scale round(maxScalerand)

14
Select Parents
  • Sort the current Population according to their
    respective fitness values
  • Select the best

15
CalculateFitness
  • Use corr2 function to calculate fitness for each
    individual
  • Classify each individual using Fuzzy classifiers
    Negative, Low, Positive correlation

16
Crossover
  • function newPopulation crossover(selectedPopul
    ation)
  • sizeSelectedPopulation size(selectedPopulation,1
    )
  • sizeIndividual size(selectedPopulation,2)
  • count 1
  • while count lt sizeSelectedPopulation
  • crossoverPoint round(sizeIndividualrand)
  • newPopulation(count,) selectedPopulation(co
    unt,)
  • newPopulation(count1,) selectedPopulation(
    count1,)
  • newPopulation(count,crossoverPointsizeIndivid
    ual) selectedPopulation(count1,crossoverPoints
    izeIndividual)
  • newPopulation(count1,1crossoverPoint-1)
    selectedPopulation(count,1crossoverPoint-1)
  • count count 2
  • end

17
Mutate( P )
0011000111111100100100 0011000111111100100100
0011000101111100100100
  • For each member of the selected population P
  • Randomly decide whether or not to mutate
  • Randomly decide index of bit to mutate
  • Perform mutation

18
Next Episode
  • Integrate the components
  • Compile Results on Different Images
  • Use information generated during fuzzy
    classification to improve matching time
  • Compare Tic-Toc Results for time
  • Compare FLOPS for memory
Write a Comment
User Comments (0)
About PowerShow.com