Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
AS1 Activity Recognition
Commits
408bce06
Commit
408bce06
authored
Mar 30, 2020
by
pandersson
Browse files
Updates code structure and README
parent
bcafdf29
Changes
36
Hide whitespace changes
Inline
Side-by-side
Readme.md
View file @
408bce06
# WASP AS 1 Assigment: Activity Recognition,
# by Frida Heskebeck, Matthias Mayr, Momina Rizwan and Pontus Andersson
Our activity recognition is based on thresholds.
The approach is to use the mean of the x,y and z accelerometer data.
Over a time interval of two seconds, we look at the difference of the max and min values of the mean.
If the differences is lower than a set threshold, the person is predicted to be standing still.
If the difference is greater than the still treshold but smaller than a set running threshold, the person is predicted to be walking.
Otherwise, the person is predicted to be running.
This repository contains three scripts used to perform activity recognition and data visualization.
The data is stored in the
`data`
directory. To include your own data, add a subfolder to
`data`
named Data_YourData.
We assume the scripts are called from the as1-activity-recognition folder.
*
`data_visualization.py`
allows you to visualize data. Usage:
`python data_visualization.py Name DataType`
,
where
`Name`
is the name of the person whose data you wish to show, and
`DataType`
is either
`ACC`
or
`GYR`
for accelerometer and
gyro data, respectively. Red bars are used to separate the data files.
*
`get_data.py`
is a helper function for
`activity_recognition.py`
. It collects the data used in the latter script.
*
`activity_recognition.py`
allows you to do activity recognition. Usage:
`python activity_recognition.py Name PresentationMode`
,
where
`Name`
is as in
`data_visualization.py`
and
`PresentationMode`
is either
`Text`
or
`ConfusionMatrix`
, with
`Text`
yielding console output of each prediction and corresponding ground truth, and
`ConfusionMatrix`
yielding a confusion matrix.
For both options, we print the accuracy in the console.
\ No newline at end of file
Data_Frida/.DS_Store
→
data/
Data_Frida/.DS_Store
View file @
408bce06
File moved
Data_Frida/Running1.txt
→
data/
Data_Frida/Running1.txt
View file @
408bce06
File moved
Data_Frida/Running2.txt
→
data/
Data_Frida/Running2.txt
View file @
408bce06
File moved
Data_Frida/running3.txt
→
data/
Data_Frida/running3.txt
View file @
408bce06
File moved
Data_Frida/running4.txt
→
data/
Data_Frida/running4.txt
View file @
408bce06
File moved
Data_Frida/stairs_walking1.txt
→
data/
Data_Frida/stairs_walking1.txt
View file @
408bce06
File moved
Data_Frida/stairs_walking2.txt
→
data/
Data_Frida/stairs_walking2.txt
View file @
408bce06
File moved
Data_Frida/standing1.txt
→
data/
Data_Frida/standing1.txt
View file @
408bce06
File moved
Data_Frida/standing2.txt
→
data/
Data_Frida/standing2.txt
View file @
408bce06
File moved
Data_Frida/table1.txt
→
data/
Data_Frida/table1.txt
View file @
408bce06
File moved
Data_Frida/table2.txt
→
data/
Data_Frida/table2.txt
View file @
408bce06
File moved
Data_Frida/walking1.txt
→
data/
Data_Frida/walking1.txt
View file @
408bce06
File moved
Data_Frida/walking2.txt
→
data/
Data_Frida/walking2.txt
View file @
408bce06
File moved
Data_Frida/walking3.txt
→
data/
Data_Frida/walking3.txt
View file @
408bce06
File moved
Data_Frida/walking4.txt
→
data/
Data_Frida/walking4.txt
View file @
408bce06
File moved
Data_Matthias/running_1.txt
→
data/
Data_Matthias/running_1.txt
View file @
408bce06
File moved
Data_Matthias/running_2.txt
→
data/
Data_Matthias/running_2.txt
View file @
408bce06
File moved
Data_Matthias/standing_1.txt
→
data/
Data_Matthias/standing_1.txt
View file @
408bce06
File moved
Data_Matthias/walking_1.txt
→
data/
Data_Matthias/walking_1.txt
View file @
408bce06
File moved
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment