# FTGM: Fast Transformer-Based Global Matching for Particle Image Velocimetry
## 2 Related Work  
In recent years, deep learning-based optical flow techniques have exhibited the potential to match and outperform the efficiency, accuracy, and spatial resolution of classical state-of-the-art algorithms. In a pioneering study [20], the potential of using artificial neural networks (ANNs) for Particle Image Velocimetry was first explored, with attempts to apply Convolutional Neural Networks (CNNs) and Fully Convolutional Neural Networks (FCNNs) to PIV and validate their effectiveness through synthetic images and real-world data. Although ANNs' performance in some aspects still lags slightly behind traditional methods, they show promise in handling complex flows and enhancing spatial resolution. [PERSON] et al. [21] designed a cascaded PIV deep convolutional neural network (PIV-DCNN) that demonstrated improved spatial resolution. This method involves a four-stage regression structure, where each level of the network is trained to predict displacement from input particle image block pairs, without any pre-established model assumptions. However, the model cannot output a dense velocity field, and the computational process is highly time-consuming. [PERSON] et al. [22] enhanced the FlowNetS [9] model for PIV estimation by incorporating deconvolutional layers into the final stage of the model to achieve high-resolution velocity fields at the pixel level. Employing a similar strategy, they also improved the LiteFlowNet [11], resulting in PIV-LiteFlowNet [24], which further increased estimation  
Figure 1: Overview of FTGM framework. We initially employ a CNN encoder to extract features at 1/8 resolution, followed by a Transformer module for feature enhancement. Subsequently, the similarity between the two feature sets is calculated, and a softmax operation is applied to obtain the matching distribution, which is then used to compute the optical flow through a weighted average with the grid coordinates. Finally, the estimated flow is further optimized through feature self-similarity. accuracy. However, these methods further increased the size of the models, introducing a significant amount of parameter redundancy. A significant advancement in the task of optical flow estimation in computer vision is the RAFT [19], achieving state-of-the-art performance on benchmark datasets. This framework employs weight sharing and recurrent mechanisms to avoid the complexity and hyperparameter sensitivity of traditional multi-stage cascaded networks. Consequently, numerous improvements and applications based on this model have emerged in PIV research, with the 4D correlation volumes and iterative update units becoming widely used structures in PIV estimation. [PERSON] et al. proposed LightPIVNet [25], which reduces the number of parameters by 47% and computation time by 14% compared to PIV-LiteFlowNet. The improvement strategy involves reducing the number of residual units in the feature encoder of RAFT from three to two and changing the output resolution of the feature maps from the original 1/8 to 1/4. This change provides a higher resolution for subsequent iterative optimization processes, retaining more details and enhancing the precision of PIV estimation while reducing the number of parameters. Subsequently, [PERSON] et al. [26] adapted RAFT to RAFT-PIV, achieving state-of-the-art accuracy and performance in PIV using optical flow estimation. [PERSON] et al. [27] undertook a study to evaluate the generalizability and robustness of RAFT-PIV, conducting extensive tests across a diverse array of real-world PIV datasets and examining the impact of varying PIV parameters in synthetically derived datasets. [PERSON] et al. [28] conducted an investigation into the impact of modified input particle image properties, such as particle diameter, Reynolds number, and particle concentration (particles per interrogation area), on the detection performance of RAFT-PIV using cylindrical flow around an obstacle. [PERSON] et al.