Microscopic image small target detection method and system based on multi-directional gated convolution

The SMOGD-YOLO architecture, which employs multi-directional gated convolution, scale-sparse fusion, and adaptive feature fusion, addresses the issues of weak edges and orientation sensitivity in the detection of small targets in microscopic images, achieving high-precision, robust, and lightweight detection results.

CN121838141BActive Publication Date: 2026-06-16HANGZHOU DIANZI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2026-03-13
Publication Date
2026-06-16

Smart Images

  • Figure CN121838141B_ABST
    Figure CN121838141B_ABST
Patent Text Reader

Abstract

The application discloses a microscopic image small target detection method and system based on multi-directional gated convolution, which comprises the following steps: firstly, microscopic image data sets are acquired and preprocessed; secondly, the preprocessed microscopic images are input into a target detection model YOLOv8n for target detection, and target detection results are acquired; finally, the target detection model YOLOv8n is trained by using a single-stage detection end-to-end training paradigm, and the trained model is tested and evaluated.The application can reduce positioning jitter and improve the stability of detection of slender targets in the scene of slight defocus and anisotropic distortion, and can be stably applied to the detection and counting tasks of micro objects such as bacteria and blood cells.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and target detection, specifically relating to a method and system for detecting small targets in microscopic images based on multi-directional gated convolution. Background Technology

[0002] Automated detection of micron-scale targets (such as bacteria, cells, and particles) in microscopic images is a key technological requirement in biomedical imaging, pathological analysis, and industrial inspection. This type of scenario presents the following typical challenges: the target size is extremely small (typically only tens of pixels), the edges are weak and the contrast is low, making them susceptible to defocusing and anisotropic optical distortion; simultaneously, the targets are often densely distributed, exhibiting severe occlusion and adhesion phenomena.

[0003] Existing deep learning-based target detection methods (such as YOLO, Faster R-CNN, and their variants) have made significant progress in natural images, but they still face problems such as insufficient detection accuracy, poor robustness, and limited generalization ability in the aforementioned microscopic scenarios. To improve the performance of microscopic target detection, mainstream research focuses on the following three aspects: (1) using higher resolution input and multi-scale feature pyramids (such as Feature Pyramid Network FPN and Bi-directional Feature Pyramid Network BiFPN) to preserve details; (2) introducing attention mechanisms or context enhancement modules to strengthen feature discriminativeness; and (3) mitigating domain differences through data augmentation and adversarial training. However, these methods still have significant limitations: First, standard convolutional Conv operations are isotropic, making it difficult to effectively capture the orientation-sensitive edges of targets such as cells and bacteria, and easily leading to positioning errors under slight defocus or motion blur; second, the feature fusion mechanism is relatively crude, with multi-scale stitching or weighted fusion introducing a large amount of semantic redundancy and background noise, causing the discriminative features of small targets to be submerged; third, the lack of adaptive modeling of scale and spatial relationships makes them prone to false detections and false negatives in dense and complex backgrounds. Therefore, existing methods still have significant room for improvement in detection accuracy and stability when dealing with orientation blur, weak edges, and dense targets in microscopic images.

[0004] To address the aforementioned issues, this invention proposes an enhanced network architecture for detecting microscopic small targets. By designing a direction-aware multi-directional gated convolution module (Multi-Operation Grouped Deep Convolution MOGDConv), the model's ability to capture directional boundaries is enhanced. A scale-aware sparse fusion module (Scale-aware Sparse Fusion Module SAS) is introduced to achieve clean fusion of cross-scale features and noise suppression. Simultaneously, an adaptive spatial feature fusion mechanism (Adaptive Spatial Feature Fusion ASFF) is constructed to dynamically optimize multi-scale information at the pixel level. Based on this, the proposed solution utilizes a cascaded and collaborative design of "Direction-aware Convolution (MOGDConv) + Scale-aware Sparse Fusion (SAS) + Adaptive Feature Fusion (ASFF)" to construct a highly efficient and robust detection architecture specifically tailored for microscopic small targets, optimizing the entire process from feature extraction and fusion to decision-making. This solution aims to systematically improve the detection accuracy, robustness, and generalization ability of weak, dense, and directionally sensitive targets in microscopic images, providing an efficient and lightweight solution for practical applications in related fields. Summary of the Invention

[0005] The technical problem to be solved by this invention is the core defect of existing microscopic object (bacteria, blood cells, etc.) detection models in complex scenes. In view of the problems that small targets have weak edges, are sensitive to direction and are easily affected by blurring, this invention proposes a microscopic image small target detection method and system based on multi-directional gated convolution, which integrates direction awareness, scale sparsity calibration and adaptive multi-scale fusion to improve the detection accuracy and robustness in microscopic scenes.

[0006] Specifically, this includes: (1) Standard convolution and fixed fusion mechanisms are insensitive to directional boundaries. In anisotropic blurring and slightly defocused scenarios, the weak edges of slender targets are easily smoothed, leading to localization jitter and insufficient detection stability; (2) Blindly splicing cross-scale features results in semantic interference and redundancy, failing to highlight pixel-discriminative directional information. Fine details of small targets (occupying only a few dozen pixels) are easily submerged, resulting in low recall; (3) When adapting to extremely crowded and directionally degraded scenarios, the model is prone to erroneous aggregation or noise diffusion, and it is difficult to balance detection accuracy and computational efficiency under lightweight configuration. To this end, this invention proposes a SMOGD-YOLO architecture (scale-aware-multi-directional gating-depth convolution-YOLO architecture) for the detection of microbial targets with dynamic changes at the micron-scale of a microscope. Through the collaborative design of directional-aware convolution, scale-sparse recalibration, and adaptive feature fusion, the accuracy, robustness, and deployment adaptability of small target detection are significantly improved while keeping the computational load close to the baseline.

[0007] The technical solution adopted in this invention is based on the three-stage detection architecture of YOLOv8n: Backbone, Neck, and Head. The core improvements focus on neck feature enhancement and head expansion. The overall process emphasizes the progressive optimization of "direction awareness, scale calibration, and adaptive fusion": (1) After the Backbone outputs multi-scale features, the neck integrates three core modules to replace traditional components; (2) A new P2 probe is added to expand the minimum target coverage; (3) Each module does not require additional supervision signals and completes adaptive learning only through images and detection loss, ensuring lightweight deployment.

[0008] In one aspect, this invention provides a method for small target detection in microscopic images based on multi-directional gated convolution, comprising the following steps:

[0009] Step 1: Data preprocessing to obtain training / validation / test datasets. Based on the characteristics of microscope imaging data, standardize the category labeling of targets such as bacteria and blood cells; unify the input image size to 640×640 pixels and perform normalization processing; divide the dataset into training, validation, and test sets according to task requirements, and use Mosaic data augmentation to cover defocused and occluded scenes.

