4.1 Initialization and local refinement
One major visual characteristic of objects is that they often stand out as saliency [24]. Based on this characteristic, we apply saliency detection to initially detect foreground regions in each image. Over various of saliency detection methods, we choose a recently proposed histogram based method [17] for its efficiency and effectiveness. Figure 2b demonstrates the saliency detection result of Figure 2a. We define the initial object likelihoods as the saliency likelihoods.
The segmentation results obtained by thresholding saliency likelihoods often contain holes and ambiguous boundaries. Motivated by the interactive segmentation methods, e.g., GrabCut [25], we utilize the inherent color Gaussian mixture model (GMM) in the image to update the object likelihoods. Two GMMs, one for the foreground and another for the background, are estimated in RGB color space. Each GMM is taken to be a full-covariance Gaussian mixture with M components. The GMM parameters are defined as: θ
k
= {θ k J|J ∈ {B,F}}, in which , . are the mean, covariance and weighting values for the foreground components, and for the background components. The GMM parameters are estimated from the initial likelihoods as follows: (1) given two thresholds T
1 and T
2, satisfying 0 < T
1 < T
2 < 1, we label the pixels with as foreground, whereas as background; (2) the colors of the foreground and background regions are clustered into M components using K-Means [26], respectively; (3) for each component, we statistically acquire its parameters . The object likelihoods built on the GMMs are given by:
(4)
(5)
Segmenting objects by directly thresholding the updated object likelihoods will result in noises, as shown in Figure 2c. We use guided filtering [16] to remove noises. The main idea of guided filtering [16] is that, given the filter input p, the filter output q is locally linear to the guidance map I, q
i
= a
x
I
i
+ b
x
, ∀i ∈ w
x
, where w
x
is a window with radius r centered at the pixel x. By minimizing the difference between the filter input p and the filter output q, i.e., , we can obtain a
x
, b
x
and the filter output q.
Based on guided filtering [16], we perform local refinement with three steps: (1) obtaining the foreground likelihood map L
k,F
={p(I
k
(x)|θ k F)} and the background likelihood map L
k,B
= {p(I
k
(x)|θ k B)}; (2) taking the grayscale image of I
k
as the guidance map, the two likelihood maps are filtered, respectively (denoting the filter outputs as and ); (3) defining the refined object likelihoods as . Figure 2d shows the refinement result of Figure 2c. As can be seen, the guided filtering based scheme can significantly improve segmentation quality.
4.2 Global message transferring
Due to the diversity of realistic scenes, saliency based object segmentation sometimes fails to extract objects of the same class (see Figure 3c). The segmentation quality can be further boosted by sharing appearance similarity among images. Unlike other cosegmentation methods [8, 9, 18] which propagate the distributions of visual appearance in the pixel or superpixel level, we perform message propagation in the heat source level to reduce computation time.
As stated in Section 3, heat sources are the representative superpixels located in the centers of the clustering regions formed by coherent superpixels. The regions are formed by a bottom-up agglomerative clustering scheme. Specifically, given an image I, we first partition it into a collection of superpixels via Turbopixels [14] (see Figure 4b, in which superpixels are encircled with red boundaries). Then we build an intra-image graph G
S
= <S,Y
S
>, where S = {s
i
} is the superpixel set and Y
S
= {(s
i
,s
j
)} is the edge set connecting all pairs of adjacent superpixels. The edge weight is defined by Gaussian similarity between the normalized mean RGB color of the nodes, i.e., w(s
i
,s
j
) = exp(-∥I(s
i
)-I(s
j
)∥2)/σ
s
, where σ
s
is a variance constant. Based on the graph G
S
, we use a greedy scheme to merge nodes one by one. Each time, we select the edge with the maximum weight value and merge its two nodes. This step is repeated until all nodes are merged into N regions. The central superpixel of each region is chosen as a heat source. Figure 4c demonstrates the clustering regions overlaid by the heat sources, in which the regions are encircled with green boundaries and the heat sources are colored in blue.
For message transferring among images, we construct an inter-image graph G
Z
= <Z,Y
Z
>. G
Z
is an undirected complete graph, where Z = {z
i
|z
i
∈Z
k
,k = 1,…,K} includes all heat sources from the input images, Y
Z
= {(z
i
,z
j
)} connects all pairs of heat sources. We update the object likelihoods of the heat sources by minimizing a standard MRF energy function that is the sum of unary terms E
1(·) and pairwise terms E
2(·,·):
(6)
where λ is the weighting value balancing the trade off between the unary terms and the pairwise terms.
The unary term E
1(·) imposes individual penalties for assigning any likelihood L(z
i
) to the heat source z
i
. We rely on the object likelihoods L∗,1 acquired in the previous stage to define this term:
(7)
The pairwise term E
2(·,·) defines to what extent adjacent heat sources should agree. It often depends on local observation. In our study, the pairwise potential takes the form:
(8)
where w(z
i
,z
j
) is the edge weight, defined as w(z
i
,z
j
)= exp(-∥f(z
i
)-f(z
j
)∥2)/σ
z
, σ
z
is a variance constant. f(z) is a nine-dimensional descriptor for the heat source z, including three-dimensional mean Lab color feature, four-dimensional mean texture featurea and two-dimensional mean position feature. This definition suggests that the larger the weight for the edge, the more similar the labels for its two nodes.
We utilize belief propagation [13] to optimize the energy function in several bounds. The main idea of belief propagation is to iteratively update a set of message maps between neighboring nodes. The message maps that are denoted by represent the transferred message from one node to another at each iteration. In our study, the message maps are initially set to zero and updated as follows:
(9)
Finally, a belief vector is computed for each node, , and the updated object likelihoods are expressed as: .
4.3 Local heat energy diffusion
After global message transferring, the object likelihoods for heat sources preserve appearance similarity among images. We further diffuse them to other superpixels. As illustrated in the middle level of Figure 1, this is performed by heat energy diffusion within individual image. The heat energy diffusion can be imagined in the following situation: putting some heat sources in a metal plate, the heat energy will diffuse to other points as time goes by, finally each point will have a stable temperature. How to calculate such steady-state temperatures? This is a well-known Dirichlet energy minimization problem:
(10)
Grady [15] states the similar problem in discrete space with the term “random walks”. Based on a graph G
X
= <X,Y
X
>, where X = {x
i
} is the node set and Y
X
= {(x
i
,x
j
)} is the set of node pairs, the Dirichlet energy function takes the form:
(11)
where w(x
i
,x
j
) is the edge weight for the adjacent node pair (x
i
,x
j
).
In our study, the random walks works on the graph G k S = <S
k
,Y k S> for the image I
k
, where S
k
= {s
i
} is the superpixel set and Y k S = {(s
i
,s
j
)} is the edge set connecting all pairs of adjacent superpixels. The corresponding energy function is:
(12)
where Q = D-A is the Laplacian matrix, in which A = {w(s
i
,s
j
)} is the edge weight matrix, and D is a diagonal matrix with the entities .
We divide the node set S
k
into two parts: the heat sources Z
k
and the superpixels U
k
= S
k
-Z
k
. The energy function can be rewritten as:
(13)
where and correspond to the Laplacian matrix for the node set Z
k
and U
k
, respectively.
Minimizing E(L(S
k
)) is equal to differentiating E(L(S
k
)) with respect to L(U
k
) and yields: . L(Z
k
) are the object likelihoods acquired in the previous stage, i.e., L(Z
k
) = L∗,2(Z
k
). The diffused object likelihoods for U
k
are obtained by: . The nonsingularity of guarantees that the solution exists and is unique.
For each pixel x, its object likelihood L∗,2(x) is assigned as the object likelihood of the superpixel it belongs to. Taking as input, we further invoke local refinement (see Section 4.1) to optimize object segmentation. Figure 3 demonstrates the segmentation results obtained before and after heat energy diffusion. As can be seen, although the saliency based initialization stage sometimes fails to extract the foreground objects, the stages of message transferring and heat energy diffusion can boost segmentation quality via sharing visual similarity of objects among images.