# A Lightweight Detection Method for Meretirix Based on an Improved YOLOv8 Algorithm
## 2 Materials and Methods
### Improved YOLOv8 Network  
The YOLO (You Only Look Once) network is a popular real-time object detection system first proposed by [PERSON] and colleagues in 2016 [14]. The design of this  
Figure 1: Display of self-made clam image dataset: (**a**) dispersed single-target; (**b**) clustered single-target; (**c**) dispersed multi-target; (**d**) clustered multi-target. Figure 2: Partial enhanced sample display. network allows it to detect objects in an image with a single scan, contrasting sharply with previous methods that required multiple scans. The YOLOv8 series models offer five versions--n, s, m, l, and x--tailored for different application scenarios, with increasing model depth and detection accuracy. Among them, YOLOv8n features the smallest model size and the highest detection speed, effectively meeting the demands for real-time performance and lightweight architecture. Given the focus on model deployment efficiency in this study, YOLOv8n was selected as the base framework for optimization. To address the challenges of high model complexity and insufficient recognition accuracy in current clam detection technologies, this study proposes a lightweight optimization detection solution based on YOLOv8. The improved model introduces enhancements to the backbone, neck, and detection head of YOLOv8. The architecture of the improved model is shown in Figure 3.  
Firstly, since the current YOLO series models adopt a top-down structure in their backbone networks, this design tends to lose embedded information during the feature extraction process, which can lead to a decline in model performance. To address this issue, this paper proposes a reconstructed backbone network based on a Reversible Connected Multi-Column Network (RevColNet) [15]. RevColNet breaks through the traditional information transmission mode of feedforward networks by adopting a multi-input design, where each column starts with low-level information and extracts semantic information through compressed image channels. Reversible connections are used between columns to ensure lossless data transmission and to endow the network with reversibility. Supervision is added at the end of each column to constrain feature extraction. To prevent excessive complexity in the backbone network and avoid increasing model complexity and parameter count, the number of columns in RevCol is set to 2. Additionally, the operations within the Fusion Block are restructured. For high-level semantic information, downsampling is performed using convolution, batch normalization, and activation functions; for low-level semantic information, convolution and upsampling are applied. Furthermore, the ConvNeXt module in YOLOv8 is replaced with the C2f module. Secondly, although the C2f module used in YOLOv8 enhances the image feature extraction capability, the stacking of Bottleneck modules inevitably leads to redundant  
Figure 3: YOLOv8-RFD network model diagram. information channels and increased inference workload. To address these issues, the Faster Block module is integrated into C2f, thereby reducing the model's computational cost and floating-point operations (FLOPs). This structure adopts the Partial Convolution (PConv) mechanism, where convolution is applied only to a subset of channels while the remaining channels remain unchanged, effectively reducing redundant computations and memory access overhead. This approach significantly lowers computational complexity and FLOPs while maintaining--or even enhancing--the model's feature representation capability and detection performance, demonstrating superior inference efficiency and deployment advantages. Finally, to improve the model's adaptability to small objects and complex backgrounds, the DyHead structure is adopted to replace the original detection head in YOLOv8. DyHead dynamically fuses multi-scale features, enabling the network to adaptively handle objects of varying sizes. This significantly enhances detection performance for multi-scale targets such as clams and improves robustness to variations in object scale.