Methods, apparatus, media and equipment for detecting tracheid cell cavities in cross-sections of coniferous wood

By using an active learning framework and generative adversarial networks to enhance sparse data sampling, combined with a cell cavity detection and segmentation model, the problem of automated detection and segmentation of cell cavities in the cross section of coniferous wood was solved, achieving low-cost and efficient acquisition of quantitative anatomical data of cell cavities.

CN120388375BActive Publication Date: 2025-10-28INST OF WOOD INDUDTRY CHINESE ACAD OF FORESTRY

Patent Information

Application Number
CN202510543849.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-10-28
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

Existing methods for quantitative anatomical studies of cell cavities in cross-sections of coniferous trees are time-consuming and labor-intensive. Due to human factors, it is difficult to guarantee work efficiency and accuracy. Especially when faced with complex structures and large differences in tree species, automated segmentation and identification are difficult. Differences in staining techniques increase the complexity of data annotation, resulting in insufficient representativeness and accuracy of model training.

Method used

An active learning framework was used to enhance sparse data sampling by combining generative adversarial networks and feedforward convolutional neural networks. The active learning framework was used to annotate tracheid cavities, and a cell cavity detection and segmentation model was constructed. The SAM general segmentation model was used for cell cavity segmentation, and post-processing was performed to extract quantitative anatomical data.

Benefits of technology

It enables automatic and rapid detection and segmentation of tracheid cavities in coniferous trees, reduces the cost of manual detection and labeling, improves the representativeness of data collection and the adaptability of the model, solves the problem of automated segmentation caused by complex structures and differences in tree species, and improves the efficiency and accuracy of detection and segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120388375B_ABST
    Figure CN120388375B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, medium, and equipment for detecting tracheid cavities in transverse sections of coniferous wood, belonging to the field of wood identification technology. Based on an active learning approach, this invention combines generative adversarial networks (GANs) for sparse data sampling and uses the output of a target detection model as a SAM (Self-Assisted Analysis) prompting strategy to achieve automatic segmentation of tracheid cavities in coniferous wood transverse sections and obtain quantitative anatomical data. By optimizing the data sampling process and enhancing the model's adaptability, this method effectively improves the accuracy and efficiency of cavity segmentation and can be adapted to any coniferous wood transverse section microscopic image. It achieves low-cost construction of a coniferous wood microscopic image database and the development of a model for the detection, segmentation, and measurement of coniferous wood tracheid cavities. This solves the problems of difficult manual detection and high collection and annotation costs caused by the complex structure and sampling difficulty of tracheid cavities in coniferous wood transverse sections, enabling automatic and rapid detection, segmentation, and measurement of coniferous wood tracheid cavities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wood identification technology, and in particular to a method, apparatus, medium and equipment for detecting tracheid cavities in a cross section of coniferous wood. Background Technology

[0002] Forestry plays a vital role in ecological environmental protection and the development of a green economy. Especially in the scientific management and rational utilization of timber resources, advancements in forestry technology are of great significance in ensuring the sustainable development of timber resources. Coniferous wood, as a major category of forestry resources, has always been a hot topic in wood science research due to its unique biological characteristics and wide range of applications.

[0003] The cellular structure of coniferous wood determines its physiological, physical, chemical, and mechanical properties, which have a direct impact on plant physiology, ecology, evolutionary biology, wood processing and utilization, paper and fiber industry, climate reconstruction, tree growth research, and tree taxonomy. In wood science research, accurate labeling and measurement of cell cavity characteristics are crucial for tree species identification and wood property analysis.

[0004] Traditional methods for quantitative anatomical studies of cell cavities often rely on microscopic observation and manual measurement. These methods are not only time-consuming and labor-intensive, but also suffer from difficulties in ensuring efficiency and accuracy for large-scale data measurements due to human intervention. With the development of science and technology, especially the advancement of computer image processing and machine learning technologies, automated and intelligent methods for measuring quantitative anatomical data of cells are gradually becoming a new trend in research.

[0005] In the field of computer graphics, traditional cell segmentation methods mostly rely on feature engineering image processing techniques, but their performance is unsatisfactory when dealing with cells that are complex in shape, overlapping, or have low contrast. Deep learning, by automatically extracting features from data, can adapt to different types of cell segmentation tasks and has gradually become a research hotspot.

[0006] Existing automated methods still face numerous challenges in processing quantitative anatomical data of coniferous wood cross-section cell cavities. First, the complex structure and high variability of coniferous wood cross-section cell cavities pose significant difficulties for automated segmentation and identification. Second, subtle morphological differences exist in the cell cavities of coniferous wood cross-sections among different tree species, placing higher demands on the universality and discriminative ability of algorithms. Due to the vast number of tree species worldwide, the morphology of xylem cell cavities varies considerably among each species, and even within the same species, cell characteristics differ significantly under different growth environments. This diversity in tree species and data not only increases the complexity of data annotation but also demands greater robustness from algorithms. Furthermore, differences in staining techniques are also a crucial factor. The staining process is influenced not only by the properties of the staining reagents themselves but also by cellular chemical substances, leading to differences between different stained samples. This diversity in staining further increases the complexity of data annotation and challenges the applicability of automated identification and modeling algorithms. Actual data collection is insufficient to fully cover all possible cell morphologies and variations. The sparse data collection is inadequate, which makes it impossible to fully reflect the diversity of tree species and environment, thus affecting the representativeness and accuracy of model training. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method, apparatus, medium, and equipment for detecting tracheid cavities in the cross section of coniferous wood. This invention solves the problems of difficult manual detection and high collection and labeling costs caused by the complex structure and sampling difficulty of tracheid cavities in the cross section of coniferous wood, and realizes automatic and rapid detection of tracheid cavities in coniferous wood.

