## 3 Methodology
### Accelerated Deployment of the Wide-Angle Image Correction Network  
To improve the runtime efficiency of wide-angle image rectification tasks, this study adopts a lightweight Swin-T (Tiny) configuration as the backbone encoder, incorporating multi-scale feature extraction and a shifted window attention mechanism. This design significantly reduces model complexity and computational overhead while maintaining correction accuracy, thereby improving inference speed and promoting structural compactness. Although the proposed structure achieves satisfactory performance on server-side platforms, its deployment on edge devices such as the Jetson TX2 NX remains constrained by limited computational resources. Specifically, the model exhibits an average inference latency of approximately 150 ms and high GPU occupancy, which does not satisfy the real-time requirement of 15 FPS. To address this limitation, we propose a pruning-based optimization strategy tailored for embedded deployment scenarios, aiming to further reduce the model size and enhance inference efficiency. More specifically, structural pruning is applied to both the shifted window attention module within the Swin-T encoder and the TPS control point prediction module. The pruning procedure involves the following steps: (1) introducing L1 regularization during retraining to promote sparse weight distributions, thereby identifying redundant channels and attention heads; (2) ranking the importance of hidden channels and attention heads based on their L1 norm values or output contributions; and (3) removing low-contribution structural units to reduce model complexity while preserving inference capability. The overall pruning framework is illustrated in Figure 11. The performance of the proposed strategy on embedded platforms is further detailed in Section 4.4.2. Specifically, to optimize the sliding window attention modules within the encoder, this study introduces an L1 regularization term into the objective function, which promotes sparse weight learning during training. Given an input image resolution of 320 \(\times\) 320, the original encoder produces a 100 \(\times\) 100 \(\times\) 24 feature map. Through pruning, the number of output channels is reduced to 15-20, significantly decreasing computational redundancy. For the TPS control point prediction module, a flow-guided structural constraint is applied by incorporating the loss term from the optical flow estimation module into the overall objective function. Based on a 320 \(\times\) 320 \(\times\) 14 control point map, the pruning process computes the L1 distance between the predicted TPS gradients and the optical flow vector directions, which enables the identification and removal of low-response channels. As a result, the number of output channels is reduced to approximately seven. The joint pruning optimization of these two modules results in an approximate 40% reduction in total network parameters, thereby substantially enhancing runtime efficiency on embedded platforms. Regarding weight importance evaluation, channel pruning is implemented by computing the L1 norm across columns (or rows) of convolutional weight matrices, whereas attention head pruning is achieved by aggregating the L1 norms of the \(Q/K/V\) projection matrices within each attention head, as defined in Equations (10) and (11). \[\text{Im}por\tan c\textsubscript{\tiny channel}=\sum_{i=1}^{d_{m}}|W_{i,j}| \tag{10}\]  
Here, \(j\) denotes the index of the output channel, and the weight matrix has a shape of \([d_{out},d_{in}]\). The L1 norm is computed along the output channel dimension. \[\text{Importance}_{k}=\sum_{m\in\{Q,K,V\}}\sum_{i,j}|W_{i,j}^{m,k}| \tag{11}\]  
Figure 11: Framework of the channel pruning strategy. Here, \(k\) denotes the index of the attention head, and the shape of each attention head's \(Q/K/V\) projection matrix is \([h,d_{head}\times d_{embed}]\).