Experiment 9

Learning local representative templates

Past results and code

The code below is not nearly as efficient as the current code posted above. It performs unnecessary inhibition steps on all the images in learning. We keep it just for our own record.

In experiment 9 (outdated), we learn local representatives in an ensemble of 123 images of animal heads. Around each image, we learn a template from this image and its K nearest neighbors, using an iterative scheme based on the active correlation. Specifically, we first learn a template for this single image where no activity is allowed. Then using the learned template, we find K nearest neighbors by active correlation, where activity is restored. After that we re-learn the template from this image and its K nearest neighbors. The weight for each of the K nearest neighbors is 1, whereas the weight for this image is $\rho K$. In our experiment, K = 5, and $\rho$ = 1/3. Then again, we find the K-nearest neighbors, and iterate. After learning all the templates, we trim them to satisfy the constraint that the neighbors of the remaining templates should not overlap (this may be too aggressive). This leaves 16 templates.

The local learning identifies the local dimensions and local "metric" in the image ensemble.

(1) data, codes, and readme for local learning based on active correlation
(1.1) data and codes based on likelihood


Experiment 9.1. The 16 representative templates locally learned by active correlation. They are ordered by the total alignment scores. Image size is 100*100. Number of elements is 40. Number of iteration is 3 for learning each template. The allowed activity of location is up to 2 pixels. The allowed activity of orientation is up to pi/15. eps

The following are the 16 templates and their corresponding 5 nearest neighbors.

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

eps

data, codes, and readme with follow-up k-mean clustering
We can use the learned template as the starting point for the k-mean clustering based on active correlation.

results of k-mean clustering
The last two clusters are removed because each of them only contains one image.

All the 123 templates
Listed in the descending order of active correlation scores.

(2) another example


Experiment 9.2. The 19 templates locally learned by active correlation. Number of images is 200, image size is 56*56, taken from MNIST data set. Number of elements is 12. Number of iteration is 3 for learning each template. The allowed activity of location is up to 2 pixels. The allowed activity of orientation is up to pi/15. eps

results of k-mean clustering
Again we use the learned templates to initialize k-mean. We did not perform merging.

All the 200 templates
Listed in the descending order of active correlation scores.

Back to active basis homepage