[0008] The technical solution provided by this invention is as follows:

[0009] In a first aspect, the present invention provides a method for detecting tracheid cell cavities in a cross-section of coniferous wood, the method comprising:

[0010] S1: Obtain a microscopic image of a cross-section of coniferous wood;

[0011] S2: Use the trained coniferous microscopic image simulation model to perform sparse data sampling enhancement on the acquired coniferous cross-section microscopic images to obtain an image dataset;

[0012] S3: Annotate the tracheid cavities of the image dataset based on an active learning framework;

[0013] S4: Construct a cell cavity detection model and train it using the labeled image dataset;

[0014] S5: Obtain a microscopic image of the cross section of the coniferous wood to be detected, and use the trained cell cavity detection model to detect the tracheid cell cavity of the microscopic image of the cross section of the coniferous wood to be detected, and output the tracheid cell cavity prompt box.

[0015] S6: Construct and train a cell cavity segmentation model, and use the trained cell cavity segmentation model to segment the image contained in the tracheid cell cavity prompt box to obtain the tracheid cell cavity segmentation result.

[0016] Furthermore, the microscopic image simulation model of coniferous wood is trained using the following method:

[0017] Construct a dataset of microscopic images of coniferous trees;

[0018] A style-based generative adversarial network was constructed as a simulation model for the microscopic images of coniferous wood, and the generative adversarial network was trained using the microscopic image dataset of coniferous wood.

[0019] The generative adversarial network includes a parallel generator and a discriminator. The generator includes a style mapping network and a generation network, which are used to sample latent features from the latent space to generate images. The discriminator includes multiple convolutional layers. Each convolutional layer downsamples the image through pooling operations to extract high-level features of the image and finally outputs a binary discrimination result.

[0020] Construct an inversion network based on a feedforward convolutional neural network and perform inversion training on the aforementioned generative adversarial network;

[0021] The forward inversion network is a forward structure, including multiple convolutional layers and a fully connected layer. The fully connected layer outputs latent features, which are compared with the latent features of the generative adversarial network that generates the corresponding image, and a loss function is constructed for optimization.

[0022] Furthermore, S2 includes:

[0023] Based on the generative adversarial network and the forward inversion network, latent features are inverted from the cross-sectional microscopic image of the coniferous wood. By linearly adjusting the latent features and generating sparse data through the generative network, sparse data sampling enhancement is achieved.

[0024] Furthermore, S3 includes:

[0025] A basic annotation model is constructed, and a pre-training dataset containing a small number of tracheid cell lumen location annotations is constructed. The basic annotation model is trained using the pre-training dataset.

[0026] The basic annotation model is used to obtain the convolutional features of all images in the image dataset, and the feature similarity of all images is calculated by combining the convolutional features of all layers to construct a similarity matrix;

[0027] Representative images from the image dataset are obtained based on the similarity matrix and manually labeled to optimize the basic labeling model;

[0028] Multiple uncertainty labeling models are trained based on the base labeling model using labeled data. The standard deviation of the confidence scores of the bounding boxes of the multiple uncertainty labeling models is calculated. After normalizing the standard deviation, uncertainty sampling is performed at a set uncertainty level to obtain model uncertainty labels for manual labeling, and the base labeling model is optimized.

[0029] Furthermore, S6 includes:

[0030] A general SAM segmentation model based on the improved cell cavity detection model is constructed and trained, and the original cue encoder of the general SAM segmentation model is replaced with the output of the cell cavity detection model.

[0031] The SAM general segmentation model is used to segment the image containing the tracheid cavity cue box output by the cell cavity detection model to obtain the tracheid cavity segmentation result.

[0032] Furthermore, the method also includes:

[0033] S7: Post-process the tracheid cell cavity segmentation results, separate the cell cavity regions of each cell, and extract quantitative anatomical data of each cell cavity.

[0034] Secondly, the present invention provides a device for detecting tracheid cell cavities in a cross-section of coniferous wood, the device comprising:

[0035] The data acquisition module is used to acquire microscopic images of cross-sections of coniferous trees;

[0036] The sparse enhancement module is used to perform sparse data sampling enhancement on the acquired microscopic images of coniferous cross sections using the trained coniferous microscopic image simulation model, so as to obtain an image dataset.

[0037] An active learning module is used to annotate tracheid cavities in the image dataset based on an active learning framework.

[0038] The cell cavity detection model building module is used to build a cell cavity detection model and train the cell cavity detection model using an annotated image dataset;

[0039] The cell cavity detection module is used to acquire a cross-sectional microscopic image of the coniferous wood to be detected, and to use the trained cell cavity detection model to detect tracheid cells in the cross-sectional microscopic image of the coniferous wood to be detected, and output a tracheid cell cavity prompt box.

[0040] The cell cavity segmentation module is used to construct and train a cell cavity segmentation model. The trained cell cavity segmentation model is used to segment the image contained in the tracheid cell cavity prompt box to obtain the tracheid cell cavity segmentation result.

[0041] Furthermore, the microscopic image simulation model of coniferous wood is trained through the following process:

[0042] Construct a dataset of microscopic images of coniferous trees;

[0043] A style-based generative adversarial network was constructed as a simulation model for the microscopic images of coniferous wood, and the generative adversarial network was trained using the microscopic image dataset of coniferous wood.