[0010] Step 2: Multi-scale feature extraction. Several images are randomly selected from the training set as a batch input model. Through the basic path of YOLOv8n Backbone (including Conv, C2f (feature fusion module in YOLOv8), SPPF (spatial pyramid pooling fast module), etc.), the image features are extracted layer by layer and semantic enhancement is completed. Based on the original P3, P4, and P5 scale features, a new P2 scale feature branch is added through shallow feature downsampling suppression and channel adjustment of the backbone network. Finally, four-scale feature maps of P2, P3, P4, and P5 are output. At the same time, the spatial size and stride of each scale are recorded to provide a basis for subsequent cross-scale fusion alignment.

[0011] Step 3: MOGDConv Direction Awareness Enhancement. In the feature transfer paths of each scale of P3, P4, and P5, multi-directional gated depth convolution (MOGDConv) is used to replace the standard depth convolution (DWConv). The core is to focus on the dominant direction of the target through a dynamic gating mechanism to obtain the enhanced features of the dominant direction corresponding to each scale of P3, P4, and P5: (1) Weight generation branch: First, 1×1 convolution is performed on the input features to perform channel transformation, and then global average pooling is used to capture global direction preference. Two sets of lightweight nonlinear mappings are used to generate gated guidance quantities. The two gated guidance quantities are fused together along the channel dimension and then the features are obtained through a linear layer. ,feature The result of the channel transformation is then multiplied element-wise with the previous 1×1 convolution, and finally the feature is obtained by passing the sigmoid function. ;feature After passing through a linear layer and dividing by the temperature coefficient, from (2) Directional feature branches: Construct several direction-sensitive deep convolution branches to extract features in different directions respectively; (3) Feature reweighting and aggregation: Use the directional weight vector to weight and scale the features in different directions, and then compress the channels through 1×1 convolution to obtain the enhanced features of the dominant focus direction corresponding to each scale of P3, P4, and P5, effectively avoiding the edge smoothing problem caused by anisotropic blurring.

[0012] Step 4: SAS scale-aware sparsity calibration. The results of upsampling the features of each scale obtained by the backbone network and the enhanced features corresponding to the next scale are concatenated and then input into the scale-aware sparsity SAS module to suppress cross-scale redundancy and output fused features; the last scale P5 does not have a next scale, so no concatenation operation is performed and it is directly input into the scale-aware sparsity SAS module: (1) First, 1×1 convolution is performed on the concatenated fused features to reduce the dimensionality and inject position encoding to enrich the scale and spatial information; (2) After injecting position encoding, complementary features are extracted through three lightweight branches: the local detail branch uses 3×3 depth convolution to capture the edge texture of the target, the strip context branch aggregates statistical features along the height and width dimensions to adapt to the slender target, and the global token attention branch captures the remote context through grid pooling and attention mechanism to reduce background interference; (3) The features output by the three branches are weighted and fused, and after restoring the number of channels through 1×1 convolution, the features after restoring the number of channels through 1×1 convolution and the features after convolution are connected element-wise to output fused features.

[0013] Step 5: ASFF Adaptive Cross-Scale Fusion. Deploy the Adaptive Spatial Feature Fusion (ASFF) module in front of the detector head. The fused features after SAS calibration are concatenated with the results of upsampling the enhanced features corresponding to the next scale through the C2f module. The weights of the features at each scale are adaptively assigned to avoid small target details being buried: (1) Divide the fused features after SAS calibration into three equal-width sub-tensors along the channel, corresponding to the features at the three scales of P3, P4, and P5 respectively; (2) Divide into three equal-width sub-tensors and generate the scale selection logic for each pixel through grouped 1×1 convolution. Then, calculate the normalized mixed weight of each pixel at the three scales (i.e., the contribution ratio of each scale feature to the pixel) through softmax; (3) Combine and fuse the features of the three scales by pixel-by-pixel weighted combination. After refining the edges through 3×3 convolution, the original channel width can be restored through 1×1 convolution to achieve accurate alignment of cross-scale features and obtain aligned features.

[0014] Step 6: Feature Fusion and Steady-State Transfer. The features processed by "MOGDConv+SAS+ASFF" at each scale are finally output as a feature set {P2, P3, P4, P5}, providing high-purity input for the detection head.

[0015] Step 7: Decouple the detection head prediction. The feature sets {P2, P3, P4, P5} are fed into the decoupled detection head respectively: (1) The classification branch and the regression branch are modeled independently, focusing on the optimization of their respective tasks; (2) The output structure of the last convolutional layer is maintained, and the detection bias and decoding process of YOLOv8n are compatible; (3) The output results of the classification branch and the regression branch at each scale are summarized, and the unified decoding and merging of the bounding box and the category are completed through non-maximum suppression (NMS) to obtain the target detection result.

[0016] Step 8: Training and Optimization. The YOLOv8n object detection model is trained using a single-stage, end-to-end training paradigm. Inference is then performed on the test set. Training ends and the model is solidified when the evaluation metrics no longer improve or the convergence condition is met.

[0017] In another aspect, the present invention also provides a microscopic image small target detection system based on multi-directional gated convolution, comprising the following modules:

[0018] The data preprocessing module is used to acquire and preprocess the microscopic image dataset.

[0019] The target detection module is used to input the preprocessed microscopic image into the target detection model YOLOv8n, perform target detection, and obtain the target detection results.

[0020] The training and testing module adopts an end-to-end training paradigm of single-stage detection to train the object detection model YOLOv8n, and then performs testing and evaluation after training.

[0021] The target detection module includes the following units:

[0022] The multi-scale feature extraction unit is used to extract image features and enhance semantics layer by layer from the preprocessed microscopic image via the backbone network, outputting four-scale feature maps (P2, P3, P4, and P5).

[0023] The MOGDConv orientation-aware enhancement unit replaces the standard DWConv deep convolution with multi-directional gated depthwise convolution in the feature propagation paths at scales P3, P4, and P5. Through a dynamic gating mechanism, it focuses on the dominant orientation of the target, obtaining enhanced features corresponding to the focused dominant orientation for features at each scale (P3, P4, and P5).

[0024] The SAS scale-aware sparse calibration unit concatenates the features obtained from the backbone network at each scale with the upsampled enhanced features corresponding to the next scale, and then inputs them into the scale-aware sparse SAS module to suppress cross-scale redundancy and output fused features.

[0025] The ASFF adaptive cross-scale fusion unit is used to concatenate the fused features calibrated by SAS with the results of upsampling the enhanced features corresponding to the next scale through the C2f module, and input them into the adaptive spatial feature fusion ASFF module to adaptively allocate the weights of the features at each scale pixel by pixel to obtain aligned features.

