Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie...

32
Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti M OPSI PROJECT M OPSI PROJECT UNIVERSITY OF EASTERN FINLAND UNIVERSITY OF EASTERN FINLAND

Transcript of Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie...

Page 1: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Detecting Movement Type by Route Segmentation and

Classification

Karol Waga, Andrei Tabarcea,Minjie Chen and Pasi Fränti

MOPSIPROJECTMOPSI

PROJECTUNIVERSITYOF EASTERN

FINLAND

UNIVERSITYOF EASTERN

FINLAND

Page 2: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

University of Eastern Finland

JoensuuJoensuuJoki= a riverJoen = of a river

Suu = mouthJoensuu = mouth of a river

Page 3: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Motivation

Page 4: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

NokiaAndroidiPhone

None

Trends and popularity of GPS Previous predictions

Nokia: 50% of its smart phones has GPS by 2010-12.

Gartner: 75% has GPS by the end of 2011.

Page 5: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Nokia: 50% of its smart phones has GPS by 2010-12.

Gartner: 75% has GPS by the end of 2011.

Trends and popularity of GPS Current situation

Our lab:Nokia 8 47 %Android 4 24 %iPhone 0 0 %

None 5 30 %

70 %

Page 6: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

173 users 7,958 routes

5,208,205 points

Mopsi route collection4th October, 2012

Page 7: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Collected GPS routePlot on map

Page 8: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

What is the activity?

Sp

eed

(km

/h)

Time

14

12

10

8

6

4

2

Collected GPS routeTime-vs-speed

Page 9: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

0 1000 2000 3000 4000 5000 60000

2

4

6

8

10

12

14

time

spee

destimated segment result

Collected GPS routeGround truth

Page 10: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

0 200 400 600 800 10000

5

10

15

20

25

time

spee

destimated segment result

Collected GPS routeAnother example

Page 11: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Summarization of entire route

Page 12: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Existing solutions

Page 13: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Features and classifiers

Sensor data• GPS• GSM, WiFi• Accelerometers• Combination of multiple sensors

Classification• Rule-based vs. trained• Fuzzy logic• Neural networks • Hidden Markov model

Page 14: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Movement type classification

Movement types considered:

Walk Run Bicycle Car

Other possibilities:

Boat Flight

Spatial contextneeded

Skiing

Speed? Track location, season

Train BusTime

tables

Page 15: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Problems attacked

Problems addressed:• Training material is not always available• Problem of over-fit• Loss of generalization

Limitations of current solution:• Correlation between neighboring segments• Accuracy of segmentation

Rule-based!

2-order Hidden Markov model

Page 16: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Proposed solution

Page 17: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Overall algorithm

Optimal segmentation:• Minimize intra-segment speed variance• Detect stop segments

Move type classification:• Speed features• 2-order Hidden Markov Model

Page 18: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Route segmentationDynamic programming

1

1( )j

j j j

i

i i ij

f t t

( , ) min( ( , 1) ( )), (1... 1)

( , ) arg min ( ( , 1) ( ))

sc s c

sc c s c

D s r D c r t t c s

A s r D c r t t

Minimize intra-segment variance:

Optimal segmentation:

O(n2k)

Page 19: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

0 1 2 1arg min ( ( , ) ( )), 1...i nm D n i i t t i m

Number of segments

Page 20: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

0 10 20 30 40

0.2

0.4

0.6

0.8

1

Speed(km/h)

Pro

bab

ility

BikeRun

WalkStop

Car

Move type classificationA priori probabilities

Page 21: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

2 1 1

1 2

( | , ) ( | )

( )

Mi i i i

i i

P m m m P m Xf

P m

i 1 11

( | X , , )M

i i ii

f P m m m

Cost function:

Cost function:

2nd order Hidden Markov Model

Previous segment

Next segment

Page 22: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Probability: Prev.

Next

0.6 - - 0.2 0.2 0.5 0.2 - 0.1 0.2 0.5 - 0.2 0.1 0.2 0.5 - - 0.3 0.2 0.8 - - 0.1 0.1 0.5 0.2 - 0.1 0.2 - 0.6 - 0.2 0.2 - 0.4 0.4 0.1 0.1 - 0.4 - 0.4 0.2 - 0.8 - 0.1 0.1

Probability: Prev.

Next

0.5 - 0.2 0.1 0.2 - 0.4 0.4 0.1 0.1 - - 0.4 0.4 0.2 - - 0.4 0.4 0.2 - - 0.8 0.1 0.1 0.5 - - 0.3 0.2 - 0.4 - 0.4 0.2 - - 0.4 0.4 0.2 0.2 0.2 0.2 0.2 0.2 - - 0.1 0.7 0.2 0.8 - - 0.1 0.1 - 0.8 - 0.1 0.1 - - 0.8 0.1 0.1 - - 0.1 0.7 0.2 0.2 0.2 0.2 0.2 0.2

Rule-based model (HMM)

Page 23: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Experiments

Page 24: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Segmentation of car route

Page 25: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Separating stop segments

Page 26: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Long distance running

Overall statisticsfrom running by move type

Page 27: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Interval training

Intervals

Warm-up &slow-down

Stops

Page 28: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Bicycle trip represented as carAlgorithm tries to be too clever

Page 29: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

What next?

Page 30: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Further improvements

Boat Flight SkiingTrain Bus

More move types

Better stop detection

Generate ground truth

Page 31: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

New movement types

Train

Skiing Flight

Page 32: Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti.

Conclusions

Method that (usually) works!

Simple to implement

No training data required