CSI-Activity-Recognition

January 4, 2020 ยท View on GitHub

Human Activity Recognition using Channel State Information for Wifi Applications

A simple Tensorflow 2.0+ model using Bidirectional LSTM stacked with one Attention Layer.

This code extends the previsous work of paper A Survey on Behaviour Recognition Using WiFi Channel State Information (corresponding code).

Dataset Preparation

Download the public dataset from here.

unzip the Dataset.tar.gz by the following command:

tar -xzvf Dataset.tar.gz

Inside the dataset, there are 7 different human activities: bed, fall, pickup, run, sitdown, standup and walk.

Requirements

Numpy

Tensorflow 2.0+

sklearn

Performance of the Model with Default Parameters

Default Parameters

Parameters for Batching SequenceValue
window length1000
Sliding Steps200
Downsample Factor2
Activity Present Threshold0.6 (60%)
Parameters for Deep Learning ModelValue
# of units in Bidirectional LSTM200
# of units in Attention Hidden State400
Batch Size128
Learning Rate1e-4
OptimizerAdam
# of Epochs60

Model Architecture

Architecture

Confusion Matrix

Confusion Matrix

LabelAccuracy
bed100%
fall97.18%
pickup98.68%
run100%
sitdown95%
standup95.56%
walk99.51%

Usage

Download the code from github.

git clone https://github.com/ludlows/CSI-Activity-Recognition.git 

Enter the code folder.

cd CSI-Activity-Recognition

Run The Model with Default Parameters

python csimodel.py your_raw_Dataset_folder

Meanwhile, you could also modify the parameters in the csimodel.py or change the architectures of neural networks.

This code could be a starting point for your deep learning project using Channel State Information.