[0026] The detection output unit is used to process the features at each scale after processing by MOGDConv, SAS, and ASFF, and finally output the feature sets {P2, P3, P4, P5}, which are then fed into the decoupled detection head. The head independently models the features through classification and regression branches, focusing on optimizing their respective tasks. The output structure of the last convolutional layer is maintained, and it is compatible with the detection bias and decoding process of YOLOv8n. The output results of the classification and regression branches at each scale are summarized, and the bounding boxes and categories are unified and merged through non-maximum suppression to obtain the target detection results.

[0027] The beneficial effects of this invention are mainly as follows: (1) Significantly improved orientation perception capability. MOGDConv effectively captures the weak edges and dominant orientation of small targets through dynamic orientation gating mechanism, reduces positioning jitter in mild defocus and anisotropic distortion scenarios, and improves the stability of slender target detection; (2) Optimized cross-scale fusion accuracy. SAS and ASFF work together to suppress semantic interference and redundancy from the perspectives of channel sparsity calibration and pixel-level adaptive weighting, respectively, highlighting the fine details of small targets and solving the problem of insufficient recall in extremely crowded scenarios; (3) Balance between lightweight and deployability. All core modules are lightweight plug-and-play designs, keeping the tensor shape and computation budget close to the baseline. At the same time, the addition of the P2 probe does not significantly increase the overhead, adapting to the edge deployment requirements of the microfluidic microscope platform; (4) Strong scene adaptability. Through data augmentation and module robustness design, it has good fitting ability for low contrast, defocus degradation and background clutter in microscope imaging, and can be stably applied to the detection and counting tasks of small objects such as bacteria and blood cells. Attached Figure Description

[0028] Figure 1 This is a detailed structural diagram of the present invention;

[0029] Figure 2 This is a detailed structural diagram of MOGDConv;

[0030] Figure 3 This is a schematic diagram of the SAS module. Detailed Implementation

[0031] The present invention will be further described below with reference to the accompanying drawings and specific implementation steps:

[0032] In one aspect, this invention provides a method for small target detection in microscopic images based on multi-directional gated convolution, comprising the following steps:

[0033] Step 1: Data Preprocessing and Segmentation. Set the input resolution and category mapping according to the requirements of the microscopic small object detection task, and complete the annotation standardization; clean and segment the raw data to form training, validation, and test sets.

[0034] Step 2: Multi-scale feature extraction. Sixteen images are randomly selected from the training set as a batch input model. After passing through the backbone network, the image features are extracted layer by layer and semantic enhancement is performed. Based on the original P3, P4, and P5 scale features, a new P2 scale feature branch is added through shallow feature downsampling suppression and channel adjustment in the backbone network. Finally, four-scale feature maps of P2, P3, P4, and P5 are output. At the same time, the spatial size and stride of each scale are recorded to provide a basis for subsequent cross-scale fusion and alignment.

[0035] like Figure 1 The overall structure of the algorithm of this invention is shown in the figure. The model consists of three main parts: Backbone, Neck, and Head. The Backbone Network is the feature extraction unit, which is composed of Conv, C2f, and SPPF modules connected in sequence. After initial downsampling, feature reuse, and aggregation of multi-receptive field information, it outputs four sets of scale feature maps P2, P3, P4, and P5 from different levels. These feature maps are respectively connected to the Neck module within the dashed box in the figure. In the Neck, the features of each scale are first concatenated with the features of the previous level that have been enhanced in the MOGDConv direction and upsampled. The concatenated features are then processed by the SAS module to suppress cross-scale redundancy, the C2f module to enhance feature expression, and then concatenated again. Finally, the ASFF module completes pixel-wise adaptive fusion. The features of each scale processed by the Neck module are finally input into the Head module on the right side of the figure, which outputs the detection results of small targets at different scales, realizing full coverage recognition of multi-scale targets in micro scenes.

[0036] Step 3: MOGDConv Direction Awareness Enhancement. In the feature transfer paths of each scale (P3, P4, P5), multi-directional gated depth convolution (MOGDConv) is used to replace the standard depth convolution. The core is to focus on the dominant direction of the target through dynamic gating mechanism to obtain the enhanced features of the dominant direction corresponding to each scale (P3, P4, P5): (1) Weight generation branch: First, 1×1 convolution is performed on the input features to perform channel transformation, and then global average pooling is used to capture global direction preference. Two sets of lightweight nonlinear mapping are used to generate gated guidance quantities. The two gated guidance quantities are fused together along the channel dimension and then the features are obtained through a linear layer. ,feature The result of the channel transformation is then multiplied element-wise with the previous 1×1 convolution, and finally the feature is obtained by passing the sigmoid function. ;feature After passing through a linear layer and dividing by the temperature coefficient, from (2) Directional feature branches: Construct four direction-sensitive deep convolution branches covering 0°, 45°, 90°, and 135° to extract features in different directions; (3) Feature reweighting and aggregation: Use the directional weight vector to weight and scale the features in different directions, and then compress the channels through 1×1 convolution to obtain enhanced features that focus on the dominant direction, effectively avoiding the edge smoothing problem caused by anisotropic blurring. Core formula for direction-aware enhancement:

[0037]

[0038]

[0039]

[0040]

[0041]

[0042]

