# Real-Time Lightweight Morphological Detection for Chinese Mitten Crab Origin Tracing
## 2 Materials and Methods
### Detection Model MC-RTLNet
#### 2.2.2 ODConv Module in the Backbone Network  
In order to enhance the ability of YOLOv10n to extract features from crab images under complex backgrounds, this paper introduces the Omni-dimensional Dynamic Convolution module. Convolution is a core operation in convolutional neural networks (CNNs), widely used for extracting local image features such as edges, textures, and shapes. It works by sliding a small matrix, the convolution kernel, over the input and performing element-wise multiplication and summation within local regions. Unlike traditional convolution with fixed weights, ODConv uses a multi-dimensional attention mechanism to achieve dynamic weighting along the spatial, input channel, output channel, and kernel levels, thereby adaptively adjusting the convolution operation.  
The input feature map \(x\in R^{\ \mathbb{C}\times H\times W}\) is first processed through Global Average Pooling (GAP) to produce a channel-wise descriptor of length \(C\). This descriptor is then passed through a Fully Connected (FC) layer and ReLU activation for dimension reduction. Subsequently, it is forwarded into four parallel attention branches to generate dynamic weights: \(\alpha_{\text{s}}\) for spatial, \(\alpha_{\text{c}}\) for input channels, \(\alpha_{\text{f}}\) for output channels, and \(\alpha_{\text{w}}\) for kernel-level attention. These weights are applied to the convolution kernels via element-wise multiplication to enable dynamic adjustment in multiple dimensions, thereby enhancing the expressive  
Figure 2: Schematic diagram of MC-RTLNet structure.  
ness and adaptability of the convolution operation. The structure of the ODConv module is shown in Figure 3.  
The convolution output of ODConv is given by  
\[Y=\sum_{i=1}^{n}\alpha_{\text{wi}}(\alpha_{\text{fi}}\cdot(\alpha_{\text{ci}} \cdot(\alpha_{\text{si}}\cdot W_{\text{i}})))*X \tag{1}\]  
where \(W_{\text{i}}\) is the i-th convolution kernel and \(*\) denotes the convolution operation. X and \(Y\) represent the input and output feature maps, respectively. \(\alpha_{\text{si}}\), \(\alpha_{\text{ci}}\), \(\alpha_{\text{fi}}\), and \(\alpha_{\text{wi}}\) are attention weights applied at the spatial, input channel, output channel, and kernel levels. The introduction of these four types of attention enables the model to adaptively adjust each convolution kernel, allowing it to capture target details more precisely while suppressing background interference.  
After incorporating the ODConv module, the network is not only able to adaptively adjust the convolution kernel parameters based on the global image features but also to balance the complementary information among the spatial, channel, and kernel dimensions during dynamic weighting. This substantially enhances the network's focus on target features. In crab images with complex backgrounds, ODConv effectively suppresses interference from cluttered background information, thereby enabling the model to extract the primary crab features (such as shell texture and morphology) with greater precision, while also improving robustness in recognizing local details (such as overlapping crab legs). Compared with traditional static convolution and conventional dynamic convolution, ODConv--even when employing a single-kernel design--achieves performance comparable to that of multi-kernel dynamic convolution, while significantly reducing the number of parameters and computational cost, thereby greatly enhancing overall computational efficiency.