# FTGM: Fast Transformer-Based Global Matching for Particle Image Velocimetry
## 5 Limitation and Discussion  
In this study, we define PIV estimation as a pixel-matching problem, addressing the computational time-consuming issue of the existing RAFT-PIV method during the iterative refinement stage and enhancing the accuracy of flow-field estimation. For a 256 \(\times\) 256-pixel image, the processing time can be decreased from 66 ms to 30 ms (higher accuracy) and 14 ms (higher performance). This is of great significance for the online study of the evolution and development of flow-field structures. In practical applications, PIV images usually have larger sizes. For example, in the turbulent wavy channel flow case, the processing speeds of FTGM (79 s and 43 s) are 1.43 and 2.63 times that of RAFT256-PIV (113 s), respectively, showing a very significant difference. This improvement is evident. It can be observed that, benefiting from the iterative refinement structure that optimizes the estimation results through step-by-step residual learning, RAFT256-PIV can better \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Methods**} & **Params** & **Speed** & **GPU Memory** & **Match** & **Transformer** & **Iterations** \\  & **(M)** & **(ms)** & **(GB)** & **(ms)** & **(ms)** & **(ms)** \\ \hline RAFT256-PIV [26] & 5.31 & 66 & 7.16 & - & - & 56 \\ \hline FTGM-PIV & 4.68 (11.8\% \(\downarrow\)) & 14 (78.8\% \(\downarrow\)) & 7.11 & 0.35 & 9.5 & - \\ FTGM-PIV-Ref * & 4.72 (11.1\% \(\downarrow\)) & 30 (54.5\% \(\downarrow\)) & 20.62 & 4.5 & 20.5 & - \\ \hline \hline \end{tabular}  
* All models were trained on PIV Dataset I, utilizing an NVIDIA A100. Inference times were measured on an NVIDIA GTX 3080 platform. “Match” and “Transformer” denote the inference durations of the corresponding components within the FTGM, while “iterations” refers to the time taken for 16 update unit iterations in RAFT256-PIV. \(\downarrow\) indicates the percentage gain of the current metric compared to the baseline model RAFT256-PIV. “-” indicates that the component is not present in the method, and the test result is a default value.  
\end{table} 
Table 4: Comparisons of parameters and inference time. Figure 8: Vortex structure resolution visualization comparison. The focus is on the estimated results of the 1000 \(\times\) 1000-pixel area in the lower left corner of Figure 7, where the FTGM estimation significantly outperforms that of RAFT256-PIV. handle areas within the image without tracer particles (vortex pair flow, area 1 and 3; spatial resolution case, area 1). However, when processing the edges of large images (Karman vortex street case, area 3), it tends to produce more overestimated values and chaotic flow-field structures. Since FTGM is based on pixel matching, it usually shows zero values for areas without particles (unmatched) or at the image edges; that is, no matching results are found. In low-density particle areas (spatial resolution case, area 1), due to the low matching success rate, FTGM tends to generate abnormal values. Observing the visualization results of all experimental images, RAFT256-PIV shows a global smoothing effect in low-density images (vortex pair flow), while in other higher-density particle images, it exhibits a large number of unexpected and very fine flow field structures (such as Karman vortex street, spatial resolution area 2, vortex structure resolution). We believe this may be because the iterative refinement structure tends to overexpress non-existent structures when faced with a large amount of information (provided by high-density particle images). FTGM, based on global matching, optimizes the estimation results by utilizing the similarity between the optical flow field and the image structure, thus obtaining results that are more faithful to the image structure. However, it is precisely this approach that prevents it from generalizing to unmatched areas. Focusing on the turbulent wavy channel flow case, the particle density of the image in this case is much higher than that of all other test cases.