[0043] in, For input feature map ( For the number of channels, , (where is the feature map space size); Conv1×1 implements channel compression, used for channel linear transformation and redundancy compression. The nonlinear mapping weight matrix, For bias terms, It is the ReLU activation function. Two sets of gate control guides are used to capture the interaction between complementary channels. Indicates serial connection along the channel dimension. To fuse the weight matrix, To merge the bias term, It is a slightly nonlinear activation function. This represents the intermediate activation value after fusion. For the sigmoid function, For element-wise multiplication, This is the final generated channel gate, used to suppress invalid channel responses. The projection weight matrix is... For bias terms, For the number of directional branches, =4 corresponds to the four dominant directions: 0°, 45°, 90°, and 135°. This is the temperature coefficient, with a value of 0.1. For normalization function, This is a sample-level directional weight vector, ensuring that the sum of the weights in each direction is 1. Direction angle Orientation-sensitive depthwise convolution, This is the feature map of the k-th directional branch. This is a grouping and splicing operation. This is the feature map after reweighting the direction weight vectors. The output feature map of the MOGDConv module, compared with the input... Consistent dimensions enable directional enhancement and feature compatibility.

[0044] like Figure 2 The diagram shown illustrates the structure of the MOGDConv module of this invention. This module comprises three core parts: a directional feature extraction branch, a gating selection branch, and a reweighted aggregation unit. These three parts work together to enhance the extraction of directionally sensitive features. Input features Figure 1 On one hand, the input feature map is fed into the directional feature extraction branch, where K deep convolutional branches in different directions extract fine-grained edge features in the corresponding directions. The outputs of all branches are concatenated to form a multi-directional feature set. On the other hand, the input feature map is simultaneously fed into the gating selection branch, where it undergoes global average pooling, 1×1 convolution, and gating selection operations in sequence to generate directional weight vectors that can represent the importance of different directions. Finally, the multi-directional feature set and the directional weight vectors are fed into the reweighted aggregation unit. After adaptive weighted fusion, the information is integrated by 1×1 convolution to output directional enhancement features with the same dimension as the input.

[0045] Step 4: SAS scale-aware sparsity calibration. The results of upsampling the features of each scale obtained by the backbone network and the enhanced features corresponding to the next scale are concatenated and then input into the scale-aware sparsity SAS module to suppress cross-scale redundancy and output fused features; the last scale P5 does not have a next scale, so no concatenation operation is performed and it is directly input into the scale-aware sparsity SAS module: (1) First, 1×1 convolution is performed on the concatenated fused features to reduce the dimensionality and inject position encoding to enrich scale and spatial information; (2) After injecting position encoding, complementary features are extracted through three lightweight branches: the local detail branch uses 3×3 depth convolution to capture the edge texture of the target, the strip context branch aggregates statistical features along the height and width dimensions to adapt to slender targets, and the global token attention branch captures remote context through grid pooling and attention mechanism to reduce background interference; (3) The features output by the global token attention branch are restored to the number of channels by 1×1 convolution and then convolutional. The features restored to the number of channels by 1×1 convolution and the features after convolution are connected element-wise to output fused features.

[0046] The core fusion formula is as follows:

[0047]

[0048]

[0049]

[0050]

[0051]

[0052]

[0053] in, This is the feature map stitched together from various scales. This is a 1×1 convolution dimensionality reduction operation that compresses the number of channels to a mid-level width. This is a two-dimensional coordinate encoding based on the feature map size, used to enhance location awareness. This is an intermediate feature map after dimensionality reduction and injection of positional encoding. It is a 3×3 depthwise convolution. To extract local detail features, we focus on the edges and texture information of tiny targets. for Grid pooling operation (in this embodiment) =4), This generates a global token for low-cost capture of remote context. , , For learnable projection matrices, For the flattening operation of spatial features, For reshaping operation, These are the query, key, and value vectors, respectively. Scaling factor ( for (dimensions) For attention normalization function, For projection operation, Features after modeling global dependencies. The generated bar context features are aggregated along the height / width. , , The three branches are learnable non-negative weight coefficients (all initially set to 1.0). This is the feature map after weighted fusion. for The convolutional projection operation maps the fused features back to the original number of channels. The feature map output by the SAS module is designed with residual connections to ensure stable gradient propagation.

[0054] like Figure 3 The diagram shows the structure of the SAS module of this invention. The input feature map is first processed by 1×1proj (projective convolution) to achieve channel dimensionality reduction and preliminary information compression. Then, the features are split into three parallel branches: the local detail branch captures the fine-grained edge texture of the target, the strip context branch aggregates axial structural information, and the global context branch associates scene-level remote dependencies. The outputs of the three branches are added element-wise to achieve complementary fusion of multi-dimensional features. The fused features are then processed by 1×1proj to restore the channel dimension, and then fed into the residual block for feature refinement. The residual block is composed of 3×3 convolutions with ReLU activation. Finally, the original features and refined features are integrated through residual connections to output calibrated high-purity features.

[0055] Step 5: ASFF Adaptive Cross-Scale Fusion. Deploy the Adaptive Spatial Feature Fusion (ASFF) module in front of the detector head. The fused features after SAS calibration are concatenated with the results of upsampling the enhanced features corresponding to the next scale through the C2f module. The weights of the features at each scale are adaptively assigned to avoid the small target details being buried: (1) Divide the fused features after SAS calibration into three equal-width sub-tensors along the channel, corresponding to the features at the three scales of P3, P4, and P5 respectively; (2) Generate the scale selection logic for each pixel through grouped 1×1 convolution, and then calculate the normalized mixed weight of each pixel at the three scales (i.e., the contribution ratio of each scale feature to the pixel) through softmax; (3) Combine and fuse the features of the three scales by pixel-by-pixel weighted combination. After refining the edges through 3×3 convolution, the original channel width can be restored through 1×1 convolution to achieve accurate alignment of cross-scale features and reduce the interference of redundant information on the detection of small targets. The core calculation formula is as follows:

[0056]

[0057]

[0058]

[0059]

[0060]

[0061] in, The feature map output by the SAS module. Divided equally along the channel dimension Subtensor (in this embodiment) =3 is the number of blocks), The number of channels for each subtensor. For grouped 1×1 convolution operations (number of groups and...) Consistent) The generated location logic graph is used to characterize the degree to which each pixel requires features at different scales. For feature map spatial coordinates, For the first The branches are in position The logical response value, It is an exponential function. For the first The normalized mixed weights of each branch at this position satisfy the following condition: . For element-wise multiplication, The feature map is fused pixel by pixel, and effective scale features are highlighted through dynamic weight allocation. This is a 1×1 convolution operation that maps the fused features back to the original number of channels. , The ASFF module outputs feature maps, and a new P2-scale dedicated probe is added to expand the coverage of the smallest scale targets.

[0062] Step 6: Feature Fusion and Steady-State Transfer. Steady-state fusion achieves complementary integration of cross-scale information, providing high-purity input features for the detection head: features processed by "MOGDConv+SAS+ASFF" at each scale are finally output as a feature set {P2, P3, P4, P5}. This set maintains the spatial structure and semantic hierarchy of features at each scale, providing a highly discriminative feature carrier for subsequent target recognition and localization of the decoupled detection head.

[0063] Step 7: Decouple the detection head prediction. The feature sets {P2, P3, P4, P5} are fed into the decoupled detection head respectively: (1) The classification branch and the regression branch are modeled independently, and lightweight channels and spatial attention micro-units are inserted before the branches; (2) The last layer is kept as a convolution output to be compatible with bias initialization and decoding; (3) The output results of the classification branch and the regression branch at each scale are summarized, and the unified decoding and merging of the bounding box and the category are completed by non-maximum suppression to obtain the target detection result.

[0064] Step 8: Training and optimization. The YOLOv8n target detection model is trained using an end-to-end training paradigm of single-stage detection: (1) The optimizer is SGD (Stochastic Gradient Descent), with an initial learning rate of 0.01, 100 epochs (iteration cycles) of training, and a batch size of 16; (2) The loss function includes classification loss, localization loss (IoU series, Intersection over Union) and target loss, focusing on small box sorting optimization; (3) Mosaic data augmentation technology is combined to simulate real scenarios such as defocus and congestion to improve the robustness of the model; During the training process, each module learns parameters adaptively through backpropagation without the need for additional supervision signals.