[0044] The generative adversarial network includes a parallel generator and a discriminator. The generator includes a style mapping network and a generation network, which are used to sample latent features from the latent space to generate images. The discriminator includes multiple convolutional layers. Each convolutional layer downsamples the image through pooling operations to extract high-level features of the image and finally outputs a binary discrimination result.

[0045] Construct an inversion network based on a feedforward convolutional neural network and perform inversion training on the aforementioned generative adversarial network;

[0046] The forward inversion network is a forward structure, including multiple convolutional layers and a fully connected layer. The fully connected layer outputs latent features, which are compared with the latent features of the generative adversarial network that generates the corresponding image, and a loss function is constructed for optimization.

[0047] Furthermore, the sparse enhancement module is used for:

[0048] Based on the generative adversarial network and the forward inversion network, latent features are inverted from the cross-sectional microscopic image of the coniferous wood. By linearly adjusting the latent features and generating sparse data through the generative network, sparse data sampling enhancement is achieved.

[0049] Furthermore, the active learning module includes the following process:

[0050] A basic annotation model is constructed, and a pre-training dataset containing a small number of tracheid cell lumen location annotations is constructed. The basic annotation model is trained using the pre-training dataset.

[0051] The basic annotation model is used to obtain the convolutional features of all images in the image dataset, and the feature similarity of all images is calculated by combining the convolutional features of all layers to construct a similarity matrix;

[0052] Representative images from the image dataset are obtained based on the similarity matrix and manually labeled to optimize the basic labeling model;

[0053] Multiple uncertainty labeling models are trained based on the base labeling model using labeled data. The standard deviation of the confidence scores of the bounding boxes of the multiple uncertainty labeling models is calculated. After normalizing the standard deviation, uncertainty sampling is performed at a set uncertainty level to obtain model uncertainty labels for manual labeling, and the base labeling model is optimized.

[0054] Furthermore, the cell cavity segmentation module includes the following process:

[0055] A general SAM segmentation model based on the improved cell cavity detection model is constructed and trained, and the original cue encoder of the general SAM segmentation model is replaced with the output of the cell cavity detection model.

[0056] The SAM general segmentation model is used to segment the image containing the tracheid cavity cue box output by the cell cavity detection model to obtain the tracheid cavity segmentation result.

[0057] Furthermore, the device also includes:

[0058] The post-processing module is used to post-process the tracheid cell cavity segmentation results, separate the cell cavity regions of each cell, and extract quantitative anatomical data of each cell cavity.

[0059] Thirdly, the present invention provides a computer-readable storage medium for detecting tracheid cavities in a cross section of coniferous wood, including a memory for storing processor-executable instructions, which, when executed by the processor, implement the steps of the method for detecting tracheid cavities in a cross section of coniferous wood as described in the first aspect.

[0060] Fourthly, the present invention provides an apparatus for detecting tracheid cavities in a cross section of coniferous wood, characterized in that it includes at least one processor and a memory storing computer-executable instructions, wherein the processor executes the instructions to implement the steps of the method for detecting tracheid cavities in a cross section of coniferous wood as described in the first aspect.

[0061] The present invention has the following beneficial effects:

[0062] This invention utilizes an active learning strategy to achieve the construction of a low-cost microscopic image database of coniferous wood, as well as the development of a model for the detection, segmentation, and measurement of tracheid cavities in coniferous wood. It solves the problems of difficult manual detection of tracheid cavities in coniferous wood cross-sections due to their complex structure and sampling difficulties, as well as the high cost of data collection and annotation. It can cope with challenges such as the amount of annotation, data diversity, staining differences, and the adaptability of existing models, and realizes the automatic and rapid detection, segmentation, and measurement of tracheid cavities in coniferous wood. Attached Figure Description

[0063] Figure 1 This is a flowchart of the method for detecting tracheid cells in a cross section of coniferous wood according to the present invention;

[0064] Figure 2 This is a diagram illustrating the active learning strategy and model architecture of the present invention;

[0065] Figure 3 This is a sampling diagram of the linear latent space sparse data after inversion based on StyleGAN3 in this invention;

[0066] Figure 4 This is a similarity comparison diagram based on convolutional feature similarity calculation under the active learning framework of this invention;

[0067] Figure 5 This invention is based on an uncertainty sampling diagram within an active learning framework.

[0068] Figure 6 These are original microscopic images of slash pine in an embodiment of the present invention;

[0069] Figure 7 for Figure 6 Cell cavity detection diagram of the original slash pine micrograph shown;

[0070] Figure 8 for Figure 6 Cell cavity segmentation diagram of the original microscopic image of slash pine shown;

[0071] Figure 9 This is a schematic diagram of the device for detecting tracheid cavities in a cross section of coniferous wood according to the present invention. Detailed Implementation

[0072] To make the technical problems, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. The components of the embodiments of this invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0073] This invention provides a method for detecting tracheid cell cavities in a cross-section of coniferous wood, used to segment the outline of tracheid cell cavities in a cross-section of coniferous wood and rapidly obtain quantitative anatomical data. For example... Figure 1 As shown, the method includes:

[0074] S1: Obtain a microscopic image of a cross-section of coniferous wood.

[0075] In this invention, a flat-push slicer can be used to obtain wood slices, and an optical microscope can be used to obtain image data.

[0076] S2: Use the trained coniferous microscopic image simulation model to perform sparse data sampling enhancement on the acquired coniferous cross-sectional microscopic images to obtain an image dataset.

