## 3 Methods
### Improvements to the RT DETR Algorithm
#### 3.2.1 Improving the Backbone of the RT DETR Algorithm  
The MobileNet series was proposed to address the issue of traditional convolutional neural networks requiring excessive memory and computational resources when running on mobile and embedded devices. In 2017, MobileNet emerged as a lightweight CNN network designed for mobile and embedded devices, aiming to significantly reduce the number of model parameters and computational load with minimal sacrifice in accuracy. By introducing the latest MobileNetV3, we further advanced efficiency and performance balance in the backbone part of the RT DETR model. Built on the foundations of MobileNetV2 and MobileNetV1, MobileNetV3 inherits and enhances their advantages, optimizing the model to set new standards in fast processing and low resource consumption. This progress means that more efficient models can better serve practical application scenarios, meeting the growing demands for mobile computing [36; 37; 38].  
The design improvements in MobileNetV3 are reflected in innovations in the bottleneck blocks. These bottleneck blocks now embed a lightweight attention mechanism called the Squeeze-and-Excitation (SE) module. This mechanism enhances the network's response to key information by precisely calibrating the importance of each feature channel while naturally suppressing less important information, thereby improving accuracy while keeping the model lightweight. Additionally, the bottleneck block updates include a mixed depthwise separable convolution strategy, which cleverly combines convolution kernels of different sizes. This not only effectively captures multi-scale information in the image but also optimizes computational efficiency. Figure 5 shows the structural details of the improved bottleneck block, revealing its superior performance in executing multi-scale feature extraction.  
MobileNetV3 reconstructs and optimizes the most computationally intensive layers in the model to reduce their computational costs while maintaining or improving model accuracy. This includes optimizing the first and last layers of the model, which are typically the most computationally expensive parts in many deep learning architectures. MobileNetV3's specific designs, such as adjusting the convolution kernel size, stride, and filter numbers, aim to reduce the computational burden of these layers. Figure 6 illustrates the streamlined design of time-efficient layers.  
Figure 5: CompactFusion block.  
In the design of MobileNetV3, researchers redesigned the activation function to adapt to mobile devices' computational constraints while enhancing performance, using h-swish instead of the swish function. The swish non-linear activation function, an alternative to ReLU, significantly improves neural network accuracy. Its definition is as follows:  
\[\text{swish}(x)=x\cdot\sigma(x) \tag{1}\]  
where \(x\) is the input, and \(\sigma(x)\) is the sigmoid function of the input \(x\), defined as \(\sigma(x)=\frac{1}{1+e^{-x}}\). The swish function increases non-linearity by multiplying the sigmoid function by \(x\), thus enhancing the model's expressive power.  
Although this non-linearity improves accuracy, swish's complex derivative calculation is not friendly to the quantization process. The improved h-swish function is defined as follows:  
\[\text{h-swish}(x)=x\cdot\frac{\text{ReLU6}(x+3)}{6} \tag{2}\]  
where \(\text{ReLU6}(x)\) is a piecewise linear function, defined as \(\text{ReLU6}(x)=\min(\max(0,x),6)\). The h-swish function can be implemented as a piecewise function, reducing memory accesses and thereby significantly lowering latency costs.  
Replacing the RT DETR model's backbone from ResNet to MobileNetV3 can significantly reduce the model's computational load to one-tenth of the original. Simultaneously, this substitution has a negligible impact on detection accuracy, almost not diminishing the model's performance.