[0065] Step 9: Inference and Evaluation. Inference is performed on the test set, using confidence thresholding and NMS post-processing. Key statistical metrics include mAP@50 (mean precision @ intersection-union threshold of 50), mAP@50:95 (mean precision @ intersection-union threshold of 50 to 95), recall, and localization accuracy. Parameter count and inference latency are also recorded, and the model is compared with baseline models such as YOLOv8n. When the evaluation metrics no longer improve or convergence conditions are met, training ends and the model is solidified.

[0066] This invention constructs a complete detection chain of "direction awareness - scale calibration - adaptive fusion - full-scale coverage" through the synergistic effect of three core modules: MOGDConv, SAS, and ASFF, and the P2 probe. MOGDConv solves the problem of insensitivity to direction in traditional convolution, SAS suppresses cross-scale redundant interference, ASFF achieves pixel-level accurate fusion, and the P2 probe makes up for the shortcoming of coverage of extremely small targets. At the same time, all modules adopt a lightweight design, requiring no additional supervision signals. Without significantly increasing computational and memory overhead, it specifically solves the core pain points in the detection of small targets, such as localization jitter, insufficient recall, and poor scene adaptability.

[0067] In another aspect, the present invention also provides a microscopic image small target detection system based on multi-directional gated convolution, comprising the following modules:

[0068] The data preprocessing module is used to acquire and preprocess the microscopic image dataset.

[0069] The target detection module is used to input the preprocessed microscopic image into the target detection model YOLOv8n, perform target detection, and obtain the target detection results.

[0070] The training and testing module adopts an end-to-end training paradigm of single-stage detection to train the object detection model YOLOv8n, and then performs testing and evaluation after training.

[0071] The target detection module includes the following units:

[0072] The multi-scale feature extraction unit is used to extract image features and enhance semantics layer by layer from the preprocessed microscopic image via the backbone network, outputting four-scale feature maps (P2, P3, P4, and P5).

[0073] The MOGDConv orientation-aware enhancement unit replaces the standard DWConv deep convolution with multi-directional gated depthwise convolution in the feature propagation paths at scales P3, P4, and P5. Through a dynamic gating mechanism, it focuses on the dominant orientation of the target, obtaining enhanced features corresponding to the focused dominant orientation for features at each scale (P3, P4, and P5).

[0074] The SAS scale-aware sparse calibration unit concatenates the features obtained from the backbone network at each scale with the upsampled enhanced features corresponding to the next scale, and then inputs them into the scale-aware sparse SAS module to suppress cross-scale redundancy and output fused features.

[0075] The ASFF adaptive cross-scale fusion unit is used to concatenate the fused features calibrated by SAS with the results of upsampling the enhanced features corresponding to the next scale through the C2f module, and input them into the adaptive spatial feature fusion ASFF module to adaptively allocate the weights of the features at each scale pixel by pixel to obtain aligned features.

[0076] The detection output unit is used to process the features at each scale after processing by MOGDConv, SAS, and ASFF, and finally output the feature sets {P2, P3, P4, P5}, which are then fed into the decoupled detection head. The head independently models the features through classification and regression branches, focusing on optimizing their respective tasks. The output structure of the last convolutional layer is maintained, and it is compatible with the detection bias and decoding process of YOLOv8n. The output results of the classification and regression branches at each scale are summarized, and the bounding boxes and categories are unified and merged through non-maximum suppression to obtain the target detection results.

[0077] Table 1 shows a comparison of the detection performance of nine methods on the *E. coli* dataset under the same training configuration. Evaluation metrics include precision, recall, mAP@50, mAP@50-95, and model parameter count. The best result achieved by SMOGD-YOLO in this invention is highlighted in bold black. Experimental results show that on the *E. coli* dataset, SMOGD-YOLO achieves a precision of 0.748, an mAP@50 of 0.789, and an inference speed of 49.60 FPS. Compared to YOLOv8n, mAP is slightly improved; compared to RCS-YOLO, mAP is improved by 0.233, while also exhibiting better real-time performance, meeting the needs of practical applications. Table 2 presents the detection results of the nine methods on the blood cell counting and detection dataset under the same settings, with the same evaluation metrics as above. The SMOGD-YOLO of this invention also performs excellently on this dataset, achieving 4.50M parameters, 40.1 GFLOPs of computation, an accuracy of 0.831, an inference speed of 0.895 mAP@50, and 41.84 FPS. Compared with YOLOv8n, it significantly improves detection accuracy with a similar number of parameters; compared with Faster R-CNN, it has only about 1 / 9 the number of parameters but higher detection accuracy; compared with RCS-YOLO, it improves mAP by 0.035 with fewer parameters, demonstrating a better balance between accuracy and efficiency. In summary, the SMOGD-YOLO of this invention achieves a combination of lightweight, high accuracy, and high real-time performance on two different types of small target detection datasets, and has strong adaptability to practical applications.

[0078] Table 3 presents the ablation experiment results based on the *E. coli* microscopic image dataset. This experiment systematically compared the performance of the proposed SMOGD-YOLO with eight baseline methods of different module configurations on key performance indicators. Each method was comprehensively evaluated in terms of module configuration (whether MOGD, SAS, and ASFF are included), number of parameters, precision, recall, mAP50, and mAP50–95. The experiments show that SMOGD-YOLO, which fully integrates the three core modules MOGD, SAS, and ASFF, achieved the best overall performance: in terms of detection accuracy, its precision reached 0.748, recall reached 0.762, mAP50 reached 0.789, and mAP50–95 reached 0.368, all significantly better than the comparison models with other module combinations or single-module enhancements, demonstrating the effectiveness of the "direction-awareness-scale sparsity calibration-adaptive fusion" synergistic mechanism.

[0079] Step 9: Inference and Evaluation. Inference is performed on the test set, using confidence thresholding and NMS / improved NMS post-processing; Precision / Recall and AP / mAP are statistically analyzed.

[0080]

[0081]

[0082]

[0083]

[0084] in, This represents the number of true positive samples. This represents the number of false positive samples. This represents the number of false negative samples. This is a function of the precision and recall curve. The average accuracy for a single type of target. For the number of target categories, For all categories The average value of, where 50 corresponds to an IoU threshold of 0.5. The IoU threshold for the range 50-95 is 0.5-0.95 (step size 0.05). Simultaneously, the model parameter count, inference latency (inference time per 640×640 image), and GPU memory usage are statistically analyzed and compared with baseline models such as YOLOv8n and YOLOv8-s. When the validation set mAP50-95 shows no improvement for 10 consecutive epochs and the loss function stabilizes (fluctuation <0.001), the model is considered converged, training is stopped, and the model parameters are fixed, generating a deployable SMOGD-YOLO inference model.

