CAP 5638

Pattern Recognition

Spring 2004


Course Information

  1. Programming Assignment 1 : Classification Using Bayesian Decision Theory
  2. Programming Assignment 2 : Parametric and Nonparametric Methods for Classification
  3. Term Project : Principle component analysis for recognition

Programming Assignment 1 : Classification Using Bayesian Decision Theory

  1. Bayesian decision theory.
    results.pgmmisclassified.pgm
     yagi@thread.csit.fsu.edu:cap5638/cap5638/hw1> ./lab1
     Please specify the test image file name: testimage.pgm
     Please specify the ground truth image file name: groundtruth.pgm
     Writing 'results.pgm' .....  DONE.
     There are 10547 misclassified pixels and the error is 16.0934 %.
     Writing 'misclassified.pgm' .....  DONE.
     
top

Programming Assignment 2 : Parametric and Nonparametric Methods for Classification

  1. Gaussian with fixed variance (4000).
        yagi@thread.csit.fsu.edu:cap5638/cap5638/hw2> ./lab2
        Please specify the test image file name: testimage.pgm
        Please specify the ground truth image file name: groundtruth.pgm
        Please specify the training data file: lab2_sample_100_1.dat
        1: Gaussian with fixed variance (4000).
        2: Gaussian with unknown mean and variance.
        3: Exponential distribution.
        4: Maxwell distribution.
        5: Parzen windows.
        6: K-nearest neighbor rule.
        Please specify the parametric forms: 1
        ***** For Gaussain distribution with fixed variance 4000 *****
        Priors for category 1 is 0.2300 and category 2 0.7700.
        Estimated mean for category 1 is 103.7826 and category 2 148.8442.
        Writing 'results.pgm' .....  DONE.
        There are 13014 misclassified pixels and the error is 19.8578 %.
       
  2. Gaussian with unknown mean and variance.
       yagi@thread.csit.fsu.edu:cap5638/cap5638/hw2> ./lab2
       Please specify the test image file name: testimage.pgm
       Please specify the ground truth image file name: groundtruth.pgm
       Please specify the training data file: lab2_sample_100_1.dat
       1: Gaussian with fixed variance (4000).
       2: Gaussian with unknown mean and variance.
       3: Exponential distribution.
       4: Maxwell distribution.
       5: Parzen windows.
       6: K-nearest neighbor rule.
       Please specify the parametric forms: 2
       ***** For Gaussian distribution with unknown mean and variance *****
       Priors for category 1 is 0.2300 and category 2 0.7700.
       Estimated mean for category 1 is 103.7826 and category 2 148.8442.
       Estimated variance for category 1 is 100.6919 and category 2 2273.3779.
       Writing 'results.pgm' .....  DONE.
       There are 9670 misclassified pixels and the error is 14.7552 %.
       
  3. Exponential distribution.
      yagi@thread.csit.fsu.edu:cap5638/cap5638/hw2> ./lab2
      Please specify the test image file name: testimage.pgm
      Please specify the ground truth image file name: groundtruth.pgm
      Please specify the training data file: lab2_sample_10_1.dat
      1: Gaussian with fixed variance (4000).
      2: Gaussian with unknown mean and variance.
      3: Exponential distribution.
      4: Maxwell distribution.
      5: Parzen windows.
      6: K-nearest neighbor rule.
      Please specify the parametric forms: 3
      ***** For exponential distribution *****
      Priors for category 1 is 0.4000 and category 2 0.6000.
      Estimated theta (exponential) for category 1 is   0.0103 and category 2   0.0058.
      Writing 'results.pgm' .....  DONE.
      There are 17095 misclassified pixels and the error is 26.0849 %.
      
  4. Maxwell distribution.
      yagi@thread.csit.fsu.edu:cap5638/cap5638/hw2> ./lab2
      Please specify the test image file name: testimage.pgm
      Please specify the ground truth image file name: groundtruth.pgm
      Please specify the training data file: lab2_sample_10_1.dat
      1: Gaussian with fixed variance (4000).
      2: Gaussian with unknown mean and variance.
      3: Exponential distribution.
      4: Maxwell distribution.
      5: Parzen windows.
      6: K-nearest neighbor rule.
      Please specify the parametric forms: 4
      ***** For Maxwell distribution *****
      Priors for category 1 is 0.4000 and category 2 0.6000.
      Estimated theta (Maxwell) for category 1 is   0.0002 and category 2   0.0000.
      Writing 'results.pgm' .....  DONE.
      There are 12847 misclassified pixels and the error is 19.6030 %.
      
  5. Parzen windows.
      yagi@thread.csit.fsu.edu:cap5638/cap5638/hw2> ./lab2
      Please specify the test image file name: testimage.pgm
      Please specify the ground truth image file name: groundtruth.pgm
      Please specify the training data file: lab2_sample_10_1.dat
      1: Gaussian with fixed variance (4000).
      2: Gaussian with unknown mean and variance.
      3: Exponential distribution.
      4: Maxwell distribution.
      5: Parzen windows.
      6: K-nearest neighbor rule.
      Please specify the parametric forms: 5
      For Parzen windows, pleas specify the window width: 3
      ***** Parzen Window *****
      For Parzen windows with Gaussian window function and window width 3.000000
      Writing 'results.pgm' .....  DONE.
      There are 12928 misclassified pixels and the error is 19.7266 %.
      
  6. K-nearest neighbor rule.
      yagi@thread.csit.fsu.edu:cap5638/cap5638/hw2> ./lab2
      Please specify the test image file name: testimage.pgm
      Please specify the ground truth image file name: groundtruth.pgm
      Please specify the training data file: lab2_sample_100_1.dat
      1: Gaussian with fixed variance (4000).
      2: Gaussian with unknown mean and variance.
      3: Exponential distribution.
      4: Maxwell distribution.
      5: Parzen windows.
      6: K-nearest neighbor rule.
      Please specify the parametric forms: 6
      For K-nearest neighbor rule, pleas specify K: 10
      ***** K-nearest neighbor *****
      For K-nearest neighbor with k  10
      Writing 'results.pgm' .....  DONE.
      There are 9915 misclassified pixels and the error is 15.1291 %.
      
top

Term Project : Principle component analysis for recognition

Face Recognition by PCA

  1. Γ : training images, M=10
    Γi is a N^2 x 1 vector, where N^2 = 112 x 92



  2. Ψ : mean image
    Ψ = 1/M ∑ Γi
    Ψ is a vector N^2 x 1 vector.



  3. Φ : subtracted images
    Φi = Γi - Ψ
    Φi is a N^2 x 1 vector



  4. Covariance Matrix
    C = 1/M ∑ Φi Φi' = A A', N x N matrix.
    where A = [Φ1 Φ2 ... ΦM]
    A'A v = λ v, λ : eigenvalue, v : eigenvector of A'A
    C u = λ u where u = A v, λ : eigenvalue, u : eigenvector of C

  5. Eigenfaces


  6. Reconstructed images, K=4,5,6
    Γ = Ψ + ∑ wk uk where w = u' Φ





  7. Γ 2 : Test image
    Γ 2i is a N^2 x 1 vector



  8. Φ 2 : subtracted image
    Φ 2i = Γi - Ψ
    Φ 2i is a N^2 x 1 vector


  9. Ω : space
    Ω i' = [ w1 w2 ... wk ]'
    Find minimum Euclidean distance : ε = | Ω - Ωk |
  1. Sample output - output.txt
  2. Useful papers and websites.
top

Yoshihito Yagi
Since May 5, 2004