Object Recognition using Particle Swarm Optimization on Fourier - - PowerPoint PPT Presentation

object recognition using particle swarm optimization on
SMART_READER_LITE
LIVE PREVIEW

Object Recognition using Particle Swarm Optimization on Fourier - - PowerPoint PPT Presentation

Object Recognition using Particle Swarm Optimization on Fourier Descriptors Muhammad Sarfraz Ali Taleb Ali Al-Awami King Fahd University of Petroleum and Minerals KFUPM # 1510, Dhahran 31261, Saudi Arabia E-mail: sarfraz@kfupm.edu.sa WSC 11


slide-1
SLIDE 1

Slide Slide 1 1

WSC 11 WSC 11

Object Recognition using Particle Swarm Optimization

  • n Fourier Descriptors

Muhammad Sarfraz Ali Taleb Ali Al-Awami

King Fahd University of Petroleum and Minerals KFUPM # 1510, Dhahran 31261, Saudi Arabia E-mail: sarfraz@kfupm.edu.sa

slide-2
SLIDE 2

Slide Slide 2 2

WSC 11 WSC 11

Outline

  • Introduction
  • Statement of the Problem
  • Methodology
  • Solution (Algorithm)
  • Experiments & Results
  • Particle Swarm Optimization (PSO)
  • Conclusion
slide-3
SLIDE 3

Slide Slide 3 3

WSC 11 WSC 11

Introduction

Answer Database of Fourier Descriptors F-16 B-747 M-52 …… …... …… Classifier Contour shape Input shape

slide-4
SLIDE 4

Slide Slide 4 4

WSC 11 WSC 11

Introduction

  • Object recognition is the ultimate goal for many

image analysis and computer vision applications.

  • Among the many cues proposed, such as color,

texture and others, shape is the most common and dominant feature

  • Many Shape models have been studied whose

imaging conditions and object appearance are restricted or well controlled.

slide-5
SLIDE 5

Slide Slide 5 5

WSC 11 WSC 11

Introduction

  • The main difficulty lies in view variability

associated with the images of the given object.

  • The previous work in view of invariant object

recognition can be classified into 3 approaches

– Using invariants – Part decomposition – Alignment

  • Fourier Descriptors are popular invariants that

are invariant to 2D transformations.

slide-6
SLIDE 6

Slide Slide 6 6

WSC 11 WSC 11

Statement of the problem

  • To Recognize the Objects such as Airplanes

which are invariant to translation, rotation and scaling in 2-dimension.

  • To recognize the objects in case of noise and
  • cclusion.
slide-7
SLIDE 7

Slide Slide 7 7

WSC 11 WSC 11

Methodology

  • Getting Bitmap Image
  • Removing Noise
slide-8
SLIDE 8

Slide Slide 8 8

WSC 11 WSC 11

Methodology

  • Extracting Outline
slide-9
SLIDE 9

Slide Slide 9 9

WSC 11 WSC 11

Methodology : Fourier Descriptors

  • Find the boundary of the image using the

algorithm

  • Convert the x, y coordinates in the contour to a
  • ne-dimensional vector by treating them as a

complex pair. That is: U(n) = X(n) + i * Y(n).

  • Perform the Fast Fourier Transform on U and

take the absolute value to create a new vector A which is the magnitude of the coefficients.

slide-10
SLIDE 10

Slide Slide 10 10

WSC 11 WSC 11

Methodology : Fourier Descriptors …..

  • The Fourier

transform of a continuous function

  • f a variable u is

given by the equation:

  • When dealing with

discrete images the Discrete Fourier Transform (DFT) is used:

  • The variable u is

complex, so by using the expansion: e[-j A] = cos (A) – j. sin (A) where A = 2πu/x and N is the number of equally spaced samples, one can have:

For Digital Images Using expansion

( ) ( )

2 j ux

F u f u e dx

π ∞ − −∞

= ∫

( ) ( )

2

1

1

j x

N N x

F u f u e N

π −

− =

⎛ ⎞ = ⎜ ⎟ ⎝ ⎠ ∑

( ) ( ) ( ) ( )

( )

1

1 ) . cos .sin

N x

F u f x jy Ax j Ax N

− =

⎛ ⎞ = + − ⎜ ⎟ ⎝ ⎠ ∑

slide-11
SLIDE 11

Slide Slide 11 11

WSC 11 WSC 11

Methodology : Fourier Descriptors ……

  • The simple geometric transformations of the

