## 4 Construction and Optimization for the Deepfake Detection Model
### Construction of the FG-TEFusionnet Model for Deepfake Detection
#### 4.3.1 Construction of the LRnet Network Model Incorporating SENet Attention
The Kalman filter is then used to perform a weighted average of the positions predicted by the Lucas-Kanade algorithm and those actually detected by the face detection module. This fusion strategy not only calibrates the detection positions but also effectively reduces the noise level of facial landmarks within the video frame sequence. The calibrated detection position information is more precise, enabling subsequent feature extraction networks to capture it more effectively and extract critical temporal feature information, thereby enhancing the overall system's capability to understand and analyze the dynamic characteristics of video content. * SENet Attention-Based Feature Extraction Module For Dual-Flow RNN  
The input sample video is processed through the facial landmarks calibration module to obtain standardized facial landmarks. The Lucas-Kanade algorithm and Kalman filter are then utilized to fuse the predicted and actual positions, effectively reducing noise and yielding the optimal calibrated feature point locations. Subsequently, a dual-stream RNN is used to extract temporal dimension features. The calibrated facial landmark coordinates are embedded into two types of feature vector sequences in different forms, which are then fed into two separate RNNs to extract temporal information at different levels. Each set of facial landmarks for a video frame \(L_{i}\) can be represented as \(\big{[}x_{i}^{1},x_{i}^{2},...,x_{i}^{68}\big{]}^{T}\), where a facial  
Figure 10: Schematic diagram of the facial landmarks calibration module. landmark point is denoted as \(x_{i}^{a}=\left[x_{i}^{a},y_{i}^{a}\right]^{T}\). Consequently, the first type of feature vector sequence is expressed as shown in Equation (15)  
\[\alpha_{i}=\left[x_{i}^{1},y_{i}^{1},x_{i}^{2},y_{i}^{2},...,x_{i}^{68},y_{i}^{ 68}\right]^{T} \tag{15}\]  
The first type of feature vector sequence represents direct facial geometric features. The second type of feature vector sequence is derived from the differences between facial landmarks of two consecutive frames, as illustrated in Equation (16). \[\beta_{i}=\alpha_{i+1}-\alpha_{i}=\left[x_{i+1}^{1}-x_{i}^{1},y_{i+1}^{1}-y_{ i}^{1},...,x_{i+1}^{68}-x_{i}^{68},y_{i+1}^{68}-y_{i}^{68}\right]^{T} \tag{16}\]  
Therefore, by embedding, the geometric feature information of the optimal facial landmarks can be represented as two feature vector sequences \(A=\left[\alpha_{1},\alpha_{2},...,\alpha_{n}\right]^{T}\) and \(B=\left[\beta_{1},\beta_{2},...,\beta_{n}\right]^{T}\), where the subscript \(n\) denotes the number of facial landmark sets in a video. Temporally, \(A\) represents the collection of facial landmarks in the sample video and serves as the input vector sequence to an RNN network \(g_{1}\). The vector sequence \(B\), formed by the differences between consecutive frames, captures the velocity feature information of the facial landmarks and is input as a vector sequence into another RNN network \(g_{2}\). In the branch network \(g_{1}\), the SENet attention module is incorporated to enhance the representation of varying weights for each facial landmark in the temporal information features. This forces the network to focus on different local information, thereby improving classification accuracy. Both RNN branches subsequently pass through fully connected neural networks, with the sigmoid activation function then producing the prediction results \(pred_{1}\) and \(pred_{2}\) of each branch. Finally, these outputs are fed into the multi-feature decision fusion module to achieve deepfake face detection.