# A Framework for Fall Detection Based on OpenPose Skeleton and LSTM/GRU Models
## 2 System Architecture and Method
### Data Pre-Processing
#### 2.3.2 Relative Position Normalization (RP-Normalization)  
In order to improve the accuracy of the model, we use the min-max normalization [26, 27, 28] to scale the data to the interval \([0,1]\) to improve the convergence speed of the model. The new scale data \(X_{nom}\) are defined as  
\[X_{nom}=\frac{X-X_{min}}{X_{max}-X_{min}}\in[0,\ 1], \tag{1}\]  
where \(X\) is the original data, \(X_{min}\) is the minimum value in the data, and \(X_{max}\) is the maximum value in the data.  
However, there are missing points in the dataset. The value of 0 means that \(X_{min}\) will be 0, but not all groups have missing values. Therefore, the original data distribution will be changed, resulting in unclear and complicated features. Therefore, we propose a normalization method to move the original coordinate position to the relative coordinate positions of the \(f\)-th frame as  
\[x_{c}^{f}=\frac{W}{2} \tag{2}\]  
and  
\[y_{c}^{f}=\frac{H}{2}, \tag{3}\]  
respectively. Here, \(W\) and \(H\) denote the width and the height of the picture, respectively. When \(x_{n}^{f}\) or \(y_{n}^{f}\) is equal to 0, it is regarded as a missing point and not calculated. If the center point is a missing point, it will be directly replaced by the calculated center point.  
The distances \((x_{dis},y_{dis})\) that need to be displaced are defined as  
\[x_{dis}^{f}\ =\ x_{8}^{f}-x_{c}^{f} \tag{4}\]  
and  
\[y_{dis}^{f}\ =\ y_{8}^{f}-y_{c}^{f} \tag{5}\]  
respectively, where the 8 th joint point is \((x_{8}^{f},y_{8}^{f})\) and the central hip circumference is used as the reference point, and the displacement is to the center point \((x_{c}^{f},\ y_{c}^{f})\). When the displacement value is less than 0, it means a move to the right, and when the displacement value is greater than 0, it means a move to the left.  
The new joint point coordinates \((rx_{n}^{f},ry_{n}^{f})\) for calculating the displacement to the relative position are defined as  
\[rx_{n}^{f}=\left(x_{n}^{f}-x_{dis}^{f}\right) \tag{6}\]  
and  
\[ry_{n}^{f}=\left(y_{n}^{f}-y_{dis}^{f}\right), \tag{7}\]  
respectively, where the original joint point coordinate is \((x_{n}^{f},y_{n}^{f})\) and the required displacement distance is \((x_{dis}^{f},y_{dis}^{f})\).  
There are two advantages to this. The first is to avoid calculating the missing points together, and the original data distribution will not be affected. The second is to reduce unnecessary features. Because the objective of this study is fall detection, it removes the original data. The characteristics of the human body displacement process, such as walking from left to right or walking from far to near, fix the human skeleton in the same position, and make continuous movements to make the model easier to learn.  
As shown in Figure 5, we unify the image size to 640 \(\times\) 480 pixel and set a center point. After displacement by the above formula, as shown in Figure 6, the human skeleton will be moved to the center of the image and the central hip joint point will be equal to the center point position. In the skeleton diagram of fall and non-fall activities, we found that some joint points are not important for the recognition of fall events, so we remove them. Too many feature parameters may also cause the recognition rate to decrease orcomplicate the environment. Only 15 important points are retained as training feature values, among which the joint points of nose, shoulders, elbows, wrists, neck, hip, knees and ankles are retained.