Friday, March 7, 2008
Monday, March 3, 2008
Throwing in more Gaussians
The variability in the appearance of a single part across different training images here suggests that a single Guassian may not be sufficient in capturing the underlying data. I decided to try out a mixture of Gaussians for each part (with diagonal covariances). The Netlab software for Matlab turned out to be very useful here as it has inbuilt routines for learning and using Gaussian mixture models (e.g. gmm, gmminit, gmmem and gmmprob scripts were a big help).
Here are the resulting log probabilites when using 2 mixture components for each part's appearance. In this case, the default EM initialization is used (uniform priors, random means and identity covariances).
Next, EM was initialized using the gmminit script, which initializes the centers and priors using k-means on the data. The covariance matrices are calculated as the sample covariance of the points closest to the corresponding centres.
Here are the resulting log probabilites when using 2 mixture components for each part's appearance. In this case, the default EM initialization is used (uniform priors, random means and identity covariances).

Next, EM was initialized using the gmminit script, which initializes the centers and priors using k-means on the data. The covariance matrices are calculated as the sample covariance of the points closest to the corresponding centres.
Sunday, March 2, 2008
Reducing dimensionality with random projections instead of PCA
Instead of reducing the dimensionality of the appearance patches using PCA, I tried using a random projection matrix instead (similar to the one defined in question 1 here). The matrix was generated once during training and the same one was used again during testing. This approach does not seem to work any better than the previous PCA approach.
Here are the total log probabilities of the same test images that were used previously. Image 1 has taken an undesirable dip and image 4 hasn't been pulled up enough from the other negative test images.
The appearances of the negative test images has gone up relative to the bike images.
Of course, the location probabilities are exactly the same as before because the these are unaffected by the method of dimensionality reduction on appearance patches.
Here are the reconstructed patches obtained by back projecting to 121 dimensions. For this, the reduced dimensionality patches were multiplied by the pseudo-inverse of the random projection matrix that was used.
Here are the total log probabilities of the same test images that were used previously. Image 1 has taken an undesirable dip and image 4 hasn't been pulled up enough from the other negative test images.
The appearances of the negative test images has gone up relative to the bike images.
Of course, the location probabilities are exactly the same as before because the these are unaffected by the method of dimensionality reduction on appearance patches.
Here are the reconstructed patches obtained by back projecting to 121 dimensions. For this, the reduced dimensionality patches were multiplied by the pseudo-inverse of the random projection matrix that was used.
Wednesday, February 27, 2008
Fixing a bug
After closer examination of the extracted patches, I discovered that the sorting of the patches was actually happening by Y-coordinate instead of X. I fixed that bug and then the tests were showing better results.
This figure shows the patches extracted from the 47 training images. Each row shows the 10 patches extracted from a single motorbike training image, now sorted by X-coordinate.
The image below shows the 9 images used for testing (in row major order):
Here are the resulting log probabilities (for location, appearance and sum) for each of the test images:

The location probability of the fifth image, which is a car, is quite high. This can be seen easily from the locations of the extracted patches here (which also shows why the location probability of the ninth image is so low, as should be the case). However, the appearance probability for it is low. In general, the locations of the patches are doing a better job at differentiating the classes. The appearance probability of the fourth bike is very low. Showing it below along with its extracted patches.
Wednesday, February 20, 2008
Reconstructed patches
For debugging purposes, I reconstructed the patches by projecting them back to 121-dimensions and displaying them as images. The first four rows show motorbike patches and the remaining rows show patches from cars and faces. Can't see much difference.
Edit: These patches were sorted (erroneously) by Y-coordinate. The correct patches, sorted by X-coordinate, are shown below in the second figure.

Edit: These patches were sorted (erroneously) by Y-coordinate. The correct patches, sorted by X-coordinate, are shown below in the second figure.

Wednesday, February 13, 2008
Sorting by X-coordinate
Running the same experiment after sorting the features by X coordinate (instead of saliency), I get these probabilities:
CombinedLogProb =
-240.8994
-206.9385
-228.6303
-249.9772
-293.5449
-261.3568
-279.4719
-255.3435
-270.4987
-296.9481
>> LogProbApp
LogProbApp =
-144.7198
-114.0909
-130.4656
-151.1481
-166.9280
-150.5252
-166.1861
-108.0655
-125.5857
-161.1468
>> LogProbLoc
LogProbLoc =
-96.1796
-92.8476
-98.1648
-98.8291
-126.6168
-110.8315
-113.2858
-147.2780
-144.9131
-135.8014
CombinedLogProb =
-240.8994
-206.9385
-228.6303
-249.9772
-293.5449
-261.3568
-279.4719
-255.3435
-270.4987
-296.9481
>> LogProbApp
LogProbApp =
-144.7198
-114.0909
-130.4656
-151.1481
-166.9280
-150.5252
-166.1861
-108.0655
-125.5857
-161.1468
>> LogProbLoc
LogProbLoc =
-96.1796
-92.8476
-98.1648
-98.8291
-126.6168
-110.8315
-113.2858
-147.2780
-144.9131
-135.8014
Subscribe to:
Posts (Atom)

