Code and data: (ZIP).
Run StartFromHere.m in Matlab. You can monitor intermediate results in the folder: output/.

Parameters. The size of each active basis template is 100 (width) by 100 (height) pixels. Maximum number of Gabor elements in each template is 40. For Gabor wavelets we use a scale of 0.70 and 16 quantized orientations within PI (in radian). Each Gabor element is allowed to move 3 pixels and rotate 1 orientation step(s) at most. We perform soft thresholding at 0.90 on SUM1 scores (Gabor responses) to reduce background clutter.

In total the codebook consists of 1 active basis templates. For unsupervised learning, we randomly start at 10 initializations. Then 10 iterations are carried out. In the encoding step, the activated templates need to have a SUM2 score of at least 30. For local inhibition between templates, the minimum distance between two activated template is 0.30 times the size of template. In later iterations, this is set to 0.30. Allowed template rotations: [-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8]. Allowed image resolutions (relative): [0.80, 1.00, 1.20]. As a pre-processing step, the input images are resized by a factor of 1.60.

Training examples

Training images:

Learned templates for 1 entries of the codebook (after 10 iterations) (some entries may be empty):



Initial templates learned from randomly cropped image patches:



Sketching the observed images by overlaying the activated templates on them:

Showing only the activated templates (with color):

Showing only the activated templates (with bounding boxes):