[0077] This step is used to generate sparse microscopic images of coniferous cross sections to cover the complex variability of the species. First, relying on large-scale specimen data from the Wood Herbarium of the Chinese Academy of Forestry, a coniferous microscopic image simulation model based on a generative adversarial network is trained. Then, a feedforward network is designed for the coniferous microscopic image simulation model to perform latent spatial inversion and sample sparsely sampled regions.

[0078] In one example, a microscopic image simulation model of coniferous materials can be trained using the following method:

[0079] S21: Construct a dataset of microscopic images of coniferous materials.

[0080] Based on the timber specimen resource bank of the Chinese Academy of Forestry, a high-quality coniferous wood microscopic image dataset was constructed. Forty tree species were randomly selected, and for each species, 20 high-resolution images of 2048×2048 pixels were captured using 100x magnification. To meet training requirements, for each tree species, random cropping was performed without loss of magnification, extracting 10 images of 1024×1024 pixels from different center points, resulting in a total of 8000 images.

[0081] S22: Construct a style-based generative adversarial network (StyleGAN3) as a simulation model for microscopic images of coniferous materials, and train the generative adversarial network using a dataset of microscopic images of coniferous materials.

[0082] The generative adversarial network (GAN) consists of a parallel generator and a discriminator. The generator includes a style mapping network and a generative network, which are used to sample latent features from the latent space to generate images. The discriminator includes multiple (e.g., 8) convolutional layers. Each convolutional layer downsamples the image through pooling operations to extract high-level features of the image and finally outputs a binary discrimination result.

[0083] S23: Construct an inversion network based on a feedforward convolutional neural network and perform inversion training on the aforementioned generative adversarial network.

[0084] The forward inversion network is a simple forward structure, including multiple (e.g., 6) convolutional layers and a fully connected layer. The fully connected layer outputs latent features, which are compared with the latent features of the generative adversarial network that generates the corresponding image, and a loss function is constructed for optimization.

[0085] After training, the latent features can be inverted from the aforementioned generative adversarial network and forward inversion network to obtain latent feature vectors from the cross-sectional microscopic images of coniferous wood. By linearly adjusting the latent features and generating sparse data through a generative network, sparse data sampling enhancement is achieved to cover the complex variability information of the species. Figure 3 As shown.

[0086] During execution, the conifer microscopic image simulation model performs latent space inversion using a feedforward network-based method, and optimizes the latent space (z-space) and intermediate representation layer (w-space) using deep learning to achieve precise control over the sparse sampling region. Specifically, the inversion network first receives the target microscopic image as input and processes it through a series of deep network layers to identify and extract the key features constituting the image. Subsequently, these features are mapped into the w-feature space to generate a preliminary w-feature vector. In this process, the loss function of the optimization process is defined as shown in Equation (1):

[0087] (1)

[0088] Using the sparse coniferous microscopic image I and the pre-trained coniferous microscopic image simulation model G as inputs, a loss function Loss is established, which is composed of perceptual space loss. It consists of pixel-wise loss. A random feature space vector is initialized. , The distance representing the perceived space indicates the distance between the sparse coniferous microscopic image I and the distance based on... Simulated microscopic images generated in feature space by generator G The distance between two images in the perceptual space can be used to compare the differences between them in high-level semantics. This represents pixel-wise loss, which can capture the differences between two images at the pixel level. A combination of the two losses can comprehensively consider... and The semantic gap between low-level and high-level layers. By optimizing the loss, we can obtain images that most closely resemble sparse simulated microscopic images. The w-feature space. During simulation, sparse sampling is achieved by adjusting the sampling points in the w-feature space; specifically, this is done through a truncation coefficient. The range of motion of sampling points in the latent space is limited to control the magnitude of pattern changes, as shown in formulas (2) and (3):

[0089] (2)

[0090] (3)

[0091] in The original feature space, obtained by random sampling from the generator network, serves as the original output feature control vector. Represents the average w-space; It is the cutoff coefficient, used to regulate... Space towards The degree of feature change in the feature space; This represents the feature space after adjustment. Therefore, by... By controlling this, the latent generation vector w of the image can be changed, such as... Figure 3 As shown.

[0092] S3: Annotate tracheid cavities in image datasets based on an active learning framework.

[0093] This step is used for representative cell annotation based on an active learning framework. By combining the active learning framework with deep learning models and human-computer interaction annotation, the efficiency and accuracy of annotation are improved. Figure 2 As shown.

[0094] In one example, this step includes:

[0095] S31: Construct a basic annotation model. Build a pre-training dataset containing a small number of tracheid cavity location annotations and use the pre-training dataset to train the basic annotation model.

[0096] Specifically, this step can be based on a pre-trained dataset with a small amount of manually labeled data, and then transfer learning can be performed on the YOLOv11 model on the COCO dataset to train a basic labeled model.

[0097] S32: Use the basic annotation model to obtain the convolutional features of all images in the image dataset, combine the convolutional features of all layers to calculate the feature similarity of all images, and construct a similarity matrix.

[0098] Specifically, a basic annotation model was used to extract convolutional features from microscopic images of cross-sections of *Pinus slashii*, including an input layer, 13 convolutional layers, 5 pooling layers, and 3 fully connected layers. Multi-layer feature maps were obtained, and the convolutional features of each layer were defined as follows: Where H, W, and C represent the height, width, and number of channels of the feature map, respectively. Convolutional features of two images and Calculate the cosine similarity of each layer, as shown in formula (4):

