---
abstract: 'Gesture recognition is a challenging problem in the field of biometrics. In this paper, we integrate Fisher criterion into Bidirectional Long-Short Term Memory (BLSTM) network and Bidirectional Gated Recurrent Unit (BGRU), thus leading to two new deep models termed as F-BLSTM and F-BGRU. Both Fisher discriminative deep models can effectively classify the gesture based on analyzing the acceleration and angular velocity data of the human gestures. Moreover, we collect a large Mobile Gesture Database (MGD) based on the accelerations and angular velocities containing 5547 sequences of 12 gestures. Extensive experiments are conducted to validate the superior performance of the proposed networks as compared to the state-of-the-art BLSTM and BGRU on MGD database and two benchmark databases (*i.e.* BUAA mobile gesture and SmartWatch gesture).'
address:
- 'Department of Automation, Beihang University, Beijing, China'
- 'Department of Computer Science, China University of Mining and Technology, Beijing, China'
- 'University of Central Florida, Orlando, FL, USA.'
- 'Nortumbria Univesity, Newcastle, UK.'
author:
- Chunyu Xie
- Ce Li
- Baochang Zhang
- Chen Chen
- Jungong Han
bibliography:
- 'mybibfile.bib'
title: Deep Fisher Discriminant Learning for Mobile Hand Gesture Recognition
---

Fisher Discriminant,Hand Gesture Recognition ,Mobile Devices

