










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











Abstract —This paper presents a framework for unsupervised learning of a hierarchical reconfigurable image template — the AND-OR Template (AOT) for visual objects. The AOT includes: (1) hierarchical composition as “AND” nodes, (2) deformation and articulation of parts as geometric “OR” nodes, and (3) multiple ways of composition as structural “OR” nodes. The terminal nodes are hybrid image templates (HIT) [17] that are fully generative to the pixels. We show that both the structures and parameters of the AOT model can be learned in an unsupervised way from images using an information projection principle. The learning algorithm consists of two steps: i) a recursive block pursuit procedure to learn the hierarchical dictionary of primitives, parts and objects, and ii) a graph compression procedure to minimize model structure for better generalizability. We investigate the factors that influence how well the learning algorithm can identify the underlying AOT. And we propose a number of ways to evaluate the performance of the learned AOTs through both synthesized examples and real world images. Our model advances the state-of-the-art for object detection by improving the accuracy of template matching.
1 INTRODUCTION
1.1 Motivation and Objective
ISUAL objects are fundamentally compositional and exhibit rich structural variations: cats may have sharp or round ears; desks may have long or short legs. Therefore object templates must be reconfigurable to account for structural variabilities. In the literature, deformable templates [3], [7], [6], [20], [5], [22], [21] and compositional hierarchy [11], [12], [9], [23], [19], [16], [8], [2] are widely used in object modeling with shared parts among categories. Furthermore, generative image gram- mar and AND-OR graphs [24] are proposed to facilitate robust statistical modeling of images. In this article, we propose a framework for learning AND-OR templates (AOT) which combine compositionality represented as AND nodes, and reconfigurability represented as OR nodes. We address the following issues associated with un- supervised learning of the AOT:
Among these issues a most important challenge with unsupervised learning is the pervasive ambiguity in identifying which elements should be grouped as a visual part. For example, it is hard to determine where to
segregate the animal face or horse body into constituent parts. The proposed AOT model aims at extending our previous work – active basis template (ABT) [20] and hybrid image templates (HIT) [17]. An ABT consists of a small number of Gabor basis elements (sketches) at select locations and orientations, where these basis elements are allowed to perturb their locations and orientations locally. Si and Zhu [17] extended the ABT to a HIT by including local texture patterns (gradient orientation histograms), flatness and color. Both ABT and HIT can be learned automatically from roughly aligned training images. The main limitation of ABT and HIT is the lack of reconfigurability. They can only deal with small deformation, and fall short when there are large articula- tions or structural changes. It would not be satisfactory by simply enumerating all possible configurations by a mixture model of HITs. These HITs do not share training positives, and require more training images. As a related example, in Felzenszwalb et. al. [5] the deformable parts model is a mixture of object templates which do not share training data. Instead of learning HITs directly for object templates, we propose to use the HITs as reusable building blocks — the terminal nodes of AOT, for smaller visual parts that are relatively rigid.
1.2 Overview of proposed methodology An AOT is a stochastic reconfigurable template that gen- erates a set of valid configurations or object templates. The AND nodes represent compositions of parts, while the OR nodes account for articulation and structural variation of parts. As an example, Figure 1 shows a learned AOT from 320 animal face images without man- ual labeling. The solid circles denote AND nodes and the hollow ones denote OR nodes. The branching probabil- ities are also shown at each OR node. The rectangles
Fig. 1. An AND-OR Template (AOT) learned from 320 animal face images of four categories, with no manual labeling. Shaded circles denote AND nodes, which are combinations of terminal nodes or children OR nodes. Empty circles means structural OR nodes. Shaded rectangles are terminal nodes, which are hybrid image templates (HITs) for part appearances. Each terminal node is also associated with a geometric OR node which accounts for its deformation and articulation. For clarity we removed the geometric OR nodes and OR branches with probability less than 0.1.
denote terminal nodes, where the numbers index the animal facial parts (e.g. eyes, ears) shown as HITs in the third row of the figure. The hierarchical AOT generates a large number of valid configurations. The learning algorithm for AOT consists of two steps: i) Block pursuit for hierarchical dictionaries of reusable parts. Firstly we set up a data matrix (e.g. Figure 4) using feature responses of positive training examples. Each row in the data matrix corresponds to one training example; and each column corresponds to one feature (e.g. primitive, texture and color). The data matrix is usually flat, i.e. with a small number of rows (e.g.
reach the scale of whole objects. It is worth to note that the pervasive ambiguity of parts (i.e. where to segment objects into parts) can be reduced or eliminated by jointly pursuing for both objects and parts. We show this in the one dimensional text example in Section 5.1. ii) Graph compression on the AOT. After block pur- suit, we encode the training images by a set of configu- rations of parts (i.e. which parts appear and where they appear). It is a flat and large AOT whose root node has many branches. This flat AOT simply memorizes data, so it suffers from large model complexity and thus poor generalizability. We propose a graph compression procedure to produce a compact AOT. There are two operators in graph compression:
By applying the two operators, we reduce the model complexity, which is measured by the number of nodes in the AOT. This is accompanied by a slight loss in likelihood. We use a parameter to control the trade-off between data likelihood and model complexity. This is closely related to Bayesian model selection methods like BIC [15].
Fig. 2. A more detailed illustration of the animal AOT shown in Figure 1. For OR nodes, we illustrate typical templates with structural variations and geometric transforms. The AND nodes are denoted by solid blue circles. The terminal nodes are individual parts (e.g. ear, mouth) which are represented by automatically learned hybrid image templates.
orientations (e.g. HoG) which are suitable to represent more complex textures inside objects (e.g. fur and hair). {hflt j } are flatness features which often appear in empty image patches like cloudless sky. {hclr j } are histograms of color, which are most capable of describing objects with distinctive colors (e.g. tomatoes).
HIT model. A HIT is a fully generative probabilistic image model, which consists of a small number of atomic feature prototypes at selected locations and orientations. See Figure 3 for two HITs learned from tomato and pear images. A HIT is specified by a list:
HIT = {(B 1 , x 1 , y 1 , o 1 ), (h 2 , x 2 , y 2 ), (h 3 , x 3 , y 3 ), (B 4 , x 4 , y 4 , o 4 ), ...}
where B 1 , B 4 , ... are image primitives and h 2 , h 3 , ... are histogram descriptors for texture, flatness and color. {(xj , yj )} denote the selected locations and {oj } are the selected orientations. Though local deformation is allowed for its individual elements, the HIT itself does not deal with large articulation or structural variation. The proposed AOT is aimed at addressing this issue, and the HITs serve as terminal nodes of AOT. Each AOT is an object template consist of a few HITs as parts.
structure texture flatness color
Fig. 3. HITs for tomato and pear [17]. Best viewed in color.
Feature responses. Within a window (e.g. 150 by 150 pixels) of visual object, the image is divided into small
image patches using a regular grid. For each patch, we measure a one-dimensional response r(I) which indi- cates how likely each feature prototype in ∆(1)^ appears in this patch. r measures the similarity between the image patch and feature prototype, and it is normalized to a value between 0 and 1. Larger value of r means this feature prototype appears with higher probability. For image primitives {Bj }, we compute feature re- sponse r as the Euclidean distance between the image patch and the primitive. For texture, color and flatness, we compute locally pooled histograms in the image patch. We refer to [17] for parameters of atomic features and how to compute the one dimensional response r(I). Let D be the total number of feature responses (i.e. number of patches times the dictionary size |∆(1)| ) on one image. D is often on the order of 106 or more. The feature responses of image I is organized in a vector:
R(I) = (r 1 (I), ..., rD (I)).
From the D candidate features we select a small subset to compose a HIT. Let {j 1 , ...jT } ⊂ { 1 , ..., D} be indexes of the selected features. T is the number of selected atomic features, and it is usually on the order of 10. To simplify notation, we will use rt to denote rjt when there is no ambiguity. Probability model. Let X+ = {I 1 , ..., IN } be positive example images (e.g. animal faces) governed by the underlying target distribution f (I). Let X− be a large set of generic natural images governed by the reference distribution q(I). Our objective of learning is to pursue a model p(I) to approximate f (I) in a series of steps:
q(I) = p 0 (I) → p 1 (I) → · · · pT (I) = p(I) ≈ f (I)
starting from q. The model p after T iterations contains T selected fea- tures {rt : t = 1, ..., T }. If the selected feature responses capture all information about image I, it can be shown by variable transformation [20] that: p(I) q(I)
p(r 1 , ..., rT ) q(r 1 , ..., rT )
So p can be constructed by reweighting q with the marginal likelihood ratio on selected features.
Under the maximum entropy principle, p(I) can be expressed in the following log-linear form:
p(I) = q(I)
t=
zt
exp {βtrt(I)}
where βt is the parameter for the t-th selected feature rt and zt (zt > 0 ) is the individual normalization constant determined by βt:
zt =
rt
q(rt) exp{βtrt}. (3)
It is an expectation over the reference distribution q(rt). In practice, as a pre-processing step prior to model learning, we estimate q(rt) in the form of a histogram using a large number of random training examples. And we can compute zt using Monte Carlo estimation. For simplicity, we will use an aggregated normalizing constant Z =
t=1 zt^ when there is no ambiguity. By the information projection principle [13], [25], [20], we adopt a step-wise procedure to for feature selection. In particular, the t-th feature rt is selected and model pt is updated by:
pt = arg max K(pt|pt− 1 )
s.t. Ept [rt] =
i=
rt(Ii) (4)
where K denotes the Kullback-Leibler divergence, and by maximizing it over all candidate features, we select a most informative feature rt to augment pt− 1 towards pt. The constraint equation in Eq. (4) ensures that the updated model is consistent with the observed training examples on marginal statistics. The optimal βt can be found by a simple line search or gradient descent to satisfy the constraint in Eq. (4). It is convenient to rewrite Eq. (2) using a long and sparse vector β of length D, with only few non-zero en- tries at the indexes {j 1 , ..., jT } corresponding to selected features:
p(I) = q(I)
j=
zj exp{βj rj (I)}
And the logarithm of normalizing constants (log z 1 , ..., log zD ) is also sparse, with log zj = 0 (i.e. zj = 1) whenever βj = 0. Since β encodes both indexes and multiplicative weights of selected features, we may simply consider β itself as an HIT.
Definition 2 The terminal nodes of AOT, denoted as ∆(2), is the set of HITs,
∆(2)^ = {HITk : k = 1, ..., K},
which are automatically learned from images. Each entry in ∆(2)^ is a part template composed of elements in ∆(1) at selected locations and orientations. K can also be learned, which will be explained in Section 3. See the third row of Figure 1 for an example of ∆(2).
In [17] it is shown that the HIT performs well on object categorization. With fewer features and parame- ters, it achieves on par or better accuracy compared with state-of-the-art methods like HoG + SVM [4] on public benchmarks, especially when there are a small number of training examples.
2.2 AOT: reconfigurable object templates An AOT consists of a number of configurations of parts, which include i) structural variabilities (i.e. what parts appear); ii) geometric variabilities (i.e. where they appear). The AOT embodies a stochastic context free grammar to regulate the structural and geometric variabilities. It can efficiently capture high-order interaction of parts and compositionality. Figure 2 illustrates an AOT for animal faces. The terminal nodes are shown as shaded rectangles. AND nodes are denoted as blue solid circles. OR nodes (for both geometric and structural variabilities) are drawn with dashed boxes together with typical configurations. The root node is an OR node with all the valid config- urations of animal faces. It is branched into several sets of valid structural configurations as well as geometric configurations (represented as AND nodes) of two sub- parts: upper face (B) and mouth (C). As we move down the AOT, the upper face is in turn decomposed into left ear (D), right ear (E) and forehead (F). The structural and geometric configurations are not observed in training images, and thus are modeled by two separate sets of latent random variables: Definition 3 The structural configuration b of AOT is a binary activation vector of length K (K = |∆(2)|), indicating which parts in ∆(2)^ are activated. bk = 1 means HITk is activated and appears in the image. Definition 4 The geometric configuration τ of AOT is a list of transforms (translation, rotation and scaling) applied to the parts in ∆(2). The AOT (e.g. in Figure 2) defines a set of valid config- urations for b and τ , and puts a probability distribution p(τ , b; AOT) on this set. The complete likelihood for an AOT is defined as
p(I, τ , b|AOT, β) = p(τ , b|AOT) · p(I|τ , b, β), (6)
and the image likelihood conditioned on the configura- tion (τ , b) is a log-linear form following Eq. (5):
p(I|τ , b, β) =
exp
k=
bk
j=
βk,j rτ (j)(I) − log Zk
q(I), (7)
Here we slightly abuse the notation and use τ as a warping function that maps { 1 , ..., D} to an integer- valued index. This in effects matches a location (and orientation, scale) in the template to a location in the
with the summation of Eq. (8) over positive examples:
∑^ K
k=
Score(Bk) =
i=
Score(Ii) =
i=
log
p(Ii) q(Ii)
So pursuing blocks by maximizing Eq. (13) corre- sponds to maximum likelihood estimation and the in- formation projection principle. Information projection. Recall that we pursue a series of models starting from q(I) to approximate the target distribution f (I) governing training positives X+. This corresponds to maximizing the log-likelihood log p(I) on X+. Initially p = q, and the data matrix has a log- likelihood L 0 (R). After pursuing K blocks, the resulting image log-likelihood is
L(R, β, b) = L 0 (R) +
k=
Score(Bk). (14)
In the above equation, we have used the vector representation in Eq. (5) and (7). Here we denote the dictionary of HITs in a K × D real-valued sparse matrix β. And we denote the structural configurations on all N images in a K × N binary sparse matrix b. The k-th block can then be denoted as a pair of sparse vectors( bk,: , βk,:
, where the non-zero items in βk,: denotes columns of Bk, and the non-zero items in bk,: denote the rows of Bk. Block pursuit is a penalized maximum likelihood es- timation problem, minimizing a two-term cost function:
−L(R, β, b) + penalty(β), (15)
which measures how well the dictionary of templates ∆(2)^ (encoded in β) explain the data matrix through their activations b. The penalty term is an l 0 penalty on β:
penalty(β) = η ·
j=
(^1) β 6 =0 (16)
where 1 () is an indicator function. η controls the trade- off between the two terms, and we find η = 0. 1 usually leads to good learning results. In a fully expanded form, the optimization problem in (15) is:
min b,β
i=
k
bk,i
j=
βk,j Ri,j − log Zk
k,j
(^1) βk,j 6 =0 (17)
where Zk =
I∈X−
exp
j=
βk,j rj (I)
We also enforce that the coefficients βk,: of HITk is confined within a local region of the object window (e.g. the top-left subwindow in the 3 by 3 grid in Figure 8) , and for each local region exactly one block is activated
for each image example, so that the activated HITs do not overlap. Due to the highly non-convex l 0 penalty, a naive global optimization algorithm would result in exponen- tial complexity of O(2K×D^ ). Inspired by the matching pursuit algorithm for signal reconstruction under sparse constraints, we propose a shared matching pursuit al- gorithm generalized from the one used in [20]. This algorithm greedily selects blocks with largest scores, and has a linear complexity O(KD). EM-type iterations. The rows of blocks (i.e. activations of parts b) are not observed on training images, and we need to repeatedly infer them using the estimated AOT model. So the block pursuit algorithm as outlined below is an EM-type algorithm that alternate between model parameters β and latent variables b:
Algorithm: Block Pursuit for part learning Input : data matrix R, initialization of structural configuration b(0), the number of blocks K. Output : Coefficient matrix β(T^ )^ and structural configuration b(T^ )^ after T iterations. I1 t ← 1. Compute the correlation matrix Corr between each pair (j, j′) of features. I2 For each candidate feature rj , and for a grid of possible values {β(m)} for the coefficient β, compute the correspond- ing normalizing constant zmj , and the corresponding expec- tations {E
rj ; β(m)
} for all m:
E
rj ; β(m)
= 1 |X−|
I∈X−
rj (I) exp{β(m)rj (I)}
M1 For k = 1 , ..., K, compute the average response on activated positive examples
¯r+ k,j = 1 N
i=
bk,iRi,j , ∀j
and find the best βk,j and zk,j by β∗ k,j ← β(μ), z k,j∗ ← z( jμ) where μ = arg min m (E
rj ; β(m)
− ¯r+ k,j )^2.
Then compute the gain of feature j for the k-th block:
gaink,j =
β∗ k,j r¯ k,j+ − log z∗ k,j j ∈ Sc(t) 0 otherwise
M2 β ← 0. For k = 1, ..., K, update βk,: iteratively: j∗^ ← arg max j gaink,j
β( k,jt) ← β∗ k,j , z k,j(t) ← z k,j∗ gaink,j′ ← 0 , ∀j′^ s.t. Corr(j, j′) > Thres = 0. 9 until maxj gaink,j < γ, or the maximum allowed number of selected features is reached. E1 b ← 0. For i = 1, ..., N , repeat:
k∗^ ← arg max k
j
β( k,jt) Ri,j − log z( k,jt) ,
b( kt∗),i ← 1 , set b( k,it) = 0 if non-zero entries of βk,: and βk∗,: overlap. until all values in b are assigned.
Terminate t ← t + 1. Iterate from M1 through E1 until b converges.
The learned blocks can be ranked by the score (or information gain) in Eq. (11) and the blocks with small scores are discarded.
3.2 Deformable block pursuit
In the previous subsection, we assume the images are aligned so that the the visual parts of different images appear in similar locations. To apply the block pursuit algorithm for non-aligned images or images with articu- lated objects, we expand the E1 step in the baseline block pursuit algorithm by inferring both geometric and struc- tural configurations. Now the input is a set of feature vectors R = {R 1 ,:, ..., RN,:} with different dimensions, but the coefficient matrix remains to be K × D. Similar to Eq. (15), the objective is:
min β,b,τ −L(R, β, b, τ ) + penalty(β), (18)
where
L(R, β, b, τ ) = L 0 (R) + ∑^ N
i=
k
bk,i
j=
βk,j Ri,τ (^) i(j) − log zk,j
In the E step, we not only solve for the best struc- tural configuration b but also infer the best geometric configuration τ (^) i on each positive example Ri,: using the inference algorithm in Section 4. τ (^) i denotes the localiza- tion (i.e. position x, y, rotation o, scale s ) for the object bounding box, part bounding boxes as well as primitives on image Ii. Part bounding boxes sit at canonical loca- tions relative to the object center. Each part is subject to a random local perturbation (∆x, ∆y, ∆o, ∆s), which is independent from other parts. Similarly, primitives are subject to independent local perturbations around their canonical locations inside their parent part bounding box. The inference algorithm contains one round of bottom-up steps followed by one round of top-down steps. In the bottom-up steps, the local perturbations are accounted in local maximizations (Up-2, Up-4). The optimal localization of object bounding box is first in- ferred (Up-6); then the optimal localizations of parts are obtained by retrieving the arg-max perturbations of parts (Down-5). The optimal localizations of primitives are found similarly.
3.3 Recursive block pursuit
Now we have pursued K blocks or terminal nodes ∆(2)^ = {HITk, k = 1, ..., K}. We then augment the data matrix by K new columns consisting of responses on the HITs. For clarity, we denote R as R(1)^ to indicate responses on ∆(1). And we denote R(2)^ as the newly
Fig. 5. Block pursuit on images.
computed responses on ∆(2)^ for the N images. Each entry of R(2)^ is a template matching score:
R(2) i,k = Score(HITk, Ii). (20)
The block pursuit algorithm or its deformable version can be carried on recursively on R(2). This leads to a compositional hierarchy. In our experiments we find the simple three level (object-part-primitive) hierarchy works well for detecting articulated objects in cluttered images.
Fig. 6. Graph compression by sharing.
Fig. 7. Graph compression by merging.
3.4 Graph compression So far we are focused on pursuing blocks to identify meaningful parts from the training images and assume a trivial structural AOT which allows for any activation patterns of parts as long as they don’t overlap. This can be problematic as the parts that co-appear in different locations are usually correlated, and certain structural configurations of parts should be prohibited (e.g. bear’s left ear + cat’s right ear). In particular, such a flexible model may easily match a cluttered background patches and cause a large number of false positives. To learn the
Fig. 8. Inference of AOT on an observed image. The top row : the dictionary of parts displayed with different colors in the border. Showing top 20 of them. The bottom row : the parsing procedure with the structural AOT and geometric AOT. The structural AOT stores an AND-OR grammar that generates a set of admissible configuration (i.e. activation of parts) on an image. In this AOT, we divide the object template into a 3 by 3 grid, and within each of the 9 cells only one part is allowed to be activated. A parse from the structural AOT results in a structural configuration (k 1 , ..., k 9 ) illustrated as a 3 by 3 color code. A parse from the geometric AOT results in the geometric configuration of activated primitives shown as black bars overlayed on the image. We also show the whole geometric parse tree by displaying the transformed object and part bounding boxes.
where r(2)^ is the collected vector of MAX2 scores of parts and bˆ is the best structural configuration both computed in Up-4.. Up-6 Compute the global maximum of SUM3 score maps over all object transformations (x, y, o, s). Down-6 Retrieve the detected (absolute) transformation (ˆx, ˆy, ˆo, sˆ) of the object from the maximization in Up-. Down-5 Compute the temporary transformation {τ (^) ˆx,y,ˆo,ˆsˆ(xk , yk )} for each activated part k (such that bk > 0 ) on I by letting the part move with the object, where (xk , yk ) is the canonical location of the part center relative to the object center. Down-4 For each activated part k ∈ {k : bk > 0 }, retrieve the detected (absolute) transformation ( ˆxk , yˆk , oˆk , sˆk ) of the k-th part from ARGMAX2 maps computed in Up-. Down-3 For each activated part k, for each of its activated primitive j ∈ {βk,j > 0 }, compute its temporary transfor- mation {τ (^) xˆk ,yˆk ,oˆk ,ˆsk (xj , yj , oj )} on I by letting the primitive move with the part, where (xj , yj , oj ) is the canonical loca- tion and rotation of the j-th primitive in the part template. Down-2 For each activated part k, for each of its activated primitive j, retrieve its detected (absolute) transformation (ˆxj , ˆyj , oˆj , ˆsj ) on I.
In Up-4.5 the procedure to infer the best structural con- figuration b also takes the form of recursive SUM-MAX. The input is a K dimensional vector r(2)^ = (r(2) 1 , ..., r(2) K ) of all candidate part scores. For notational convenience, we represent the sparse binary vector b as its non-zero entries (k 1 , k 2 , ...) ⊂ { 1 , ..., K}. By induction, assume for all the OR nodes in level l we have found the its best parse tree that generates the sub-configuration (k 1 , ..., kl) with exactly l parts being activated. We have also computed the scores of these OR nodes achieved by
the best parse trees. Then for an OR node ORl+1^ in level l + 1 (the parent level), we find its best parse tree by the following two steps:
SUM Identify this OR node’s children nodes, which are AND nodes. For each of the AND nodes ANDl i+1 , compute its score by summation of :
Score(ANDl i+1 ) =
ORlj ∈Children(ANDl i+1 )
Score(ORlj )
MAX Find the best branch of this OR node by maximization:
i∗^ = arg max i Score(ANDl i+1 ).
Retrieve the best parse tree by concatenating the best sub-parse-trees in Children(ANDl i+1∗ ). From this parse tree, we get the non-zero entries (k 1 ∗ , ..., k∗ l+1) of the best sub- configuration b∗. We then compute the best score of this OR node by:
Score(ORl+1) =
k=
b∗ k r(2) k
5 EXPERIMENT We evaluate the AOT model in both supervised and unsupervised settings. In the supervised setting, the ground truth label for training images and object bounding boxes are given. We measure the performance of classification and detection for articulated objects. On challenging object detection
tasks with lots of occlusion and clutter, we perform on par with state of art methods for localization of objects, parts and key points, while using a much smaller number of features. Evaluating the learned AOT in the unsupervised learning is a non-trivial problem, as we often don’t have a unique ground-truth, e.g. how an object should be divided into parts. We start from the 1D text example, because we have the underlying generating AOT for the training data, which enables us to conduct a thorough numerical evaluation. Then we evaluate the image AOT learned without supervision for both objects and parts, comparing to human subjects.
5.1 The synthesized 1D example
Fig. 9. A stochastic AND-OR template for generating a sentence composed by three parts: subject + linking verb + adjective/present participle, such as “hamster is now jumping”. Shaded circles denote AND nodes. Empty circles represent OR nodes. Shaded rectangles are terminal nodes.
To study the identifiability issue, we synthesize a 1D example where we know the underlying AOT as ground truth that generates the training data. Let AOT∗^ be the true AOT. Figure 9 shows AOT∗^ for sentences composed of three parts: subject + linking verb + adjective/present participle (e.g. winter is now leaving). The three parts are correlated, such that not all combinations of the three parts are admissible. For example, the combination spring is now jumping is not allowed. Each part is in turn composed of a prefix and a postfix. Each part, prefix/postfix and letter can be missing (i.e. occluded by random letters) with a small probability (0.01). Finally, random letters of varying lengths are inserted between the three parts of the sentence.
5.1.1 The data and data matrix
Table 2 shows several example strings generated by this underlying AOT. Our goal is to learn an AOT from the sampled example strings, and compare the learned AOT with the underlying one in Figure 9 to study the effectiveness of the learning algorithm in identifying its parts and composite structures.
5.1.2 Recursive block pursuit for text data
We first identify frequent substrings of length l (l = 3 or 4 ), such as “ing”, “ster”, as significant blocks in the
String examples.
Fig. 12. The effect of the separation parameter s and training sample size n on learned dictionary. Left: ROC curves for different separation parameters. Right: AUC as a function of separation s and sample size n.
data matrix. These blocks are selected into the first level dictionary ∆(1)^ (Figure 10). Once ∆(1)^ is learned, the strings are re-encoded using the entries in ∆(1). We then construct a new data matrix by collecting co-occurrences of ∆(1)^ entires. As a result, frequent combinations such as “spr”+“ing” are identi- fied as significant blocks and selected into the second level word dictionary ∆(2). An entry in the word level dictionary covers 6 to 8 letters. The word dictionary contains many duplicate or overlapping entries, such as “hamster” and “amster”. The nuance entries like “amster” are pruned by a greedy procedure of finding best matching and local inhibition. In the end, only high frequency words remain in the top of ∆(2)^ (Figure 10). Notice that compared to ∆(1), ∆(2)^ contains much less ambiguity. Finally the level 3 dictionary (sentences) ∆(3)^ = {“spring is now coming”, · · · } is easily obtained by identifying frequent combinations of words.
5.1.3 Evaluation on the text example In this experiment, we are interested in studying the following factors that influence model identifiability:
We perform 105 repeated cross validations to com- pare training error and testing error. Different from the classification scenario, the training error for AOT is defined as the KL divergence K( fˆ (^) ntrain ‖AOT) be- tween the learned AOT and training data fˆ (^) ntrain. Here f^ ˆ (^) ntrain denotes the empirical distribution on the train- ing data {btrain 1 , ..., btrain n }. The testing error for AOT is defined as the KL divergence K( fˆ (^) mtest ‖AOT), where f^ ˆ (^) mtest = {btest 1 , ..., btest m } is another independent sample from AOT∗. And m >> n. In Figure 13 (left), the horizontal axis is the logarithm of α which is sampled at seven points ( 10 −^6 , 10 −^3 , 10 −^2 , 0. 1 , 0. 2 , 0. 5 , 0. 8 ), and the vertical axis denotes the model error computed as KL divergence. Recall that large α results in larger more complexity. When the model becomes more complex, the training error always decreases, but the testing error would first decrease but then increase due to overfitting. Figure 13 (right) shows at what sample size and what α values can we successfully recover the generating grammar. The horizontal axis is the logarithm of training sample size log 10 n, and the vertical axis is log α. The color intensity in this 2D contour map denotes the testing error. We find that the graph compression algorithm can successfully identify the AOT for n > 100 and 10 −^6 < α < 10 −^2 , up to a tolerance of 0.1 in KL divergence.
5.2 Unsupervised learning of image AOT
Interesting practical issues arise from learning image AOT in the unsupervised setting. Firstly, for the learning algorithm to scale to a large dataset, an online version of the learning algorithm is desirable. Secondly, it is inter- esting to see how the learned part dictionary grows with the number of training examples. Thirdly, we care about the stability of the learning algorithm with respect to perturbations in the training sequence. We also compare our learning algorithm with state-of-the-art latent SVMs methods for discovering hidden clusters in image data.
Fig. 14. Online learning of AOT.
Fig. 15. Sub-linear growth of the learned dictionary.
Fig. 16. Robustness of AOT learning evaluated by perturbation in KL divergence.
Online AOT learning. We implemented an online version of both block pursuit for part dictionary and graph compression. When a new training example comes in, we first try to explain it using existing dictionary and AOTs. If the likelihood of the AOT or a part scores a low likelihood on the new image, we then update both the dictionary and the AOT. The online dictionary learning is achieved by an incremental version of EM algorithm. The incremental updating of the stochastic AOT is carried out by inserting the new configuration into the current AOT, creating new OR branches and updating branching probabilities. Figure 14 gives the first, second and sixth updates of the AOT using 320 animal face images. Dictionary growth. With the online learning algo- rithm, we are able to observe the size of the dictionary as a function of the number of training examples (Figure 15). The sub-linear growth of the dictionary shows that the learned dictionary of parts is highly re-usable and shared by several animal face categories. The number of nodes in the learned AOT scales linearly with the dictionary size. Thus the complexity of AOT also grows sub-linearly to the number of training examples. Robustness of AOT learning. Another important question is, how many training examples are needed so that the AOT is reliably learned. We study this question by performing the following cross validation: two inde- pendent samples of size n are drawn from the training data of animal faces, from which two AOTs are learned. Both AOTs are then evaluated on a third independent sample of data (testing examples) by KL divergence. The difference in KL divergence is recorded. A smaller difference indicates that the learned AOT is closer to convergence, and thus more identifiable. We do this for 5 repetitions and for different training sizes n. The result is summarized in Figure 16. The AOT is increasingly identifiable as n grows, and when n reaches 100 an AOT can be reliably identified up to a KL divergence of 0. (bits). The KL divergence is computed by Monte Carlo
Fig. 17. Training examples from 20 animal face categories.
estimation:
K(AOT∗|AOT) ≈
∑^ m
i=
log
p(bi; AOT∗) p(bi; AOT)
Evaluating learned AOTs by performance of clus- tering. For the object dictionary, we evaluate on two examples of unsupervised clustering on i) 142 cat and wolf images, and ii) 100 rabbit images. The rabbit images contain two distinct types with standing ears and relaxed ears. For both examples, the number of clusters is 2. We use the labeling cost by [10] to measure the performance of clustering. This cost reflects the labeling effort needed for a user to label all the images, given the clustering result. The user is assumed to be able to use two buttons: one to assign a single label to all images in a cluster, and one to assign a label to a single image. In Table 3, we compare the label cost of clustering for AOT and latent SVMs. We also show the cost for an optimal clustering (e.g. cats in one cluster, wolves in the other) and a random clustering. From this result, we can see that the learned AOT is able to identify meaningful object clusters more reliably. On a larger scale, Figure 1 shows the learned AOT from a mixture of 320 animal face images (bear, cat, wolf and cow) without knowing their categories. The AOT successfully identifies the four hidden clusters.
TABLE 3 Cost of unsupervised clustering.
AOT LSVM optimal random cat & wolf 3 2 2 61 rabbit 5 36 2 38
5.3 Animal faces classification
We perform classification experiments on the LHI- Animal-Faces dataset^1 [17]. Figure 17 is an overview of the dataset, which consists of about 2200 images for 20 categories of animal faces. Compared to other bench- marks, LHI-Animal-Faces has several desirable proper- ties: (1) the animal face categories are similar to each other due to evolutional relationship and shared parts, and it is a challenging task to discern them; (2) the animal face categories exhibit interesting within-class variation, which includes (i) rotation and flip transforms, e.g. rotated panda faces and left-or-right oriented pigeon
Classification accuracy on animal faces.
HoG+SVM [4] HIT [17] LSVM [5] AOT 70.8% 75.6% 77.6% 79.1%
Fig. 18. Reconstructed image generated by AOT tem- plates matched to objects. For each pair of images, the observed image is shown on the left, followed by the reconstructed image is on the right.
heads; (ii) posture variation, e.g. rabbits with standing ears and relaxed ears; and (iii) sub-types, e.g. male and female lions. In Table 4, we compare the classification accuracy to three related works: (i) HoG feature trained with linear SVM [4], (ii) our prevoius work HIT [17] and (iii) part- based HoG features trained with latent SVM [5]. For all methods, we use 30 positive training images for each category, and we use the rest as testing examples. For AOT, the log-likelihood ratio score in Eq. (8) is used for evluating the classification performance. We use parameter η = 0. 1 as the stopping criterion for feature selection, i.e. stop when the information gain of newly selected feature is below 0.1 (bits). For each category, the number of selected primitive features are around 200, and the number of selected blocks are around 20. Our AOT model is fully generative to the pixels. In Figure 18 we show several examples of reconstructed image generated from the inferred (or matched) AOT. The reconstructed image captures rich information of the articulated object. While the AOT shows competitive performance on ob- ject categorization against state-of-the-art methods, it re- quires training to be carried out separately per category. This poses heavy computational burden when scaling up to hundreds or thousands of categories. One way to tackle this problem is to use a dictionary of shared parts, in the hope that the number of distinctive parts grows sub-linearly to the number of object categories. In
part-based latent SVMs. In contrast to the discrimina- tively trained system [5] which uses a large number of features (O(10^4 )), the AOT learned for each category only contains less than 200 features in total. It takes less than 10 minutes to learn an AOT with around 20 positive example images, on a machine with Intel i processor (3GHz) and 8GB RAM. On the same machine, detection in one image takes half a minute. No negative examples are used in training as the computation of the normalizing constant is put in the pre-computation stage. While for latent SVMs, a large number of negative examples need to be used and going over them in each optimization iteration requires heavy computation. So despite the highly optimized implementation of the training algorithm, it takes much more time (several hours) to train a latent SVMs model.
Fig. 23. Measuring the accuracy object localization with key points.
(a) AOT (b) LSVM
Fig. 24. 2D scatter plots of localization error (normalized by the object size) for the second key point of the egret.
Evaluating the accuracy of localizing objects, parts and keypoints. We evaluate the localization of objects, parts and pixel-level key points as the performance met- ric for detection. This is done using manually selected key points that are easy to be identified by a human labeler. Figure 23 shows the ground truth key point labelings (in total 6 key points), along sided with the detected key points by AOT and by latent SVMs. The key point labeling is only used in evaluating the detection results, and not used in the training of either models. After the AOT model is learned, we find the nearest edge element to each key point in the training images, and record the most likely location of the key point relative to that edge element. For the latent SVMs, we find the nearest part for each key point and record the most likely location of the key point relative to that part. We then use this information to locate the key points for each testing image. Figure 24 shows the detections for the second key
point (joint of neck and head) of egret using the two methods. Each red dot in the point cloud denotes one detection, and its coordinate means the displacement in horizontal and vertical directions. The displacements are normalized by dividing the size of the object. The AOT can locate the key points much more accurately. To numerically measure the performance of localiza- tion, we use an imprecision-recall curve. A higher curve indicates better performance. In this curve, the horizon- tal axis is the tolerance for normalized displacement√ ∆x^2 + ∆y^2 by dividing the object size. We restrict the range to be [0, 1] for convenience. The vertical axis is the recall rate (between 0 and 1), i.e. the percentage of correctly detected points that fall within the specified displacement tolerance. As we tolerate more displace- ment, the recall rate increases. We use the area under curve (AUC) to measure the average recall rate. Figure 25 shows the imprecision-recall curves for 6 key points (tip of beak, joint of head and neck, joint of neck and body, tail, top of standing leg, and bottom of standing leg) of egret. We also show the curves for 4 parts (head, neck, body, and leg) and the whole object. To get the curves for parts and the object, the displacement of the part is computed by averaging the displacements of key points associated with that part; and the dis- placement of the object is computed by averaging the displacements of all the key points. Our model performs localization consistently better than the latent SVMs, for all the parts and key points and for all the imprecision values (displacement tolerances). Table 6 provides a numerical comparison for egret, deer and VOC bikes, using the area under curve (AUC) measure. The part and key point AUCs are computed by averaging over all parts and key points. We also measured the average precision using PASCAL standard criteria on VOC bikes, with AOT getting an average precision of 60.8% vs. 59.5% for LSVM.
TABLE 6 AUCs for localization of object, parts and key points.
object part keypoint AOT LSVM AOT LSVM AOT LSVM egret .93 .80 .88 .76 .88. deer .93 .83 .91 .79 .90. bike .78 .76 .70 .66 .68.
In Figure 26, 27 and 28 we show the detection results on several challenging testing images. From these ex- amples we can see that the AOT can locate the object boundary and inner structures with a higher precision, which leads to more accurate localization overall.
6 CONCLUSION We propose a hierarchical reconfigurable object template called the AND-OR Template (AOT) model, which can capture rich structural variations and shape variations of
Fig. 25. Egret: the quantitative performance measure for localization of object, parts and key points.
Fig. 26. Detection results on VOC bikes. For AOT, we show the detected bounding boxes for objects and parts, as well as individual sketches. As a comparison, we also show detection results by latent SVMs model [5]. Best viewed in color.
Fig. 27. Detection results on Deer. For AOT, we show the detected bounding boxes for objects and parts, as well as individual sketches. As a comparison, we also show detection results by latent SVMs model [5]. Best viewed in color.
Fig. 28. Detection results on Egrets. For AOT, we show the detected bounding boxes for objects and parts, as well as individual sketches. As a comparison, we also show detection results by latent SVMs model [5]. Best viewed in color.
objects. We propose an unsupervised learning algorithm for learning AOTs from only images and no manual labeling. In our learning algorithm, the pervasive am- biguity of parts is overcome by 1) articulation of parts,
well the learning algorithm can identify the underlying AOT, and we design a number of ways to evaluate the performance of the proposed learning algorithm through both synthesized examples and real world images. The proposed AOT model achieves good performance on par with state-of-the-art systems in public benchmarks for object detection. Moreover, the AOT model has the