UNIVERSITY OF EASTERN FINLAND MOPSI PROJECT Detecting Movement Type by Route Segmentation and Classification Karol Waga, Andrei Tabarcea, Minjie Chen and Pasi Fränti University of Eastern Finland Joensuu Joki = a river Joen = of a river Suu = mouth Joensuu = mouth of a river Motivation 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. Nokia Android iPhone None Trends and popularity of GPS Current situation Nokia: 50% of its smart phones has GPS by 2010-12. Gartner: 75% has GPS by the end of 2011. 70 % Our lab: Nokia Android iPhone 8 4 0 47 % 24 % 0% None 5 30 % Mopsi route collection 4th October, 2012 173 users 7,958 routes 5,208,205 points Collected GPS route Plot on map Collected GPS route Time-vs-speed 14 Speed (km/h) 12 10 8 6 4 2 Time Collected GPS route Ground truth Collected GPS route Another example Summarization of entire route Existing solutions 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 Movement type classification Movement types considered: Walk Run Bicycle Car Other possibilities: Train Boat Spatial context needed Flight Skiing Speed? Bus Time tables Track location, season Problems attacked Problems addressed: • Training material is not always available • Problem of over-fit • Loss of generalization Limitations of current solution: Rule-based! • Correlation between neighboring segments • Accuracy of segmentation 2-order Hidden Markov model Proposed solution Overall algorithm Optimal segmentation: • Minimize intra-segment speed variance • Detect stop segments Move type classification: • Speed features • 2-order Hidden Markov Model Route segmentation Dynamic programming Minimize intra-segment variance: f i j 1 ij (ti j1 ti j ) j Optimal segmentation: D( s, r ) min( D( c, r 1) cs (ts tc )), c (1...s 1) A( s, r ) arg min c ( D( c, r 1) cs (ts tc )) O(n2k) Number of segments m0 arg mini ( D(n, i ) 1i 2 (tn t1 )), i 1...m Move type classification A priori probabilities 1 Stop Walk Car 0.8 Run Probability Bike 0.6 0.4 0.2 0 10 20 Speed(km/h) 30 40 2nd order Hidden Markov Model Previous segment Cost function: Next segment M f P(mi | Xi , mi 1 , mi 1 ) i 1 Cost function: M P(mi 2 | mi , mi 1 ) P(mi 1 | X ) f P(mi 2 ) i 1 Rule-based model (HMM) Experiments Segmentation of car route Separating stop segments Long distance running Overall statistics from running by move type Interval training Intervals Stops Warm-up & slow-down Bicycle trip represented as car Algorithm tries to be too clever What next? Further improvements More move types Train Boat Flight Better stop detection Generate ground truth Skiing Bus New movement types Skiing Train Flight Conclusions Method that (usually) works! Simple to implement No training data required