Introduction {#sec:introduction}
============

Towards natural human-computer interaction, the emergence of smartphones has changed our lives and made our lives more convenient. The interaction between people and mobile phones are through the touch screen, camera and microphone. However, due to environmental constraints, these interaction methods suffer from many uncontrollable problems. For example, the video based methods do not work well in the night time. Nowadays, inertial sensors including accelerometer and gyrometer are built in smartphones [@lane2010a; @choi2005; @mantyla2000hand], which can record the signal of hand movements when their devices are in use. Therefore, gesture action using inertial sensors can be easily achieved and understood [@liu2009uwave]. Different from computer vision based gesture recognition, the requirements for gesture recognition based on inertial sensors (*e.g.* accelerometer and gyrometer) are much simpler[@catal2015on]. However, the mobile gesture recognition inevitably encounters several external variations including signal intensity differences (intense versus weak gestures), temporal variations (slow versus fast movements) and physical differences (users’ physical conditions, etc.). In addition, the noise caused by the hardware device also has a severe impact on the recognition performance. Support vector machine (SVM), hidden Markov model (HMM) and dynamic time warping (DTW) have been introduced to solve the problems mentioned above.

Recently, deep learning methods have significantly push the state-of-the-art in human activity recognition. They avoid feature engineering and are able to learn data representations and classifiers simultaneously. Among those, the recurrent neural network (RNN) and Long Short-Term Memory (LSTM)[@hochreiter1997long] are popular sequential modelling methods. They have been successfully applied to many fields such as language modeling[@mikolov2011extensions; @sundermeyer2012lstm; @mesnil2013investigation], image captioning[@vinyals2015show; @xu2015icml], video analysis[@ng2015cvpr; @alahi2016social; @deng2015structure; @ibrahim2015a] and 3D action recognition. These methods can also be utilized to solve our problem, since the mobile gesture signals are sequential data streams of inertial sensors[@shin2016dynamic; @lefebvre2013ANN].

The publicly available databases are very important to researchers for algorithm development and evaluation. However, most of the previous works in the field of mobile gesture recognition were conducted with self-prepared data. And few databases related to mobile gesture recognition are publicly available. In this paper, we first introduce a mobile based gesture recognition benchmark, which can help researchers to evaluate and compare their algorithms by using the same gesture data. The database was collected based on 32 participants (23 males and 9 females), consisting 12 gestures of 5547 repetitions.

Two Fisher discriminative deep models termed F-BLSTM and a variant F-BGRU are proposed for hand gesture recognition on mobile devices. The Fisher criterion which minimizes the [intra-class variations and maximize inter-class variations]{} is incorporated into softmax loss of LSTM, leading a better classification ability to cope with external variations. The flowchart of the gesture recognition approach is shown in Fig.\[fig:flowchart\].

![image](flowchart.pdf){width="\linewidth" height="0.4\textheight"}

In summary, we make the following contributions:

1.  We collect a large mobile gesture database using an Andriod [Huawei]{} device, which is the largest database in published studies for mobile gesture recognition systems.

2.  We integrate Fisher criterion into BLSTM network to improve the traditional softmax loss training function. Extensive experiments on our [MGD, BUAA Mobile Gesture database,]{} and a public database are conducted to verify the superior performance of the proposed networks.

The rest of the paper is organized as follows. Section\[sec:relatedwork\] introduces the related works, and Section\[sec:approach\] describes the details of the proposed method. Experiments and results are presented in Section\[sec:experiments\]. Finally, Section\[sec:conclusion\] concludes the paper.

Related Work {#sec:relatedwork}
============

[Gesture recognition has been extensively investigated in the last two decades, and remarkable advances are achieved using inertial sensors in mobile devices[@rekimoto2001iswc; @jang2003signal; @kallio2003online; @bulling2014a]. For the application of human computer interaction, Rekimoto [*et al.*]{}[@rekimoto2001iswc] detected the movement of arm using a specific wearable device. But it is difficult to get high precision in practice because of large size of the equipment. Fresca [*et al.*]{}[@ferscha2007gestural] studied and recognized human gesticulation and the manipulation of graspable and movable everyday artifacts as a potentially effective means for the interaction with smart things. Parsani [*et al.*]{}[@Parsani2009A] designed an embedded system which could analyze and recognize smartphone gestures involving a combination of straight line motions in three dimensions. Roy [*et al.*]{}[@Roy2014Demo] suggested that the walking direction should be detectable through the accelerometer and get blended into various other motion patterns during the act of walking, including up and down bounce, side-to-side sway, swing of arms or legs, *etc.*. They also analyzed the human walking dynamics to estimate the dominating forces and used this knowledge to find the heading direction of the pedestrian. For the application of biological monitoring, Park [*et al.*]{}[@Park2014Poster] demonstrated a very promising application to classify and monitor heartbeats, while Nandakumar [*et al.*]{}[@Nandakumar2015Contactless] monitored sleep apnea using the sensors in smartphones to develop more convenient conditions for gesture recognition[@hoang2013adaptive]. Besides, there are also some other applications.]{} As reported in[@Agrawal2011Using], Agrawal [*et al.*]{}proposed a system called PhonePoint Pen that uses the built-in accelerometer in mobile phones to recognize the human writing. The system, based on Nokia N95 platform, was evaluated through 10 students and 5 hospital patients. Results showed that English characters can be identified with an average accuracy of 91%. The system presented a promising prospect for mobile based gesture recognition. [Mobile gesture recognition has provided new directions and also delivered compelling performance for the application of machine learning. Hofmann [*et al.*]{}[@hofmann1998velocity] proposed a recognition scheme based on Hidden Markov Models (HMM)[@markov] and used discrete HMM (dHMM) to recognize dynamic gestures. The approach essentially divided the input data into different regions and assigned each of them to a corresponding codebook for classifying them with dHMM. The vector codebook was obtained by a clustering method, serving as an unsupervised learning procedure to model the feature vector distribution in the input data space. The experiments were carried out using 500 training gestures with 10 samples per gesture, yielding an accuracy of 95.6% for 100 test gestures.]{} In[@kallio2003online], gestures were captured with a small wireless sensor-box that produced three dimensional acceleration signal. Kallio [*et al.*]{}trained the dHMM model by using five states and a codebook size of eight. They [measured]{} the recognition accuracy of system using four degrees of complexity. In[@kela2006accelerometer-based], an HMM model was trained with five states, achieving a rate of 96.1% accuracy for classifying 8 gestures. Pylv [*et al.*]{}[@pylvanainen2005accelerometer] proposed a method based on continuous HMM (cHMM), which takes correlated time information into consideration. The experiment achieved reliable results, with 96.67% of correct classification on a database of 20 samples for 10 gestures. In[@Zhang2009Hand], multi-stream HMM consisting of EMG and ACC streams was utilized as decision fusion method to recognize hand gestures. For a data set of 18 gestures, each trained with 10 repetitions, the average recognition accuracy was about 91.7% in real application.

[Besides HMM, a few other popular techniques have been used in gesture recognition. Akl [*et al.*]{} proposed a gesture recognition system based primarily on a single 3 dimensional accelerometer, by employing DTW[@akl2010accelerometer-based].]{} The system defined a dictionary of 18 gestures and a database of 3700 repetitions from 7 users[ and got up to 90% classification accuracy in the experiment.]{} David [*et al.*]{}[@Mace2013Accelerometer] proposed two approaches including Naive Bayes and DTW for recognizing four gesture types from five different subjects in the experiment. The results revealed Bayesian classification is better than DTW. Wu [*et al.*]{}[@wu2009gesture] employed multi-class Support Vector Machine (SVM) for user-independent gesture recognition and demonstrated that SVM significantly outperformed other methods including DTW, Naive Bayes and HMM. In[@Hsu2009Integrating], Wang [*et al.*]{} combined LCS and SVM to perform the classification task and achieved the classification accuracy of 93%. Another line of research focuses on the feature extraction and selection. For example, the principle component analysis was used for feature selection and dimensionality reduction in gesture classification[@Marasovic2011Accelerometer]. [In[@He2011Accelerometer], the hybrid features combined short-time energy with Fast Fourier Transform, denoting the fusion of time-domain features and frequency-domain features, were presented for recognizing seventeen complex gestures on cell phone.]{} An average recognition accuracy of 89.89% was obtained using multi-class SVM.

[Driven by the tremendous success of deep learning, the research paradigm has been shifted from traditional approaches to deep learning methods for mobile gesture recognition[@shin2016dynamic; @lefebvre2013ANN].]{} Shin [*et al.*]{}[@shin2016dynamic] developed a dynamic hand gesture recognition technique using recurrent neural network (RNN) algorithm. The gesture recognition model was trained using the SmartWatch Gestures database[@costante2014eusipco]. Each gesture sequence contains acceleration data from the 3 dimensional accelerometer. An evaluation of the network size was presented, and the best performance was obtained by using the LSTM layer with the size of 128. Lefebvre[@lefebvre2013ANN] carried out gesture recognition experiments on a database consisted of both accelerometer and gyrometer sensors. The sensor data was captured using an Android Nexus S Samsung device. 22 participants, from 20 to 55 years old, contributed to the database of the 14 symbolic gestures. The results showed that gesture recognition utilizing both sensors can achieve better performance than using each individual sensor. [Moreover, the BLSTM based method achieved an accuracy of 95.57% on the database of total 1540 gestures. To the best of our knowledge, the BLSTM based method is currently the state-of-the-art baseline and performs better than previous approaches such as cHMM, DTW, FDSVM and LSTM]{}.

The Proposed Approach {#sec:approach}
=====================

In this section, we first describe the network structures of [Bidirectional Long-Short Term Memory (BLSTM) and its variant – LSTM with Gate Recurrent Unit (BGRU).]{} Then, we propose to incorporate the Fisher criterion to improve the discriminative power of these deep models, dubbed F-BLSTM and F-BGRU.

Bidirectional LSTM {#sec:blstm}
------------------

We briefly describe the LSTM unit which is the basic building block of the proposed F-BLSTM model. The neurons of LSTM contain a constant memory cell name, which has a state $c_t$ at time $t$. [A LSTM neuron unit is presented in detail at the bottom of Fig.\[fig:blstm-architecture\]]{}. Each LSTM unit for reading or modifying is controlled through a sigmoidal input gate $i_t$, a forget gate $f_t$ and an output gate $o_t$. At each time step $t$, [LSTM unit receives inputs from two external sources at each of the three gates.]{} The current frame $x_t$ and previous hidden states $h_{t-1}$ are two sources, and the cell state $c_{t-1}$ in the cell block is an internal source of each gate. The gates are passed through the tanh non-linearity and activated by logistic function. After multiplying the cell state by the forget gate $f_t$, the final output of the LSTM unit $h_t$ is computed by multiplying the activation $o_t$ of the output gates with updated cell state. Denoting all $W_*$ are diagonal matrices, the updates in a layer of LSTM units are summarized as follows: $$\begin{array}{l}
    {i_t} = \sigma \left( {{W_{xi}}{x_t} + {W_{hi}}{h_{t - 1}} + {W_{ci}}{c_{t - 1}} + {b_i}} \right),\\
    {f_t} = \sigma \left( {{W_{xf}}{x_t} + {W_{hf}}{h_{t - 1}} + {W_{cf}}{c_{t - 1}} + {b_f}} \right),\\
    {c_t}={f_t}c_{t-1}+{i_t}tanh\left(W_{xc}x_t+W_{hc}h_{t-1}+b_c\right),\\
    o_t=\sigma\left(W_{xo}x_t+W_{ho}h_{t-1}+W_{co}c_t+b_o\right),\\
    h_t={o_t}tanh\left(c_t\right).
    \end{array}
    \label{eq:lstm-unit}$$

![image](blstm-architecture.pdf){height="0.9\textheight"}

The model of [BLSTM uses Recurrent Neural Nets (RNNs)]{} made of LSTM units, which have shown the great ability to deal with temporal data in many applications [@sundermeyer2012lstm]. We consider the gesture data using 3 dimensional accelerometer and 3 dimensional gyrometer synchronized input vectors through sampling timestep. As shown in Fig.\[fig:blstm-architecture\], the forward and backward LSTM hidden layers are fully connected to the input layer and consist of multiple LSTM neurons each with full recurrent connections. Several experiments have been conducted with different hidden neuron sizes and 128 neurons yield the best results. The output layer has a size equivalent to the number of neuron to classify (*i.e.* $M=128$). $G = \left\{ {G_1,...,G_{T}} \right\}$ is a gesture sequence of $T$ size, $G_t = \left(x_1\left(t\right),...,x_{N}\left(t\right)\right)$ is a vector at timestep $t$ and $N$ denotes the sensor number, and $\left(y_1,...,y_{n}\right)$ is the BLSTM output set with $n$ being the number of gestures to be classified. The softmax activation function is used for this layer to give network response between 0 and 1. Classically, these outputs can be considered as posterior probabilities of the input sequence belonging to a specific gesture class, and the softmax loss function is presented as follows $${\cal L}_s =  - \frac{1}{m} \sum\limits_{i = 1}^m \log \frac{{{e^{W_{{y_i}}^T{O_i} + {b_{{y_{i}}}}}}}}{{\sum\nolimits_{j = 1}^n {{e^{W_j^T{O_i} + {b_j}}}} }},
    \label{eq:softmaxloss}$$ where $O_i =\left(o_1,...,o_M\right)$ denotes the [$i$th output belonging to the $y_i$th class]{}. $W_j$ denotes the $j$th column of the weights $W$ in the last layer and $b$ is the bias term. $m$ is the size of mini-batch and $n$ is the number of classes.

Deep Fisher Discriminant Learning  {#sec:fisherloss}
----------------------------------

To further enhance the performance of BLSTM, we incorporate the Fisher criterion into the softmax loss function, which is shown in Fig.\[fig:blstm-architecture\]. First, the input layer consists of the concatenation of 3 dimensional accelerometer and 3 dimensional gyrometer signals synchronized in time (*i.e.* $N=6$). The sensor data is normalized between 0 and 1 according to the maximum value that sensors can provide. In order to minimize the intra-class variations and maximize the inter-class variations of gesture data, we propose a new Fisher criterion based on Fisher Linear Discrimination as follows: $${\cal L}_f
    = \frac{1}{m}{\sum\limits_{i = 1}^m {\left\| {{O_i} - {\mu_{{y_i}}}} \right\|_2^2}  - \frac{\delta}{n\left(n-1\right)} \sum\limits_{j = 1,k = 1}^n {\left\| {{\mu_j} - {\mu_k}} \right\|_2^2} }
    \label{eq:fisher}$$ where ${\mu_{{y_i}}}$ is the $y_i$th class mean of output vectors, and $\delta$ is the discriminative factor. As updating the mean vector ${\mu_{{y_i}}}$ when learning BLSTM, the Fisher criterion utilizes the whole training set and mean vectors of each class in every iteration. We propose to augment the loss in Eq.(\[eq:softmaxloss\]) with the additional Fisher criterion term in Eq.(\[eq:fisher\]) as follows: $$    {\cal L} 
    = {\cal L}_s +\theta{\cal L}_f \\
    \label{eq:wholeloss}$$ where $\theta$ and $\delta$ are bounded in $[0,1]$, and these two parameters are used for balancing three parts of the loss function. In forward and backward processes, we set output vector ${O_i}$, mean vector ${\mu_j}$, loss parameter $W$, scalar parameters $\theta$, $\delta$ and learning rate $\lambda$, BLSTM parameters $H_f$ and iteration number $e$, respectively. In each iteration, we compute the loss of F-BLSTM by Eq. (\[eq:fisher\]) and Eq. (\[eq:wholeloss\]), and the backpropagation error by $$\frac{{\partial {L^e}}}{{\partial O_i^e}} = \frac{{\partial L_s^e}}{{\partial O_i^e}} + \theta \frac{{\partial L_f^e}}{{\partial O_i^e}}.
    \label{eq:backerror}$$ Then, we update the parameter $W$, mean vector $\mu_{j}$ and BLSTM parameter $H_f$ in the $e+1$ iteration by the following formulas until the converge stopping criterion. $$\begin{array}{l}
    {W^{e + 1}} = {W^e} - {\lambda ^e} \cdot \frac{{\partial L_f^e}}{{\partial {W^e}}},\\
    \mu _j^{e + 1} = \mu _j^e - \alpha  \cdot \Delta \mu _j^e,\\
    H_f^{e + 1} = H_f^e - {\lambda ^e}\sum\nolimits_i^m {\frac{{\partial {L^e}}}{{\partial O_i^e}}}  \cdot \frac{{\partial O_i^e}}{{\partial H_f^e}}.
    \end{array}
    \label{eq:parmean}$$ With proper scalar parameters $\theta$, $\delta$ and $\alpha$, the discriminative power of F-LSTM can be significantly enhanced for hand gesture recognition. This network is learned using classical online backpropagation through time with momentum. For classifying a new gesture sequence, we use a majority voting rule over the outputs along the sequence (*i.e.* keeping only the most probable class $argmax _{i \in \left[ {1,n} \right]}{O_i}$) to determine the final gesture class. A detailed parameter analysis of $\theta$, $\delta$ and $\alpha$ is presented in Section\[sec:parameter\].

Bidirectional GRU and F-BGRU {#sec:bgru}
----------------------------

To further enhance the performance of network, a variant of BLSTM termed Bidirectional Gated Recurrent Unit (BGRU) was proposed in[@cho2014arxiv; @chung2014eprint] to make each recurrent unit to adaptively capture dependence of different time scales. Similarly to the BLSTM unit, the BGRU has the activation $h_t$, candidate activation $\tilde{h}_t$, update gate $z_t$ and reset gate $r_t$ units to modulate the flow of information in unit without some separate memory cells, as shown in Fig.\[fig:bgru-unit\]. The flows in BGRU are summarized as follows:

$$\begin{array}{l}
{z_t} = \sigma \left( {{W_z}{x_t} + {W_{zf}}{h_t} + {b_z}} \right),\\
{r_t} = \sigma \left( {{W_r}{x_t} + {W_{rf}}{h_t} + {b_r}} \right),\\
{{\tilde h}_t} = tanh\left( {W{x_t} + U\left( {{r_t} \odot {h_{t - 1}}} \right) + {b_h}} \right),\\
{h_t} = \left( {1 - {z_t}} \right){h_{t - 1}} + {z_t}{{\tilde h}_t}
\end{array}.
\label{eq:bgru-unit}$$

where the activation $h_t$ at time $t$ is a linear interpolation between previous activation $h_{t-1}$ and the candidate activation $\tilde{h}_t$, the candidate activation $\tilde{h}_t$ is computed same as traditional recurrent unit. The update gate $z_t$ decides the number of units to update its activation, and so as the reset gate $r_t$.

It is easy to notice that the BGRU unit also controls the flow of information like the BLSTM unit, but without having to use a memory unit. Similar to F-BLSTM, we also apply the Fisher discriminative function for BGRU and learn a new variant named F-BGRU model to recognize hand gestures.

![image](bgru-unit.jpg){width="0.65\linewidth"}

Experiments {#sec:experiments}
===========

Hardware Device {#sec:database}
---------------

Our mobile hand gesture database is collected using a Huawei device with Android system, which has a 3 dimensional accelerometer and a 3 dimensional gyrometer. According to[@lefebvre2013ANN], we collect the data of both accelerometer and gyrometer, [and record each gesture by pressing, holding and releasing the “Sensor" button on the touch screen.]{}

### Gesture Dictionary

As shown in Fig.\[fig:gesture-dic\], the gesture dictionary consists of two categories including Arabic numerals (1, 2, 3, 4, 5, 6) and English capital letters (A, B, C, D, E, F). Furthermore, the stroke order of gestures is set in advance to ensure the consistency of gestures drawed by left or right hand of each participant. We directly collect all accelerometer and gyrometer data, then transfer the data from the cellphone memory to the computer for gesture recognition.

![image](gesture-dic.jpg){width="\linewidth"}

### Database Collection

The database named MGD consists of 12 gestures performed by 32 participants (23 males and 9 females) with about fifteen times per gesture. Therefore, there are a total of 5547 gesture sequences. The sampling time of accelerometer and gyrometer sensors is 5ms corresponding to a frequency of 200Hz. To the best of our knowledge, it is the largest database so far for mobile based gesture recognition, [which is of benefit to the research community]{}.

Implementation Details {#sec:preprocess}
----------------------

In this section, we present the details of the implementation of our experiments. We use Tensorflow toolbox as the deep learning platform and an NVIDIA GTX 1070 GPU to run the experiments. In order to validate the effectiveness of our proposed Fisher criterion in LSTM for modeling temporal sequences, we compare our methods, F-BLSTM and F-BGRU, with the state-of-the-art baselines (BLSTM and BGRU[@chung2014eprint]) on three benchmarks including our proposed database (MGD), and two previous databases: the BUAA Mobile Gesture database[@xie2016ccbr] and the SmartWatch Gestures database[@chung2014eprint]. We comprehensively evaluate the performance of the proposed model under different parameter settings of $\delta$, $\alpha$ and $\theta$ in Sec.\[sec:parameter\], and provide extensive experimental comparison in Sec.\[sec:comparison\].

**Data preprocessing.** The main objective for data preprocessing is to facilitate gesture recognition. In real world applications, the sensor data often contain a lot of noise due to complex environmental conditions and hardware limitations. Therefore, we first carry out a filtering process to suppress noise (i.e. data smoothing). We experimented with Average Filter, Median Filter and Butterworth Filter, and selected the Average Filter in terms of its good performance and computational efficiency. Fig.\[fig:filtered-data\] shows the original accelerometer and gyrometer data and the processed data using the Average Filter.

\
\

The gesture execution speed of different participants may vary considerably, which leads to different signal lengths due to a fixed sampling frequency (200HZ) of accelerometer and gyrometer in the mobile phone. For example, gestures completed relatively faster will have fewer sampling points. Also, the signal strength of gesture sequences may vary. To cope with signal strength and speed variations, we apply amplitude and sequence normalization to the original signal sequences. Specifically, we first normalize a signal $x_i^n\left(t\right)$ by $$x_i^n\left( t \right) = \frac{{{x_i}\left( t \right) - \min _{t = 1}^T{x_i}\left( t \right)}}{{\max _{t = 1}^T{x_i}\left( t \right) - \min _{t = 1}^T{x_i}\left( t \right)}},\;\;\;
    \forall i \in \left\{ {1,...,6} \right\}.
    \label{eq:normalize}$$ Then, we use cubic spline interpolation to normalize the length of a sequence to a fixed size (we set this size as 1000 in our experiments). Fig.\[fig:preprocessed-data\] shows the preprocessed accelerometer and gyrometer data, where the sequence has been filtered and normalized.

\

Study of Fisher Criterion Parameters {#sec:parameter}
------------------------------------

In our model, the hyperparameter $\theta$ impacts the Fisher criterion, $\alpha$ controls the update rate of mean $\mu$ in F-BLSTM, and $\delta$ adjusts the relationship of intra-class distance and inter-class distance between features. These parameters would affect the performance of gesture recognition. In order to configure an optimal parameter setting, we conduct parameter tuning experiments for the F-BLSTM model as follows.

1.  We fix $\alpha$ to 0.5, $\delta$ to 0.01 and vary $\theta$ from 0 to 1 to investigate the effect of parameter $\theta$. Fig.\[fig:parameter-theta\] shows the classification accuracy on testing set. The result shows that the model trained with only softmax loss has poor performance, which certificates the necessity of introducing Fisher criterion.

2.  We fix $\alpha$ to 0.5, $\theta$ to 0.1 and vary $\delta$ from 1e-5 to 0.1 to verify that the inter-class distance’s joining promote the classification ability. As shown in Fig.\[fig:parameter-delta\], $\delta$ balances the relationship of intra-class distance and inter-class distance. We can set $\delta$ to an appropriate value to make the classification better according to different circumstances.

3.  We fix $\theta$ to 0.1, $\delta$ to 0.01 and vary $\alpha$ from 0 to 1 to train different models. The classification accuracy of these models on our gesture database are illustrated in Fig.\[fig:parameter-alpha\]. We find that the classification performance of our model remains relatively stable across a wide range of $\alpha$, but a moderate value of $\alpha$ has a better performance.

![image](parameter-theta.png){width="0.5\linewidth"}

\

![image](parameter-delta.png){width="0.5\linewidth"}

![image](parameter-alpha.png){width="0.5\linewidth"}

\
\

Analysis of Model Effect {#sec:discussion}
------------------------

As shown in the analysis mentioned above, the F-BLSTM and FBGRU achieves a better discriminant ability than the baseline BLSTM and BGRU. This section further discusses the better feature disctribution has been achieved. By the study in last section, we set $\theta$ to 0.1, $\delta$ to 0.01 and $\alpha$ to 0.5 in the F-BLSTM model, and set the parameters to 0.3, 0.01, 0.5 in the F-BGRU model, respectively.

Fig. \[fig:featurevisualization\] shows the feature visualizations on MGD database. In Fig. \[fig:featurevisualization\](a) and Fig. \[fig:featurevisualization\](b), the BLSTM and BGRU features of 12 classes are visualized by t-SNE [@Maaten2009Science] with the parameters of initial dimension 100 and perplexity dimension 30, while the F-BLSTM and F-BGRU features are illustrated in Fig. \[fig:featurevisualization\](c) and Fig. \[fig:featurevisualization\](d), respectively. Clearly, the fisher discriminant learning features are more discriminative than the original baseline features, especially the F-BGRU feature in Fig. \[fig:featurevisualization\](d) can be better discriminated than the BLSTM feature in Fig. \[fig:featurevisualization\](a). As another verification, the quantitative evaluation is performed based on three databases in the next section.

Comparison with State-of-the-Arts {#sec:comparison}
---------------------------------

**Experiment on [MGD]{} Database.** For the proposed database, we select 3500 sequences for training our model and 2047 sequences for testing. After preprocessing, the length of each data sequence is set to 1000, thus each input sample (3-axis accelerometer and gyrometer signals) is a matrix of [$1000 \times 6$]{}. Here, we train the network using adaptive moment estimation, with the learning rate as 0.002 and the batch size as 200. For the F-BLSTM model, we set $\theta$ to 0.1, $\delta$ to 0.01 and $\alpha$ to 0.5. We complete the training of BLSTM and F-BLSTM models at 1.5K iterations. The parameters of F-BGRU model are set to 0.3, 0.01, 0.5 respectively. The training of BGRU and F-BGRU is completed at 1.2K iterations. We report the performance of different methods on the testing set based on the average over 5 runs. The class-wise classification accuracy comparison of different mothods is presented in Table.\[table:ourdatabase\]. It is clear that by incorporating the Fisher criterion to the base models (BLSTM and BGRU), the recognition performance can be improved. Fig.\[fig:curve-proposed\] also shows the behaviors of F-BLSTM and F-BGRU models. Dotted lines denote training errors, and solid lines denote testing errors for different methods. As can be observed from the figure, our proposed softmax function with Fisher criterion effectively speeds up the convergence of training and achieves a smaller error rate.

             BLSTM    F-BLSTM    BGRU     F-BGRU
  --------- ------- ----------- ------- -----------
      A      97.41     97.85     97.09     98.09
      B      94.17     96.50     97.24     98.78
      C      98.95     99.40     99.85    100.00
      D      96.88     99.04     98.02     98.87
      E      96.88     97.40     98.48     98.61
      F      96.86     98.59     97.62     99.54
      1      93.80   95.33.82    96.62     98.53
      2      98.60     98.82     99.03     99.35
      3      96.69     97.56     98.29     99.42
      4      98.77     98.97     99.28     99.29
      5      96.55     98.16     99.77    100.00
      6      99.10     99.32     99.77     99.61
   Overall   97.05   **98.04**   98.38   **99.15**

![image](curve-proposed.eps){width="\linewidth"}

**Experiment on BUAA Mobile Gesture Database[@xie2016ccbr].** This database has 1120 samples for gestures A, B, C, D, 1, 2, 3, 4. Each sample includes three-dimensional acceleration and angular velocity of the mobile phone. The training and testing sets are divided randomly into 70% and 30%, respectively. We conduct the experiments using the same setting for F-BLSTM and F-BGRU. We set $\theta$ to 0.1, $\delta$ to 0.03 and $\alpha$ to 0.5. Model training is finished at 400 iterations. Table.\[table:buaadatabase\] shows that LSTMs with Fisher criterion still have better results than baselines on a smaller dataset. Similarly, the models converge faster and yield lower classification error rates with the Fisher criterion as shown in Fig.\[fig:curve-buaa\].

             BLSTM     F-BLSTM     BGRU     F-BGRU
  --------- -------- ----------- -------- -----------
      A      100.00     99.17     98.34      99.58
      B      97.29      98.92     97.84      98.37
      C      100.00    100.00     100.00    100.00
      D      99.26      97.42     96.77      99.35
      1      97.87      99.57     100.00    100.00
      2      100.00    100.00     100.00    100.00
      3      97.06     100.00     100.00    100.00
      4      95.83      97.50     97.08      97.08
   Overall   98.44    **99.06**   98.75    **99.25**

![image](curve-buaa.eps){width="\linewidth"}

**Experiment on SmartWatch Gesture Database[@costante2014eusipco].**

![image](example-smartwatch.png){width="0.6\linewidth"}\

The database has been used to evaluate gesture recognition algorithms for interacting with mobile applications using gestures. Eight different users performed twenty repetitions of twenty different gestures for a total of 3200 sequences. The gestures are depicted in Fig.\[fig:example-smartwatch\]. Different from the 6-dimensional sequences of previous two databases, each sequence in this dataset only contains acceleration data from the 3-axis accelerometer of a first generation Sony SmartWatch. Furthermore, due to the lower sampling frequency, we set the length of each gesture sequence preprocessed to 50. We randomly select 2400 sequences as training set and the rest 800 sequences as testing set. The parameters of Fisher criterion follow the same setting in previous experiment. Adaptive moment estimation is used to train the network, and the initial learning rate $\lambda$ is set to 0.0001. The batch size is 1000. Training for BLSTM and F-BLSTM is stopped at 1.4K iterations, and BGRU and F-BGRU at 2K iterations. [Fig.\[fig:curve-smart\] shows the training error and testing error during the training process. Like Fig.\[fig:curve-proposed\] and Fig.\[fig:curve-buaa\], dotted lines denote training errors, and solid lines denote testing errors. Table.\[table:smartwatch-database\] lists the classification results for different gestures. Notice that our proposed models perform considerably better than the baselines across the 20 gestures.]{}

             BLSTM    F-BLSTM     BGRU     F-BGRU
  --------- ------- ----------- -------- -----------
      1      94.58     97.91     97.08      97.50
      2      95.00     97.22     95.56      95.56
      3      86.90     87.59     93.10      93.10
      4      95.91     97.27     97.27      97.73
      5      96.88     98.13     96.88      98.13
      6      93.33     94.07     96.30     100.00
      7      96.44     96.89     98.22      99.56
      8      97.62     98.57     100.00    100.00
      9      93.49     96.74     96.74      97.67
     10      94.84     98.06     100.00    100.00
     11      89.76     94.15     94.15      95.12
     12      92.89     92.44     96.00      97.33
     13      90.42     95.00     94.17      95.42
     14      94.88     96.30     96.30      97.21
     15      95.14     95.14     100.00     97.84
     16      92.20     89.27     93.17      93.17
     17      96.52     95.65     99.13     100.00
     18      96.22     97.30     96.76      95.68
     19      94.29     94.76     94.76      96.67
     20      97.21     98.60     100.00    100.00
   Overall   94.30   **95.65**   96.80    **97.40**

![image](curve-smart.eps){width="\linewidth"}

Based on the experimental evaluations, we can observe that LSTM models with Fisher criterion consistently outperform the standard LSTMs on three different databases, validating the advantage of the proposed Fisher criterion. Furthermore, with even less data, the proposed Fisher criterion helps the LSTMs obtain a better result. This proves that it has a significant effect on a small database, showing the Fisher criterion has a widespread application scope.

Conclusion {#sec:conclusion}
==========

[In this paper, we have collected a large gesture database, namely MGD, for the application of mobile based gesture recognition. We proposed a novel Fisher criterion for F-BLSTM network to effectively classify the mobile hand gestures. Based on F-BLSTM, we also extended the F-BLSTM to a variant F-BGRU. By conducting numerous experiments, we proved that the mobile gesture recognition based on F-BLSTM networks which is supervised by the Fisher criterion has an outstanding performance. An appropriate values of Fisher criterion parameters contribute to the better results.]{}

Acknowledgement {#acknowledgement .unnumbered}
===============

The work was supported in part by the Natural Science Foundation of China under Contract 61672079, 61473086, 61601466. The work of B. Zhang was supported in part by the Program for New Century Excellent Talents University within the Ministry of Education, China, and in part by the Beijing Municipal Science and Technology Commission under Grant Z161100001616005. Baochang Zhang is the correspondence.

References {#references .unnumbered}
==========

Biography {#biography .unnumbered}
=========

**Chunyu Xie** received the B.S. degree and is a master in automation from Beihang University. His current research interests include signal and image processing, pattern recognition and computer vision.\
\
**Ce Li** received the B.E. degree in Computer Science from Tianjin University, Tianjin, China, in 2008, the M.S. and Ph.D. degrees in Computer Science from the School of Electronic, Electrical and Communication Engineering at the University of Chinese Academy of Sciences, Beijing, China, in 2012 and 2015, respectively. She is currently a research assistant with China University of Mining & Technology, Beijing, China. Her current interests include computer vision, video analysis and machine learning. She was supported by the Natural Science Foundation of China for Youth.\
\
**Baochang Zhang** received the B.S., M.S. and Ph.D. degrees in Computer Science from Harbin Institue of the Technology, Harbin, China, in 1999, 2001, and 2006, respectively. From 2006 to 2008, he was a research fellow with the Chinese University of Hong Kong, Hong Kong, and with Griffith University, Brisban, Australia. Currently, he is an associate professor with the Science and Technology on Aircraft Control Laboratory, School of Automation Science and Electrical Engineering, Beihang University, Beijing, China. He was supported by the Program for New Century Excellent Talents in University of Ministry of Education of China. His current research interests include pattern recognition, machine learning, face recognition, and wavelets.\
\
**Chen Chen** received the B.E. degree in automation from Beijing Forestry University, Beijing, China, in 2009, the M.S. degree in electrical engineering from Mississippi State University, Starkville, MS, USA, in 2012, and the Ph.D. degree from the University of Texas at Dallas, Richardson, TX, USA, in 2016. He is currently a Postdoctoral Fellow with the Center for Research in Computer Vision, University of Central Florida, Orlando, FL, USA. His current research interests include compressed sensing, signal and image processing, pattern recognition, and computer vision. He has published over 40 papers in refereed journals and conferences in the above areas.\
\
**Jungong Han** is currently a Senior Lecturer with the Department of Computer Science and Digital Technologies at Northumbria University, Newcastle, UK. Previously, he was a Senior Scientist (2012-2015) with Civolution Technology (a combining synergy of Philips Content Identification and Thomson STS), a Research Staff (2010-2012) with the Centre for Mathematics and Computer Science (CWI), and a Senior Researcher (2005-2010) with the Technical University of Eindhoven (TU/e) in Netherlands. Dr. Han’s research interests include Multimedia Content Identification, Multi-Sensor Data Fusion, Computer Vision and Multimedia Security. He is an Associate Editor of Elsevier Neurocomputing (IF 2.4) and an Editorial Board Member of Springer Multimedia Tools and Applications (IF 1.4). He has been (lead) Guest Editor for five international journals, such as IEEE-T-SMCB, IEEE-T-NNLS. Dr. Han is the recipient of the UK Mobility Award Grant from the UK Royal Society in 2016.\
\
