Contents
Code and data: (ZIP). | Change Log |
Run StartFromHere.m in Matlab. You can monitor intermediate results in the folder: output/. |
Parameters. The size of each active basis template is 72 (width) by 72 (height) pixels. Maximum number of Gabor elements in each template is 12. 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 we learn 20 active basis templates (i.e. clusters). For EM learning, we randomly start at 3 initializations. Then 10 EM iterations are carried out. In the M step, for each cluster we use a maximum of 30 examples to re-learn the active basis model. In the E step, the activated templates need to have a SUM2 score of at least 5. For local inhibition between templates, the minimum distance between two activated template is 0.25 times the size of template. In later EM iterations, this is increased to 0.40 resulting in sparser representation. Allowed template rotations: [-2, 0, 2]. Allowed image resolutions (relative): [0.90, 1.00, 1.10]. As a pre-processing step, the input images are resized so that the image area is roughly 22500 pixels.
Training examples
A selection of the input images:
Learned templates for 20 clusters (after 10 iterations) for image patches randomly cropped/scanned from the input images. (some clusters may be empty):
Initial templates learned from randomly initialized clusters:
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):