SLIDE 1 Model-Driven Matching and Segmentation of Trajectories
Jiangwei Pan (Duke University)
joint work with
Swaminathan Sankararaman (Akamai Technologies) Pankaj K. Agarwal (Duke University) Thomas Mølhave (Scalable Algorithmics USA) Arnold P. Boedihardjo (U.S. Army Corps of Engineers)
SLIDE 2
Trajectories
Definition: function from time domain to Rd
SLIDE 3
Trajectories
Definition: function from time domain to Rd Observed: a sequence of sample points
SLIDE 4 Trajectories
Definition: function from time domain to Rd Observed: a sequence of sample points Examples:
◮ GPS traces of vehicles ◮ Object movement in videos ◮ Animal migration
trajectories
SLIDE 5 Outline
Matching A new model/algorithm for matching similar portions of two trajectories
◮ distinguish deviation (gaps)
from noise
◮ handle non-uniform sampling
Segmentation Discover common patterns from a collection of trajectories Experiments
Deviation/Gap Noise
SLIDE 6
Trajectory Matching
SLIDE 7 Existing Approaches for Matching
Two trajectories (sequences): P = p1, · · · , pm, Q = q1, · · · , qn Dynamic Time Warping (DTW)
◮ person walk on P, dog on
Q, no backtrack
◮ minimize average leash
length For trajectory matching: not meaningful at significant deviations
SLIDE 8 Existing Approaches for Matching
Two trajectories (sequences): P = p1, · · · , pm, Q = q1, · · · , qn Dynamic Time Warping (DTW)
◮ person walk on P, dog on
Q, no backtrack
◮ minimize average leash
length Biological Sequence Alignment (Seq-Align)
◮ allow gaps ◮ maximize score function ◮ one-to-one matching
For trajectory matching: not meaningful at significant deviations For trajectory matching: cannot handle non-uniform sampling
SLIDE 9 Existing Approaches for Matching
Two trajectories (sequences): P = p1, · · · , pm, Q = q1, · · · , qn Dynamic Time Warping (DTW)
◮ person walk on P, dog on
Q, no backtrack
◮ minimize average leash
length Biological Sequence Alignment (Seq-Align)
◮ allow gaps ◮ maximize score function ◮ one-to-one matching
For trajectory matching: not meaningful at significant deviations For trajectory matching: cannot handle non-uniform sampling Both can be computed in quadratic time.
SLIDE 10 Our Matching Model
Combine the advantages of DTW and Seq-Align
◮ Handle non-uniform sampling: allow multiple-to-one matching
(as DTW)
◮ Distinguish deviation from noise: allow gaps (as Seq-Align)
Deviation/Gap Noise
SLIDE 11 Trajectory Matching - Assignment
(Use ⊥ to denote a gap) An assignment for P and Q is a pair of functions
◮ α : P → Q ∪ {⊥} ◮ β : Q → P ∪ {⊥}
SLIDE 12 Trajectory Matching - Assignment
(Use ⊥ to denote a gap) An assignment for P and Q is a pair of functions
◮ α : P → Q ∪ {⊥} ◮ β : Q → P ∪ {⊥}
View as directed graph: α, β decide
- utgoing edges. Each point
◮ at most one outgoing edge ◮ could have multiple incoming
edges
SLIDE 13 Trajectory Matching - Assignment
(Use ⊥ to denote a gap) An assignment for P and Q is a pair of functions
◮ α : P → Q ∪ {⊥} ◮ β : Q → P ∪ {⊥}
View as directed graph: α, β decide
- utgoing edges. Each point
◮ at most one outgoing edge ◮ could have multiple incoming
edges
SLIDE 14 Trajectory Matching - Assignment
(Use ⊥ to denote a gap) An assignment for P and Q is a pair of functions
◮ α : P → Q ∪ {⊥} ◮ β : Q → P ∪ {⊥}
View as directed graph: α, β decide
- utgoing edges. Each point
◮ at most one outgoing edge ◮ could have multiple incoming
edges
SLIDE 15 Trajectory Matching - Assignment
(Use ⊥ to denote a gap) An assignment for P and Q is a pair of functions
◮ α : P → Q ∪ {⊥} ◮ β : Q → P ∪ {⊥}
View as directed graph: α, β decide
- utgoing edges. Each point
◮ at most one outgoing edge ◮ could have multiple incoming
edges
SLIDE 16 Trajectory Matching - Score of Assignment
Score of assignment α, β (λ > 0, θ < 0, ∆ > 0 are parameters)
Score for matched edges Score for gaps
◮ E: set of matching edges ◮ gap: maximal contiguous sequence
◮ Γ: set of gaps
Objective: find assignment α, β with maximum score
SLIDE 17 Trajectory Matching - Score of Assignment
Score of assignment α, β (λ > 0, θ < 0, ∆ > 0 are parameters)
Score for matched edges Score for gaps
◮ E: set of matching edges ◮ gap: maximal contiguous sequence
◮ Γ: set of gaps
Objective: find assignment α, β with maximum score We propose a dynamic programming algoirthm that computes optimal assignment in O(mn) time
SLIDE 18
Segmentation of Trajectories
SLIDE 19
Related Work
[Lee, Han, Whang, 2007]: partition and cluster subtrajectories [Buchin et al., 2011]: use Fr´ echet distance to discover popular subtrajectories [Chen, Su, Huang, Zhang, Guibas, 2013, this conference]: formulate the segmentation problem as an integer linear program
SLIDE 20 Trajectory Segmentation
Given a set of k trajectories T = {T1, · · · , Tk} Goal:
◮ segment trajectories into fragments ◮ represent trajectories compactly
SLIDE 21 Segmentation Algorithm
set of k trajectories T = {T1, · · · , Tk} V : set of all trajectory points The algorithm
- 1. Labeling: assign a label L(p) ⊆ {1, · · · , k} to each point
p ∈ V
- 2. Clustering: cluster points into fragments based on their labels
SLIDE 22
Segmentation Algorithm - Labeling
(Assign a label L(p) ⊆ {1, · · · , k} to each point p) Intuition: j ∈ L(p) means trajectory Tj “pass” p
SLIDE 23 Segmentation Algorithm - Labeling
(Assign a label L(p) ⊆ {1, · · · , k} to each point p) Intuition: j ∈ L(p) means trajectory Tj “pass” p Run matching algorithm between every pair of trajectories Labeling: L(p) contains
◮ trajectory that contains p ◮ trajectories that p is
matched to
SLIDE 24 Segmentation Algorithm - Labeling
(Assign a label L(p) ⊆ {1, · · · , k} to each point p) Intuition: j ∈ L(p) means trajectory Tj “pass” p Run matching algorithm between every pair of trajectories Labeling: L(p) contains
◮ trajectory that contains p ◮ trajectories that p is
matched to Note: other matching algorithms can also be used in labeling (comparison in experiment).
SLIDE 25
Segmentation Algorithm - Clustering
Fragment: maximal contiguous subsequences of points with same label
SLIDE 26
Experiments
SLIDE 27 Datasets
WorkOut: 330 trajectories from road cycling and running
◮ ∼ 1M points ◮ low noise, uniform (1 second) sampling rate
SLIDE 28 Datasets
WorkOut: 330 trajectories from road cycling and running
◮ ∼ 1M points ◮ low noise, uniform (1 second) sampling rate
Bus: 143 trajectories of school buses in Athens, Greece
◮ ∼ 65K points ◮ high noise, uniform sampling rate
SLIDE 29 Datasets
WorkOut: 330 trajectories from road cycling and running
◮ ∼ 1M points ◮ low noise, uniform (1 second) sampling rate
Bus: 143 trajectories of school buses in Athens, Greece
◮ ∼ 65K points ◮ high noise, uniform sampling rate
GeoLife (Microsoft Research Asia): 17,621 trajectories of 182 users in Beijing, China
◮ ∼ 5M points ◮ high noise, non-uniform sampling rate
SLIDE 30 Matching Results
On a pair of trajectories from the Bus dataset.
(a) Dynamic Time Warping (DTW)
SLIDE 31 Matching Results
On a pair of trajectories from the Bus dataset.
(a) Dynamic Time Warping (DTW) (b) DTW-Pruned (prune long edges)
SLIDE 32 Matching Results
On a pair of trajectories from the Bus dataset.
(a) Dynamic Time Warping (DTW) (c) Sequence Alignment (Seq-Align) (b) DTW-Pruned (prune long edges)
SLIDE 33 Matching Results
On a pair of trajectories from the Bus dataset.
(a) Dynamic Time Warping (DTW) (c) Sequence Alignment (Seq-Align) (b) DTW-Pruned (prune long edges) (d) Our matching algorithm (Assignment)
DTW-Pruned/Seq-Align produce many spurious gaps
SLIDE 34 Matching Results
Assignment vs. DTW-Pruned Each point in figure: result on
(a) GeoLife dataset
Assignment has fewer gaps, DTW-Pruned has many unnecessary gaps
SLIDE 35 Matching Results
Assignment vs. DTW-Pruned Each point in figure: result on
(b) WorkOut dataset
Assignment has fewer gaps, DTW-Pruned has many unnecessary gaps
SLIDE 36 Segmentation Results
WorkOut, Assignment GeoLife, Assignment
SLIDE 37
Segmentation Results - Quantitative Comparison
Recall: other matching algorihtms can also be used in Labeling step Compare using Assignment and DTW-Pruned in labeling
SLIDE 38 Segmentation Results - Quantitative Comparison
Assignment covers more points with the same number of fragments.
DTW-Pruned,Workout DTW-Pruned,GeoLife Assignment,Workout Assignment,GeoLife
.7 .7 5 .8 .8 5 .9 .9 5 1 .0
Fra ction of Poin ts
2 4 6 8 1 1 2 1 4
N u m b e r
F r a g m e n t s
vary ρ: minimum number of points in a fragment
SLIDE 39 Segmentation Results - Quantitative Comparison
Assignment covers more points with the same number of fragments.
DTW-Pruned,Workout DTW-Pruned,GeoLife Assignment,Workout Assignment,GeoLife
.2 .3 .4 .5 .6 .7 .8 .9
Fra ction of Poin ts
1 2 3 4 5 6 7 8
Nu m be r of Fra g m e n ts
vary η: minimum size of fragment label
SLIDE 40 Conclusion
In this paper, we proposed
◮ a new model for matching two trajectories that can handle
non-uniform sampling and distinguish between deviation and noise.
◮ a segmentation algorithm that discovers a collection of
fragments from a set of trajectories
SLIDE 41 Conclusion
In this paper, we proposed
◮ a new model for matching two trajectories that can handle
non-uniform sampling and distinguish between deviation and noise.
◮ a segmentation algorithm that discovers a collection of
fragments from a set of trajectories Future work: we are working on
◮ better labeling scheme for the segmentation algorithm ◮ handle noisy and sparse trajectories
SLIDE 42
Thank you.