Fourier transforms

  • Translation: u(n)+t a(k)+tδ(k)
  • Rotation : u(n)ejθ a(k)ejθ
  • Scaling: su(n) sa(k)
  • Starting point: u(n-t) a(k) ej2∏tk/N
slide-12
SLIDE 12

Slide Slide 12 12

WSC 11 WSC 11

Methodology : Fourier Descriptors ……

The Fourier transform:

The magnitude is independent of the phase, and so unaffected by rotation. The complex coefficients are called Fourier descriptors (FD)

  • f the boundary.

The magnitude completely defines the shape (according to Zahn and Roskies).

( ) ( )

1

2

1 N N x

x j

e u f N u F

π −

− =

⎟ ⎠ ⎞ ⎜ ⎝ ⎛ =

slide-13
SLIDE 13

Slide Slide 13 13

WSC 11 WSC 11

Methodology : Fourier Descriptors ……

  • Throw away A(0) since it is the DC component; that is, it

represents only the translation of the contour.

  • Truncate A(>6) since higher frequency components don't

add much to the shape.

  • Normalize the remaining magnitudes by dividing each

element of A by A(0).

  • Reason: when a shape is scaled by a constant factor

(alpha), the magnitude of each of the coefficients in the resulting FFT is also multiplied by alpha.

  • To remove alpha from the equation, we simply divide by

a number, A(0), which is known to be a product of alpha.

  • The FD of the test object is compared with each object
  • f the training set
  • The object with the least Euclidean distance in the

training set will be the recognized object.

slide-14
SLIDE 14

Slide Slide 14 14

WSC 11 WSC 11

Methodology : Similarity Measures

  • If two shapes, A and B, produce a

set of values represented by a(i) and b(i) then the distance between them can be given as c(i) = a(i) – b(i).

  • If a(i) and b(i) are identical then c(i)

will be zero.

  • If they are different then the

magnitudes of the components in c(i) will give a reasonable measure

  • f the difference.
slide-15
SLIDE 15

Slide Slide 15 15

WSC 11 WSC 11

Methodology : Similarity Measures

  • Euclidean Distance (ED)
  • Percentage Error (PE)

( ) ( )

= n i

i b i c

1

( )

= n i

i c

1 2

slide-16
SLIDE 16

Slide Slide 16 16

WSC 11 WSC 11

Solution

ALGORITHM

  • Clean up the image of noise by using a

median filter and then removing all but the

  • largest of the objects in the scene.
  • Find the boundary of the image.
  • Convert the x, y coordinates in the

contour to a one-dimensional vector by treating them as a complex pair. That is: U(n) = X(n) + i * Y(n).

  • Perform the Fast Fourier Transform on U

and take the absolute value to create a new vector A which is the magnitude of

slide-17
SLIDE 17

Slide Slide 17 17

WSC 11 WSC 11

Experiments & Results

Fourier Descriptors under different transformations

slide-18
SLIDE 18

Slide Slide 18 18

WSC 11 WSC 11

Experiments & Results 1a: Euclidean Measure

  • Comparison
  • f results for

100 model

  • bjects
  • T:

Transformati

  • ns
  • N: Noise
  • O: Occlusion

23.33% 93.75% 95% 40 23.33% 93.75% 95% 29 23.33% 93.75% 93.33% 22 18.33% 93.75% 90% 8 20% 93.75% 93.33% 11 8.33% 93.75% 83.33% 6 5% 75% 71.67% 4 Occlusion Noise Transformations

  • No. of FDs

used

Base Case

slide-19
SLIDE 19

Slide Slide 19 19

WSC 11 WSC 11

  • Using Euclidean distance

Experiments & Results 1a: Euclidean Measure

Recognition Rate for Different Number of FDs

0.00 10.00 20.00 30.00 40.00 50.00 60.00 70.00 80.00 90.00 100.00 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57

  • No. of FDs

Recognition Rateg Xmation Noise Occlusion

slide-20
SLIDE 20

Slide Slide 20 20

WSC 11 WSC 11

Experiments & Results 1b: Percentage of Error Measure

  • Comparison of

results for 100 model objects

  • T: Transformations
  • N: Noise
  • O: Occlusion

Base Case

11.33% 81.25% 62.25% 40 11.67% 81.25% 68.33% 29 6.67% 81.25% 68.33% 22 8.33% 81.25% 75% 16 13.33% 81.25% 86.67% 9 11.67% 81.25% 80% 6 8.33% 87.5% 70% 4 Occlusion Noise Transformations

  • No. of

FDs used

slide-21
SLIDE 21

Slide Slide 21 21

