fast pattern detection using orbit decomposition · rotation of 2d signal projected into its 3...

25
1 Fast Pattern Detection using Orbit Decomposition Fast Pattern Detection Fast Pattern Detection using using Orbit Decomposition Orbit Decomposition Yacov Hel-Or The Interdisciplinary Center On Sabbatical at HP Labs joint work with Hagit Hel-Or Haifa University On Sabbatical at Stanford U.

Upload: others

Post on 04-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

1

Fast Pattern Detection using

Orbit Decomposition

Fast Pattern Detection Fast Pattern Detection usingusing

Orbit DecompositionOrbit Decomposition

Yacov Hel-Or The Interdisciplinary Center

On Sabbatical at HP Labs

joint work with

Hagit Hel-Or Haifa University

On Sabbatical at Stanford U.

Page 2: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Pattern DetectionPattern DetectionA given pattern is sought in an image. • The pattern may appear at any location in the image.• The pattern may be subject to any transformation

(within a given transformation group).

• • •

Page 3: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

ExampleExample

Face detection in images

Page 4: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Why is it Expensive? The search in Spatial DomainWhy is it Expensive? The search in Spatial Domain

Searching for faces in a 1000x1000 image, is applied 1e6 times, for each pixel location.

A very expensive search problem

Page 5: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Why is it difficult? The Search in Transformation DomainWhy is it difficult? The Search in Transformation Domain

• A pattern under transformations draws a very complex manifold in “pattern space”:

– In a very high dimensional space.

– Non convex.

– Non regular (two similarly perceived patterns may be distant in pattern space).

P ∈ℜkxk

Q

P

T(α)P

∆(Q,P)

Page 6: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

-0.2-0.15

-0.1-0.05

00.05

0.10.15

0.2 -0.2

-0.1

0

0.1

0.2

-0.2

-0.1

0

0.1

0.2

rotation of 2D signal projected into its 3 highest eigen-vectors

-0.2-0.15

-0.1-0.05

00.05

0.10.15

-0.2

-0.1

0

0.1

0.2

0.3

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

A rotation manifold of a pattern drawn in “pattern-space”The manifold was projected into its three most significant

components.

Page 7: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Efficient Search in the Transformation DomainEfficient Search in the

Transformation Domain

Page 8: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Transformation ManifoldTransformation Manifold

A pattern P can be represented as a point in ℜkxk

T(α)P is a transformation T(α) applied to pattern P.

T(α)P for all α forms an orbit in ℜkxk

T(α0)P

T(α2)P

T(α1)P

P

Page 9: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Fast Search in Group OrbitFast Search in Group Orbit• Assume d(Q,P) is a distance metric.

• We would like to find

∆(Q,P)=minα d(Q, T(α)P)

Q

P

T(α)P∆(Q,P)

Page 10: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Fast Search in Group Orbit (Cont.)Fast Search in Group Orbit (Cont.)• In the general case ∆(Q,P) is not a metric.

Q

P

R

• Observation: if d(Q,P)= d(T(α)Q, T(α)P)

• ∆(Q,P) is a metric• Point-to-Orbit dist. = Orbit-to-Orbit dist.

Page 11: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Fast Search in Group Orbit (Cont.)Fast Search in Group Orbit (Cont.)

The metric property of ∆(Q,P) implies triangular inequality on the distances.

Q

P

S

Page 12: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Orbit DecompositionOrbit Decomposition• In practice T(α) is sampled into T (εi)=Tε(i) , i=1,2,…

• We can divide Tε(i)P into two sub-orbits:T2ε(i)P and T2ε(i)P’ where P’= Tε(1) P

Q

P

∆ε(Q,P)

Tε(i)Pε

P’2ε

T2ε(i)P

Page 13: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Orbit Decomposition (Cont.)Orbit Decomposition (Cont.)

T2ε(i)P T2ε(i)P’

Q

P

P’

Tε(i)P

∆ε(Q,P)

∆2ε(Q,P) ∆2ε(Q,P’)

P

P’

( ) ( ) ( ){ }PQPQMinPQ ′∆∆=∆ ,,,, 22 εεε

Page 14: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Orbit Decomposition (Cont.)Orbit Decomposition (Cont.)

T2ε(i)P T2ε(i)P’

Q

∆2ε(Q,P) ∆2ε(Q,P’)

P

P’∆2ε (P,P’)

Since ∆2ε is a metric and ∆2ε(P,P’) can be calculated in advancewe may save calculations using the triangle inequality constraint.

Page 15: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

The Orbit TreeThe Orbit Tree• The sub-group subdivision can be applied recursively.

Page 16: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Orbit Tree

Threshold = 100

Page 17: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 18: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 19: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 20: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 21: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 22: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 23: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05
Page 24: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Rejection Rate

# Distance Calculations5 10 15 20 25 300

102030405060708090

100

% Im

age

Pix

els

Rem

aini

ng

Average number of distance computations per pixel is 2.868

Page 25: Fast Pattern Detection using Orbit Decomposition · rotation of 2D signal projected into its 3 highest eigen-vectors-0.2-0.15-0.1-0.05 0 0.05 0.1 0.15-0.2-0.1 0 0.1 0.2 0.3-0.2-0.15-0.1-0.05

Fast Search in Group Orbit: ConclusionsFast Search in Group Orbit: Conclusions

• Observation 1: Orbit distance is a metric when the point distance is transformation invariant.

• Observation 2: Fast search in orbit distance space can be applied using recursive orbit decomposition.

• Distant patterns are rejected fast.

• Important: Can be applied to metric spaces (Non Euclidean).