movement-analysis
movement-analysis copied to clipboard
Classification of human movement based on accelerometer / gyro data from mobile phones
movement-analysis
Classification of human movement based on accelerometer / gyro data from mobile phones
-
data-gathering
contains all the code required for collecting live data from smartphones and dump it to disk -
datasets
contains training and verification data that we use to train the model -
logs
track model performance over time -
models
pre-trained models -
src
application that does the data analysis
Test the live classifier yourself
First set up your environment:
- Install node.js and python 2.7
- Go into
data-gathering
folder and runnpm install
- Go into
src
folder and runeasy install sklearn docopt
The application contains of three parts: a website that runs on a phone and gets data; a node.js app that runs on computer and receives the data; a python app that classifies the data. Get two terminals and...
In terminal 1:
$ cd src
$ python dataset.py --model ../models/1s_6sps.pkl --data=../data-gathering/raw-data/
In terminal 2:
$ cd data-gathering
$ node server.js
Now open the monitoring application on your computer, so you can see the live classification, at http://localhost:9321/server.
Next you want to start gathering data. Make sure your phone and computer are on the same wifi network, and look up the IP of your computer.
- Navigate to http://YOURIP:9321 on your mobile phone
- Press the 'Start measurement' button
- Put the phone (with the screen on, and to your leg) in your left front pocket
- See data flowing in! (In terminal 2 it should say 'Start measurement')
After a few seconds the classifier starts showing data in your web browser!
Note Default measurement time is only 30s, which probably not enough to demo. Change it in data-gathering/client/accelerometer-position/index.html (copy the beepWithTimeout lines).