This code is for paper "Fall Detection Based on Multi-Horizon Forecasting"( Currently under review )
A fall detection method with multi-horizon forecasting usring Temporal Fusion Transformers and other deep learning methods.
For deep methods, 1D CNN, single LSTM, stacked LSTM were used.
All models were configured to forecast falls through the window size of data from the perspective of regression instead of classification.
For the last predicted value, the class of the predicted values was classified on the basis of the threshold value.
To verify benchmark performance, we faithfully reproduced the 1D CNN and LSTM-basedmodels, although the model structures were modified to enable regression in both cases because they were tailored to the classification task.
1D CNN model architecture is based on the model structure proposed in 2020 by Kraft et al(paper).
Signle LSTM and stacked LSTM model is based on the model architecture proposed in 2019 by Luna et al (paper).
Prediction results for the SmartFall, Notch, DLR and MobiAct datasets in order using:
(a)-(d) TFT method, (e)-(h) Single LSTM, (i)-(l) Stacked LSTM, (m)-(p) 1D CNN
For SmartFall
and Notch
dataset, I have uploaded zip files in dataset/
. You can also download data through the link below.
dataset url - https://userweb.cs.txstate.edu/~hn12/data/SmartFallDataSet/
paper - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6210545/
dataset url - https://www.dlr.de/kn/en/desktopdefault.aspx/tabid-12705/22182_read-50785/
dataset url - https://bmi.hmu.gr/the-mobifall-and-mobiact-datasets-2/
Please download all datasets through the URL or zip
files provided in dataset/
.
- Put dataset into directory named
dataset/SmartFall_Dataset/
. - For SmartFall dataset, preprocessing codes are included in
ipynb
files.
- Put dataset into directory named
dataset/Notch_Dataset/
- For Notch dataset, preprocessing codes are included in
ipynb
files.
- Put dataset into directory named
dataset/ARS DLR Data Set/
. - Use
dataset/DLR_preprocess.ipynb
for preprocessing. Run all cells in the ipynb file. - Save all preprocessed files in
dataset/dlr_preprocessed
.
- Put dataset into directory named
dataset/MobiAct_Dataset_v2.0
. - Use
dataset/MobiAct_preprocess.ipynb
for preprocessing. Run all cells in the ipynb file. - Save all preprocessed files in
dataset/mobiact_preprocessed
.
Each file named as DLR.ipynb
, MobiAct.ipynb
, Notch.ipynb
, SmartFall.ipynb
is for deep learning methods.
In each ipynb file, you can choose which DL method you want to use(CNN, singleLSTM, stackedLSTM
)
- Clone https://github.com/google-research/google-research/tree/master/tft
- Use each file named as
dlr_tft.ipynb
,mobi_tft.ipynb
,notchFall_tft.ipynb
andsmartFall_tft.ipynb
for TFT method. - Files named as
dlr_tft_wo_bioinfo.ipynb
andmobi_tft_no_bioinfo.ipynb
are for cases when personal biometric information is removed.