[0085] To verify the multi-scale adaptation performance of the SMOGD-YOLO invention in microscopic small target detection scenarios, Table 3 shows the blood cell count dataset, divided into three groups according to target pixel size: extremely small targets (5-15 pixels), core small targets (15-32 pixels), and medium-sized targets (32-50 pixels). Under the same training configuration, the average precision (AP) of the proposed invention was compared with that of the existing mainstream lightweight models YOLOv5n, YOLOv8n, YOLOv10n, and YOLO11n. The results are as follows: In the extremely small target group, the AP of the proposed invention is 0.1498, which is slightly lower than that of YOLOv8n (0.1725) and YOLOv10n (0.1655), but significantly better than that of YOLOv5n (0.1167) and YOLO11n (0.1357), demonstrating the effective coverage capability of the P2 probe for extremely small targets; In the core small target group (corresponding to mainstream detection objects such as mature E. coli and platelets), the proposed invention... The AP reached 0.5964, basically on par with YOLO11n (0.5966), ranking first. It improved by 0.0217 compared to the baseline model YOLOv8n (0.5747) and by 0.0917 compared to YOLOv10n (0.5047), validating the effect of the direction-aware enhancement of multi-directional gated deep convolution (MOGDConv) and the pixel-wise fusion mechanism of adaptive spatial feature fusion (ASFF) on improving the discriminative power of small target features; (The last sentence appears to be incomplete and possibly refers to a different model.) In the target group (corresponding to leukocytes, adhering bacterial clusters, etc.), the AP of this invention is 0.4287, which is better than YOLOv8n (0.3587) and YOLOv10n (0.2850), and only 0.0105 different from YOLO11n (0.4392). This proves that while optimizing the detection performance of small targets, this invention achieves balanced detection across all scales without sacrificing the detection accuracy of medium and large targets through the redundancy suppression design of the Scale-Aware Sparse Fusion Module (SAS). The above experimental data show that this invention, through the collaborative design of MOGDConv, SAS, ASFF and P2 probe, accurately matches the target size distribution characteristics of the microscopic detection scenario, has significant performance advantages in core application scenarios, and at the same time takes into account the robustness of detection across all scales, solving the technical problem of "uneven scale adaptation" in the detection of microscopic small targets by existing lightweight models.

[0086] This application proposes a collaborative mechanism of "MOGDConv orientation-aware enhancement + SAS scale-sparse calibration + ASFF adaptive cross-scale fusion + P2 probe extension", which is specifically adapted to the detection scenarios of small targets such as bacteria and blood cells under a microscope. It solves the core problems of isotropic convolution being insensitive to directional boundaries, cross-scale fusion having redundant interference, and insufficient coverage of extremely small targets in existing technologies, and achieves active adaptation of feature extraction and detection tasks rather than passive superposition. In this mechanism, the MOGDConv module adaptively focuses on the dominant direction of the target through multi-directional feature extraction and sample-level dynamic gating, replacing the traditional standard convolution. This effectively preserves weak edge features in slightly defocused and anisotropic distortion scenarios, reducing localization jitter. The SAS module, after feature concatenation, selectively highlights task-related channels through sparse recalibration using three branches: local details, bar context, and global token attention. This suppresses cross-scale semantic redundancy and background interference, decoupling spatial and channel decisions to improve feature purity. The ASFF module generates pixel-wise scale selection logic through grouped 1×1 convolutions, achieving adaptive weighted fusion of cross-scale features, aligning different levels of statistical distribution, reducing cross-interference while maintaining lightweight design. The P2 probe supplements the detection coverage for extremely small targets occupying only tens of pixels, forming a full-scale detection chain with the original P3 / P4 / P5 probes, solving the problem of insufficient recall for extremely small targets in traditional architectures. These components require no additional supervision signals, completing adaptive learning solely through images and detection loss. Without significantly increasing the number of parameters or computational overhead, they significantly improve the detection of small targets. It improves recall rate, especially enhancing detection stability in extremely crowded and slightly defocused scenarios, while maintaining edge deployment capabilities compatible with microfluidic microscopy platforms.

[0087] Figure 1 The diagram clearly illustrates the architecture of the SMOGD-YOLO model, including the feature extraction backbone, the feature enhancement neck, and the decoupled detection head. The diagram explicitly shows the generation paths of the four-scale feature maps (P2, P3, P4, and P5), as well as the connection order and data flow of the MOGDConv, SAS, C2f, upsampling, concat, and ASFF modules within the neck, demonstrating a progressive optimization mechanism of "direction awareness - scale calibration - adaptive fusion."

[0088] Figure 2The internal structure of the MOGDConv module is described in detail, mainly including a directional feature extraction branch, a gated weight generation branch, and a feature reweighting and aggregation unit. The directional feature extraction branch contains K deep convolutional branches in different directions; the gated weight generation branch generates channel attention weights through global average pooling, fully connected layers, and gate functions; finally, the output is a direction-enhanced feature map through weighted fusion and 1×1 convolution to improve the model's ability to perceive the dominant direction of the target.

[0089] Figure 3 The design details of the SAS module are explained. Input features are first reduced in dimensionality using 1×1 projective convolutions, then fed in parallel into three branches: a local detail branch (3×3 depthwise convolution), a bar context branch (statistical aggregation of height / width dimensions), and a global token attention branch (grid pooling and attention mechanism). The outputs of these three branches are then weighted and fused using learnable weights, and finally restored to channel count through 1×1 convolutions and residual connections, achieving sparse calibration and redundancy suppression of cross-scale features.

[0090] Table 1. Performance comparison results of the present invention and the comparative method on the E. coli dataset.

[0091]

