# FTGM: Fast Transformer-Based Global Matching for Particle Image Velocimetry
## 1 Introduction  
Particle Image Velocimetry (PIV), a pivotal tool in contemporary fluid dynamics research, offers a non-invasive and high-precision method for the quantitative measurement of the full-field velocity field [1, 2]. It achieves this by capturing and analyzing images of a fluid containing small particles at a short time interval, typically on the order of microseconds, to extract detailed information about the velocity field. The traditional methods of PIV estimation predominantly consist of cross-correlation and optical flow methodologies. The cross-correlation method (CC) [3], which enjoys widespread adoption, typically involves segmenting PIV images into smaller sub-regions, referred to as interrogation areas (IAs). By computing the correlation within the image pairs for these interrogation areas, the direction of maximum match is ascertained, which then determines the displacement at the centroid of each interrogation area. The window deformation iterative multi-grid (WIDIM) method [4], a representative technique in the realm of Particle Image Velocimetry, employs an iterative multi-grid refinement strategy that dynamically narrows the size of the interrogation window during the iterative query process, thereby markedly enhancing the spatial resolution and precision of numericalinterrogation schemes, as evidenced by its commendable performance in international PIV challenge assessments. However, the cross-correlation method is based on the assumption of uniform motion. This means that all particles within an interrogation area are assumed to exhibit a consistent motion state. The method faces challenges when dealing with complex flow scenarios. It tends to partially lose the anisotropy of the flow field and the abrupt changes in velocity. This limitation, which restricts the output to a single vector per window, further restricts the spatial resolution of the output velocity field to the scale of the interrogation area, consequently hindering the algorithm's ability to accurately capture fine-scale vortex structures that are smaller than the interrogation area itself. Another significant approach, the optical flow method [5, 6], is capable of yielding dense velocity vector fields with single-pixel resolution. This improves the measurement of small-scale fine structures and compensating for the deficiencies of correlation-based methods. Initially proposed by [PERSON] and [PERSON] in their seminal work [5], which has since become a cornerstone in the field. This method has also garnered considerable interest among fluid dynamics experimentalists. Addressing the inadequacy of classic optical flow models to adapt to fluid dynamics, researchers often consider incorporating fluid dynamics prior knowledge into the model to optimize the data term (based on brightness constancy assumption) and regularization terms in the objective function using physical equations of fluid mechanics [7, 8]. However, the variational optimization required by optical flow algorithms is computationally intensive and time-consuming. There remains room for improvement in optical flow algorithms. The emergence of deep learning (DL) has catalyzed the development of innovative approaches to address the existing challenges. Deep optical flow models, which have made significant strides in computer vision, have demonstrated remarkable performance [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]. These advancements have inspired researchers to adapt and modify high-performing models for Particle Image Velocimetry estimation. Early efforts primarily focused on model stacking to enhance precision [20, 21, 22, 23, 24]; however, these models were complex and suffered from significant parameter redundancy. The introduction of the Recurrent All-Pairs Field Transforms (RAFT) framework [19], with its outstanding performance, established a foundational architecture for learning-based optical flow estimation methods.