Kernel on Bag of Paths For Measuring Shapes Similarity Suard Fr´ed´eric, Rakotomamonjy Alain and Bensrhair Abdelaziz Laboratoire Informatique, Traitement de l’Information, Syst`emes EA4051 Institut National des Sciences Appliqu´ees (INSA) de Rouen, Universit´e de Rouen, Email:
[email protected] http://asi.insa-rouen.fr/∼fsuard/
Introduction Graph kernel
Context :
Wallraven [6] : building a kernel on set ⇔ computing a similarity between each element of sets :
• shape recognition, • structured representation,
XX
′
K(G, G ) =
• application to shock graph retrieval.
h′
h
X
• Kashima [4]: K(G1, G2) =
KL(h, h′)
p1(h1)p2(h2)KL(h1, h2)
h1 ,h2 ∈V1⋆ ,V2⋆
Using graph for comparison :
– p1, p2 : probabilities to generate random walk, – positive definite. 1 1 X • Mean kernel : K(G1, G2) = K(P1, P2) = N1 N 2
• shape represented with skeleton, • skeleton comparison ⇔ graph comparison, • graph kernel : kernel on set approach,
X
KL(hi, hj )
i:hi ∈P1 j:hj ∈P2
• graph : set of subgraphs, set of paths.
– all paths are compared, – positive definite. 1 ˆ ˆ • Max matching kernel : K(G1, G2) = K(P1, P2) = [K(P 1 , P2 ) + K(P2 , P1 )] 2 – best comparison retained, X 1 ˆ 1 , P2 ) = max KL(hi, hj ) – K(P j:hj ∈P2 |P1|
Shape representation with graph
i:hi ∈P1
How to build a graph ?
X 1 1 ˆ 1 , P2 ) = • Matching kernel : K(P |P1| |P2|
1. original image,
X
KdL (hi, hj )
i:hi ∈P1 j:hj ∈P2
2. binary mask,
– Haasdonk [3] : max KL(hi, hj ) approximated with
3. morphological skeleton,
j:hj ∈P2
4. transform skeleton into graph :
X
KdL (hi, hj )
j:hj ∈P2
2
– KdL (h1, h2) = exp − dL(h2σ1,h2 2) ,
• vertices : skeleton branch ending or branches intersection, • edges.
– dL(h1, h2)2 = KL(h1, h1) + KL(h2, h2) − 2KL(h1, h2). – positive definite for all σ > 0. • Path level set kernel : K(G1, G2) = K(P1, P2) = hbP1 , bP2 i ·
→
→
1
4
3
αiP1 αjP2 KL(hi, hj )
i:hi ∈P1 j:hj ∈P2
→
2
X
X
– Desobry [2] : comparing the probability distribution of each set of paths using one-class SVM, 1 1 X 2 – optimization problem : min kf kH + max(0, b − f (xi)) − b f ∈H,b 2 νn i X P X P 1 – fP1 (h) = αi KL(hi, h) − bP1 and fP2 (h) = αj 2 KL(hj , h) − bP2 i
5. label graph : edge :
j
– positive definite.
• length (L), • skeleton length (s), • orientation (θ),
Shock graph mining
• distance between skeleton and edge (e). vertex : • distance to the center of mass (ρ), • Rudger tools database :25 objects, 8 classes,
• distance to the nearest shape edge (E).
• shape retrieval : ranking for each shape query, • vertex label : E, ρ, • edge label : L. → compare graph formulations
Set of paths
→ path length influence
Performance of each graph kernel according to path length :
• V : set of vertices,
1
• E : set of edges, • labeled graph : G = (V, E), Recognition rate for best match
0.95
• path : h = {v1, · · · , vn} - generated using random walk or shortest path, - threshold for path length. ⇒ h is a subgraph of G • set of m paths : P = {h1, h2, ..., hm} ⇒ G is represented with a bag of paths. Graph
L=0
L=1
L=2
Bag of paths
0.9
0.85
0.8
Path Max Matching Mean Kashima
0.75
0.7
0.65
0.6
→
→
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
Maximal length of path
• Sebastian [5], Demirci [1] : 96%, • path-level set, max matching kernel : 100%, • path length : 2 or 3 for best performance. →
→
Query result for each object of the database :
Similarity between path : ′
KL(h, h ) =
0
, if path lengths are different ′
Kv (l(v1), l(v1))
n Y
′ , vi′))Kv (l(vi), l(vi′)) , otherwise Ke(l(vi−1, vi), l(vi−1
i=2
• Kv kernel on vertex label, • Ke kernel on edge label.
References
[1] F. Demirci, A. Shokoufandeh, L. Bretzner, and S. Dickinson. Object recognition as many-to-many feature matching. Internation Journal of Computer Vision, 69(2):203–222, 2006. [2] F. Desobry, M. Davy, and W.J. Fitzgerald. A class of kernels for sets of vectors. In Proceedings of the 13th European Symposium on Artificial Neural Networks, 2005. [3] B. Haasdonk and C. Bahlmann. Learning with distance substitution kernels. In Springer, editor, Pattern Recognition - Proc. of the 26th DAGM Symposium, 2004. [4] H. Kashima, K. Tsuda, and A. Inokuchi. Marginalized kernels between labeled graphs. In Proceedings of the Twentieh International Conference on Machine Learning, 2003.
Conclusion Conclusions :
Perspectives :
[5] T. Sebastian, P. Klein, and B. Kimia. Recognition of shapes by editing shock graphs. IEEE Trans. on Pattern Analysis and Machine Intelligence, 26(5):550–571, 2001.
• Graph kernel for measuring graph similarity,
• Add other information : local histograms, texture,
• New graph kernel formulations,
• Explore other ways for graph designing : points of interest.
[6] C. Wallraven, B.Caputo, and A. Graf. Recognition with local features: the kernel recipe. In Proceedings of International Conference on Computer Vision, pages 257–264, 2003.
• Application to shock graph mining.