ChapterPDF Available

FPGA-Based Realtime Detection of Freezing of Gait of Parkinson Patients

Authors:

Abstract

In this paper we report on our implementation of a temporal convolutional network trained to detect Freezing of Gait on an FPGA. In order to be able to compare our results with state of the art solutions we used the well-known open dataset Daphnet. Our most important findings are even though we used a tool to map the trained model to the FPGA we can detect FoG in less than a millisecond which will give us sufficient time to trigger cueing and by that prevent the patient from falling. In addition, the average sensitivity achieved by our implementation is comparable to solutions running on high end devices.KeywordsFreezing of GaitTemporal convolution models FPGA based implementationTool assisted implementationBody worn sensor nodes
FPGA-based Realtime detection of Freezing of
Gait of Parkinson Patients
Author's version; the final version published in: BODYNETS 2021 (LNICST, vol 420), available at
https://link.springer.com/chapter/10.1007/978-3-030-95593-9_9
Patrick Langer1, Ali Haddadi Esfahani1, Zoya Dyka1, Peter Langend¨orfer1,2
1IHP GmbH, Frankfurt (Oder), 15326, Germany
2BTU Cottbus, Cottbus, 03046, Germany
Abstract. In this paper we report on our implementation of a temporal
convolutional network trained to detect freezing of gait on an FPGA. In
order to be able to compare our results with state of the art solutions we
used the well-known open dataset Daphnet. Our most important findings
are even though we used a tool to map the trained model to the FPGA
we can detect FoG in less than a millisecond which will give us sufficient
time to trigger cueing and by that prevent the patient from falling. In
addition, the sensitivity achieved by our implementation is comparable
to solutions running on high end devices and above 78 per cent.
Keywords: Freezing of Gait, Temporal Convolutional Models FPGA
based Implementation, tool assisted implementation, body worn sensor
nodes.
1 Introduction
Detecting Freezing of Gait (FoG) and triggering countermeasures i.e. cueing is
an important issue with respect of quality of life of Parkinson patients. Parkinson
patients are often so afraid of falling due to FoG, that their social life seriously
suffers as they do no longer leave their flats. A proper device for detecting FoG
needs to be wearable and, to avoid stigmatization, as unobtrusive as possible.
The time for detecting FoG and triggering the cueing is limited by the normal
time for taking a step which is about 300ms. As the device needs to get some
sensor data to do the assessment and then to trigger the, cueing the whole
process should be limited to about 50ms. This leads to strict hard real time
requirements and extremely short processing time. In addition, cueing may not
be triggered to often to avoid that the patient becomes too familiar and it is no
longer helping if FoG really occurs. But a few false positives do not cause harm
according to clinicians and patients reports. So, 100 per cent sensitivity is not
the ultimate goal.
Contributions of this paper We report on our FPGA implementation that
provides extremely good parameters with its quite good sensitivity well above 78,
comparable to what is reported in literature for high end devices and a detection
time of far less than 1 millisecond. The paper is structured as follows. Section 2
presents an overview over current research for FOG detection and its require-
ments. Furthermore, recent methods for the implementation of neural networks
on FPGAs are discussed. Section 3 gives details about our own implementations
and methods. Our experimental results are discussed in section 4. Section 5
provides our conclusion and presents an outlook for our further research.
2 Related Work
2.1 Overview of recent methods of detecting FOG
When it comes to Freezing of Gait (FOG), different algorithms have been used
to identify an FOG event from sensor data (usually acceleration sensors). For
example, in [17], [8], [18] and [30], threshold analysis methods are used, normally
by applying those methods on extracted statistical features. Based on that, [3]
and [25] employ Support Vector Machines (SVM) for FOG detection on sen-
sor data. With the breakthrough of Machine Learning (ML) and Deep Learning
(DL) methods, more recent research applied those technologies on FOG datasets
to achieve new state of the art results. [15] tested different machine learning tech-
niques for FOG detection. In [29], a Convolutional Neural Network (CNN) was
trained on the raw sensor data and was used as an end-to-end classifier for FOG
detection. As FOG detection is based on time series data usually from accelerom-
eters, [31] claims that better results for FOG detection can be achieved when
neural network architectures are used that are especially targeted at time series
data. Historically this is associated with Recurrent Neural Networks (RNNs) [4],
[14]. Especially Long short-term memory (LSTM) Units have achieved state of
the art results on time series problems, such as speech recognition [10] or Human
Activity Recognition (HAR) [19]. As such, [31] propose a combined CNN-LSTM
architecture for FOG detection. The CNN is intended to learn the necessary
feature extraction from the raw sensor data, whereas the LSTM shall learn the
time-based dependencies in order to classify a time series and decide whether an
FOG event occurred. A similar architecture was proposed by [27]. They evalu-
ated a CNN combined with fully connected layers (Multilayer Perceptron, MLP)
and a CNN combined with LSTM. They evaluated their models by means of sen-
sitivity, specificity, area under the curve (AUC), geometric mean (GM) and equal
error rate (EER). The CNN-LSTM achieved slightly better results (e.g. 0.844
vs. 0.849 sensitivity and the same for specificity). Thus, the authors state that
the CNN-LSTM is the better architecture and should be used for future experi-
ments.
Recently, it has been shown that CNNs in fact are able to learn (long-term) de-
pendencies on time series data, contradicting recent convictions that RNNs are
the logical choice for such data sets. In [20], a special 1D convolutional model
was developed for raw audio generation. Recent research suggests that similar
convolutional models are able to learn long-term dependencies, possibly better
than recurrent models and LSTMs [6]. Those models form a new group of CNNs,
called Temporal Convolutional Models (TCNs), which achieved state of the art
results on different datasets [6], yet inherently being a lot more straightforward
by having a simpler architecture. In [13] it was proposed to combine TCNs and
LSTMs in order to achieve better results in FOG detection (additionally, they
also introduced an attentional mechanism). However, the TCN here was only
used for the feature detection, as in previous papers, not explicitly for learning
dependencies in the time series data.
2.2 Requirements of FOG detection methods for wearable devices
Most of those publications especially focus on achieving better detection results
and the applied methods have been trained and tested on modern GPUs. For
example the mentioned TCN-LSTM architecture of [13] can be run in 0.52ms
but has only been evaluated on modern GPU (NVIDIA RTX 2060). From our
understanding, there seems to be a gap in research between increasing accuracy
and achieving real time capability for deployment in real world applications.
While focusing on achieving better detection results, it is important to keep in
mind that the proposed methods shall be deployed in wearable devices to aid
parkinson patients. It is necessary that can be run in real time efficiently. A
freezing must be detected within at least 300ms, so that an appropriate cueing
signal can be issued fast enough in order to prevent patients from falling. As
those wearable devices are powered by battery, the used hardware to run the
neural network needs to be efficient, having an overall low power consumption.
2.3 Field Programmable Gate Arrays (FPGAs) for inference of
neural networks
Field Programmable Gate Arrays (FPGA) are often used as algorithm-specific
hardware accelerator [21], [5]. They can eventually be more efficient than generic
computing units like CPUs or GPUs [22], [7]. FPGAs are currently used to run
neural networks, aiming for use cases in embedded applications or wearable de-
vices. In [23], an efficient computing array for convolutional operations was pro-
posed. FOG detection was implemented with specific neural network for those
matters on an FPGA [16]. This architecture even has online learning capabili-
ties, which means that the model on the FPGA can be trained continuously in
action. However, the architecture itself is hardwired, it is not easily possible to
switch to a more modern or sophisticated neural network. In order to speed up
the development process and gain more flexibility means, to convert a neural
network, trained in a common machine learning framework like TensorFlow or
PyTorch, to some format applicable for the FPGAs would be needed. High Level
Synthesis for machine Learning (HLS4ML) [12] is a project addressing this is-
sues. Another approach was taken by Xilinx. They developed the so-called Deep
Learning Processing Unit (DPU) [2] for their FPGAs. This is a programmable
computation engine enabling FPGAs to run neural networks. Different types of
DPUs with different supported layers are available, e.g. there is one for convolu-
tional neural networks and one for recurrent neural networks. To the best of our
knowledge, this technology represents the current state of the art of a generic
method to deploy neural networks on FPGAs.
3 Methods
3.1 VitisAI to run neural networks on FPGA
Methods of FOG detection should be executable in real-time on wearable devices
and preferably only require a minimum amount of power. Therefore, we choose
an FPGA as our targeted hardware and first explain how to use it to run neural
networks. Xilinx provides a development environment for execution of neural
networks on FPGAs. Currently, the machine learning frameworks Caffe, PyTorch
and TensorFlow are supported. For this, the FPGA is configured (programmed)
with Xilinx DPU. The DPU running inside the FPGA then is able to load
a neural network from a file in a specific binary format (called xmodel). To
generate this file from a certain model, it needs to be converted, which is a
process containing two steps [1]:
1. Quantization: The trained model needs to be quantized. Currently, the DPU
only supports 8-bit integer quantization. Thus, if the model was trained using
32-bit-floating-point values, those are converted to 8-bit integer values. This
results in a loss of precision, possibly decreasing the accuracy of the neural
network. This problem can partially be alleviated by so-called finetuning,
which is also supported by the development tools.
2. Compilation: The quantized model is compiled into a binary file, which con-
tains instructions to be run on Xilinx DPU.
Xilinx provides different DPUs for different types of neural networks. Figure 1
shows the used hardware for our experiments, namely the UltraZED-EG hard-
ware platform. It is a credit-card-sized FPGA platform based on a Xilinx XZCU3EG
with some additional hardware. Additionally, a carrier card is available, which
features peripheral connections, like USB or ethernet ports. The reason to use
Fig. 1: UltraZED-EG
The used hardware platform for our experiments, which can used for embedded
applications.
this platform is its small size and energy efficiency, but it currently does not
support to execute recurrent layers and LSTM. We report on how we solved this
issue in the following section.
3.2 Hardware-aware implementation of a Temporal Convolutional
Network for FOG detection
As mentioned, usually RNNs are chosen for dealing with time series data. How-
ever, recently it has been shown that TCNs might achieve comparable or even
better results [6]. When it comes to deciding which type of neural network shall
be used for the implementation,a thorough analysis of benefits and drawbacks
is essential. For the case of FOG detection, we especially consider the advan-
tages shown in table 1 very important. In addition, it needs to be taken into
Table 1: Advantages of TCNs compared to RNNs according to [6].
TCN RNN
Parallelism Input sequence can be pro-
cessed as a whole, convolution
operations and filters are paral-
lelizable. Especially important
for FPGAs or other hardware
accelerators.
Each sample in the input se-
quence is processed one at a
time (only sequential process-
ing).
Stable gradients Backpropagation path differ-
ent from temporal direction
of sequence, avoids vanish-
ing/exploding gradient prob-
lem. Plus strategies like skip
connections etc. can be used to
build deep networks just as for
conventional neural networks.
LSTMs reduce risk of vanish-
ing gradient problems, explod-
ing gradients might still be a
problem.
Receptive field size Flexible, can be easily ex-
panded, e.g. by increasing filter
size or dilation factor. Might
lead to better possibilities to
learn long term dependencies.
Cannot be flexibly changed or
influenced.
account that TCNs potentially have a higher memory requirement during infer-
ence. When it comes to FPGA-based neural network accelerators, often memory
bandwidth is the main limitation [26]. Thus, a recurrent neural network might
have benefits when it comes to long input sequences or more complex problems,
as the memory requirement during inference is potentially lower [6]. However,
in the case of FOG detection, memory of modern FPGA systems is sufficient to
run our proposed architecture very well.
So, from our point of view TCN are the better choice for an FPGA imple-
mentation. Another important aspect is that RNNs are not yet supported for
our targeted FPGA platforms, neither by Xilinx VitisAI nor by other alterna-
tives such as HLS4ML [12] etc. Xilinx provides a DPU able to execute RNNs
only for Alveo platforms.
Implementation details For our implementations, which were done in Keras,
we used [24] as a reference. After training, the model was converted to the binary
file needed for the FPGA. For our tests, we used VitisAI version 1.33. However,
there were some restrictions for the conversion of the model in terms of supported
layers and operations.
First, the mentioned version of VitisAI only supports models built with Keras
functional API. Furthermore, custom layers as used in [24] cannot be used.
Second, Conv1D operations are not supported.
The latter issue can be remedied as follows. It is possible to replace any
Conv1D operation with a Conv2D operation equivalently. For example, if the
Conv1D operation uses a kernel of size 3, the Conv2D operation can use kernel of
size 1×3, where 1 represents the height and 3 the width. However, while Conv1D
operation in Keras supports causal (symmetric) and non-causal padding (asym-
metric) padding, Conv2D operations only support the former. However, as Keras
is based on TensorFlow, a tf.pad layer can be used to do asymmetrical padding
manually. But standard TensorFlow layers are currently only supported by Vi-
tisAI for TensorFlow 1, not for TensorFlow 2.
We realized causal padding with manual padding using tf.pad layer. The con-
version for the FPGA worked well, however the used tools indicated that some
of the layers of the converted model might not be run on the FPGA but on
the CPU of the SoC automatically. This is not the case if non-causal padding is
used.
To solve these issues, we came up with our own implementation of TCN which is
convertible with VitisAI to be run on the FPGA (or FPGA + CPU accordingly).
The desired form of padding can be chosen as desired. Training and conversion
can be done end-to-end, no manual steps are required.
4 Experiments
4.1 Dataset description
We trained our model using the Daphnet dataset [9], [11] in order to compare our
own results with the state-of-the-art publications using the same data set (such
as [13] or [15]). It is a publicly available dataset of movement data recordings
from 10 Parkinson patients. The age of those patients ranged from 59 to 75 years
(66.4years ±4.8years), whereas 3 patients were females. The patients were asked
to perform three walking tasks as described in [9]. Three sensor nodes placed at
different locations of the body, i.e. shank, thigh, and on the lower back of the
patients, were used to record the data. Each sensor acquired data at a frequency
of 64 Hz. A physiotherapist marked FOG events through recorded videos of the
experiments. In total, 8h 20min of acceleration signals were recorded, during
which 237 FOG events occurred. Two of the ten patients did not show any freez-
ing, their gait appeared as normal walking.
3https://github.com/Xilinx/Vitis-AI/tree/v1.3
4.2 Performance evaluation
Training details For evaluation, we used a patient dependent approach. This
means that for each patient, a separate model was trained. As mentioned, two
patients (patients four and ten) did not experience any FOG episodes during
the recordings. Those patients were excluded from the training. The training
dataset for each patient was composed of 80% of the corresponding data for the
patient including all data of all other patients (except patients four and ten).
The remaining 20% of the patients’ data were used as validation dataset. The
daphnet dataset, however, is highly imbalanced. Therefore, common indicators
such as accuracy might not be suitable to evaluate the detection performance of a
model. Thus, we use sensitivity (true positive rate) and specificity (true negative
rate), as used in other publications as well. We configured our architecture to use
three residual blocks as described in [6], using a kernel size of 3 and 64 kernels per
layer overall. For each patient (except four and ten), our model was trained five
times for 1000 epochs using a learning rate of 0.001 and batch size 1000. Among
all trainings and epochs, the best model for each patient was saved. Afterwards,
it was quantized using Vitis AI tools and converted for FPGA. The quantized
model is a TensorFlow graph and can be run on GPU as well.
4.3 Hardware platform details
For our experiments, an UltraZED-EG was used. It features a Xilinx XCZU3EG
multiprocessor system on a chip (MPSoC). It contains 154.350 system logic cells,
216 Block RAM blocks (resulting in 7.6 MB BRAM memory in total) and 360
DSP slices. It features an ARM Cortex-A53 processor aswell. In our case, the
processor runs PYNQ, an Ubuntu based operating system. A program running
on the operating system is responsible for loading the test data, feed it to the
model running on the FPGA and interpret the results. The model only needs
0.7ms = 700µs for execution on the FPGA. This number was consistent during
the whole evaluation. The FPGA does not need any scheduling like CPUs or
GPUs, thus the inference time is almost exactly the same each time the model
is run.
Results on standard Daphnet dataset In table 2 we present our results of
the model for each patient. We evaluated sensitivity and specificity on the orig-
inal model, the quantized model running on GPU and the converted quantized
model running on the FPGA.
Table 2: Results for dataset without augmentation
Patient Original Quantized FPGA
Sens. Spec. Sens. Spec. Sens. Spec.
Patient 1 0.0833 0.9987 0.0833 0.9889 0.0833 1.0000
Patient 3 0.4615 0.9760 0.4615 0.9680 0.3846 0.9640
Patient 3 0.4603 0.9514 0.5238 0.9114 0.4127 0.9114
Patient 5 0.4216 0.9394 0.3627 0.9303 0.3725 0.9394
Patient 6 0.0714 0.9943 0.0357 0.9448 0.0357 0.9946
Patient 7 0.3158 0.9968 0.3684 0.9968 0.3158 0.9935
Patient 8 0.6905 0.9052 0.4286 0.9138 0.2857 0.9483
Patient 9 0.4035 0.9663 0.4211 0.8653 0.3158 0.8384
Average 0.3635 0.9669 0.3356 0.9482 0.2758 0.9487
As can be seen, the overall specificity is quite high, 0.9669 on the original
model run on GPU and still 0.9487 on FPGA. However, with this naive approach,
the average sensitivity is quite low. This is due to the fact that the dataset
is highly imbalanced, and the positive class (FOG event) is underrepresented.
This issue was addressed by recent research. Different publications suggest using
augmentation or rebalancing strategies to improve the dataset, such as [13] and
[28].
Results on rebalanced Daphnet set Accordingly, we used a simple over-
sampling strategy to virtually rebalance the dataset and retrained our model
again using the same procedure as described above. The results are presented in
table 3.
Table 3: Results for dataset with augmentation
Patient Original Quantized FPGA
Sens. Spec. Sens. Spec. Sens. Spec.
Patient 1 0.9995 0.9558 0.8103 0.9088 0.8966 0.9171
Patient 2 0.9996 0.9880 0.9692 0.9480 0.9487 0.9480
Patient 3 0.9995 0.9257 0.9199 0.8371 0.8846 0.8886
Patient 5 0.9994 0.9394 0.8518 0.8848 0.7787 0.8394
Patient 6 0.9998 0.9517 0.7059 0.7158 0.6053 0.9196
Patient 7 0.9999 0.9643 0.8000 0.7695 0.7316 0.9123
Patient 8 0.9988 0.9483 0.7000 0.9224 0.6048 0.9569
Patient 9 0.9997 0.9798 0.9146 0.8889 0.8043 0.8923
Average 0.9953 0.9566 0.8340 0.8594 0.7818 0.9093
On this rebalanced dataset, the sensitivity is significantly higher than on the
non-augmented dataset. We achieve an average sensitivity of 0.9953 and speci-
ficity of 0.9566 with our model run on GPU, which is comparable to current
state of the art results. However, after quantization, sensitivity and specificity
suffer a significant drop (0.8340 sensitivity and 0.8594 specificity for the quan-
tized model run on GPU, 0.7818 sensitivity and 0.90932 specificity for converted
quantized model run on FPGA). This can be explained by the loss of precision,
as the quantization converts the 32-bit float model to an 8-bit integer model.
5 Conclusions
In this paper we reported on an FPGA based implementation for detecting freez-
ing of gait of Parkinson patients. We would like to stress the following points.
Our implementation achieves almost the same values for sensitivity and speci-
ficity as reported in the literature for high end devices. Even after quantization,
the results are quite good. So, the use of FPGAs to allow real time detection of
FoG in wearables is a feasible solution. In our discussion with clinicians, they
reported that false positives, if they do not occur too often, are not an issue and
that patients rather like to get a cueing more often to be reassured the system is
still working. So, 100 per cent sensitivity is not the ultimate goal. On the other
hand, a very fast detection of FoG is key when it comes to trigger proper cueing
to prevent the patient from falling due to FoG. Here our implementation provides
extremely good parameters with its quite good sensitivity and a detection time
of far less than 1 millisecond. The latter is the parameter that makes fall pre-
vention by a body worn sensor node feasible. Please note that we achieved this
extremely fast processing even though we used a tool to map the trained model
onto the FPGA. In our future work we aim at integrating our FPGA based solu-
tion with a wireless sensor node and to run experiments with Parkinson patients
together with a clinical partner. In order to improve user experience, we will also
work on increasing sensitivity. The loss of precision because of quantization can
possibly be alleviated by finetuning the model. Xilinx already provides support
for finetuning the converted models using their development tools. We are also
interested to further reduce the processing time on the FPGA.
References
1. Vitis ai user guide. https://www.xilinx.com/support/documentation/sw manuals
/vitis ai/1 3/ug1414-vitis-ai.pdf, accessed: 21.06.2021
2. Convolutional neural network with int4 optimization on xilinx devices white paper
(2014)
3. Ahlrichs, C., Sam`a Monson´ıs, A., Lawo, M., Cabestany, J., Rodr´ıguez-Mart´ın,
D., erez, C., Sweeney, D., Quinlan, L., ´
OLaighin, G., Counihan, T., Browne,
P., Lewy, H., Vainstein, G., Costa, A., Annicchiarico, R., Alcaine, S., Mestre, B.,
Quispe, P., Baes, A., Rodr´ıguez-Molinero, A.: Detecting freezing of gait with a tri-
axial accelerometer in parkinson’s disease patients. Medical Biological Engineering
Computing 54 (10 2015). https://doi.org/10.1007/s11517-015-1395-3
4. Almqvist, O.: A comparative study between algorithms for time series forecasting
on customer prediction: An investigation into the performance of ARIMA, RNN,
LSTM, TCN and HMM. Ph.D. thesis (06 2019)
5. Andrey, G., Thirer, N.: A fpga implementation of hardware based accelerator for
a generic algorithm (11 2010). https://doi.org/10.1109/EEEI.2010.5662152
6. Bai, S., Kolter, J., Koltun, V.: An empirical evaluation of generic convolutional
and recurrent networks for sequence modeling (03 2018)
7. Betkaoui, B., Thomas, D.B., Luk, W.: Comparing performance and energy ef-
ficiency of fpgas and gpus for high productivity computing. 2010 International
Conference on Field-Programmable Technology pp. 94–101 (2010)
8. achlin, M., Hausdorff, J., Roggen, D., Giladi, N., Plotnik, M., Tr¨oster, G.: Online
detection of freezing of gait in parkinson’s disease patients: A performance charac-
terization. BODYNETS 2009 - 4th International ICST Conference on Body Area
Networks p. 11 (04 2009). https://doi.org/10.4108/ICST.BODYNETS2009.5852
9. achlin, M., Plotnik, M., Roggen, D., Giladi, N., Hausdorff, J., Tr¨oster, G.: A
wearable system to assist walking of parkinson´s disease patients. Methods of in-
formation in medicine 49, 88–95 (12 2009). https://doi.org/10.3414/ME09-02-0003
10. Chiu, C.C., Sainath, T., Wu, Y., Prabhavalkar, R., Nguyen, P., Chen, Z., Kannan,
A., Weiss, R., Rao, K., Gonina, E., Jaitly, N., Li, B., Chorowski, J., Bacchiani, M.:
State-of-the-art speech recognition with sequence-to-sequence models. pp. 4774–
4778 (04 2018). https://doi.org/10.1109/ICASSP.2018.8462105
11. D. Roggen, M.P., Plotnik, M.: Daphnet freezing of gait data set. UCI machine
learning repository (2013)
12. Duarte, J., Han, S., Harris, P., Jindariani, S., Kreinar, E., Kreis, B., Ngadiuba, J.,
Pierini, M., Rivera, R., Tran, N., Wu, Z.: Fast inference of deep neural networks
in fpgas for particle physics. ArXiv abs/1804.06913 (2018)
13. Li, B., Yao, Z., Wang, J., Wang, S., Yang, X., Sun, Y.: Improved deep learning
technique to detect freezing of gait in parkinson’s disease based on wearable sensors.
Electronics 9, 1919 (11 2020). https://doi.org/10.3390/electronics9111919
14. Mahmud, A., Mohammed, A.: A Survey on Deep Learning for Time-Series Fore-
casting, pp. 365–392 (01 2021). https://doi.org/10.1007/978-3-030-59338-4 19
15. Mazilu, S., Hardegger, M., Zhu, Z., Roggen, D., Tr¨oster, G., Plotnik, M., Hausdorff,
J.: Online detection of freezing of gait with smartphones and machine learning
techniques (05 2012). https://doi.org/10.4108/icst.pervasivehealth.2012.248680
16. Mikos, V., Heng, C.H., Tay, A., Yen, S.C., Chia, N., Koh, K., Tan, D., Au, W.L.: A
wearable, patient-adaptive freezing of gait detection system for biofeedback cueing
in parkinson’s disease. IEEE Transactions on Biomedical Circuits and Systems
PP, 1–1 (05 2019). https://doi.org/10.1109/TBCAS.2019.2914253
17. Moore, S., MacDougall, H., Ondo, W.: Ambulatory monitoring of freezing of gait
in parkinson’s disease. Journal of neuroscience methods 167, 340–8 (02 2008).
https://doi.org/10.1016/j.jneumeth.2007.08.023
18. Moore, S., Yungher, D., Morris, T., Dilda, V., MacDougall, H., Shine, J., Nai-
smith, S., Lewis, S.: Autonomous identification of freezing of gait in parkinson’s
disease from lower-body segmental accelerometry. Journal of neuroengineering and
rehabilitation 10, 19 (02 2013). https://doi.org/10.1186/1743-0003-10-19
19. Murad, A., Pyun, J.Y.: Deep recurrent neural networks for human activity recog-
nition. Sensors 17, 2556 (11 2017). https://doi.org/10.3390/s17112556
20. oord, A., Dieleman, S., Zen, H., Simonyan, K., Vinyals, O., Graves, A., Kalchbren-
ner, N., Senior, A., Kavukcuoglu, K.: Wavenet: A generative model for raw audio
(09 2016)
21. Possa, P., Schaillie, D., Valderrama, C.: Fpga-based hardware accelera-
tion: A cpu/accelerator interface exploration. In: 2011 18th IEEE Interna-
tional Conference on Electronics, Circuits, and Systems. pp. 374–377 (2011).
https://doi.org/10.1109/ICECS.2011.6122291
22. Qasaimeh, M., Denolf, K., Lo, J., Vissers, K., Zambreno, J., Jones, P.: Comparing
energy efficiency of cpu, gpu and fpga implementations for vision kernels (05 2019).
https://doi.org/10.1109/ICESS.2019.8782524
23. Rahman, A., Lee, J., Choi, K.: Efficient fpga acceleration of convolutional neural
networks using logical-3d compute array. In: 2016 Design, Automation Test in
Europe Conference Exhibition (DATE). pp. 1393–1398 (2016)
24. Remy, P.: Temporal convolutional networks for keras.
https://github.com/philipperemy/keras-tcn (2020)
25. Rodr´ıguez-Mart´ın, D., Sam`a, A., erez-L´opez, C., Catal`a, A., Arostegui, J.M.M.,
Cabestany, J., Bay´es, `
A., Alcaine, S., Mestre, B., Prats, A., Crespo, M., Counihan,
T., Browne, P., Quinlan, L., ´
OLaighin, G., Sweeney, D., Lewy, H., Azuri, J., Vain-
stein, G., Annicchiarico, R., Costa, A., Rodr´ıguez-Molinero, A.: Home detection of
freezing of gait using support vector machines through a single waist-worn triaxial
accelerometer. PLoS ONE 12 (2017)
26. Shawahna, A., Sait, S.M., El-Maleh, A.: Fpga-based accelerators of deep learning
networks for learning and classification: A review. IEEE Access 7, 7823–7859 (2019)
27. Sigcha, L., Costa, N., Pav´on, I., Costa, S., Arezes, P., opez, J.M., Arcas, G.: Deep
learning approaches for detecting freezing of gait in parkinson’s disease patients
through on-body acceleration sensors. Sensors (Basel, Switzerland) 20 (2020)
28. Um, T.T., Pfister, F., Pichler, D., Endo, S., Lang, M., Hirche, S., Fietzek, U., Kuli´c,
D.: Data augmentation of wearable sensor data for parkinson’s disease monitoring
using convolutional neural networks. Proceedings of the 19th ACM International
Conference on Multimodal Interaction (2017)
29. Wang, J., Liu, Q., Chen, H.: Detection of freezing of gait for parkinson’s disease
patients based on deep convolutional neural networks. Chinese Journal of Biomed-
ical Engineering 36, 418–425 (08 2017). https://doi.org/10.3969/j.issn.0258-
8021.2017.04.005
30. Zach, H., Janssen, A., Snijders, A., Delval, A., Ferraye, M., Auff, E., Weerdesteyn,
V., Bloem, B., Nonnekes, J.: Identifying freezing of gait in parkinson’s disease
during freezing provoking tasks using waist-mounted accelerometry. Parkinsonism
Related Disorders 21 (10 2015). https://doi.org/10.1016/j.parkreldis.2015.09.051
31. Zhang, Y., Gu, D.: A deep convolutional-recurrent neural network for freez-
ing of gait detection in patients with parkinson’s disease. pp. 1–6 (10 2019).
https://doi.org/10.1109/CISP-BMEI48845.2019.8965723
... Their model achieved 95.6% sensitivity and 90.2% specificity with a 4.5s window length, inferring in 20ms, and operated for 9 hours on an 800mAh battery. Langer et al. trained and tested a Temporal Convolutional Neural Network using the Daphnet dataset, later implementing it on a Xilinx FPGA with VitisAI [8]. Their model labeled data in under a millisecond, enabling a cueing device trigger in less than 250 ms, and achieved 78% sensitivity and 90% specificity. ...
... The choice of FPGA was justified to provide a fast DR diagnosis for an effective intervention plan. Some other disease diagnosis techniques implemented in recent years involved the use of hardware accelerators that achieve faster performance and less power consumption, such as a CNN-based cough detection system on lightweight FGPA [37], FPGA-based real-time detection of Gait freezing with Parkinson patients [38] and epileptic seizure detection with wearable devices while implementing FPGA [39]. ...
Article
Full-text available
Citation: Khalil, K.; Khan Mamun, M.M.R..; Sherif, A.; Elsersy, M.; Imam, A.A.-A.; Mahmoud, M.; Alsabaan, M. A Federated Learning Model Based on Hardware Acceleration for the Early Detection of Alzheimer's Disease. Sensors 2023, 23, 8272. Abstract: Alzheimer's disease (AD) is a progressive illness with a slow start that lasts many years; the disease's consequences are devastating to the patient and the patient's family. If detected early, the disease's impact and prognosis can be altered significantly. Blood biosamples are often employed in simple medical testing since they are cost-effective and easy to collect and analyze. This research provides a diagnostic model for Alzheimer's disease based on federated learning (FL) and hardware acceleration using blood biosamples. We used blood biosample datasets provided by the ADNI website to compare and evaluate the performance of our models. FL has been used to train a shared model without sharing local devices' raw data with a central server to preserve privacy. We developed a hardware acceleration approach for building our FL model so that we could speed up the training and testing procedures. The VHDL hardware description language and an Altera 10 GX FPGA are utilized to construct the hardware-accelerator approach. The results of the simulations reveal that the proposed methods achieve accuracy and sensitivity for early detection of 89% and 87%, respectively, while simultaneously requiring less time to train than other algorithms considered to be state-of-the-art. The proposed algorithms have a power consumption ranging from 35 to 39 mW, which qualifies them for use in limited devices. Furthermore, the result shows that the proposed method has a lower inference latency (61 ms) than the existing methods with fewer resources.
... Mikos et al. [28] demonstrated that the freezing of a gait detection system built from neural networks capable of learning in real-time was integrated into a single sensor node based on field programmable gate arrays (FPGA), and could operate for more than 9 hours while providing auditory biofeedback cues. Langer et al. [55] reported the implementation of a temporal convolutional network trained to detect freezing of gait based on an FPGA, which can ensure sufficient time to trigger the cue in less than a millisecond to prevent the patient from falling. These will facilitate the design of dedicated hardware for PD. ...
Article
Full-text available
Walking detection in the daily life of patients with Parkinson’s disease (PD) is of great significance for tracking the progress of the disease. This study aims to implement an accurate, objective, and passive detection algorithm optimized based on an interpretable deep learning architecture for the daily walking of patients with PD and to explore the most representative spatiotemporal motor features. Five inertial measurement units attached to the wrist, ankle, and waist are used to collect motion data from 100 subjects during a 10-meter walking test. The raw data of each sensor are subjected to the continuous wavelet transform to train the classification model of the constructed 6-channel convolutional neural network (CNN). The results show that the sensor located at the waist has the best classification performance with an accuracy of 98.01%±0.85% and the area under the receiver operating characteristic curve (AUC) of 0.9981±0.0017 under ten-fold cross-validation. The gradient-weighted class activation mapping shows that the feature points with greater contribution to PD were concentrated in the lower frequency band (0.5~3Hz) compared with healthy controls. The visual maps of the 3D CNN show that only three out of the six time series have a greater contribution, which is used as a basis to further optimize the model input, greatly reducing the raw data processing costs (50%) while ensuring its performance (AUC=0.9929±0.0019). To the best of our knowledge, this is the first study to consider the visual interpretation-based optimization of an intelligent classification model in the intelligent diagnosis of PD.
Chapter
Full-text available
Deep learning, one of the most remarkable techniques of machine learning, has been a major success in many fields, including image processing, speech recognition, and text understanding. It is powerful engines capable of learning arbitrary mapping functions, not require a scaled or stationary time series as input, support multivariate inputs, and support multi-step outputs. All of these features together make deep learning useful tools when dealing with more complex time series prediction problems involving large amounts of data, and multiple variables with complex relationships. This paper provides an overview of the most common Deep Learning types for time series forecasting, Explain the relationships between deep learning models and classical approaches to time series forecasting. A brief background of the particular challenges presents in time-series data and the most common deep learning techniques that are often used for time series forecasting is provided. Previous studies that applied deep learning to time series are reviewed.
Article
Full-text available
Freezing of gait (FOG) is a paroxysmal dyskinesia, which is common in patients with advanced Parkinson’s disease (PD). It is an important cause of falls in PD patients and is associated with serious disability. In this study, we implemented a novel FOG detection system using deep learning technology. The system takes multi-channel acceleration signals as input, uses one-dimensional deep convolutional neural network to automatically learn feature representations, and uses recurrent neural network to model the temporal dependencies between feature activations. In order to improve the detection performance, we introduced squeeze-and-excitation blocks and attention mechanism into the system, and used data augmentation to eliminate the impact of imbalanced datasets on model training. Experimental results show that, compared with the previous best results, the sensitivity and specificity obtained in 10-fold cross-validation evaluation were increased by 0.017 and 0.045, respectively, and the equal error rate obtained in leave-one-subject-out cross-validation evaluation was decreased by 1.9%. The time for detection of a 256 data segment is only 0.52 ms. These results indicate that the proposed system has high operating efficiency and excellent detection performance, and is expected to be applied to FOG detection to improve the automation of Parkinson’s disease diagnosis and treatment.
Article
Full-text available
Freezing of gait (FOG) is one of the most incapacitating motor symptoms in Parkinson’s disease (PD). The occurrence of FOG reduces the patients’ quality of live and leads to falls. FOG assessment has usually been made through questionnaires, however, this method can be subjective and could not provide an accurate representation of the severity of this symptom. The use of sensor-based systems can provide accurate and objective information to track the symptoms’ evolution to optimize PD management and treatments. Several authors have proposed specific methods based on wearables and the analysis of inertial signals to detect FOG in laboratory conditions, however, its performance is usually lower when being used at patients’ homes. This study presents a new approach based on a recurrent neural network (RNN) and a single waist-worn triaxial accelerometer to enhance the FOG detection performance to be used in real home-environments. Also, several machine and deep learning approaches for FOG detection are evaluated using a leave-one-subject-out (LOSO) cross-validation. Results show that modeling spectral information of adjacent windows through an RNN can bring a significant improvement in the performance of FOG detection without increasing the length of the analysis window (required to using it as a cue-system).
Thesis
Full-text available
Time series prediction is one of the main areas of statistics and machine learning. In 2018 the two new algorithms higher order hidden Markov model and temporal convolutional network were proposed and emerged as challengers to the more traditional recurrent neural network and long-short term memory network as well as the autoregressive integrated moving average (ARIMA). In this study most major algorithms together with recent innovations for time series forecasting is trained and evaluated on two datasets from the theme park industry with the aim of predicting future number of visitors. To develop models, Python libraries Keras and Statsmodels were used. Results from this thesis show that the neural network models are slightly better than ARIMA and the hidden Markov model, and that the temporal convolutional network do not perform significantly better than the recurrent or long-short term memory networks although having the lowest prediction error on one of the datasets. Interestingly, the Markov model performed worse than all neural network models even when using no independent variables.
Conference Paper
Full-text available
Developing high performance embedded vision applications requires balancing run-time performance with energy constraints. Given the mix of hardware accelerators that exist for embedded computer vision (e.g. multi-core CPUs, GPUs, and FPGAs), and their associated vendor optimized vision libraries, it becomes a challenge for developers to navigate this fragmented solution space. To aid with determining which embedded platform is most suitable for their application, we conduct a comprehensive benchmark of the run-time performance and energy efficiency of a wide range of vision kernels. We discuss rationales for why a given underlying hardware architecture innately performs well or poorly based on the characteristics of a range of vision kernel categories. Specifically, our study is performed for three commonly used HW accelerators for embedded vision applications: ARM57 CPU, Jetson TX2 GPU and ZCU102 FPGA, using their vendor optimized vision libraries: OpenCV, VisionWorks and xfOpenCV. Our results show that the GPU achieves an energy/frame reduction ratio of 1.1-3.2× compared to the others for simple kernels. While for more complicated kernels and complete vision pipelines, the FPGA outperforms the others with energy/frame reduction ratios of 1.2-22.3×. It is also observed that the FPGA performs increasingly better as a vision application's pipeline complexity grows.
Article
Full-text available
Due to recent advances in digital technologies, and availability of credible data, an area of artificial intelligence, deep learning, has emerged, and has demonstrated its ability and effectiveness in solving complex learning problems not possible before. In particular, convolution neural networks (CNNs) have demonstrated their effectiveness in image detection and recognition applications. However, they require intensive CPU operations and memory bandwidth that make general CPUs fail to achieve desired performance levels. Consequently, hardware accelerators that use application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), and graphic processing units (GPUs) have been employed to improve the throughput of CNNs. More precisely, FPGAs have been recently adopted for accelerating the implementation of deep learning networks due to their ability to maximize parallelism as well as due to their energy efficiency. In this paper, we review recent existing techniques for accelerating deep learning networks on FPGAs. We highlight the key features employed by the various techniques for improving the acceleration performance. In addition, we provide recommendations for enhancing the utilization of FPGAs for CNNs acceleration. The techniques investigated in this paper represent the recent trends in FPGA-based accelerators of deep learning networks. Thus, this review is expected to direct the future advances on efficient hardware accelerators and to be useful for deep learning researchers.
Article
Full-text available
Recent results at the Large Hadron Collider (LHC) have pointed to enhanced physics capabilities through the improvement of the real-time event processing techniques. Machine learning methods are ubiquitous and have proven to be very powerful in LHC physics, and particle physics as a whole. However, exploration of the use of such techniques in low-latency, low-power FPGA hardware has only just begun. FPGA-based trigger and data acquisition (DAQ) systems have extremely low, sub-microsecond latency requirements that are unique to particle physics. We present a case study for neural network inference in FPGAs focusing on a classifier for jet substructure which would enable, among many other physics scenarios, searches for new dark sector particles and novel measurements of the Higgs boson. While we focus on a specific example, the lessons are far-reaching. We develop a package based on High-Level Synthesis (HLS) called hls4ml to build machine learning models in FPGAs. The use of HLS increases accessibility across a broad user community and allows for a drastic decrease in firmware development time. We map out FPGA resource usage and latency versus neural network hyperparameters to identify the problems in particle physics that would benefit from performing neural network inference with FPGAs. For our example jet substructure model, we fit well within the available resources of modern FPGAs with a latency on the scale of 100 ns.
Article
Freezing of Gait (FoG) is a common motor related impairment among Parkinson's disease patients which substantially reduces their quality of life and puts them at risk of falls. These patients benefit from wearable FoG detection systems that provide timely biofeedback cues and hence help them regain control over their gait. Unfortunately, the systems proposed thus far are bulky and obtrusive when worn. The objective of this paper is to demonstrate the first integration of a FoG detection system into a single sensor node. To achieve such an integration, features with low computational load are selected and dedicated hardware is designed that limits area and memory utilization. Classification is achieved with a neural network that is capable of learning in real-time and thus allows the system to adapt to a patient during run-time. A small form factor FPGA implements the feature extraction and classification, while a custom PCB integrates the system into a single node. The system fits into a 4.5×3.5×1.5cm34.5\times 3.5\times 1.5 cm^3 housing case, weighs 32 g and achieves 95.6% sensitivity and 90.2% specificity when adapted to a patient. Biofeedback cues are provided either through auditory or somatosensory means and the system can remain operational for longer than 9 hours while providing cues. The proposed system is highly competitive in terms of classification performance and excels with respect to wearability and real-time patient adaptivity.