# End-to-End Online Video Stitching and Stabilization Method Based on Unsupervised Deep Learning
## 3 Experimental Results and Analysis  
### Experimental Parameter Settings  
In this study, experiments were conducted using the StabStitch-D video stitching dataset provided in [12]. This dataset consists of 100 videos categorized into four groups based on scene characteristics: Regular (RE), Low-Texture (LT), Low-Light (LL), and Fast-Moving (FM). Among these, the Fast-Moving category features rapid and irregular camera motions, making it particularly valuable for research. To maintain computational efficiency while ensuring experimental diversity, all videos were uniformly resized to a resolution of 360 \(\times\) 480. The datasets employed are limited in diversity--most contain predominantly daytime, outdoor scenes with moderate motion--thus they do not fully represent challenging conditions such as extreme low-light environments, heavy occlusions, or highly dynamic indoor footage.  
Regarding parameter settings and evaluation metrics, the hyperparameters of the triplet loss in the trajectory estimation module were set to \(\xi\) = 2 and \(\mu\) = 1. For the overall loss function, the initial weight \(\lambda_{0}\) was set to 3, and the weight of the stitching motion loss \(\beta\) was set to 5. In the trajectory smoothing module, the respective weights of different loss components were assigned as \(\alpha_{\text{s}}\) = 20, \(\beta_{\text{s}}\) = 10, and \(\gamma_{\text{s}}\) = 30. The grid vertex partition was configured as \((6+1)\times(8+1)\). Within the sliding window framework, the lengths of the historical and original paths were set to 6 and 8, respectively. For evaluation metrics, the image alignment quality was assessed using PSNR and SSIM, consistent with StabStitch. Additionally, the video stability and distortion rates were evaluated following the methodology of RTVSASP [14], ensuring a fair comparison with state-of-the-art methods.  
The values of \(\xi\) = 2.0 and \(\mu\) = 0.01 are adopted following the settings in [13], where these hyperparameters were extensively validated for content-aware unsupervised deep homography estimation and shown to achieve superior robustness and accuracy. In our framework, which uses a similar loss formulation and network backbone, these values have also been confirmed through preliminary sensitivity tests to provide stable convergence and consistent performance across diverse scene conditions.  
Considering that unsupervised learning in image registration tasks is prone to nonlinearities and local optima, direct end-to-end training often faces convergence challenges. To address this issue, a staged training strategy was designed. Initially, in the independent training phase, the camera trajectory estimation module and stitching parameter estimation module were trained separately using temporal and spatial data, respectively. Their inference results were saved as initialization parameters for subsequent optimization. Next,during the sliding window optimization phase, historical path information was incorporated for further refinement. In each iteration, the network simultaneously computed trajectory estimation loss and stitching motion loss, while the trajectory smoothing loss was computed every 8 iterations to ensure both global continuity and local consistency. The training was performed on an RTX 4090 Ti GPU manufactured by NVIDIA in the United States (Santa Clara, CA, USA) in an Ubuntu 18.04 environment. The Adam optimizer was employed with an initial learning rate of 0.00001 and momentum parameters set to \(\beta_{1}=0.9\) and \(\beta_{2}=0.99\). A StepLR strategy was applied to reduce the learning rate by 50% every 10 epochs, with the entire training process lasting for 50 epochs.