# A Novel Deep Learning Method for Detecting Strawberry Fruit
## 2 Materials and Methods
### RFT-YOLO for Detecting Strawberry
#### 2.2.1 Backbone  
The backbone network was reconstructed with structure reparameterization technology [26] and the QARepVgg block [27]. Many mainstream studies focused on well-designed architectures like ResNet, MobileNet, and Inception. These networks use multi-branch parallelism to increase the model's representational capacity and improve the accuracy. However, complex multi-branch designs lead to increased memory access and usage, which, in turn, reduces the model's inference speed [26, 28]. [PERSON] et al. [26] proposed the RepVgg block based on the structure reparameterization technology. The RepVgg block has different structures during training and inferencing. In training, the RepVgg Block has three parallel branches, namely, the \(3\times 3\) convolution, \(1\times 1\) convolution, and Identify branches, with each followed by a BN (batch normaliza  
Figure 4: The C3 and SPPF modules of YOLOv5. The C3 combines N bottleneck blocks with three Conv modules, which optimizes the feature fusion for efficient feature extraction. The SPPF module generates multi-scale feature maps by applying max pooling at different scales, which enriches the semantic information of the feature representation. tion) layer. During inference, the three parallel branches are converted into a single-path structure, as shown in Figure 5a, specifically:  
1. In the \(1\times 1\) convolution branch, the \(1\times 1\) convolution is converted into an equivalent \(3\times 3\) convolution by padding. 2. In the identity branch, the identity is converted into an equivalent \(1\times 1\) convolution by using the identity matrix as the kernel. Then, the \(1\times 1\) convolution is converted into a \(3\times 3\) convolution by padding. 3. All three branches are converted into the structure of a \(3\times 3\) convolution followed by a BN layer. Then, the \(3\times 3\) convolution and BN layer are fused into a single \(3\times 3\) convolution on each branch. 4. The \(3\times 3\) convolutions of the three branches are merged into one branch through addition. The RepVgg block achieved an optimal balance between performance and inference speed. However, in quantization scenarios, models with the RepVgg Block experienced a significant decline in performance, including an over 20% top one accuracy drop on ImageNet with INT8 (8-bit integer) inference. [PERSON] et al. [27] conducted an in-depth analysis of performance degradation during the standard quantization. The authors introduced a simple yet effective improved structure, QARepVgg block, which benefited from the advantages of reparameterization and possessed quantization-friendly attributes, as illustrated in Figure 5b. Consequently, networks based on the QARepVgg block significantly minimize the performance discrepancy between INT8 and FP32 (32-bit floating point), which enhances the model's suitability for deployment on edge devices. We utilized the QARepVgg block to create the QARepNeXt module. In detail, the width (the size of the feature map) of the QARepNeXt module was kept consistent with that of the C3 module, and the stacking layers of the QARepVgg block were aligned with the BottleNeck in the C3 module. Similar to RepVgg, QARepNeXt operates as a multi-branch parallel structure during training and converts to a single-path structure during inference,  
Figure 5: Reparameterization of a QARepVgg block compared with RepVgg. The main improvements were as follows: (1) the BN layers followed by both the \(1\times 1\) branch and identity branches were removed, and (2) a new BN layer was appended to the convolutional layer obtained from the fusion of multiple branches. as depicted in Figure 6. The multi-branch structure promotes diverse feature learning and robustness during training but increases the computational complexity. Converting to a single-path structure can enhance the inference speed while preserving the benefits of the features learned during training.