Lightweight multi-scale instance segmentation method for microdissection phenotyping of rice flag leaves
Patent Information
- Application Number
- CN202610987684.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]然而现有的植物显微解剖结构的分析方法在水稻剑叶显微解剖分析上还存在以下缺点:一是在多尺度特征融合中存在微小结构细节丢失的问题;二是密集分布的小型维管束边界模糊和轮廓不连续的问题
[0017]本发明的有益效果为:通过高分辨率细节分支在P2层级(1/4分辨率)引入高分辨率特征图,使微小维管束的有效可见像素数量提升约4倍,显著增强了对微小维管束和狭窄叶脉的检测灵敏度。通过轻量级掩码优化模块在掩码解码前对原型张量进行局部空间平滑处理,抑制了由染色伪影引起的孤立性错误激活,提升了细长结构(如叶脉和维管束边界)的轮廓连续性和边界质量,生成的掩码更平滑紧凑且与解剖轮廓匹配度更高。通过尺度感知分割损失函数在训练过程中根据当前批次中小尺寸目标的比例自适应调整损失权重,强化了对低频出现的小型解剖结构的监督,解决了大型组织主导梯度的问题,为高通量水稻解剖表型分析和抗倒伏高产育种提供了有效工具。
Smart Images

Figure CN122990457A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of plant phenotyping technology, and more particularly to a lightweight multi-scale instance segmentation method for microscopic anatomical phenotyping of rice flag leaves. Background Technology
[0002] Rice (Oryza sativa) is one of the world's most important staple crops, providing food for more than half of the world's population. Maintaining structural stability while increasing grain yield remains a core challenge in modern crop science. Lodging resistance and yield potential are closely related to assimilate transport efficiency and mechanical support capacity, both of which are fundamentally regulated by the vascular system. As the primary photosynthetic "source" organ during the grain-filling stage, the flag leaf plays a dominant role in determining carbohydrate yield and transport efficiency. Its microstructure, especially the number, size distribution, and spatial arrangement of vascular bundles, as well as the internal anatomical features such as xylem vessels and phloem sieve tubes, directly affects photosynthetic capacity and assimilate transport efficiency. A more developed vascular bundle system not only enhances the efficiency of assimilate transport to the grain but also improves the mechanical strength of the stem, thus achieving the dual goals of high yield and lodging resistance.
[0003] However, existing methods for analyzing plant microscopic anatomy still have the following drawbacks in the microscopic anatomy of rice flag leaves: first, there is a problem of loss of minute structural details in the fusion of multi-scale features; second, there is a problem of blurred boundaries and discontinuous outlines of densely distributed small vascular bundles.
[0004] The information disclosed in this background section is intended only to enhance the understanding of the general background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0005] This invention provides a lightweight multi-scale instance segmentation method for microscopic anatomical phenotypic analysis of rice flag leaves, thereby effectively solving the problems in the background art.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: a lightweight multi-scale instance segmentation method for microscopic anatomical phenotypic analysis of rice flag leaves, comprising the following steps: Microscopic images of the cross-section of rice flag leaves are obtained, and hierarchical multi-scale features are extracted through a convolutional backbone network. The hierarchical multi-scale features include shallow features containing boundary details and local textures, as well as deep features containing semantic context and anatomical prior information. High-resolution feature maps are introduced at a set resolution level where the shallow features are located by a high-resolution detail branch. The high-resolution feature maps are then concatenated with the deep features and refined by convolution before being re-input into a deeper network to preserve shallow spatial detail features of tiny vascular bundles and narrow leaf veins. The fused multi-scale features are input into the mask generation module. The prototype tensor is then locally spatially smoothed by the lightweight mask optimization module before the instance mask is reconstructed to suppress artifacts and improve contour continuity. During model training, the weights of the segmentation loss function are dynamically adjusted based on the proportion of small-sized targets in the current batch. When the proportion of small-sized targets increases, the loss weights are adaptively increased to strengthen the supervision of low-frequency small anatomical structures.
[0007] Furthermore, the microscopic image of the cross-section of the rice flag leaf includes: Tissue segments were cut from the widest part of the rice flag leaf and manually sectioned to obtain a cross section with a thickness of 0.2 to 0.5 mm. The sections were then immersed in distilled water and stained for 10 seconds in a fresh solution containing 5% phloroglucinol and concentrated hydrochloric acid in a 1:1 volume ratio. The sections were then observed and photographed under a stereomicroscope.
[0008] Furthermore, the hierarchical multi-scale features are aggregated through a bidirectional pyramid, which includes a top-down fusion path and a bottom-up enhancement path. The top-down fusion path upsamples deep semantic features and fuses them with shallow features of the corresponding level, while the bottom-up enhancement path propagates shallow localization cues to the deep layers through straddle convolution.
[0009] Furthermore, the high-resolution detail branch introduces an additional high-resolution branch at the P2 level, i.e., 1 / 4 resolution, calculated as follows: ; In the formula, This is a shallow feature map. Indicates upsampling, Indicates channel splicing. This indicates convolution thinning; the generated high-resolution features are then processed... Re-enter a deeper network. This indicates downsampling.
[0010] Furthermore, the lightweight mask optimization module processes the prototype tensor T as follows: First, perform a 3×3 convolution. and SiLU activation function Then, after a second 3×3 convolution The optimized prototype tensor is obtained. With the optimized prototype tensor Replace the original prototype tensor Then proceed with the subsequent mask decoding.
[0011] Furthermore, the instance mask is reconstructed in the following manner:
[0012] In the formula, For the c-th basis mask in the optimized prototype tensor, Let be the mask coefficients corresponding to the c-th base mask for the i-th instance. This represents the Sigmoid activation function.
[0013] Furthermore, the dynamic adjustment of the weights of the segmentation loss function includes: Calculate the normalized area of each target in the current batch. ,in and These are the width and height of the target bounding box, respectively; like It is then determined to be a small-sized target; the proportion of small-sized targets in the current batch is calculated. ; Calculate adaptive weighting factors The final loss function is .
[0014] This invention also includes a lightweight multi-scale instance segmentation system for microscopic anatomical phenotypic analysis of rice flag leaves, using the method described above, the system comprising: The feature extraction unit is used to acquire a microscopic image of the cross-section of rice flag leaf and extract hierarchical multi-scale features through a convolutional backbone network. The hierarchical multi-scale features include shallow features containing boundary details and local textures, as well as deep features containing semantic context and anatomical prior information. The detail-preserving unit is used to introduce a high-resolution feature map at a set resolution level where the shallow features are located through a high-resolution detail branch. The high-resolution feature map is then channel-stitched and convolved with the deep features and re-inputted into a deeper network to preserve shallow spatial detail features of tiny vascular bundles and narrow leaf veins. The mask generation unit is used to input the fused multi-scale features into the mask generation module. The prototype tensor is then locally spatially smoothed by the lightweight mask optimization module before the instance mask is reconstructed, which suppresses artifacts and improves contour continuity. The scale-aware training unit is used to dynamically adjust the weights of the segmentation loss function based on the proportion of small-sized targets in the current batch during model training. When the proportion of small-sized targets increases, the loss weights are adaptively increased to enhance the supervision of low-frequency small anatomical structures.
[0015] The present invention also includes a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described above.
[0016] The present invention also includes a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described above.
[0017] The beneficial effects of this invention are as follows: By introducing high-resolution feature maps at the P2 level (1 / 4 resolution) through a high-resolution detail branch, the number of effectively visible pixels for small vascular bundles is increased by approximately four times, significantly enhancing the detection sensitivity for small vascular bundles and narrow leaf veins. A lightweight mask optimization module performs local spatial smoothing on the prototype tensor before mask decoding, suppressing isolated false activations caused by staining artifacts and improving the contour continuity and boundary quality of slender structures (such as leaf veins and vascular bundle boundaries). The generated mask is smoother, more compact, and has a higher degree of matching with the anatomical contour. A scale-aware segmentation loss function adaptively adjusts the loss weights during training based on the proportion of small-sized targets in the current batch, strengthening the supervision of low-frequency small anatomical structures and solving the problem of gradient dominance in large tissues. This provides an effective tool for high-throughput rice anatomical phenotypic analysis and lodging-resistant, high-yield breeding. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the system structure in Embodiment 1 of the present invention; Figure 3 This is a microscope image of a cross-section of a rice leaf in Embodiment 2 of the present invention; Figure 4 This is an image of the data annotation process in Embodiment 2 of the present invention; Figure 5 This is a comparison chart of the retrieval results of different methods in Embodiment 2 of the present invention; Figure 6 This is a schematic diagram of the computer device in Embodiment 5 of the present invention. Detailed Implementation
[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0021] Example 1: like Figure 1 As shown: A lightweight multi-scale instance segmentation method for microscopic anatomical phenotypic analysis of rice flag leaves, comprising the following steps: Microscopic images of cross-sections of rice flag leaves were obtained, and hierarchical multi-scale features were extracted through a convolutional backbone network. The hierarchical multi-scale features include shallow features containing boundary details and local textures, as well as deep features containing semantic context and anatomical prior information. High-resolution feature maps are introduced into the set resolution layer where the shallow features are located by the high-resolution detail branch. The high-resolution feature maps are then concatenated with the deep features and refined by convolution before being re-input into a deeper network to preserve the shallow spatial details of tiny vascular bundles and narrow leaf veins. The fused multi-scale features are input into the mask generation module. The prototype tensor is then locally spatially smoothed by the lightweight mask optimization module before the instance mask is reconstructed to suppress artifacts and improve contour continuity. During model training, the weights of the segmentation loss function are dynamically adjusted based on the proportion of small-sized targets in the current batch. When the proportion of small-sized targets increases, the loss weights are adaptively increased to strengthen the supervision of low-frequency small anatomical structures.
[0022] By introducing high-resolution feature maps at the P2 level (1 / 4 resolution) through a high-resolution detail branch, the number of effectively visible pixels for small vascular bundles is increased by approximately four times, significantly enhancing the detection sensitivity for small vascular bundles and narrow leaf veins. A lightweight mask optimization module performs local spatial smoothing on the prototype tensor before mask decoding, suppressing isolated false activations caused by staining artifacts and improving the contour continuity and boundary quality of slender structures (such as leaf veins and vascular bundle boundaries). The generated masks are smoother, more compact, and have a higher degree of matching with anatomical contours. A scale-aware segmentation loss function adaptively adjusts the loss weights during training based on the proportion of small-sized targets in the current batch, strengthening the supervision of low-frequency small anatomical structures and solving the problem of gradient dominance by large tissues. This provides an effective tool for high-throughput rice anatomical phenotypic analysis and lodging-resistant, high-yield breeding.
[0023] In this embodiment, the microscopic image of the cross-section of the rice flag leaf includes: Tissue segments were cut from the widest part of the rice flag leaf and manually sectioned to obtain a cross section with a thickness of 0.2 to 0.5 mm. The sections were then immersed in distilled water and stained for 10 seconds in a fresh solution containing 5% phloroglucinol and concentrated hydrochloric acid in a 1:1 volume ratio. The sections were then observed and photographed under a stereomicroscope.
[0024] Among them, hierarchical multi-scale features are aggregated through a bidirectional pyramid, which includes a top-down fusion path and a bottom-up enhancement path. The top-down fusion path upsamples deep semantic features and fuses them with shallow features of the corresponding level, while the bottom-up enhancement path propagates shallow localization cues to the deep layers through step convolution.
[0025] As a preferred embodiment of the above, the high-resolution detail branch introduces an additional high-resolution branch at the P2 level, i.e., at 1 / 4 resolution, and the calculation formula is as follows: ; In the formula, This is a shallow feature map. Indicates upsampling, Indicates channel splicing. This indicates convolution thinning; the generated high-resolution features are then processed... Re-enter a deeper network. This indicates downsampling.
[0026] In this embodiment, the lightweight mask optimization module processes the prototype tensor T as follows: First, perform a 3×3 convolution. and SiLU activation function Then, after a second 3×3 convolution The optimized prototype tensor is obtained. With the optimized prototype tensor Replace the original prototype tensor Then proceed with the subsequent mask decoding.
[0027] As a preferred embodiment of the above, the instance mask is reconstructed in the following manner: ; In the formula, For the c-th basis mask in the optimized prototype tensor, Let be the mask coefficients corresponding to the c-th base mask for the i-th instance. This represents the Sigmoid activation function.
[0028] The dynamic adjustment of the weights in the segmentation loss function includes: Calculate the normalized area of each target in the current batch. ,in and These are the width and height of the target bounding box, respectively; like It is then determined to be a small-sized target; the proportion of small-sized targets in the current batch is calculated. ; Calculate adaptive weighting factors The final loss function is .
[0029] like Figure 2 As shown, a lightweight multi-scale instance segmentation system for microscopic anatomical phenotypic analysis of rice flag leaves, using the method described above, includes: The feature extraction unit is used to acquire microscopic images of the cross-section of rice flag leaves. It extracts hierarchical multi-scale features through a convolutional backbone network. The hierarchical multi-scale features include shallow features containing boundary details and local textures, as well as deep features containing semantic context and anatomical prior information. The detail-preserving unit is used to introduce high-resolution feature maps at a set resolution level where shallow features are located through a high-resolution detail branch. After channel concatenation and convolution refinement of the high-resolution feature maps and deep features, they are re-input into a deeper network to preserve shallow spatial detail features of tiny vascular bundles and narrow leaf veins. The mask generation unit is used to input the fused multi-scale features into the mask generation module. The prototype tensor is then locally spatially smoothed by the lightweight mask optimization module before the instance mask is reconstructed, which suppresses artifacts and improves contour continuity. The scale-aware training unit is used to dynamically adjust the weights of the segmentation loss function based on the proportion of small-sized targets in the current batch during model training. When the proportion of small-sized targets increases, the loss weights are adaptively increased to strengthen the supervision of low-frequency small anatomical structures.
[0030] Example 2: This embodiment provides a lightweight multi-scale instance segmentation method suitable for microscopic anatomical phenotypic analysis of rice flag leaves. It uses cross-sectional microscopic images of rice flag leaves as the processing object and employs the VascuLite-Seg framework to accurately segment the main vein, lateral veins, and vascular bundles at different scales.
[0031] 1. Dataset Construction and Preprocessing
[0032] The dataset used in this embodiment contains core germplasm resources screened from the 3K RGP (3000 Rice Genome Project). Based on genetic diversity, 315 germplasm materials from different countries with similar heading dates were selected from this core set, including 156 indica rice germplasm and 111 japonica rice germplasm (including 45 subtropical japonica rice, 13 tropical japonica rice, 40 temperate japonica rice from Southeast Asia, and 13 GJ-adm). In addition, 33 japonica rice from South Asia and 15 hybrid varieties were also included.
[0033] During the sample collection phase, the flag leaves of three representative plants from each genotype were selected. A 2 cm long tissue segment was cut from the widest part of each flag leaf for manual sectioning. After obtaining a cross-section with a thickness of 0.2 to 0.5 mm, the section was immediately immersed in distilled water for approximately 30 seconds. The section was then stained for 10 seconds in a freshly prepared solution containing 5% phloroglucinol (dissolved in a 95:5 volume ratio of ethanol to water) and concentrated hydrochloric acid prepared at a 1:1 volume ratio. The stained sections were observed and photographed under a stereomicroscope (Olympus SZ61). Figure 3 As shown, the image acquisition resolution is 1792×1374 pixels, the scale bar is 500μm, and it is saved in TIFF format.
[0034] The final dataset contains 864 microscopic images with a total of 75,347 labeled instances, covering 11 different feature types. Each image was manually labeled using LabelMe (version 5.2.1), such as... Figure 4 As shown in the figure, (A) displays the original image, (B) displays the segmentation result obtained using LabelMe, and (C) displays the corresponding masking result. The annotations involve the following anatomical structures: the lateral and medial sides of the main vein (body1, body2), the lateral and medial small vascular bundles of the main vein (body1_small, body2_small), the lateral large vascular bundle of the main vein (body1_big), lateral vein 1 and lateral vein 2 (side1, side2), the small vascular bundles of lateral vein 1 and lateral vein 2 (side1_small, side2_small), and the large vascular bundles of lateral vein 1 and lateral vein 2 (side1_big, side2_big). The dataset is divided into training, validation, and test sets in an 8:1:1 ratio.
[0035] 2. Feature extraction from convolutional backbone networks
[0036] Given an input cross-sectional image The convolutional backbone network first extracts hierarchical feature representations. The feature map output by the backbone network in stage l is represented as follows: , (1) in, Φ l (·) denotes the feature extraction operator for stage l. Shallow features (such as F2) preserve boundary details and local texture information, while deep features (such as F5) encode semantic context and global anatomical prior information. This embodiment uses YOLOv11 as the basic backbone network.
[0037] 3. Two-way pyramid multi-scale feature fusion
[0038] To effectively integrate multi-scale information, the extracted features are aggregated through a bidirectional pyramid consisting of top-down fusion and bottom-up enhancement. The fused features at level l are represented as follows: , (2) Where Up(·) represents the upsampling operation, ψ l (·) represents the convolution thinning operation, and ⊕ represents the channel concatenation operation. Subsequently, backpath propagation is used to locate cues: , (3) Where Down(·) represents downsampling, ω l The · symbol indicates a convolution thinning operation. The final aggregated feature input instance segmentation head is used for classification, localization, and mask generation.
[0039] 4. High-Resolution Detail Branch (HRDB)
[0040] In microscopic images, tiny vascular bundles and narrow leaf veins typically occupy only a few pixels. Traditional pyramid structures starting from P3 (1 / 8 resolution) inevitably lose discriminative features after multiple downsampling operations. To address this issue, this embodiment introduces an additional high-resolution detail branch at the P2 (1 / 4 resolution) level, enabling shallow structural details to participate in the multi-scale fusion process.
[0041] Given a shallow feature map F2, the high-resolution detail branch is defined as: , (4) The generated high-resolution features are then re-injected into deeper network layers: (5) This design leverages subtle edge features and local intensity transitions to guide deeper semantic features, rather than discarding them at an early stage. For a pixel area of A... s For tiny objects, the effective visible area after downsampling with a step size R is approximately: (6) Compared to P3 (R=8), P2 (R=4) retains approximately 4 times more pixels, significantly improving the observability of fine vascular bundles.
[0042] Experimental data show that after introducing HRDB, the mAP@0.5 of body1_small increased from 0.499 to 0.569, body2_small from 0.280 to 0.534, side1_small from 0.333 to 0.372, and side2_small from 0.364 to 0.392, with significant improvements in all four small object categories.
[0043] 5. Lightweight Mask Refinement Module (MRM)
[0044] The segmentation header follows a prototype-based mask generation paradigm. Let... Let C represent the prototype tensor, where C is the number of basis masks. The i-th instance mask is reconstructed as follows: (7) Where, α ic For mask coefficients, (·) denotes the Sigmoid activation function. Directly generated prototype images often contain noise, discontinuities, and jagged boundaries, especially noticeable in elongated structures such as the main vein and lateral vein contours.
[0045] To address this issue, the mask refining module introduces lightweight spatial smoothing before final mask reconstruction: , (8) Where f1(·) and f2(·) are 3×3 convolution operations, and δ(·) is the SiLU activation function. The optimized prototype... In subsequent mask decoding, it replaces the original prototype T. By aggregating local neighborhood information, the mask refining module can suppress isolated erroneous activations caused by tinting artifacts, improve contour smoothness, and maintain the continuity of fine structures. Compared to designs that rely on numerous attention mechanisms, the computational cost of this module is negligible.
[0046] 6. Scale-Aware Segmentation Loss Function (SASL)
[0047] Anatomical images of rice flag leaves exhibit severe scale imbalance: large tissues such as the midrib and lateral veins dominate pixel distribution, while tiny vascular bundles provide only limited supervisory signals. Standard segmentation loss functions tend to favor simpler and larger regions. To address this issue, scale-aware segmentation loss functions dynamically increase the segmentation loss weights when more small objects appear in mini-batch data.
[0048] For each target object, the width, height, and normalized area are defined as follows: (9) If an object satisfies: (10) Where τ = 0.02 is the area threshold, it is considered a small object. The proportion of small objects in this batch is: (11) Where N is the total number of target objects in the batch. Given the original segmentation loss L... seg The adaptive weighting factor is defined as: , (12) Where γ = 1.5 is the amplification factor. The final optimized loss function is: (13) When a batch of samples contains a large number of tiny vascular bundles, the model automatically assigns stronger gradient weights to complex microstructures; batches of samples mainly consisting of large tissues maintain stable optimization performance. This adaptive mechanism does not require manual adjustment of class weights.
[0049] 7. Model Training
[0050] This embodiment was trained on a single NVIDIA RTX 3090 GPU, using the Ultralytics YOLO framework in conjunction with PyTorch 2.0.1, CUDA 11.7, and Python 3.8. The model was trained using 640x640 pixel input images, with 300 training epochs using the AdamW optimizer. The initial learning rate was 0.01, the weight decay factor was 0.0005, and the batch size was 16. Mosaic data augmentation was applied during the initial training phase (application probability p=1.0; this strategy was deactivated after the 20th epoch to restore the original data distribution and avoid semantic distortion caused by image stitching). Other data augmentation strategies included copy-paste (p=0.05), translation (p=0.2), and random horizontal flipping, and scale jitter was introduced to improve the model's generalization ability to scale changes. During training, random shuffling (Shuffle=True) was enabled in the data loader to ensure the randomness of the batch sample distribution. Automatic Mixed Precision (AMP) was enabled during optimization to accelerate training, and interrupted training states were restored based on previously saved checkpoints. During the inference phase, the model directly outputs the prediction results without performing non-maximum suppression (NMS) or any other post-processing operations.
[0051] 8. Experimental Results
[0052] like Figure 5 As shown, to verify the superiority of the proposed framework, the method of this embodiment is compared with several existing methods, including YOLOv8-seg, YOLOv11-seg, DeepLabV3, HRNet, PSPNet, U-Net, SOD-YOLO, ASF-YOLO, Subtle-YOLO, and Rice-SVBDete. The quantitative evaluation results are shown in the table below:
[0053] Table 1. Performance comparison between this embodiment and existing methods
[0054] Compared to the baseline model YOLOv11-seg, this embodiment improves precision from 0.771 to 0.813 (a 4.2% improvement), recall from 0.783 to 0.811 (a 2.8% improvement), and mAP@0.5 from 0.763 to 0.792 (a 2.9% improvement). Compared to the strongest competing method SOD-YOLO, this embodiment outperforms both precision (0.813 vs. 0.804) and recall (0.811 vs. 0.793).
[0055] The ablation experiment results are shown in the table below, verifying the effectiveness of each of the three core modules:
[0056] Table 2. Ablation Experiment Results
[0057] Key findings: The HRDB module delivered the greatest performance improvement (2.3 percentage points improvement in mAP@0.5), especially for small vascular bundles; the MRM module primarily improved profile quality and boundary accuracy; the SASL module improved all metrics without requiring additional parameters or inference overhead.
[0058] 9. Online Reasoning and Applications
[0059] After model training is complete, the model parameters are saved. During the online inference phase, real-time acquired microscopic images of rice flag leaf cross-sections are scaled to 640×640 pixels and input into the trained VascuLite-Seg model. The model outputs instance segmentation masks and category labels for each anatomical structure. The segmentation results can be directly used to extract phenotypic features such as the number of vascular bundles, vascular bundle area, vessel arrangement, and spatial distribution, providing data support for high-throughput phenotypic analysis, trait analysis, and breeding of high-yielding and lodging-resistant rice varieties.
[0060] Example 3: Parameter Variation and Transferability Verification
[0061] Based on Example 2, this embodiment verifies the portability and robustness of the proposed framework by changing key parameters and configurations.
[0062] 1. The influence of the area threshold τ
[0063] The area threshold τ was set to 0.01, 0.02, 0.03, and 0.05, respectively, while the other parameters remained the same as in Example 1. Experimental results show that:
[0064] Table 3. Parameter sensitivity analysis of area threshold τ
[0065] When τ=0.02, the model achieves optimal or near-optimal performance across all metrics. A τ value that is too small (0.01) may result in some medium-sized small targets not being included in the adaptive weighting, while a τ value that is too large (0.05) may misclassify some medium-sized tissues as small targets, diluting the specificity of the adaptive weights. τ=0.02 is the optimal choice for this dataset, and this threshold can be adjusted accordingly based on the microscopic image characteristics of different crop organs.
[0066] 2. The effect of magnification factor γ
[0067] The amplification factor γ was set to 0.5, 1.0, 1.5, and 2.5, respectively, while the other parameters remained the same as in Example 1. Experimental results show that the model achieves the best overall performance when γ=1.5. When the value of γ is too small (0.5), the adaptive weighting effect is not obvious, and the improvement in the segmentation performance of small targets is limited; when the value of γ is too large (2.5), the loss weight of small targets is too high, resulting in a decrease in the segmentation accuracy of large targets (such as the main vein and lateral veins), and the overall performance of the model fluctuates. γ=1.5 achieves the best balance between large and small targets.
[0068] 3. Adaptation verification for different backbone networks
[0069] To verify the generality of the proposed framework, the backbone networks were replaced with YOLOv8 and ResNet-50 respectively, and experiments were conducted on the same dataset and training configuration. The results show that:
[0070] Table 4. Adaptation verification of different backbone networks
[0071] All three backbone networks showed significant performance improvements over their respective baseline models after incorporating the HRDB, MRM, and SASL modules, demonstrating the good versatility of the proposed three core modules and their adaptability to different convolutional backbone network architectures. YOLOv11 achieved the best performance as the backbone network, thanks to its end-to-end optimized design in object detection and instance segmentation tasks.
[0072] 4. Robustness verification under different staining conditions
[0073] To verify the robustness of the framework under different imaging conditions, an additional batch of 120 images of the sword leaf cross-section were collected using different staining concentrations (3% and 8% phloroglucinol) and different microscope magnifications (5× and 10×) as an additional test set. On this test set, the precision of the method in this embodiment was 0.798, the recall was 0.792, and the mAP@0.5 was 0.775, showing only a performance decrease of about 1.5 to 2.0 percentage points compared to the original test set, indicating that the framework has good robustness to staining differences and changes in imaging conditions.
[0074] Example 4: Microscopic Anatomical Phenotypic Analysis System for Rice Flag Leaves
[0075] This embodiment provides a rice flag leaf microscopic anatomy phenotypic analysis system for executing the lightweight multi-scale instance segmentation methods described in Embodiments 2 and 3. The system comprises four parts: an image acquisition subsystem, a feature extraction and segmentation subsystem, a phenotypic analysis subsystem, and a system control subsystem.
[0076] 1. Image Acquisition Subsystem
[0077] The image acquisition subsystem comprises a microscope module and an image acquisition module. The microscope module uses a stereomicroscope (such as an Olympus SZ61) to observe cross-sectional sections of rice flag leaves stained with phloroglucinol. The image acquisition module acquires microscopic images via a high-resolution camera with a resolution of 1792 × 1374 pixels and a scale bar of 500 μm; images are saved in TIFF format. This subsystem supports manual control of section thickness (0.2 to 0.5 mm) and staining time (10 seconds) to ensure stable and consistent image quality.
[0078] 2. Feature Extraction and Segmentation Subsystem
[0079] The feature extraction and segmentation subsystem is the core of this system, including: (1) Preprocessing module: The acquired microscopic images are normalized in size (scaled to 640×640 pixels) and data augmentation is performed, including operations such as Mosaic enhancement, copy and paste, translation, random horizontal flipping and scale jitter, to expand the training dataset.
[0080] (2) Backbone feature extraction module: YOLOv11 convolutional backbone network is used to extract hierarchical feature representations F2, F3, F4 and F5 from the second to the fifth stage of the input image. Among them, shallow features preserve boundary details and local textures, while deep features encode semantic context and global anatomical prior information.
[0081] (3) Multi-scale feature fusion module: A bidirectional pyramid structure consisting of top-down fusion and bottom-up enhancement is adopted to aggregate features at each level and generate fused feature P. l and enhanced features Q l This module includes a High Resolution Detail Branch (HRDB), which introduces an additional high resolution branch at the P2 (1 / 4 resolution) level to inject shallow structural details into the multi-scale fusion process.
[0082] (4) Segmentation Head Module: Based on the prototype mask generation paradigm, the instance mask is reconstructed using the prototype tensor and mask coefficients. This module embeds a lightweight mask refining module (MRM), which performs spatial smoothing on the prototype tensor through 3×3 convolution and SiLU activation function to suppress noise response and improve contour continuity.
[0083] (5) Training optimization module: The scale-aware segmentation loss function (SASL) is adopted to dynamically adjust the loss weights according to the proportion of small objects in each mini-batch. This module uses the AdamW optimizer with an initial learning rate of 0.01, a weight decay coefficient of 0.0005, a batch size of 16, and a training period of 300 epochs. Automatic mixed precision technology is enabled.
[0084] 3. Phenotypic Analysis Subsystem
[0085] The phenotypic analysis subsystem includes: (1) Instance statistics module: Based on the segmentation results, the number, area and spatial distribution information of each type of anatomical structure (main vein, lateral vein, vascular bundles of different scales) in each microscopic image are statistically analyzed.
[0086] (2) Morphological feature quantification module: calculates morphological indicators such as the average area, area variance, vessel arrangement, and vascular bundle spacing of vascular bundles, and generates a structured phenotypic feature report.
[0087] (3) Variety comparison module: Statistical comparison of phenotypic characteristics of different germplasm materials to help researchers identify anatomical markers of high-yielding and lodging-resistant varieties.
[0088] 4. System Control Subsystem
[0089] The system management subsystem includes: (1) System Management Module: Provides global management functions such as image acquisition parameter configuration, model training parameter configuration (including area threshold τ, magnification factor γ, learning rate, etc.), and segmentation result export. It also provides a system operation status monitoring panel to display key indicators such as GPU utilization, data processing throughput, and segmentation accuracy in real time.
[0090] (2) Data Management Module: Manages the storage and retrieval of microscopic image datasets, labeled data, model parameters and segmentation results, and supports batch import and export of data and version management.
[0091] (3) User interaction module: Provides a graphical operation interface, supports users to manually review and correct the segmentation results, and the annotation results can be fed back to the training dataset to continuously optimize the model performance.
[0092] 5. System Hardware Configuration
[0093] This system is deployed on a computing server equipped with an NVIDIA RTX 3090 GPU (24GB VRAM), running Ubuntu 20.04, and using PyTorch 2.0.1, CUDA 11.7, and Python 3.8 as the deep learning environment. The image acquisition subsystem is deployed on the experimental platform, transmitting acquired microscopic images to the computing server via gigabit Ethernet for feature extraction and segmentation. Phenotypic analysis results are output via a web interface or API for breeding researchers to query and analyze. The system supports both single-image inference and multi-batch batch processing modes, with a single-image inference time of approximately 15 milliseconds, meeting the requirements of high-throughput phenotypic analysis.
[0094] Example 5: Please see Figure 6The diagram shows a structural schematic of a computer device provided in an embodiment of this application. An embodiment of this application provides a computer device 400, including a processor 410 and a memory 420. The memory 420 stores a computer program executable by the processor 410. When the computer program is executed by the processor 410, it performs the method described above.
[0095] This application embodiment also provides a storage medium 430, on which a computer program is stored, and the computer program is executed by a processor 410 to perform the above method.
[0096] The storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0097] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.
[0098] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0099] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0100] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0101] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0102] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0103] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0104] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A lightweight multi-scale instance segmentation method for microscopic anatomical phenotypic analysis of rice flag leaves, characterized in that, Includes the following steps: Microscopic images of the cross-section of rice flag leaves are obtained, and hierarchical multi-scale features are extracted through a convolutional backbone network. The hierarchical multi-scale features include shallow features containing boundary details and local textures, as well as deep features containing semantic context and anatomical prior information. High-resolution feature maps are introduced at a set resolution level where the shallow features are located by a high-resolution detail branch. The high-resolution feature maps are then concatenated with the deep features and refined by convolution before being re-input into a deeper network to preserve shallow spatial detail features of tiny vascular bundles and narrow leaf veins. The fused multi-scale features are input into the mask generation module. The prototype tensor is then locally spatially smoothed by the lightweight mask optimization module before the instance mask is reconstructed to suppress artifacts and improve contour continuity. During model training, the weights of the segmentation loss function are dynamically adjusted based on the proportion of small-sized targets in the current batch. When the proportion of small-sized targets increases, the loss weights are adaptively increased to strengthen the supervision of low-frequency small anatomical structures.
2. The method according to claim 1, characterized in that, The microscopic image of the cross-section of the rice flag leaf includes: Tissue segments were cut from the widest part of the rice flag leaf and manually sectioned to obtain a cross section with a thickness of 0.2 to 0.5 mm. The sections were then immersed in distilled water and stained for 10 seconds in a fresh solution containing 5% phloroglucinol and concentrated hydrochloric acid in a 1:1 volume ratio. The sections were then observed and photographed under a stereomicroscope.
3. The method according to claim 1, characterized in that, The hierarchical multi-scale features are aggregated through a bidirectional pyramid, which includes a top-down fusion path and a bottom-up enhancement path. The top-down fusion path upsamples deep semantic features and fuses them with shallow features of the corresponding level, while the bottom-up enhancement path propagates shallow localization cues to the deep layers through straddle convolution.
4. The method according to claim 1, characterized in that, The high-resolution detail branch introduces an additional high-resolution branch at the P2 level, i.e., at 1 / 4 resolution. The calculation formula is as follows: ; In the formula, This is a shallow feature map. Indicates upsampling, Indicates channel splicing. This indicates convolution thinning; the generated high-resolution features are then processed... Re-enter a deeper network. This indicates downsampling.
5. The method according to claim 4, characterized in that, The lightweight mask optimization module processes the prototype tensor T as follows: First, perform a 3×3 convolution. and SiLU activation function Then, after a second 3×3 convolution The optimized prototype tensor is obtained. With the optimized prototype tensor Replace the original prototype tensor Then proceed with the subsequent mask decoding.
6. The method according to claim 5, characterized in that, The instance mask is reconstructed in the following way: In the formula, For the c-th basis mask in the optimized prototype tensor, Let be the mask coefficients corresponding to the c-th base mask for the i-th instance. This represents the Sigmoid activation function.
7. The method according to claim 1, characterized in that, The weights of the dynamically adjusted segmentation loss function include: Calculate the normalized area of each target in the current batch. ,in and These are the width and height of the target bounding box, respectively; like It is then determined to be a small-sized target; the proportion of small-sized targets in the current batch is calculated. ; Calculate adaptive weighting factors The final loss function is .
8. A lightweight multi-scale instance segmentation system for microscopic anatomical phenotypic analysis of rice flag leaves, characterized in that, Using the method of any one of claims 1 to 7, the system comprises: The feature extraction unit is used to acquire a microscopic image of the cross-section of rice flag leaf and extract hierarchical multi-scale features through a convolutional backbone network. The hierarchical multi-scale features include shallow features containing boundary details and local textures, as well as deep features containing semantic context and anatomical prior information. The detail-preserving unit is used to introduce a high-resolution feature map at a set resolution level where the shallow features are located through a high-resolution detail branch. The high-resolution feature map is then channel-stitched and convolved with the deep features and re-inputted into a deeper network to preserve shallow spatial detail features of tiny vascular bundles and narrow leaf veins. The mask generation unit is used to input the fused multi-scale features into the mask generation module. The prototype tensor is then locally spatially smoothed by the lightweight mask optimization module before the instance mask is reconstructed, which suppresses artifacts and improves contour continuity. The scale-aware training unit is used to dynamically adjust the weights of the segmentation loss function based on the proportion of small-sized targets in the current batch during model training. When the proportion of small-sized targets increases, the loss weights are adaptively increased to enhance the supervision of low-frequency small anatomical structures.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-7.