[0092] Table 1 shows the comparison results of the proposed method (SMOGD-YOLO) with eight existing target detection methods in terms of precision, recall, mAP@50, mAP@50:95, and number of parameters on the E. coli dataset. The models compared include: YOLOv5n, a single-stage, extremely lightweight detection model with advantages such as small parameter count, fast inference speed, and low deployment threshold, and is a classic lightweight benchmark model in the YOLO series; YOLOv8n, an upgraded version of YOLOv5n, is also a single-stage lightweight detector. By optimizing the backbone network and detector head structure, it improves detection accuracy while maintaining lightweight design and supports multi-task inference; YOLOv10n is a single-stage, extremely lightweight detector that further reduces computational power consumption and improves inference efficiency by simplifying redundant computational branches, with slightly better detection accuracy than YOLOv8n; YOLO11n is an iterative lightweight detector based on YOLOv8. By upgrading the feature fusion module, it significantly enhances the detection capability for small targets while reducing GPU memory usage during training; Faster... R-CNN, a classic two-stage object detection model, uses a region proposal network to generate candidate boxes before classification and regression. It boasts high detection accuracy and is often used as a benchmark model for high-precision detection. RetinaNet, a classic single-stage detection model, introduces a focus loss function to alleviate the imbalance between easy and difficult samples. Its detection accuracy surpasses that of earlier lightweight YOLO models, making it suitable for detection tasks in complex scenes. RTDETR-L is a large-size, anchor-free, single-stage real-time detector that does not rely on anchor box design and parameter tuning. Its detection accuracy is close to that of two-stage models, while significantly improving inference speed and supporting dynamic adjustment of the operating mode based on computing power. RCS-YOLO, or RCS-enhanced YOLO, is a single-stage detector improved on the YOLO architecture. It adds an RCS context modeling module, effectively improving detection robustness in complex environments such as occlusion and backlighting, balancing computational efficiency and detection performance.

[0093] The figure highlights the best results of the method of the present invention on various datasets, demonstrating its effectiveness and superiority in significantly improving detection accuracy and robustness while maintaining lightweight design.

[0094] Table 2. Performance comparison results of the present invention and the comparative method on blood cell counting and detection datasets.

[0095]

[0096] Table 2 compares the precision, recall, mAP@50, mAP@50:95, and parameter count of the proposed method (SMOGD-YOLO) with eight existing methods on a blood cell dataset. The figure highlights the best results of the proposed method on each dataset, demonstrating its effectiveness and superiority in significantly improving detection accuracy and robustness while maintaining a lightweight design.

[0097] Table 3. Ablation experimental results based on E. coli microscopic image dataset.

[0098]

[0099] Table 3 shows the ablation experiment results based on the E. coli microscopic image dataset. This study systematically compared the proposed SMOGD-YOLO method with baseline models of seven different module configurations, covering multi-dimensional performance indicators such as module composition (MOGD, SAS, ASFF), number of parameters, precision, recall, mAP@50 (mean precision with an intersection-over-union (IoU) threshold of 0.5), and mAP@50:95 (mean precision with IoU thresholds ranging from 0.5 to 0.95). The baseline models compared include: YOLOvBn, a basic variant of YOLO with an integrated batch normalization (BN) layer, which effectively stabilizes the training process and alleviates internal covariate bias through feature map normalization, thereby improving detection accuracy and convergence efficiency. It is a typical reference model for BN layer applications in the YOLO series; YOLO-M, a medium-sized basic model in the YOLO series, which achieves a good balance between parameter count and computational efficiency, with detection accuracy superior to the small (S) version and inference speed faster than the large (L) version. It is often used as a benchmark model for general object detection tasks; YOLO-S, a small and lightweight model in the YOLO series, characterized by fewer parameters, faster inference speed, and lower deployment threshold. It is suitable for mobile and edge devices, achieving efficient computing power adaptation while ensuring basic detection capabilities; and YOLO-A, a single-stage YOLO detector with an anchor-box-less design, which abandons the traditional anchor-box mechanism and directly regresses the target coordinates. The YOLO-MS, a multi-scale enhanced YOLO variant, simplifies the detection process, avoids the tediousness of anchor-frame hyperparameter tuning, and significantly enhances detection robustness in complex scenarios. It introduces an innovative MS-Block structure and global query learning mechanism, and optimizes the heterogeneous convolution kernel size selection strategy, significantly improving the detection capability for multi-scale targets while balancing detection accuracy and inference speed. The YOLO-MA, a medium-sized anchor-frame-less YOLO detector, combines the general performance advantages of YOLO-M with the anchor-frame-less design features of YOLO-A. Suitable for medium-powered computing devices, it excels in tasks requiring both accuracy and real-time performance, such as industrial quality inspection. The YOLO-SA, a small anchor-frame-less YOLO detector, combines the lightweight characteristics of YOLO-S with the simplified process advantages of YOLO-A, possessing extremely high inference speed and flexible deployment capabilities, making it particularly suitable for real-time detection applications on mobile and embedded platforms.

[0100] The results show that SMOGD-YOLO (the present invention), which fully integrates MOGD, SAS, and ASFF modules, achieves the best performance in all accuracy metrics. Moreover, it maintains high inference efficiency with only a slight increase in the number of parameters and computational cost, demonstrating the effective contribution of each module to improving the performance of small target detection and the necessity of their collaborative design.

[0101] Table 4. Comparison of Average Precision (AP) of Target Models at Different Scales Based on Blood Cell Dataset

[0102]

[0103] Table 4 compares the average accuracy (AP) of different scale target detection models for microscopic targets, aiming to verify the multi-scale adaptation performance of the SMOGD-YOLO model of this invention. Based on a blood cell count dataset, the table categorizes targets into three groups according to pixel size: 5-15 pixels (extremely small), 15-32 pixels (small core), and 32-50 pixels (medium-small). Different mainstream lightweight models are selected as comparison benchmarks. Under a unified training configuration, the average accuracy (AP) is used as the core indicator to quantify the performance differences of different models in target detection at various scales. This visually presents the advantages of the full-scale balanced detection achieved by the collaborative design of MOGDConv, SAS, ASFF, and the P2 probe of this invention, providing data support for solving the technical problem of "uneven scale adaptation" in existing models.

Claims