[0099] (4)

[0100] Where the numerator represents the dot product and the denominator represents the Euclidean norm. Then, the average similarity of all layers is calculated to obtain the comprehensive feature similarity between images, as shown in Formula 5:

[0101] (5)

[0102] Where n represents the number of convolutional feature layers. The feature similarity results of all images are organized into a matrix: ,in This represents the similarity between image i and image j. The similarity matrix is ​​used to filter representative data based on a threshold of 0.65, while retaining images with low similarity to cover the diversity of data distribution, such as... Figure 4 As shown.

[0103] S33: Obtain representative images from the image dataset based on the similarity matrix, perform manual annotation, and optimize the basic annotation model.

[0104] This step is used to label the cell cavity locations in representative microscopic slice images, further training the basic labeling model.

[0105] S34: Train multiple uncertain labeling models based on the base labeling model based on the labeled data, calculate the standard deviation of the confidence of the bounding boxes of the multiple uncertain labeling models, normalize the standard deviation and sample the uncertainty at a set uncertainty level (e.g., 0.8), obtain the model uncertainty labels for manual labeling, and further optimize the base labeling model.

[0106] Based on the transfer learning method, after representative data is labeled, it undergoes multiple training iterations to generate a set of basic labeled models. }, for the set of slash pine images { Each image in} Using the model in sequence Perform prediction and obtain the set of detection boxes { For each set of detection boxes Extract its spatial coordinates ( ) and confidence level Stack the confidence matrices of all models into a three-dimensional tensor: ,in The dimension is (H, W, n), representing the image. The pixel confidence level. As shown in formulas (6) and (7), the standard deviation of the tensor in the last dimension (model dimension) is calculated to obtain the uncertainty matrix. :

[0107] (6) (7)

[0108] in The average confidence score of all models at pixel (x,y) is normalized to the standard deviation of the confidence score and then sampled with an uncertainty level of 0.8 to obtain the final uncertainty heatmap, as shown below. Figure 5 As shown, uncertainty annotations for the model are obtained based on the uncertainty heatmap, manually annotated, and the basic annotation model is further optimized.

[0109] S35: Based on the aforementioned generative adversarial network and the aforementioned forward inversion network, latent feature inversion is performed on sparse real microscopic images. By linearly adjusting the latent features and generating sparse data through a generative network, after sparse data sampling, sparse model annotations can be obtained for manual annotation and the basic annotation model can be further optimized.

[0110] This invention performs representative sampling and uncertainty sampling on the image dataset generated by the aforementioned coniferous microscopic image simulation model. This process employs two sampling strategies to ensure the selection of the most representative and uncertain sample data for subsequent processing: representative sampling aims to select samples that comprehensively reflect the entire data distribution, while uncertainty sampling focuses on selecting samples with higher model uncertainty. The combination of these two approaches helps to better train the model, enabling it to learn as much valuable information as possible even with scarce labeled data. After sampling, the selected samples are manually labeled to ensure data accuracy and labeling quality. This manually labeled data is used to train the initial cell cavity segmentation model, and iterative training is performed based on the pre-trained labeled model to gradually improve model performance.

[0111] S4: Construct a cell cavity detection model and train it using an annotated image dataset.

[0112] After labeling a large number of tracheid cell cavities from coniferous microscopic images using the active learning method described in S3, a large-scale image dataset was generated. A cell cavity detection model was then constructed using YOLOv11 and trained on the aforementioned tracheid cell cavity labeling dataset.

[0113] S5: Obtain a microscopic image of the cross section of the coniferous wood to be detected, and use the trained cell cavity detection model to detect the tracheid cells in the microscopic image of the cross section of the coniferous wood to be detected, and output the tracheid cell cavity prompt box.

[0114] For example, a microscopic image of a cross-section of the coniferous wood to be examined is shown below. Figure 6 The image shown is a microscopic image of the original slash pine.

[0115] S6: Construct and train a cell cavity segmentation model. Use the trained cell cavity segmentation model to segment the image contained in the tracheid cell cavity cue box to obtain the tracheid cell cavity segmentation result.

[0116] In one example, S6 includes:

[0117] S61: Construct and train a general SAM segmentation model based on the improved cell cavity detection model, and replace the original cue encoder of the general SAM segmentation model with the output of the cell cavity detection model.

[0118] S62: The image containing the tracheid cavity cue box output by the cell cavity detection model is segmented using the SAM general segmentation model to obtain the tracheid cavity segmentation result.

[0119] This invention provides an optimized SAM model cue generation strategy that fully utilizes the predicted bounding boxes (i.e., tracheid cavity cue boxes) generated by the YOLO model as cue generators, integrating them into the Prompt input of the SAM model's mask encoder. The cavity cue boxes are then used as prompt inputs to the SAM to generate a cavity segmentation mask.

[0120] For example, with Figure 6 Using the original microscopic image of slash pine as the detection object, the cell cavity detection model, after training, can automatically detect the cell cavity region in the cross-sectional image of the xylem of slash pine, such as... Figure 7 As shown, by inputting the cell cavity detection results as cue information into the cue encoder of the SAM model, the model's segmentation ability is further optimized. This process continuously iterates through active learning, gradually improving the model's accuracy and generalization ability, ultimately achieving precise and independent segmentation of each cell cavity in the cross-sectional image of slash pine xylem, as shown. Figure 8 As shown.

[0121] As an improvement, the method of the present invention further includes:

[0122] S7: Post-process the tracheid cell cavity segmentation results, separate the cell cavity regions of each cell, and extract quantitative anatomical data of each cell cavity in pixels.

[0123] The quantitative anatomical data include cell cavity chordal diameter, cell cavity radial diameter, cell cavity area, cell cavity perimeter, and cell cavity roundness.

[0124] Specifically, the cell cavity mask is used as the calculation object, where 1 represents the cell cavity region and 0 represents other regions. Cell cavity area This represents the number of pixels with a value of 1 in the cell cavity mask, which can be obtained by counting the pixels with a value of 1 in the mask image. The perimeter of the cell cavity is the length of the boundary of the cell cavity region, which can be calculated through contour detection. Cell cavity roundness. It is used to measure the degree to which a shape resolves to a circle: Draw a perpendicular line and a parallel line that intersect at the center point of the cell cavity mask. Define the length of the perpendicular line within the cell cavity mask as the radial diameter of the cell cavity, and define the length of the parallel line within the cell cavity mask as the chordal diameter of the cell cavity.

[0125] As shown in Table 1, the segmented Figure 8 For each cell cavity mask, quantitative anatomical feature measurements are performed, including cell cavity area, cell cavity perimeter, cell cavity chordal diameter, cell cavity radial diameter, and cell cavity roundness.

[0126] Table 1: Examples of quantitative anatomical data for cell cavities (unit: pixels)

[0127]

[0128] This invention employs an active learning approach, combined with generative adversarial networks for sparse data sampling, and uses the output of a target detection model as a SAM (Self-Assisted Anatomical Model) prompting strategy. The aim is to achieve automatic segmentation of cell cavities in transverse sections of coniferous wood with strong generalization capabilities and to rapidly acquire quantitative anatomical data. By optimizing the data sampling process and enhancing the model's adaptability, this method effectively improves the accuracy and efficiency of cell cavity segmentation and can be applied to any microscopic image of a transverse section of coniferous wood.

[0129] This invention utilizes an active learning strategy to achieve the construction of a low-cost microscopic image database of coniferous wood, as well as the development of a model for the detection, segmentation, and measurement of tracheid cavities in coniferous wood. It solves the problems of difficult manual detection of tracheid cavities in coniferous wood cross-sections due to their complex structure and sampling difficulties, as well as the high cost of data collection and annotation. It can cope with challenges such as the amount of annotation, data diversity, staining differences, and the adaptability of existing models, and realizes the automatic and rapid detection, segmentation, and measurement of tracheid cavities in coniferous wood.

[0130] The specific beneficial effects are described below:

[0131] 1. This invention integrates an active learning framework, a StyleGAN3 simulation model, a SAM segmentation model, and quantitative data extraction of cell cavities, providing a method for obtaining quantitative anatomical data of tracheid cell cavities from cross-sections of coniferous wood with strong sparse data generalization ability, low annotation cost, and higher level of automation.

[0132] 2. Based on the active learning framework, this invention successfully solves the problem of high cost of cell cavity segmentation and annotation in the special field of xylem cells in cell detection.

[0133] 3. Based on the StyleGAN3 model, this invention designs a forward network and introduces latent space inversion technology to enhance the sparse data regions caused by the special sampling difficulties of coniferous materials.

[0134] 4. This invention is based on the SAM model and introduces an improved object detection model prompt generator, which improves the prompting level of the SAM model, the mask quality, and the speed and quality of cell cavity segmentation.

[0135] This invention also provides a device for detecting tracheid cell cavities in a cross-section of coniferous wood, such as... Figure 9 As shown, the device includes:

[0136] Data acquisition module 1 is used to acquire microscopic images of cross-sections of coniferous wood.

[0137] Sparse enhancement module 2 is used to perform sparse data sampling enhancement on the acquired microscopic images of coniferous cross sections using the trained coniferous microscopic image simulation model to obtain an image dataset.

[0138] Active learning module 3 is used to annotate tracheid cavities in image datasets based on the active learning framework.

[0139] Cell cavity detection model building module 4 is used to build a cell cavity detection model and train the cell cavity detection model using annotated image dataset.

[0140] Cell cavity detection module 5 is used to acquire a microscopic image of the cross section of the coniferous wood to be detected, and to use the trained cell cavity detection model to detect tracheid cells in the microscopic image of the cross section of the coniferous wood to be detected, and output a tracheid cell cavity prompt box.

[0141] Cell cavity segmentation module 6 is used to construct and train a cell cavity segmentation model. The trained cell cavity segmentation model is used to segment the image contained in the tracheid cell cavity prompt box to obtain the tracheid cell cavity segmentation result.

[0142] The aforementioned simulation model of coniferous microscopic images was trained through the following process:

[0143] Construct a dataset of microscopic images of coniferous materials.

[0144] A style-based generative adversarial network was constructed as a simulation model for microscopic images of coniferous wood, and the generative adversarial network was trained using a dataset of microscopic images of coniferous wood.

[0145] The generative adversarial network (GAN) consists of a parallel generator and a discriminator. The generator includes a style mapping network and a generative network, which are used to sample latent features from the latent space to generate images. The discriminator includes multiple convolutional layers, each of which downsamples the image through pooling operations to extract high-level features of the image and finally outputs a binary discrimination result.

[0146] Construct an inversion network based on a feedforward convolutional neural network and perform inversion training on the aforementioned generative adversarial network;

[0147] The forward inversion network is a forward structure consisting of multiple convolutional layers and a fully connected layer. The fully connected layer outputs latent features, which are compared with the latent features of the generative adversarial network that generates the corresponding image, and a loss function is constructed for optimization.

[0148] Based on the above-mentioned trained coniferous microscopic image simulation model, the sparse enhancement module is used for:

[0149] Based on generative adversarial networks and forward inversion networks, latent features are inverted from microscopic images of cross-sections of coniferous trees. By linearly adjusting the latent features and generating sparse data through a generative network, sparse data sampling enhancement is achieved.

[0150] The active learning module in this invention includes the following processing steps:

[0151] A basic annotation model is constructed by building a pre-training dataset containing a small number of tracheid cell lumen location annotations and using the pre-training dataset to train the basic annotation model.

[0152] The convolutional features of all images in the image dataset are obtained using a basic annotation model. The feature similarity of all images is calculated by combining the convolutional features of each layer, and a similarity matrix is ​​constructed.

[0153] Representative images from the image dataset are obtained based on the similarity matrix and manually labeled to optimize the basic labeling model.

[0154] Multiple uncertainty labeling models based on the base labeling model are trained using labeled data. The standard deviation of the confidence scores of the bounding boxes of the multiple uncertainty labeling models is calculated. After normalizing the standard deviation, uncertainty sampling is performed according to the set uncertainty level to obtain the model uncertainty labels for manual annotation and to optimize the base labeling model.

[0155] Furthermore, the aforementioned cell cavity segmentation module includes the following processing steps:

[0156] A general SAM segmentation model based on the improved cell cavity detection model was constructed and trained, and the original cue encoder of the general SAM segmentation model was replaced with the output of the cell cavity detection model.

[0157] The image containing the tracheid cavity cue box output by the cell cavity detection model is segmented using the SAM general segmentation model to obtain the tracheid cavity segmentation result.

[0158] As an improvement, the device of the present invention further includes:

[0159] The post-processing module is used to post-process the tracheid cell cavity segmentation results, separate the cell cavity regions of each cell, and extract quantitative anatomical data of each cell cavity.

[0160] The apparatus provided in the above embodiments corresponds one-to-one with the embodiments of the aforementioned methods in terms of its implementation principle and the resulting technical effects. For the sake of brevity, any parts of the apparatus not mentioned in the embodiments can be referred to the corresponding content in the embodiments of the aforementioned methods. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the modules and units described in this apparatus can all be referred to the corresponding processes in the embodiments of the aforementioned methods, and will not be repeated here.

[0161] The method for detecting tracheid cavities in cross-sections of coniferous wood provided by the present invention can implement business logic through a computer program and record it on a storage medium. This storage medium can be read and executed by a computer, achieving the effects of the scheme described in the method embodiments of this specification. Therefore, the present invention also provides a computer-readable storage medium for detecting tracheid cavities in cross-sections of coniferous wood, including a memory for storing processor-executable instructions. When executed by a processor, these instructions implement the steps of the method for detecting tracheid cavities in cross-sections of coniferous wood according to the foregoing embodiments.

[0162] The storage medium may include a physical device for storing information, typically digitizing the information and then storing it using electrical, magnetic, or optical methods. The storage medium may include: devices that store information using electrical energy, such as various types of memory, like RAM and ROM; devices that store information using magnetic energy, such as hard disks, floppy disks, magnetic tapes, magnetic core memory, bubble memory, and USB flash drives; and devices that store information using optical methods, such as CDs or DVDs. Of course, there are other readable storage media, such as quantum memories and graphene memories.

[0163] The storage medium described above may also include other implementation methods according to the description of the method embodiments. The implementation principle and technical effects of this embodiment are the same as those of the foregoing method embodiments. For details, please refer to the description of the relevant method embodiments, which will not be repeated here.

[0164] This invention also provides a device for detecting tracheid cell cavities in a cross-section of coniferous wood. The device may be a standalone computer, or it may include an actual operating device that uses one or more of the methods or embodiments described in this specification. The device for detecting tracheid cell cavities in a cross-section of coniferous wood may include at least one processor and a memory storing computer-executable instructions. When the processor executes the instructions, it implements the steps of any one or more of the methods for detecting tracheid cell cavities in a cross-section of coniferous wood.

[0165] The device described above may also include other implementation methods according to the method embodiments. The implementation principle and technical effects of this embodiment are the same as those of the foregoing method embodiments. For details, please refer to the description of the relevant method embodiments, which will not be repeated here.

[0166] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for detecting tracheid cell cavities in a cross-section of coniferous wood, characterized in that, The method includes: S1: Obtain a microscopic image of a cross-section of coniferous wood; S2: Use the trained coniferous microscopic image simulation model to perform sparse data sampling enhancement on the acquired coniferous cross-section microscopic images to obtain an image dataset; S3: Annotate the tracheid cavities of the image dataset based on an active learning framework; S4: Construct a cell cavity detection model and train it using the labeled image dataset; S5: Obtain a microscopic image of the cross section of the coniferous wood to be detected, and use the trained cell cavity detection model to detect the tracheid cell cavity of the microscopic image of the cross section of the coniferous wood to be detected, and output the tracheid cell cavity prompt box. S6: Construct a cell cavity segmentation model and train it. Use the trained cell cavity segmentation model to segment the image contained in the tracheid cell cavity prompt box to obtain the tracheid cell cavity segmentation result. The microscopic image simulation model of coniferous materials was trained using the following method: Construct a dataset of microscopic images of coniferous trees; A style-based generative adversarial network was constructed as a simulation model for the microscopic images of coniferous wood, and the generative adversarial network was trained using the microscopic image dataset of coniferous wood. The generative adversarial network includes a parallel generator and a discriminator. The generator includes a style mapping network and a generation network, which are used to sample latent features from the latent space to generate images. The discriminator includes multiple convolutional layers. Each convolutional layer downsamples the image through pooling operations to extract high-level features of the image and finally outputs a binary discrimination result. Construct an inversion network based on a feedforward convolutional neural network and perform inversion training on the aforementioned generative adversarial network; The forward inversion network is a forward structure, including multiple convolutional layers and a fully connected layer. The fully connected layer outputs latent features, which are compared with the latent features of the generative adversarial network that generates the corresponding image, and a loss function is constructed for optimization.

2. The method for detecting tracheid cell lumens in a cross-section of coniferous wood according to claim 1, characterized in that, S2 includes: Based on the generative adversarial network and the forward inversion network, latent features are inverted from the cross-sectional microscopic image of the coniferous wood. By linearly adjusting the latent features and generating sparse data through the generative network, sparse data sampling enhancement is achieved.

3. The method for detecting tracheid cell cavities in a cross-section of coniferous wood according to claim 2, characterized in that, S3 includes: A basic annotation model is constructed, and a pre-training dataset containing a small number of tracheid cell lumen location annotations is constructed. The basic annotation model is trained using the pre-training dataset. The basic annotation model is used to obtain the convolutional features of all images in the image dataset, and the feature similarity of all images is calculated by combining the convolutional features of all layers to construct a similarity matrix; Representative images from the image dataset are obtained based on the similarity matrix and manually labeled to optimize the basic labeling model; Multiple uncertainty labeling models are trained based on the base labeling model using labeled data. The standard deviation of the confidence scores of the bounding boxes of the multiple uncertainty labeling models is calculated. After normalizing the standard deviation, uncertainty sampling is performed at a set uncertainty level to obtain model uncertainty labels for manual labeling, and the base labeling model is optimized.

4. The method for detecting tracheid cell lumens in a cross-section of coniferous wood according to claim 3, characterized in that, S6 includes: A general SAM segmentation model based on the improved cell cavity detection model is constructed and trained, and the original cue encoder of the general SAM segmentation model is replaced with the output of the cell cavity detection model. The SAM general segmentation model is used to segment the image containing the tracheid cavity cue box output by the cell cavity detection model to obtain the tracheid cavity segmentation result.

5. The method for detecting tracheid cell lumens in a cross-section of coniferous wood according to any one of claims 1-4, characterized in that, The method further includes: S7: Post-process the tracheid cell cavity segmentation results, separate the cell cavity regions of each cell, and extract quantitative anatomical data of each cell cavity.

6. A device for detecting tracheid cell cavities in a cross-section of coniferous wood, characterized in that, The device includes: The data acquisition module is used to acquire microscopic images of cross-sections of coniferous trees; The sparse enhancement module is used to perform sparse data sampling enhancement on the acquired microscopic images of coniferous cross sections using the trained coniferous microscopic image simulation model, so as to obtain an image dataset. An active learning module is used to annotate tracheid cavities in the image dataset based on an active learning framework. The cell cavity detection model building module is used to build a cell cavity detection model and train the cell cavity detection model using an annotated image dataset; The cell cavity detection module is used to acquire a cross-sectional microscopic image of the coniferous wood to be detected, and to use the trained cell cavity detection model to detect tracheid cells in the cross-sectional microscopic image of the coniferous wood to be detected, and output a tracheid cell cavity prompt box. The cell cavity segmentation module is used to construct and train a cell cavity segmentation model. The trained cell cavity segmentation model is used to segment the image contained in the tracheid cell cavity prompt box to obtain the tracheid cell cavity segmentation result. The microscopic image simulation model of coniferous materials is trained through the following process: Construct a dataset of microscopic images of coniferous trees; A style-based generative adversarial network was constructed as a simulation model for the microscopic images of coniferous wood, and the generative adversarial network was trained using the microscopic image dataset of coniferous wood. The generative adversarial network includes a parallel generator and a discriminator. The generator includes a style mapping network and a generation network, which are used to sample latent features from the latent space to generate images. The discriminator includes multiple convolutional layers. Each convolutional layer downsamples the image through pooling operations to extract high-level features of the image and finally outputs a binary discrimination result. Construct an inversion network based on a feedforward convolutional neural network and perform inversion training on the aforementioned generative adversarial network; The forward inversion network is a forward structure, including multiple convolutional layers and a fully connected layer. The fully connected layer outputs latent features, which are compared with the latent features of the generative adversarial network that generates the corresponding image, and a loss function is constructed for optimization.

7. A computer-readable storage medium for detecting tracheid cell cavities in cross-sections of coniferous wood, characterized in that, It includes a memory for storing processor-executable instructions, which, when executed by the processor, implement the steps of the method for detecting tracheid cavities in a cross section of coniferous wood according to any one of claims 1-5.

8. A device for detecting tracheid cell cavities in a cross-section of coniferous wood, characterized in that, It includes at least one processor and a memory storing computer-executable instructions, wherein the processor executes the instructions to implement the steps of the method for detecting tracheid cavities in a cross section of coniferous wood according to any one of claims 1-5.

Citation Information

Patent Citations

  • Pavement disease data enhancement method based on generative adversarial network

    CN114022368A

  • Low-cost cell segmentation method, system and device based on active learning

    CN119295480A

Cited By

  • Intelligent batch identification and analysis system for gymnosperm wood cross section cells

    CN122176700A