A method for detecting small vascular bundles of rice stem cross section
By introducing dynamic serpentine convolution and multi-scale feature fusion mechanisms, combined with the PIOU loss function, the accuracy and efficiency problems in the detection of small vascular bundles in rice stems are solved, achieving high-precision detection of small vascular bundles and improving the robustness and adaptability of the model.
Patent Information
- Application Number
- CN202510566498.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-04-30
AI Technical Summary
Existing technologies for detecting small vascular bundles in rice stems suffer from insufficient accuracy and efficiency, especially in complex and variable natural environments or under insufficient light conditions, making it difficult to accurately identify and capture the fine structure of small vascular bundles.
Dynamic snake convolution (DSConv), multi-scale feature fusion mechanism, and PioU loss function are employed to enhance the model's ability to detect small-dimensional tube bundles. Specific measures include integrating the dynamic snake convolution module into the backbone network, optimizing model training through multi-scale feature fusion and PioU loss function, and improving the accuracy and efficiency of small target detection.
It significantly improves the accuracy and robustness of small-dimensional tube bundle detection, enhances the model's ability to detect complex environments and multi-scale targets, and optimizes the performance indicators of small target detection.
Smart Images

Figure CN120496063B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and specifically to a method for detecting small vascular bundles in the cross-section of rice stems. Background Technology
[0002] As one of the world's most important food crops, rice's growth, development, and yield formation are influenced by a variety of intrinsic structural factors, among which the structure and distribution of vascular bundles play a crucial role. Vascular bundles are responsible not only for water transport, the transport of inorganic salts and organic nutrients within the plant, but also for providing mechanical support, significantly impacting the physicochemical properties and functions of rice stems. In particular, parameters such as the number, area, ratio, and distribution of large and small vascular bundles are essential for a deeper understanding of key biological characteristics such as stem growth and development, environmental adaptability, and stress resistance.
[0003] In crop breeding and precision agriculture management, efficient and accurate automated detection of rice stem cross-sectional parameters is of paramount importance. However, due to the unique and difficult-to-capture characteristics of small vascular bundles, such as variable morphology, dense arrangement, blurred edges, and low contrast, coupled with the inherent challenges of small size, low resolution, and susceptibility to noise interference, the detection of small vascular bundles in rice cross-sections has become a particularly challenging task.
[0004] In recent years, object detection technology based on convolutional neural networks (CNNs) has achieved significant success and breakthroughs, and has been widely applied in the field of computer vision. Object detection algorithms are mainly divided into two categories: Two-Stage and One-Stage. Two-Stage detection algorithms extract candidate regions and features through convolutional neural networks to complete classification and boundary regression, achieving high detection accuracy but lower detection efficiency and a higher false positive rate. One-Stage detection algorithms, on the other hand, directly extract features from the network to achieve object classification and location prediction, resulting in faster speed. Among them, the YOLO series of algorithms has achieved a good balance between detection accuracy and computational cost.
[0005] While mainstream object detection methods such as the YOLO series have achieved significant success in various fields, they still have shortcomings in small object detection. The main reasons are the insufficient feature representation capabilities of small objects and the inadequacy of functional loss mechanisms for small object detection. To address these challenges, researchers have explored various methods, such as improving network structure, capturing more feature information, and minimizing feature loss during transmission, to enhance the detection capability for small objects.
[0006] For example, existing technologies have proposed a deformable end-to-end object detection framework (DERT), which improves performance in small object detection tasks by fusing multi-scale features through an attention mechanism. Existing technologies have proposed a small object detection model for UAV aerial images based on YOLOv7 (SOD-YOLOv7), which, while maintaining effective attention to small objects, increases the model's parameter count and reduces computational speed. Existing technologies have proposed an IoU balanced loss function to enhance the model's localization accuracy. Existing technologies have proposed a detection algorithm for small and complex targets in UAV aerial images (Subtle-YOLOv8), which enhances the network's detection of small objects by incorporating dynamic snake convolution (DSConv) and multi-scale attention modules (EMA), but increases the model's computational complexity and memory footprint. Existing technologies have proposed a cross-scale feature fusion method (HEPAN) and added an SCDown downsampling module to reduce the model's parameters and computational complexity. Existing technologies have also proposed a single-point supervised small object detection method, but it may be limited by the quality of the coarse pseudo-boxes generated in the first stage.
[0007] While the aforementioned methods have significantly improved small target detection technology, existing techniques still have limitations from the perspective of detecting small vascular bundles in rice stems. Especially in complex and variable natural environments or environments with insufficient light, the detection accuracy and efficiency of small vascular bundles need further improvement. Therefore, there is an urgent need for a new high-precision detection method and system for small vascular bundles in rice stems to overcome the shortcomings of existing technologies and meet the needs of crop breeding, precision agricultural management, and pest and disease diagnosis. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a method for detecting small vascular bundles in rice stem cross-sections. This method significantly improves the detection accuracy and efficiency of small vascular bundles by introducing dynamic serpentine convolution (DSConv), a multi-scale feature fusion mechanism, and a PIOU loss function.
[0009] The present invention achieves the above objectives through the following technical solutions:
[0010] A method for detecting small vascular bundles in rice stem cross-sections includes the following steps:
[0011] Input a microscopic image of a cross-section of a rice stalk;
[0012] The constructed small-dimensional vascular bundle detection model is used to extract small-dimensional vascular bundle features from the image;
[0013] Output the detected small vascular bundle information;
[0014] The construction of the small-dimensional tube bundle detection model includes: integrating a dynamic snake convolution module into the backbone network to enhance the network's ability to detect small objects; adopting a multi-scale feature fusion mechanism to fuse features of different scales from the backbone network and FPN and PAN structures; and using the PioU loss function as the loss function for model training.
[0015] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided, which integrates a dynamic snake convolution module into the C2f module of the backbone network, including:
[0016] The original standard convolutions in the C2f module are replaced with dynamic snake convolutions DSConv to form an improved C2f-DSConv module. The replacement includes updating the standard convolutions in the BootleNeck module to DSConv to create an improved BootleNeckDSConv module, and using dynamic snake convolutions DSConv before and after the C2f module to handle channel adjustment, thereby enhancing the model's ability to perceive small vascular bundles in rice stalk cross-sections and extract feature information. The enhanced C2f module is converted into a C2f-DSConv module, which serves as a feature extraction component in the Backbone network.
[0017] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided. Dynamic snake convolution DSConv reduces memory access cost (MAC) and computation cost by decomposing the traditional convolution operation into VQK and distributed shift CDS. VQK quantizes the floating-point tensors in the convolution weights into integers to reduce memory usage and speed up computation. Distributed shift CDS adjusts the values in VQK by scaling and biasing the distributed offset KDS in the kernel and the distributed offset CDS in the channels to keep them consistent with the output of the original weight tensor.
[0018] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided, which includes the quantification of VQK, comprising:
[0019] VQK takes floating-point weights as input and applies a linear mapping to convert them into fixed-point numbers. It then stores these quantized numbers using two's complement representation. The quantization process for b-bit numbers is defined by the following formula:
[0020] w q εZ|-2 b-1 ≤w q ≤2 b-1 -1
[0021] Here, w represents the value of each parameter in the tensor. Through linear mapping, VQK scales the floating-point weight values to binary integers with a specified number of bits to ensure that the range of floating-point numbers is consistent with the range of binary integers.
[0022] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided, which addresses distribution shift:
[0023] The distribution shift adjusts the values in VQK by scaling and biasing the distribution offsets KDS and CDS to match the output of the original weight tensor. Specifically, the tensor is initialized by setting the scaling factors and bias terms to ξ, ξs, φ, and φs, respectively, and using the L2 minimization criterion. With the initialization of the KDS tensor, the element-wise multiplication of the tensor approximates the original value ξ, as expressed in the following formula:
[0024] w0ξ+ξ s ≈w q0
[0025] w1ξ+ξ s ≈w q1
[0026] wBLK-1ξ+ξ s ≈w BLK-1
[0027] Take the average value of ξ Minimize the initial KDS tensor using the L2 criterion; where w i (i = 1, 2, ..., BLK-1) represents the weight parameter values of the quantized VQK tensor, w qi (i = 1, 2, ..., BLK-1) represents the weight parameters of the original convolution tensor, expressed by the following formula:
[0028]
[0029] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided. The dynamic snake convolution DSConv dynamically adjusts the offset of the convolution kernel, as expressed by the following formula:
[0030] K i±c =(x i ±c, y i +Δy)
[0031] Among them, K i±c This represents the dynamic adjustment of the convolution kernel at position i, x i This represents the horizontal coordinate position of the current convolution kernel during the convolution operation, y. iΔy represents the vertical coordinate position of the current convolution kernel in the convolution operation, c represents the offset of the center of the convolution kernel, and Δy is a learnable displacement used to dynamically adjust the shape of the convolution kernel to adapt to the geometry of complex targets.
[0032] The present invention provides a method for detecting small vascular bundles in rice stem cross-sections, the multi-scale feature fusion mechanism of which includes:
[0033] The upsampling modules F2, F3, and F4 in the FPN structure of the Neck network are used to perform upsampling operations on feature layers of different scales in the FPN to generate high-resolution feature maps. Furthermore, the high-resolution feature maps generated by the upsampling modules F2, F3, and F4 are concatenated layer by layer with the shallow feature maps P2, P3, and P4 in the Backbone network to form concatenated feature map combinations P2-F2, P3-F3, and P4-F4, in order to compensate for the limitations of the model in detecting small targets.
[0034] The present invention provides a method for detecting small vascular bundles in rice stem cross-sections, the multi-scale feature fusion mechanism of which includes:
[0035] In the PAN structure of the Neck network, convolutional modules T2, T4, and T5 correspond to different scale feature levels in the PAN structure. Convolutional module T2 receives and processes features from upsampling module F2, convolutional module T4 receives and processes features from upsampling module F4 or features at the corresponding scale, and convolutional module T5 receives and processes features from the P5 level of the Backbone network or FPN. Through feature fusion operations, the features of F2 and T2, F4 and T4, and P5 and T5 are fused to strengthen the top-down feature propagation path and enhance the model's ability to understand complex semantic information.
[0036] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided. A feature fusion module is introduced based on the original network. This feature fusion module is configured to fuse feature information from feature extraction layers of different scales in the original network. The output of the feature fusion module is expressed by the following formula:
[0037] O = Detect(F) concat )
[0038] in, This represents the concatenation of feature maps at different scales. Detect(.) represents the detection head, which includes convolution, non-linear activation, and loss calculation. O is the output, which includes the object classification score and bounding box regression.
[0039] According to the present invention, a method for detecting small vascular bundles in rice stem cross-sections is provided, which uses the PIoU loss function as the loss function for model training, and is expressed by the following formula:
[0040]
[0041] The penalty term P is defined by the following formula:
[0042] dw1=|(b1 x2 -b1 x1 )-(b2 x2 -b2 x1 )|
[0043] dw2=|(b1 x2 -b1 x1 )+(b2 x2 -b2 x1 )|
[0044] dh1=|(b1 y2 -b1 y1 )-(b2 y2 -b2 y1 )|
[0045] dh2=|(b1 y2 -b1 y1 )+(b2 y2 -b2 y1 )|
[0046]
[0047] Where b1 and b2 are the coordinates of the predicted bounding box and the ground truth bounding box, respectively; (x1, y1) represents the coordinates of the top-left corner; ((x2, y2)) represents the coordinates of the bottom-right corner; and w gt h represents the width of the actual bounding box. gt P represents the height of the ground truth bounding box, IoU is the intersection-over-union ratio between the predicted and ground truth bounding boxes, d is the Euclidean distance between corresponding corner points of the predicted and ground truth bounding boxes, λ is the weighting coefficient of the penalty term, used to adjust the impact of P on the loss, and q is the focusing factor exponentially scaled by P, expressed as...
[0048] Therefore, compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. Enhanced Detection Capability for Tiny Objects: This invention introduces Dynamic Snake Convolution (DSConv) into the backbone network, enabling flexible adaptation to complex geometric shapes in images. DSConv dynamically adjusts the offset of the convolution kernel, allowing the network to capture minute details in images more precisely, especially fine structures such as small dimensional tube boundaries. This innovation significantly improves the model's accuracy in recognizing tiny objects, making the detection of small targets more accurate and reliable in fields such as medical image analysis and remote sensing image detection.
[0050] 2. Improved Detection Performance of Multi-Scale Targets: This invention proposes a multi-scale feature fusion method. By effectively fusing features of different scales from the backbone network and FPN (Feature Pyramid Network) and PAN (Path Aggregation Network) structures, it enhances the model's ability to detect multi-scale targets. This invention not only preserves high-resolution detail information of the image but also integrates deep semantic information, enabling the model to exhibit excellent detection results when processing targets of varying sizes. Especially for small targets, the design of upsampling operations, downsampling convolutions, and multi-scale detection heads significantly enhances the model's ability to perceive details and understand complex semantic information.
[0051] 3. Optimizing Performance Metrics for Small Object Detection: This invention replaces the traditional CIoU loss function with the PioU loss function, optimizing for the unique challenges in small object detection. The PioU loss function, by introducing a dedicated penalty term, enhances the spatial matching between the predicted and ground truth bounding boxes. This is particularly effective when dealing with small, dispersed objects, guiding the model to perform accurate bounding box regression more efficiently. This improvement significantly enhances the model's accuracy and robustness in small object detection tasks, enabling the model to more accurately identify and locate small objects in practical applications.
[0052] In summary, this invention significantly improves the model's ability to detect small objects and multi-scale targets by integrating dynamic snake convolution, multi-scale feature fusion, and the PIOU loss function, and optimizes the performance indicators of small target detection. It has broad application prospects and important practical value.
[0053] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0054] Figure 1 This is a flowchart of an embodiment of the present invention for detecting small vascular bundles in rice stem cross-sections.
[0055] Figure 2 This is a network structure diagram of the small vascular bundle detection model in an embodiment of the present invention, which is applicable to the detection of small vascular bundles in rice stem cross sections.
[0056] Figure 3 This is a diagram illustrating the annotation effect of the microscopic image contour in an embodiment of a method for detecting small vascular bundles in rice stem cross-sections according to the present invention.
[0057] Figure 4 This is a diagram showing the detection results of a small vascular bundle detection model in an embodiment of a method for detecting small vascular bundles in rice stem cross-sections according to the present invention.
[0058] Figure 5 This is a schematic diagram illustrating the effect of dataset annotation in an embodiment of a method for detecting small vascular bundles in rice stem cross-sections according to the present invention.
[0059] Figure 6 This is a test result diagram of the small vascular bundle detection model in an embodiment of the present invention, which is applicable to the detection method of small vascular bundles in rice stem cross-section.
[0060] Figure 7 This is a heatmap of the small vascular bundle detection model in an embodiment of the present invention, which is applicable to the detection of small vascular bundles in rice stem cross sections. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0062] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0063] See Figures 1 to 7 This embodiment provides a method for detecting small vascular bundles in rice stem cross-sections, the method comprising the following steps:
[0064] Step S1: Input a microscopic image of a cross-section of a rice stalk;
[0065] Step S2: Extract small vascular bundle features from the image using the constructed small vascular bundle detection model;
[0066] Step S3: Output the detected small vascular bundle information.
[0067] The construction of a small-dimensional vascular bundle detection model includes:
[0068] A dynamic serpentine convolution module is integrated into the backbone network to enhance its ability to detect small objects. Specifically, this embodiment proposes a strategy to enhance feature extraction capabilities by introducing DSConv into the backbone network, thereby improving the model's accuracy in recognizing fine structures at the boundaries of small-dimensional tube bundles, enabling the model to better capture small and complex details.
[0069] A multi-scale feature fusion mechanism is employed to integrate features from different scales in the backbone network and the FPN and PAN structures. Specifically, this embodiment designs a multi-scale feature fusion method by adding Upsample, C2f, and Concat modules to the FPN of the Neck network, and adding a new detector head to the original network structure. This significantly enhances the model's ability to express multi-scale features, enabling it to more accurately capture fine-grained target features. While improving segmentation accuracy, this method effectively enhances the model's robustness and adaptability in target segmentation tasks at different scales.
[0070] The PIoU loss function is used as the loss function for model training. In this embodiment, the original CIoU loss function is replaced with the PIoU loss function to better optimize the model's performance in small object detection. PIoU, by introducing a dedicated penalty term, effectively enhances the matching degree between the predicted bounding box and the ground truth bounding box in spatial distribution, showing a significant advantage, especially when dealing with small, dispersed objects. At the same time, the design of PIoU further simplifies the calculation process, requiring only one hyperparameter to adjust the weight distribution of the loss function. This not only improves the model's convergence speed and optimization performance but also achieves a better balance between detection accuracy and segmentation quality, thereby significantly improving the model's efficiency and stability.
[0071] As can be seen, this embodiment provides a small vascular bundle detection algorithm—Rice-SVBDete—suitable for rice stem cross-sections. First, dynamic snake convolution (DSConv) is integrated into the backbone network to enhance its ability to detect small objects. Second, this embodiment proposes a multi-scale feature fusion mechanism, fusing features from different scales in the backbone network and FPN and PAN structures to improve the model's ability to detect multi-scale targets. Finally, PIoU is used instead of CIoU loss function, focusing the model more on the spatial consistency and positional accuracy between the predicted and ground truth boxes, further improving the detection capability for small targets. The proposed method achieves an accuracy of 0.789, a recall of 0.771, and a mean precision (mAP@.5) of 0.728 at IoU = .50 for detecting small vascular bundles. Compared with the original YOLOv8 network, the accuracy, recall, and mAP@.5 are improved by 0.179, 0.201, and 0.227, respectively. The method presented in this embodiment provides insights into improving the detection of small vascular bundles in rice stem cross-sections and rice yield.
[0072] Traditional methods for detecting small vascular bundles in rice stem cross-sections first require magnified microscopic photography, followed by manual calculation and statistical analysis. Each microscopic image contains numerous and tiny vascular bundles, making manual annotation highly susceptible to visual fatigue, thus affecting the accuracy and efficiency of the results. Furthermore, the phenotypic parameters of rice stem cross-section microscopic images are directly related to factors such as stem growth status, nutrient absorption capacity, and the genetic characteristics of the variety.
[0073] To systematically address this problem, this embodiment defines the terminology and symbols used: Given a dataset of cross-sectional microscopic images of rice stalks X and their corresponding labeled Y, the goal is to develop a fitted model f(X) that can accurately identify and classify small vascular bundles in new, unseen cross-sectional microscopic images of rice stalks.
[0074] Let X = {X1, X2, ..., Xi, ..., XN} represent a dataset of microscopic images of cross-sections of rice stalks, where each image Xi contains multiple feature units, and N represents the total number of elements in the dataset. Each target bounding box is denoted as Y = {Y1, Y2, ..., Yi, ..., YN}, where each Yi contains one or more bounding boxes indicating the location of a feature unit in image Xi. For each feature unit j in image Xi, the bounding box is denoted as... and These are the coordinates of the top left and bottom right corners of the bounding box, respectively.
[0075] Detection of small vascular bundles in rice stem cross-sections presents a series of challenges due to their microscopic characteristics and the complexity of their biological structures. Small vascular bundles, due to their tiny size, are easily affected by lighting conditions, uneven cross-sections, background impurities, and the texture of the biological tissue itself. These fine structures not only require detection algorithms with high sensitivity but also the ability to accurately distinguish the target vascular bundles from the surrounding complex biological tissue background. For example, accurately identifying and differentiating vascular bundles of different morphologies and densities in stem cross-sections, especially under conditions of uneven lighting and varied tissue textures, is an extremely challenging task. Furthermore, compared to other tissues in the stem, vascular bundles often have more delicate and difficult-to-define boundaries.
[0076] In this embodiment, to effectively detect small vascular bundles in the cross-section of rice stems, a dynamic snake convolution module is integrated into the C2f module of the backbone network, including:
[0077] The standard convolutions in the C2f module are replaced with dynamic snake convolutions (DSConv) to form an improved C2f-DSConv module. This replacement involves updating the standard convolutions in the BootleNeck module to DSConv to create an improved BootleNeckDSConv module, and using the dynamic snake convolutions (DSConv) before and after the C2f module for channel adjustment. This enhances the model's ability to perceive and extract features from small vascular bundles in rice stem cross-sections. The enhanced C2f module is then converted into a C2f-DSConv module, serving as a feature extraction component in the Backbone network. This design aims to enhance the model's ability to perceive small and complex structures, thereby maximizing the extraction of vascular bundle features from stem cross-section images. This approach improves the model's accuracy and robustness in recognizing small vascular bundles in complex biological tissue contexts.
[0078] Specifically, the standard convolutions in the BootleNeck module are updated to DSConv, creating the improved BootleNeckDSConv module. Furthermore, DSConv is also used for the convolutions responsible for channel adjustment before and after the C2f module. Figure 2 As shown, the C2f module is enhanced and converted into the C2f-DSConv module, which serves as the feature extraction component in the Backbone network.
[0079] DSConv was developed to address the issue of high memory access cost (MAC) and computational cost in standard convolution operations. Dynamic snake convolution DSConv reduces MAC and computational cost by decomposing the traditional convolution operation into VQK and distributed shift CDS. VQK quantizes the floating-point tensors in the convolution weights into integers to reduce memory usage and speed up computation. Distributed shift CDS adjusts the values in VQK by scaling and biasing the distributed offset KDS in the kernel and the distributed offset CDS in the channels to keep them consistent with the output of the original weight tensors.
[0080] In this embodiment, the quantization of VQK includes:
[0081] VQK takes floating-point weights as input and applies a linear mapping to convert them into fixed-point numbers. It then stores these quantized numbers using two's complement representation. The quantization process for b-bit numbers is defined by the following formula:
[0082] w q εZ|-2 b-1 ≤w q ≤2 b-1 -1
[0083] Here, w represents the value of each parameter in the tensor. Through linear mapping, VQK scales the floating-point weight values to binary integers with a specified number of bits to ensure that the range of floating-point numbers is consistent with the range of binary integers. This allows for efficient computation and memory storage using integers, ultimately improving computational efficiency.
[0084] In this embodiment, for the distribution offset:
[0085] The distribution shift adjusts the values in VQK by scaling and biasing the distribution offsets KDS and CDS to match the output of the original weight tensor. Specifically, the tensor is initialized by setting the scaling factors and bias terms to ξ, ξs, φ, and φs, respectively, and using the L2 minimization criterion. With the initialization of the KDS tensor, the element-wise multiplication of the tensor approximates the original value ξ, as expressed in the following formula:
[0086] w0ξ+ξ s ≈w q0
[0087] w1ξ+ξ s ≈w q1
[0088] wBLK-1ξ+ξ s ≈w BLK-1
[0089] Where, the average value of ξ is taken. Minimize the initial KDS tensor using the L2 criterion; where w i (i = 1, 2, ..., BLK-1) represents the weight parameter values of the quantized VQK tensor, w qi (i = 1, 2, ..., BLK-1) represents the weight parameters of the original convolution tensor, expressed by the following formula:
[0090]
[0091] In this embodiment, the dynamic snake convolution DSConv achieves flexible adaptation to complex geometric shapes in images by dynamically adjusting the offset of the convolution kernel. Its core lies in using these offsets to finely control the convolution operation, thereby significantly improving the model's ability to perceive and recognize targets of different shapes and sizes, as expressed in the following formula:
[0092] K i±c =(x i ±c, y i +Δy)
[0093] Among them, K i±c This represents the dynamic adjustment of the convolution kernel at position i, x i This represents the horizontal coordinate position of the current convolution kernel during the convolution operation, y. i The vertical coordinates of the current convolution kernel during the convolution operation are represented by Δy, where 'c' represents the offset of the kernel center, and Δy is a learnable displacement used to dynamically adjust the kernel shape to adapt to the geometry of complex targets. Compared to the YOLOv8 network, DSConv focuses more on the shape of small-dimensional tube bundles and has a better suppression effect on background noise, thereby improving the comprehensiveness and accuracy of detection.
[0094] To address the challenges of capturing small targets, insufficient feature representation, and significant differences between targets at multiple scales within the small vascular bundles of rice stem cross-sections, this embodiment proposes a detection strategy based on multi-scale feature fusion. By effectively combining upsampling operations, downsampling convolutions, and the design of a multi-scale detection head, the model's ability to perceive details of small targets and understand complex semantic information is enhanced. The improved network structure is as follows: Figure 2 As shown. The specific improvement ideas are as follows:
[0095] The upsampling modules F2, F3, and F4 in the FPN structure of the Neck network are used to perform upsampling operations on feature layers of different scales in the FPN to generate high-resolution feature maps. Furthermore, the high-resolution feature maps generated by the upsampling modules F2, F3, and F4 are concatenated layer by layer with the shallow feature maps P2, P3, and P4 in the Backbone network to form concatenated feature map combinations P2-F2, P3-F3, and P4-F4, in order to compensate for the limitations of the model in detecting small targets.
[0096] The convolution modules T2, T4, and T5 set in the PAN structure of the Neck network respectively correspond to different scale feature levels in the PAN structure. Among them, the convolution module T2 receives and processes the features from the upsampling module F2, the convolution module T4 receives and processes the features from the upsampling module F4 or the features of the corresponding scale, and the convolution module T5 receives and processes the features from the P5 level of the Backbone network or FPN; through the feature fusion operation, the features of F2 and T2, F4 and T4, and P5 and T5 are fused to strengthen the top-down feature transfer path and enhance the model's ability to understand complex semantic information.
[0097] Specifically, an upsampling operation is introduced to compensate for the limitations of the model in detecting small targets: in the FPN structure of the Neck network, three upsampling modules, F2, F3, and F4, are designed and constructed in this embodiment, corresponding to different scale feature levels in the FPN. These modules generate high-resolution feature maps through upsampling and are concatenated layer by layer with the shallow feature maps in the Backbone network, specifically P2 - F2, P3 - F3, and P4 - F4. This concatenation strategy aims to fully fuse the spatial details in the shallow features and the semantic information in the deep features, enhance the model's perception and learning ability of detailed features, and thus significantly improve the model's performance in small target detection tasks. The formula is as follows:
[0098]
[0099] Among them, F l represents the l-th feature map from the deep features, Upsample(.) represents the upsampling operation, F shallow represents the feature map from the shallow layer, and ⊕ represents the concatenation operation.
[0100] The downsampling convolution technology is introduced to enhance the model's ability to understand complex semantic information: in the PAN structure of the Neck network, three convolution modules, T2, T4, and T5, are constructed in this embodiment, respectively corresponding to different scale feature levels in the PAN structure. Specifically, by fusing the features of F2 - T2, F4 - T4, and P5 - T5, the top-down feature transfer path is strengthened. This strategy effectively compensates for the traditional defect of possible loss of target location information when only relying on FPN, thereby improving the model's semantic understanding and target detection performance in complex scenarios. The formula is as follows:
[0101]
[0102] Among them, Conv(.) represents the convolution operation, usually the downsampling convolution, F l-1 represents the feature map from the previous layer. represents the feature fusion operation.
[0103] In this embodiment, a feature fusion module is introduced on top of the original network. This feature fusion module is configured to fuse feature information from feature extraction layers of different scales in the original network. The output of the feature fusion module is expressed by the following formula:
[0104] O = Detect(F) concat )
[0105] in, This represents the concatenation of feature maps at different scales. Detect(.) represents the detection head, which includes convolution, non-linear activation, and loss calculation. O is the output, which includes the object classification score and bounding box regression.
[0106] Specifically, an additional detection head enhances the model's ability to detect small objects. This embodiment introduces an extra detection head on top of the original network. This detection head is designed to efficiently fuse features at different scales, improving the model's ability to perceive multi-scale targets. By introducing a detection head specifically designed for different scales, detection accuracy is significantly improved, especially in small target detection and multi-scale segmentation tasks, demonstrating superior performance. This improvement effectively compensates for the potential shortcomings of the original network in small-scale target detection, providing a more comprehensive and accurate solution for multi-scale target detection tasks.
[0107] Bounding box regression (BBR) loss functions are also crucial in the detection of small vascular bundles in rice stem cross-sections. A well-designed boundary loss function can significantly improve model performance. YOLOv8 uses CompleteIntersectionoverUnion (CIoU) to calculate the bounding box regression loss. CIoU considers three important aspects when calculating the bounding box regression loss: overlap area, distance between centers, and aspect ratio. Given a predicted bounding box b and a ground truth bounding box b... gt The CIoU loss function is defined as follows:
[0108]
[0109] Where IoU is the Intersection over Union ratio, ρ 2 (b, bgt) represents the predicted bounding box b and the ground truth bounding box b. gt The square of the Euclidean distance between the center points, c is the diameter of the smallest closed region containing the predicted box and the ground truth box, α is a weighting coefficient, and v is the aspectratio consistency penalty term.
[0110] However, the CIoU loss function fails to adequately consider the differences in target scale during calculation, especially when dealing with small and large targets, easily leading to insufficient localization accuracy for small targets. This deficiency may cause a decrease in the detection performance of small targets, thus affecting the overall detection accuracy. To address this issue, this embodiment introduces the PIoU loss function to replace the CIoU loss function in the original network. PIoU, based on measuring the overlap area between the predicted and ground truth boxes, further introduces a penalty mechanism that improves the modeling ability of target positional relationships by minimizing the Euclidean distance between corresponding corner points of the predicted and ground truth boxes. Simultaneously, this loss function can more effectively balance the detection performance of targets at different scales, especially showing superior performance in small target detection. The PIoU loss function used as the loss function for model training is expressed as the following formula:
[0111]
[0112] The penalty term P is defined by the following formula:
[0113] dw1=|(b1 x2 -b1 x1 )-(b2 x2 -b2 x1 )|
[0114] dw2=|(b1 x2 -b1 x1 )+(b2 x2 -b2 x1 )|
[0115] dh1=|(b1 y2 -b1 y1 )-(b2 y2 -b2 y1 )|
[0116] dh2=|(b1 y2 -b1 y1 )+(b2 y2 -b2 y1 )|
[0117]
[0118] Where b1 and b2 are the coordinates of the predicted bounding box and the ground truth bounding box, respectively; (x1, y1) represents the coordinates of the top-left corner; ((x2, y2)) represents the coordinates of the bottom-right corner; and w gt h represents the width of the actual bounding box. gtP represents the height of the ground truth bounding box, IoU is the intersection-over-union ratio between the predicted and ground truth bounding boxes, d is the Euclidean distance between corresponding corner points of the predicted and ground truth bounding boxes, λ is the weighting coefficient of the penalty term, used to adjust the impact of P on the loss, and q is the focusing factor exponentially scaled by P, expressed as...
[0119] The PIoU loss enhances the ability to model the positional relationships of targets by introducing a penalty mechanism for the Euclidean distance of corner points, effectively balancing the detection performance of targets at different scales, and significantly improving the localization accuracy and robustness, especially in the detection of small targets.
[0120] To evaluate the performance of the proposed method in microscopic image analysis of small vascular bundles in rice stem cross-sections, this embodiment evaluated the performance of the Rice-SVBDete method using a customized dataset. The purpose of the experiments was to assess the effectiveness of the Rice-SVBDete method in accurate identification.
[0121] The datasets used in this experiment were all provided by Guangxi University. The materials were selected from the core germplasm resources of the 3KRGP project. Based on the genetic diversity of the materials, 289 germplasm resources from different countries with similar heading dates were screened. These included 146 indica rice accessions and 99 japonica rice accessions (38 subtropical japonica rice accessions, 13 tropical japonica rice accessions, 36 temperate japonica rice accessions from Southeast Asia, and 12 GJ-adm accessions). The 23 japonica rice accessions (cA), 6 japonica rice accessions (cB), and 15 admixtures from South Asia represent the main rice gene pools in temperate and subtropical regions. Rice cross-sectional sections were collected from the second internode at the base of the rice stem during the heading stage, with a section thickness of approximately 0.2 to 0.5 mm. Images were saved in TIF format. This embodiment acquired 1000 microscopic images. The Labelme (5.2.1) tool was used to label the contours of small vascular bundles, large vascular bundles, cavities (in), and stem circumference (out) in each image. The labeling results are as follows: Figure 3 As shown, the dataset is divided into training, validation, and testing datasets in an 8:1:1 ratio for model training, validation, and testing.
[0122] This embodiment implements the Rice-SVBDete method based on the PyTorch deep learning framework YOLOv8, and trains the model on an NVIDIA GeForce RTX 3090 GPU with 24GB of memory. The model was trained for 100 epochs using the Adam optimizer with a learning rate of 0.01, a batch size of 16, and an input image size of 640×640. This embodiment employs a four-scale anchoring system: P2 / 4, P3 / 8, P4 / 16, and P5 / 32. Specifically, the P2 / 4 scale anchors are designed to detect small targets, the P3 / 8 and P4 / 16 anchors are for medium-sized targets, and the P5 / 32 anchors are for large targets. This hierarchical structure ensures comprehensive coverage of target sizes in the microscopic images.
[0123] MAPE is a metric used to measure the error between predicted and actual values, and is particularly suitable for regression tasks. It represents the mean percentage error; a lower value indicates a smaller prediction error, expressed by the following formula:
[0124]
[0125] Among them, y i It is the i-th true value. It is the i-th predicted value, and n is the total number of data points.
[0126] RMSE is a commonly used metric for assessing the error between predicted and actual values. It emphasizes larger errors and is more sensitive to outliers. The smaller the RMSE value, the more accurate the prediction. It is expressed by the following formula:
[0127]
[0128] To evaluate the effectiveness of the Rice-SVBDete proposed in this embodiment, it was compared with several widely used state-of-the-art image recognition algorithms. Specifically, the method of this embodiment was compared with YOLOv8, ASF-YOL, SOD-YOLO, Subtle-YOLO, etc., which represent different architectural paradigms and have demonstrated superior performance in various computer vision tasks, providing a robust baseline for comparative analysis.
[0129] As shown in Table 1, the quantitative results of the comparative analysis demonstrate that the proposed Rice-SVBDete method outperforms all state-of-the-art methods across all four evaluation metrics. Specifically, Rice-SVBDete achieves impressive P and R scores of 0.794 and 0.784, respectively, surpassing SOD-YOLO by 0.013 and 0.015. Furthermore, Rice-SVBDete achieves the highest mAP@.5 score of 0.732, outperforming its closest competitor, SOD-YOLO, by 0.017. Rice-SVBDete also demonstrates its advantage in the most challenging mAP@.5:.95 metric, reaching 0.248, which is 0.011 higher than the second-best improved YOLOv8. These results highlight the effectiveness of the proposed method in accurately detecting and locating objects under varying degrees of occlusion and overlap. Additionally, the detection results of Rice-SVBDete are also presented, such as... Figure 4 As shown in the figure, Rice-SVBDete can not only identify small vascular bundles of different sizes, but also accurately detect fuzzy boundary structures.
[0130] Table 1: Comparative Experimental Results
[0131] (1)
[0133] To further verify the prediction accuracy of Rice-SVBDete, manually labeled vascular bundle regions were used as reference standards, and the algorithm's prediction results were compared and analyzed with manually measured values. The analysis results are as follows: Figure 4 As shown in the figure, the algorithm exhibits high accuracy in predicting the number and area of small-dimensional vascular bundles, with MAPE values of 0.0% and 19.06%, respectively, and RMSE values of 0 and 0.001, respectively. The results demonstrate that Rice-SVBDete possesses high reliability and accuracy in predicting small-dimensional vascular bundle parameters.
[0134] Table 3: Comparison Results of Other Parameters
[0135] (3)
[0137] To evaluate the impact of each proposed module, this embodiment conducted a comprehensive ablation study. DSConv, multi-scale feature fusion, and PIOU loss were systematically included or excluded from the model, and their performance was evaluated. The results of these experiments are shown in Table 3. The data in Table 3 show a significant trend of improved model performance with the addition of more modules. Including all three modules (DSConv, MMF, and PIOU) resulted in the highest P, R, mAP@.5, and mAP@.5:.95. This indicates a synergistic effect between DSConv, multi-scale feature fusion, and PIOU loss. The consistent improvement across all evaluation metrics suggests that multi-scale feature fusion is crucial for improving object detection accuracy.
[0138] Table 2: Ablation Studies Results
[0139] (2)
[0141] To evaluate the effectiveness of the DSConv module, the model in this embodiment was trained, and numerous experiments were conducted. Table 2 shows the significant impact of DSConv on the model's performance metrics. Precision and recall increased from 0.61 and 0.57 without DSConv to 0.617 and 0.574 with DSConv, respectively, indicating that the module enhances feature extraction capabilities while minimizing false positives and false negatives. Furthermore, the mean precision (mAP), which comprehensively evaluates the model's performance at different confidence thresholds, also showed a significant improvement. mAP@.5 increased the mean precision from 0.501 without DSConv to 0.513 with DSConv when the inter-overlap (IoU) threshold was 0.5.
[0142] The MMF module represents a significant advancement in addressing the complex challenges of rice stem cross-sections, including their varied vascular bundle morphology, dense arrangement, blurred edges, and low contrast. This module integrates the advantages of both shallow and deep feature representations in the model. Figure 7 The heatmap provides a visual representation of the impact of the MMF module. A focused and accurate attention map is obtained after using MMF, highlighting the model's ability to detect small-dimensional vascular bundles with different morphological features, even those with blurred boundaries. In summary, the multi-scale feature fusion module addresses the limitations of a single-scale approach in simultaneously capturing global semantic information and local detail representation. By fully utilizing the complementarity of features at different scales, it enhances the model's ability to perceive complex scenes globally, while simultaneously improving its ability to capture small targets and detailed features. This effectively improves the performance of Rice-SVBDete in the accurate detection and analysis of small-dimensional vascular bundles.
[0143] To further evaluate the adaptability and effectiveness of the Rice-SVBDete method, parameters such as the large vascular bundles (big), cavities (in), and stem perimeter (out) of rice stem cross-sections were detected, and core indicators such as P, R, and mAP were recorded. The results are shown in Table 3. Experimental results show that this method significantly improves the detection of large vascular bundles, cavities, and stem perimeter. Specifically, P and mAP@.5:95 for the in category improved by 0.004 and 0.001, respectively; for the big category, significant improvements were observed in P, R, mAP@.5, and mAP@.5:95, specifically by 0.147, 0.135, 0.173, and 0.15, respectively; and for the out category, P and mAP@.5:95 improved by 0.004 and 0.002, respectively. The results fully demonstrate that the Rice-SVBDete method not only exhibits excellent performance in small-dimensional tube bundle detection tasks, but also demonstrates outstanding accuracy and robustness in the detection of parameters such as large-dimensional tube bundles and cavities, effectively improving the overall detection capability and task adaptability.
[0144] The small vascular bundles in the cross-section of rice stems are difficult to capture due to their varied morphology, dense arrangement, blurred edges, and low contrast, posing a significant challenge to traditional detection and identification methods. However, rice breeding, quality assessment, and related biological research urgently require an advanced and reliable automated identification technology. Deep learning-based methods, especially the development of artificial neural networks, offer a promising solution for the automated detection of small vascular bundles in rice stem cross-sections. This embodiment proposes a novel method—Rice-SVBDete—which introduces dynamic snake convolution to optimize the feature extraction process and integrates a multi-scale feature fusion module to improve the ability to express diverse features and the overall accuracy of the model, thereby effectively solving the key problem of automated detection of small vascular bundles in rice. The Rice-SVBDete method can accurately capture the edge details of small vascular bundles while effectively overcoming detection biases caused by low contrast and noise interference. In the experiment, Rice-SVBDete significantly outperformed existing state-of-the-art methods in key indicators such as P, R, and mAP, fully verifying its excellent performance and wide applicability in small vascular bundle detection tasks, and providing a reliable and efficient solution for rice stem cross-sectional analysis.
[0145] In summary, this embodiment significantly improves the model's ability to detect small objects and multi-scale targets by integrating dynamic snake convolution, multi-scale feature fusion, and the PIOU loss function. It also optimizes the performance indicators of small target detection, demonstrating broad application prospects and significant practical value.
[0146] Furthermore, this embodiment introduces Dynamic Snake Convolution (DSConv) into the backbone network, enabling flexible adaptation to complex geometric shapes in images. DSConv can dynamically adjust the offset of the convolution kernel, allowing the network to capture minute details in images more precisely, especially fine structures such as the boundaries of small dimensional tube bundles. This innovation significantly improves the model's accuracy in recognizing small objects, making the detection of small targets more accurate and reliable in fields such as medical image analysis and remote sensing image detection.
[0147] Furthermore, this embodiment proposes a multi-scale feature fusion method. By effectively fusing features of different scales from the backbone network and FPN (Feature Pyramid Network) and PAN (Path Aggregation Network) structures, it enhances the model's ability to detect targets at multiple scales. This invention not only preserves high-resolution detail information of the image but also integrates deep semantic information, enabling the model to exhibit excellent detection performance when processing targets of varying sizes. Particularly for small targets, the design of upsampling operations, downsampling convolutions, and multi-scale detection heads significantly enhances the model's ability to perceive details and understand complex semantic information.
[0148] Furthermore, this embodiment uses the PioU loss function instead of the traditional CIoU loss function, optimizing for the unique problems in small object detection. The PioU loss function, by introducing a dedicated penalty term, enhances the spatial matching between the predicted bounding box and the ground truth bounding box. Especially when dealing with small, dispersed objects, it more effectively guides the model to perform accurate bounding box regression. This improvement significantly enhances the model's accuracy and robustness in small object detection tasks, enabling the model to more accurately identify and locate small objects in practical applications.
[0149] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0150] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. A method for detecting small vascular bundles in rice stem cross-sections, characterized in that, The method comprises the following steps: inputting a microscopic image of a rice stem section; extracting small vascular bundle features in the image using a constructed small vascular bundle detection model; outputting detected small vascular bundle information; wherein the small vascular bundle detection model is constructed by: integrating a dynamic snake convolution module into a backbone network to enhance the detection capability of the network for micro objects; using a multi-scale feature fusion mechanism to fuse features of different scales in the backbone network, FPN and PAN structure; and using a PIoU loss function as a loss function for model training; the dynamic snake convolution module is integrated into a C2f module of the backbone network, including: replacing the original standard convolution in the C2f module with a dynamic snake convolution DSConv to form an improved C2f-DSConv module; the replacement includes updating the standard convolution in the BoottleNeck module to DSConv to create an improved BoottleNeckDSConv module, and using the dynamic snake convolution DSConv for the convolution responsible for channel adjustment before and after the C2f module to enhance the perception ability and feature information extraction ability of the model for small vascular bundles in the rice stem section; wherein the enhanced C2f module is converted into a C2f-DSConv module as a feature extraction component in the backbone network; the multi-scale feature fusion mechanism includes: setting up sampling modules F2, F3 and F4 in the FPN structure, which are respectively used for up-sampling operation on different scale feature levels in the FPN to generate high-resolution feature maps; and the high-resolution feature maps generated by the up-sampling modules F2, F3 and F4 are respectively spliced with the shallow feature maps P2, P3 and P4 in the backbone network layer by layer to form the spliced feature map combinations P2-F2, P3-F3 and P4-F4, so as to make up for the limitations of the model in detecting small targets; the multi-scale feature fusion mechanism includes: setting up convolution modules T2, T4 and T5 in the PAN structure, which correspond to different scale feature levels in the PAN structure, wherein the convolution module T2 receives and processes features from the up-sampling module F2, the convolution module T4 receives and processes features from the up-sampling module F4 or corresponding scale features, and the convolution module T5 receives and processes features from the P5 level of the backbone network or the FPN; through feature fusion operation, the features of F2 and T2, F4 and T4, and P5 and T5 are fused to strengthen the top-down feature transmission path and enhance the understanding ability of the model for complex semantic information; a feature fusion module is introduced on the basis of the original network, which is configured to fuse feature information from different scale feature extraction layers in the original network, and the output of the feature fusion module is represented by the following formula: where F concat = ⊕ i F i represents the concatenation of feature maps of different scales, Detect(.) represents the detection head including convolution, non-linear activation and loss computation, and O is the output including target classification scores and bounding box regression.
2. The method of claim 1, wherein: The dynamic snake convolution DSConv reduces the memory access cost MAC and the calculation cost by decomposing the traditional convolution operation into VQK and distributed shift CDS, wherein the VQK quantizes the floating-point tensor in the convolution weight into an integer to reduce the memory usage and speed up the calculation, and the distributed shift CDS adjusts the value in the VQK through the scaling and biasing of the distributed offset KDS in the kernel and the distributed offset CDS in the channel, so that the value is consistent with the output of the original weight tensor.
3. The method of claim 1, wherein: The dynamic snake convolution DSConv dynamically adjusts the offset of the convolution kernel, which is expressed as the following formula: where K i±c represents the dynamic adjustment of the convolution kernel at position i, x i represents the horizontal coordinate position of the current convolution kernel in the convolution operation, y i represents the vertical coordinate position of the current convolution kernel in the convolution operation, c represents the offset of the center of the convolution kernel, and Δy is a learnable displacement amount used to dynamically adjust the shape of the convolution kernel to adapt to the geometric structure of a complex target.
Citation Information
Patent Citations
YOLOv8-based field snail huai detection method
CN118334705A
Method for improving YOLOv8 network and application of method in strip steel surface defect detection
CN118365599A