1. A method for small target detection in microscopic images based on multi-directional gated convolution, characterized in that, Includes the following steps: Step 1: Obtain the microscopic image dataset and perform preprocessing; Step 2: Input the preprocessed microscopic image into the target detection model YOLOv8n to perform target detection and obtain the target detection results; The specific implementation process of the target detection model YOLOv8n is as follows: Step 2.1: Multi-scale feature extraction: After preprocessing, the microscopic image is processed by the backbone network to complete the layer-by-layer extraction and semantic enhancement of image features. Based on the original P3, P4, and P5 scale features, a new P2 scale feature branch is added through the backbone network, and finally the four-scale feature maps of P2, P3, P4, and P5 are output. At the same time, the spatial size and stride of each scale are recorded. Step 2.2: MOGDConv orientation awareness enhancement: In the feature transmission paths of each scale (P3, P4, P5), multi-directional gated deep convolution (MOGDConv) is used to replace deep convolution (DWConv). Through dynamic gating mechanism, the dominant direction of the target is focused, and the enhanced features corresponding to the dominant direction of each scale (P3, P4, P5) are obtained. Step 2.3: SAS Scale-Aware Sparse Calibration: The results of upsampling the features at each scale obtained from the backbone network and the enhanced features corresponding to the next scale are concatenated and then input into the Scale-Aware Sparse SAS module to suppress cross-scale redundancy and output fused features. Since there is no next scale, the last scale P5 does not undergo a stitching operation and is directly input into the scale-aware sparse SAS module. Step 2.4: ASFF Adaptive Cross-Scale Fusion: Deploy the Adaptive Spatial Feature Fusion (ASFF) module in front of the detector head. The fused features calibrated by SAS are concatenated with the results of upsampling the enhanced features corresponding to the next scale through the C2f module and input into the Adaptive Spatial Feature Fusion (ASFF) module. The weights of the features at each scale are adaptively allocated pixel by pixel to obtain the aligned features. Step 2.5: Process the features at each scale using MOGDConv, SAS, and ASFF, and finally output the feature set {P2, P3, P4, P5}. Step 2.6: Feed the feature sets {P2, P3, P4, P5} into the decoupled detection head respectively, and model them independently through classification and regression branches, focusing on the optimization of their respective tasks; maintain the output structure of the last convolutional layer, and be compatible with the detection bias and decoding process of YOLOv8n; The output results of the classification and regression branches at each scale are summarized, and the bounding boxes and categories are unified and merged through non-maximum suppression to obtain the target detection results; Step 3: Train the object detection model YOLOv8n using a single-stage detection end-to-end training paradigm, and then test and evaluate it after training.

2. The method for small target detection in microscopic images based on multi-directional gated convolution according to claim 1, characterized in that, The preprocessing includes standardizing the category labeling of the target, unifying the input image size, performing normalization processing, and dividing the dataset into training set, validation set, and test set.

3. The method for small target detection in microscopic images based on multi-directional gated convolution according to claim 2, characterized in that, The specific implementation process of the multi-directional gated depthwise convolution MOGDConv is as follows: The input features are subjected to a 1×1 convolution for channel transformation, followed by global average pooling to capture global orientation preferences. Two sets of nonlinear mappings are used to generate gated steering vectors, which are then concatenated and fused along the channel dimension before being passed through a linear layer to obtain the features. ,feature The result of the channel transformation is then multiplied element-wise with the previous 1×1 convolution, and finally the feature is obtained by passing the sigmoid function. ;feature After passing through a linear layer and dividing by the temperature coefficient, from The direction weight vector is obtained by function operation; Construct several orientation-sensitive depthwise convolutional branches to extract features from different orientations; The features in different directions are weighted and scaled using directional weight vectors, and then compressed through 1×1 convolution to obtain enhanced features that focus on the dominant direction.

4. The method for small target detection in microscopic images based on multi-directional gated convolution according to claim 3, characterized in that, The specific implementation process of the scale-aware sparse SAS module is as follows: The concatenated features are subjected to 1×1 convolution for dimensionality reduction, and positional encoding is injected to enrich scale and spatial information; After injection location encoding, complementary features are extracted through three branches: The local detail branch uses depth convolution to capture the target edge texture; The bar-shaped context branch aggregates statistical features along the height and width dimensions to adapt to slender targets; the global token attention branch captures remote context through grid pooling and attention mechanisms. The features output from the three branches are weighted and fused. After restoring the number of channels through a 1×1 convolution, the features after restoring the number of channels through the 1×1 convolution are then convolved with the features after the convolution operation, and then connected element-wise to output the fused features.

5. The method for small target detection in microscopic images based on multi-directional gated convolution according to claim 4, characterized in that, The specific implementation process of the adaptive spatial feature fusion (ASFF) module is as follows: The fused features after SAS calibration are divided into three equal-width sub-tensors along the channel, corresponding to features at three scales: P3, P4, and P5. The scale selection logic for each pixel is generated by dividing it into three equal-width subtensors and performing grouped 1×1 convolution. Then, the normalized mixing weights of each pixel on the three scales are calculated by softmax. Features from three scales are combined and fused using a pixel-by-pixel weighted combination. After edge refinement via convolution, the original channel width is restored through 1×1 convolution, achieving cross-scale feature alignment and obtaining aligned features.

6. The method for small target detection in microscopic images based on multi-directional gated convolution according to claim 5, characterized in that, The end-to-end training paradigm using single-stage detection is as follows: the optimizer is stochastic gradient descent (SGD); the loss function includes classification loss and localization loss; during training, each module adaptively learns parameters through backpropagation without the need for additional supervision signals; when the evaluation metric no longer improves or meets the convergence condition, the training ends and the model is solidified.

7. A microscopic image small target detection system based on multi-directional gated convolution, used to implement the microscopic image small target detection method according to any one of claims 1 to 6, characterized in that, Includes the following modules: The data preprocessing module is used to acquire and preprocess the microscopic image dataset; The target detection module is used to input the preprocessed microscopic image into the target detection model YOLOv8n, perform target detection, and obtain the target detection results; The training and testing module adopts an end-to-end training paradigm of single-stage detection to train the object detection model YOLOv8n, and then performs testing and evaluation after training.

8. The microscopic image small target detection system based on multi-directional gated convolution according to claim 7, characterized in that, The target detection module includes the following units: The multi-scale feature extraction unit is used to extract image features and enhance semantics layer by layer from the preprocessed microscopic image through the backbone network, and output four-scale feature maps of P2, P3, P4 and P5. The MOGDConv orientation-aware enhancement unit is used to replace the deep convolution DWConv with multi-directional gated deep convolution MOGDConv in the feature transmission paths of each scale (P3, P4, P5). Through dynamic gating mechanism, it focuses on the dominant direction of the target and obtains the enhanced features corresponding to the dominant direction of the focus for each scale (P3, P4, P5). SAS Scale-Aware Sparse Calibration Unit: The feature obtained from each scale by the backbone network is concatenated with the upsampled result of the enhanced feature corresponding to the next scale, and then input into the Scale-Aware Sparse SAS module to suppress cross-scale redundancy and output fused features. The ASFF adaptive cross-scale fusion unit is used to concatenate the fused features calibrated by SAS with the results of upsampling the enhanced features corresponding to the next scale through the C2f module, and input them into the adaptive spatial feature fusion ASFF module to adaptively allocate the weights of the features at each scale pixel by pixel to obtain aligned features. The detection output unit is used to process the features at each scale after processing by MOGDConv, SAS, and ASFF, and finally output the feature sets {P2, P3, P4, P5}, which are then fed into the decoupled detection head. The head independently models the features through classification and regression branches, focusing on the optimization of their respective tasks. The output structure of the last convolutional layer is maintained, and it is compatible with the detection bias and decoding process of YOLOv8n. The output results of the classification and regression branches at each scale are summarized, and the bounding boxes and categories are unified and merged through non-maximum suppression to obtain the target detection results.