# Application of Augmented Reality in Waterway Traffic Management Using Sparse Spatiotemporal Data
## 4 Methodology
### Ship Detection Based on One-Stage Object Detection Model
#### 4.1.1 Feature Learning Enhancement Module  
Given that some vessels in inland waterways exhibit low resolution and small sizes during object detection, we propose replacing the strided convolution and pooling layers in the convolutional neural network (CNN) of the e-stage object detection algorithm with the SPD-Conv module. This modification aims to mitigate the loss of fine-grained information in CNNs when processing low-resolution images and small targets.  
The SPD-Conv module employed in this study was proposed by [PERSON] to address the performance degradation of CNNs when processing low-resolution images or small detection targets [39]. SPD-Conv utilizes spatial-to-depth transformation and non-strided convolution to reduce the spatial dimensions of feature maps while retaining all channel information. This method mitigates the loss of fine-grained details caused by strided operations, enhancing the model's ability to learn features from low-resolution images and small targets and thereby improving detection accuracy. SPD-Conv consists of an SPD layer and a non-strided convolutional layer. This section provides a detailed introduction and optimization tailored to the practical scenarios of inland waterway environments.  
* Space-to-Depth (SPD) Component  
The space-to-depth (SPD) component utilizes image transformation techniques to sample feature maps within a CNN and across the entire network. It splits an intermediate feature map X of size S into a series of sub-feature maps. Considering the characteristics of inland waterway scenarios, we modified the SPD component's sub-feature map formula by incorporating dynamic offsets \(\mathrm{o_{i}}\) and \(\mathrm{o_{j}}\), allowing for better adaptation to complex backgrounds and multi-target occlusions. The specific formula is as follows:  
\[\mathrm{f_{x,  
SS  
\[X^{\prime}=\text{Concatenate }(f_{0,0},f_{1,0},\ldots f_{\text{scale}-1,\text{ scale}-1})\,, \tag{3}\]  
The dimensions of the newly generated feature map, \(X^{\prime}\), change from \(S\,\times\,S\times C_{1}\) to the following:  
\[X^{\prime}\in R^{\frac{S}{\text{scale}}\,\times\,\frac{S}{\text{scale}}\,\times \,\text{scale}^{2}\,C_{1}}\,, \tag{4}\]  
* Non-Strided Convolution  
Non-strided convolution is a technique used in convolutional neural networks (CNNs) characterized by a stride of 1. This configuration ensures that the convolutional kernel slides over the input feature map without skipping any pixels, thereby preserving the spatial information.  
Non-strided convolution is applied following the SPD (space-to-depth) layer to process the high-dimensional feature maps generated via SPD. It helps in extracting features while utilizing learnable parameters to reduce the number of channels. This process ensures the preservation of discriminative features without the information loss typically associated with strided convolutions. Consequently, all distinguishing feature information is effectively retained. The layer consists of \(C_{2}\) filters, where \(C_{2}\,<\,\text{scale}^{2}\,C_{1}\). The objective is to transform \(X^{\prime}(\frac{S}{\text{scale}},\frac{S}{\text{scale}},\text{scale}^{2}C_{1})\) into \(X^{\prime\prime}(\frac{S}{\text{scale}},\frac{S}{\text{scale}},C_{2})\). This design allows the non-strided convolution layer to effectively reduce the number of channels in the feature map without losing information. Since the stride of the non-strided convolution is 1, the convolutional kernel slides over the feature map without skipping any pixels, thereby preserving its spatial resolution.