• No results found

Learning Cross-view Binary Identities

For two different camera views: a and b, we can collect two training datasets Xa = {x1a, x2a, · · · , xna} and Xb = {x1b, x2b, · · · , xnb}, where xia is a column vector

observed by view a for person i and n is the number of paired samples (xi a, xib).

Our aim is to find K hash functions F = {f1

v, · · · , fvK} for each view v ∈ {a, b}

and yv(k) = fvk(xv). In this chapter, the hash functions are constructed by a

set of linear hyperplanes: Wv = {wv1, wv2, · · · , wvK}. Thus, for dataset Xv, we

obtain Yv = {yv1, yv2, · · · , yvn} by using yvik = sign((wvk)Txiv). It is obvious that

yi

v ∈ {−1, 1}K. For simplicity, we can write it as: Yv = sign(WvTXv).

For a person with an image in the probe view, the first step is to calculate the ID by using the learned projections of the probe view. Next, the ID can be used to retrieve the images of persons with similar IDs in the gallery view. The IDs of persons in the gallery view can be obtained in advance. Finally, the person re-identification can be achieved by ranking the Hamming distances. Because the learned pairs of projections can embed the images of a same person into a same ID, the top list of ranking will conclude the ones corresponding to the probe image.

5.2.1

Maximising the variance of bits

We want to produce an efficient code for each view v, in which the variance of each bit is maximised and the bits are pairwise uncorrelated [115]. Thus, we need to do this by maximising the following objective function:

Iv =P kvar(f k v(xv)) s.t. cor(fk1 v (xv), fvk2(xv)) = 0, cor(fk v(xv), fvk(xv)) = 1, (5.1)

where k1 6= k2. However, the requirement of exact balancedness makes the above

objective function intractable. By signed magnitude relaxation, we get the fol- lowing continuous objective function based on dataset Xv:

Iv =P kE(||(w k v)Txv||22) ≈ 1n P k(w k v)TXvXvTwkv = 1ntr(WT v XvXvTWv) s.t. WT v Wv = I. (5.2)

We relax the constraints as: ((wk1

v )Twkv2)2 < δv, k1 6= k2, without considering the

norm of each linear projection. δv is a minimal positive value. In fact, in the

following, we can see that it is not necessary to require the unit norm constraints if the linear functions satisfy the hinge loss constraint.

5.2.2

Minimising the Hamming distance

In a single-view problem, the main consideration is that the learned codes are discriminative to represent all the samples by preserving some special proper- ties. However, it is not enough in a multi-view problem, such as person re- identification. Our main goal, in this chapter, is to learn K hash functions for each view so that two observations of each person have the most similar binary codes (IDs). That is to say, the Hamming distance between two sets of codes of one person should be minimised. For a pair of sample sets (Xa, Xb) collected

under the two views a and b, the Hamming distance between them is defined as: Lh(Xa, Xb) =X

i

Dh(yia, y i

b), (5.3)

where Dh indicates the Hamming distance. The Hamming distance Dh is equal

to the number of ones in yi

a⊕ yib, where ⊕ is a logical operation that outputs true

whenever the inputs differ.

However, despite its efficiency, minimisation of the Hamming distance is gen- erally intractable, because it is non-differentiable to the linear functions. Thus, we seek to minimise an alternative item, which guarantees the Hamming distance will be minimised simultaneously. Fortunately, Proposition 1 shows that we can achieve this, when the linear hash functions satisfy the hinge loss constraint de- fined as follows.

Definition 1: Hinge loss constraint. For any sample xi

v in one view v, if

the linear function wk

v is satisfying yvik(w k v) T xiv ≥ 1 − ξ ki v , (5.4) where ξki

v is a minimal non-negative value and yvik = sign((wvk)Txiv), thus wvk is

The hinge loss function is used for “maximum-margin” classification, most no- tably for Support Vector Machines (SVM) [220]. It penalises the items satisfying yik

v (wkv)Txiv < 1 so that all items can be correctly classified and the classification

score should keep stable as well. In our framework, we hope all the samples can be projected outside of [−1, 1] by each linear function so that the learned codes are relatively stable for all the samples. Moreover, if Wk

a and Wbk are hinge loss

constraint satisfied functions, the Hamming distance between the learned codes are constrained by the Euclidean distance.

Proposition 1: If two sets of linear projections Wa and Wb for two views are

the hinge loss constraint satisfied functions and their corresponding binary codes are defined by yi

v = sign(WvTxiv), v ∈ {a, b}, thus the inequality can be established

