## 3 Overall Algorithm Design
### Visual Recognition Algorithm  
By using the YOLOv5s-Ghost network model [32], the UAV relies on the Intel RealSense D435 depth camera installed at the front as its eyes to identify the surrounding environment. This setup ensures safe navigation within a range of 0-20 m.  
The YOLO (You Only Look Once) series of detection algorithms are widely favored by researchers due to their high efficiency and fast detection speed [33]. Among them, YOLOv5 is the most widely adopted, capable of efficiently extracting target feature information, yet its network structure is overly complex [34]. YOLOv5s is the most lightweight version, with significantly reduced parameters and minimal floating-point operations, balancing model complexity and accuracy [35]. Despite its relatively fast detection speed, it still falls short of meeting the rapid detection requirements of UAVs. The proposed YOLOv5s-Ghost model integrates Ghost-BottleNeck modules with DarkNet-53, achieving a lighter network architecture and accelerated detection. Ghost-BottleNeck combines Ghost feature generation with bottleneck structures, primarily aiming to reduce parameters and enhance detection speed through feature redundancy assumptions and efficient feature generation. As depicted in Figure 10, the Ghost module generates more feature maps with fewer parameters, primarily by dividing the convolution operations: half of the channels undergo standard convolution, while the other half use a 3 \(\times\) 3 depthwise separable convolution (cheap transformation operations). Finally, these dual-path outputs are concatenated to form the final feature representation [36]. Figure 9: Ground station system flowchart. In the computation of FLOPs (Floating Point Operations Per Second) for standard convolutions, \(h^{\prime}\) denotes the output height, \(w^{\prime}\) the output width, \(n\) the output dimension (equivalent to the number of filters), \(c\) the number of input channels, and \(k\) the spatial dimensions (height and width) of convolutional kernels. This study introduces an improvement using Ghost modules, where the \(n\) filters in standard convolutions are partitioned into \(s\) groups. The theoretical speed-up ratio of upgrading the ordinary convolution with the Ghost module is  
\[r_{s}\ =\ \frac{n\times k\times w\times c\times k}{\frac{n}{s}\times h^{ \prime}\times w^{\prime}\times c\times k\times k+\frac{(s-1)}{s}\times n\times h ^{\prime}\times w^{\prime}\times c\times d\times d}= \tag{13}\] \[\frac{c\times k\times k}{\frac{n}{s}\times c\times k\times k+\frac{ (s-1)}{s}\times d\times d}\approx\frac{s\times c}{s+c-1}\ \approx\ s\]  
where \(d\ \times\ d\) has a similar magnitude as that of \(k\ \times\ k\), and \(s\) <<\(c\). Similarly, the compression ratio can be calculated as  
\[r_{c}=\frac{n\ \times\ c\ \times\ k\ \times\ k}{\frac{n}{s}\times c\ \times\ k\ +\frac{(s-1)}{s}\times\ n\ \times\ d\ \times\ d}\ \approx\ \frac{s\ \times c}{s+c-1}\approx\ s \tag{14}\]  
For implementation, the filters are divided into two groups (\(s=2\)), resulting in the Ghost module achieving a 50% reduction in both the parameter count and computational cost compared to standard convolutions. Leveraging the lightweight characteristics of Ghost modules, this work employs a Ghost-BottleNeck architecture. As depicted in Figure 11, the module consists of two cascaded Ghost modules with integrated Batch Normalization (BN) layers to accelerate network convergence and suppress overfitting. The first segment incorporates Leaky ReLU activation functions to prevent neuron deactivation during training, while the latter segment intentionally omits activation functions to maintain a consistent feature distribution across network layers, enhancing the model's convergence efficiency. The architecture of the YOLOv5s-Ghost network is shown in Figure 12. YOLOv5s-Ghost only uses one CSP_X structure, which significantly reduces the model's complexity.