WSC 11 WSC 11

  • Using Percentage of Errors

Experiments & Results1b: Percentage of Error Measure

Recognition Rate for Different Number of FDs

0.00 10.00 20.00 30.00 40.00 50.00 60.00 70.00 80.00 90.00 100.00 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57

  • No. of FDs

Recognition Rate Xmation Noise Occlusion

slide-22
SLIDE 22

Slide Slide 22 22

WSC 11 WSC 11

Particle Swarm Optimization (PSO)

  • J= - H + α sum(D)
  • vid = w*vid + c1*rand( )*(pid-xid) +

c2*Rand( )*(pgd-xid)

  • xid = xid + vid

pid = pbest

  • pgd = gbest
slide-23
SLIDE 23

Slide Slide 23 23

WSC 11 WSC 11

Particle Swarm Optimization (PSO)

  • The PSO algorithm is described as follows:

– Define the problem space and set the boundaries, i.e. equality and inequality constraints. – Initialize an array of particles with random positions and their associated velocities inside the problem space. – Check if the current position is inside the problem space or not. If not, adjust the positions so as to be inside the problem space. – Evaluate the fitness value of each particle. – Compare the current fitness value with the particles’ previous best value (pbest[]). If the current fitness value is better, then assign the current fitness value to pbest[] and assign the current coordinates to pbestx[][d] coordinates. – Determine the current global minimum among particle’s best position. – If the current global minimum is better than gbest, then assign the current global minimum to gbest[] and assign the current coordinates to gbestx[][d] coordinates. – Change the velocities according to Eqns. (4) or (6). – Move each particle to the new position according to Eqn. (5) and return to Step 3. – Repeat Step 3- Step 9 until a stopping criteria is satisfied.

slide-24
SLIDE 24

Slide Slide 24 24

WSC 11 WSC 11

Particle Swarm Optimization (PSO)

0.0143 0.0195 0.0138 0.1742 0.1083 0.3051 0.2216 0.1515 0.5409 0.2698 0.0002 0.0020 0.0009 0.0015 0.0001 0.0036 0.0005 0.0048 0.0041 0.0079 0.0296 0.0152 0.1033 0.4004 0.4368 0.5681 0.6245 0.9140 0.8876 0.2022 0.3879 0.4992 0.5281 0.0009 0.0035 0.0024 0.0328 0.0000 0.0156 0.0394 0.0651 0.0000 0.0000 0.0000 Optimized Weights

  • btained

11 6 6 11 11

  • No. of FDs

Consider ed X, O, N O X X X Training set* 5 4 3 2 1 Experiment No.

*X = transformed objects, O = occluded objects, N = noisy objects

slide-25
SLIDE 25

Slide Slide 25 25

WSC 11 WSC 11

Particle Swarm Optimization (PSO)

*X = transformed objects, O = occluded objects, N = noisy objects 25% 20% 20% 23.33 25% O 87.5% 87.5% 87.5 93.75% 93.75% N 98.33% 90% 95% 95% 93.33% X Recog nit io n Ra te 10 6 6 11 7

  • No. of FDs

Used 11 6 6 11 11

  • No. of FDs

Conside red X, O, N O X X X Training set* 5 4 3 2 1 Experiment No.

slide-26
SLIDE 26

Slide Slide 26 26

WSC 11 WSC 11

Conclusion

  • Fourier descriptors were found to be able to recognize at a higher

rate if we use nine or more Fourier descriptors. This trend is seen to continue when the size of the database is increased from 15 to 45 to 60.

  • Most cumulative combinations of Fourier descriptors are able to

recognize most of the images correctly for samples without noise

  • r occlusion.
  • It is noted that if an image is recognized, it is recognized by most

cumulative combinations of Fourier descriptors, and if it is not recognized, then it is not recognized by almost all cumulative combinations of Fourier descriptors.

  • Noise (salt and pepper) with density of ten percent has a minimal

effect on the recognition ability of Fourier descriptors. When we use eight or more Fourier descriptors, the accuracy level does not drop if we add ten percent salt and pepper noise to the images.

  • Occlusion brings down the recognition rate of Fourier descriptors

from 80-90 percent to around 20%.

  • The Fourier descriptors show a steady increase in accuracy level

as the number of Fourier descriptors used increases. It then stabilizes at same level for nine to eleven descriptors.

  • Using PSO to find the most suitable descriptors and to assign

weights for these descriptors improves dramatically the recognition rate using the least number of descriptors.

slide-27
SLIDE 27

Slide Slide 27 27

WSC 11 WSC 11