when satisfying ∀k, ξki a + ξbki≤ 1: Dh(yia, y i b) < ||W T ax i a− W T b x i b||22. (5.5)

Proof. The Hamming distance between two binary codes ya and yb is defined by:

Dh(ya, yb) =Pkyak⊕ ybk

=P

k1(sign((w k

a)Txa) 6= sign((wkb)Txb)),

where 1(· ) is an indicator function. Thus, for any k, we consider two conditions: (1) If sign((wk

a)Txa) = sign((wbk)Txb), it is obvious that

yk

a⊕ ykb = 0 ≤ |(wka)Txa− (wbk)Txb|.

(2) If sign((wk

a)Txa) 6= sign((wbk)Txb), we assume that sign((wak)Txa) = 1 (Other-

wise, same conclusion can be also obtained). There must be sign((wk

b)Txb) = −1.

Since the two linear projections are both hinge loss constraint satisfied functions, we have (wk

a)Txa ≥ 1 − ξka and (wbk)Txb ≤ −1 + ξbk. So, there is 2 − ξak− ξbk ≤

|(wk

a)Txa− (wbk)Txb|. Provided that ξak+ ξbk≤ 1, the following inequalities hold:

yak⊕ y k b = 1 ≤ 2 − ξ k a − ξ k b ≤ |(w k a) T xa− (wkb) T xb|.

In total, provided with 1(.)2 = 1(.), we obtain the following conclusion by satis-

fying ∀k, ξk a + ξbk ≤ 1: Dh(ya, yb) =Pk12(sign((wak)Txa) 6= sign((wkb)Txb)) ≤P k||(wak)Txa− (wkb)Txb||2 = ||WT a xa− WbTxb||22.

5.2.3

Overall objective function

To construct our objective function, three points need to be considered: (1) The cumulative Hamming distance should be minimised while the variance of bits should be maximised, thus

L(Wa, Wb) =P i||W T axia− WbTxib||22− n P vIv = −2tr(WT a SabWb), (5.6) where Sv1v2 = Xv1X T

v2, v1, v2 ∈ {a, b}. (2) For conditions ξ

ki

a + ξbki <= 1, we

can sum all of them over samples and functions to obtain the relaxed inequality

Υ = P

kiξaki+

P

kiξbki <= K ∗ n. (3) To increase the generalisation of the model,

it is necessary to penalise each learned projection by maximising the margin of two separated samples ||W ||2 = 1

2 P v∈{a,b} P k||w k v||2, which is same as an SVM

classification model. Therefore, we obtain

L= λ2L(Wa, Wb) + CΥ + ||W ||2, (5.7)

where λ2 and C are used to balance the different types of loss. In Eqn 5.7,

L(Wa, Wb) can be considered as a cross-view loss function for matching, Υ is a

within-view quantization loss for hashing and ||W ||2 is a regularization.

Proposition 2: Substituting L(Wa, Wb), Υ and ||W ||2 into (5.7) with con-

sidering the conditions, the objective function can be written as: {W∗ a, Wb∗} = arg minWa,Wb−λ2tr(W T aSabWb) +12P k||w k a||2+ C P kiξ ki a +1 2 P k||w k b||2+ C P kiξ ki b s.t. ∀v ∈ {a, b}, i, k, k1 6= k2 : ((wk1 v )Twvk2))2 ≤ δv, (yik v (wkv)Txvi) ≥ 1 − ξvki, ξkiv >0. (5.8)

Firstly, we can see that the proposed CBI is related to Canonical Correlation Analysis (CCA) [221], but without minimising the covariance of intra-module. A solution of CCA may be affected by highly correlated but unimportant (in the sense of low variation and/or covariation) variables. However, a preserved large variance will increase the stability and discriminativeness of the learned codes. Secondly, we can see that Sab is the cross-covariance matrix between the

two views a and b. Maximum Cross-variance Analysis (MCA) [222] is a typical dimensionality reduction method for two cross sets of highly correlated variables in the low dimensional space. The proposed CBI can also learn the compact, highly correlated binary codes by maximising the cross-covariance in the new space. Thirdly, although PDH [24] also learns the projection by maximising the margins, there are two significant differences between CBI and PDH. On the one

hand, both the cross-variance and the variances of bits have been maximised in CBI but neither of them is considered in PDH. On the other hand, PDH obtains the projection by directly using the classical SVM, but, in CBI, a novel dual problem with a first degree item is solved to learn the projections. That is why PDH cannot improve the performance by increasing the number of bits. Finally, the Hamming distance of two IDs of one person in two different views will be the least when the learned linear hash functions are hinge loss constraint satisfied.