Semantic segmentation-based high-throughput analysis method for starch grains in wheat grains

Through the SGnet model based on DeepLabV3+ architecture, combined with the cavity convolution and ASPP module, high-throughput analysis of starch granules in wheat grains is achieved, solving the problems of high analysis cost, time-consuming, low automation and insufficient accuracy in the existing technology, and achieving efficient and accurate starch granules analysis.

CN120088783AActive Publication Date: 2025-06-03SANYA INSTITUTE OF NANJING AGRICULTURAL UNIVERSITY +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510571513.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-06-03
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

The prior art has different conditions in the analysis of starch granules in wheat grains, which are costly, time-consuming, labor-intensive, low degree of automation, and difficulty in taking into account the spatial distribution of starch in both the developing and mature grains, resulting in insufficient accuracy.

Method used

The SGnet model built on the DeepLabV3+ architecture is adopted to integrate multi-scale features with the ASPP module to achieve high-throughput analysis of starch granules in wheat grains, support full automatic operation, reduce manual operation, and effectively handle irregular granules and dense overlap scenes.

Benefits of technology

It greatly reduces the cumbersomeness of manual operations, improves the accuracy and calculation efficiency of analysis, supports rapid analysis of mature grains or young fruits, and does not require the use of expensive and time-consuming particle size analyzer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088783A_ABST
    Figure CN120088783A_ABST
Patent Text Reader

Abstract

The invention discloses a semantic segmentation-based high-throughput analysis method for starch grains in wheat grains, which comprises the following steps of: S1, outlining a contour to obtain an annotation data set; s2, constructing an SGnet model for training, and selecting a final model; s3, any original microscopic image is selected and input into the final model, the equivalent diameter of each starch particle is obtained, different particles are automatically divided according to the size of the equivalent diameter, an endosperm layering area is divided into different layers based on a mass center radial layering algorithm, and the quantitative proportion, the average diameter and the area distribution of different types of particles in each layer are counted. According to the method, the SGnet model is constructed, and the final model capable of automatically running is obtained through operations such as cavity convolution and ASPP module fusion of multi-scale features, so that manual operation is reduced, irregular particles and dense overlapping scenes can be processed, analysis of mature grains or young caryopses is supported, a high-cost particle size analyzer does not need to be used, and the method has both accuracy and calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural technologies, and particularly relates to a high-throughput analysis method for starch granules in wheat grains based on semantic segmentation. Background Art

[0002] Starch is the main energy source of plants, accounting for about 70% of the weight of wheat grains. It is stored in the endosperm in the form of starch granules and can be classified into two types: type I with a size greater than 10 μm and type II with a size less than 10 μm. The differences in the physicochemical properties between type I and type II starch granules are crucial for processing quality. For example, the amylose content of type I granules is higher than that of type II granules, and correspondingly, the peak viscosity is also higher; while type II granules contain more amylopectin and exhibit stronger swelling power and lower peak and final viscosities. Since the size of type II starch granules is smaller, their specific surface area is higher than that of type I granules. Therefore, as the proportion of type II granules increases, the adsorption capacity for proteins, amylose, lipids, and moisture during the processing is stronger. Thus, an increase in the content of type II granules can significantly improve the viscoelasticity and smoothness of fresh wet noodles. A higher proportion of type II granules can also form a denser starch granule-protein framework, increasing the starch decomposition rate and the water absorption rate during dough formation. On the contrary, flour with a higher proportion of type I granules is more suitable for making biscuits and pastries.

[0003] The distribution of starch granules in wheat endosperm is not uniform, and there are spatial gradients in both their quantity and size. Some researchers have found that during the process of gradually grinding mature grains into different levels of flour, the average particle size of type I starch granules gradually increases from the outer layer to the inner layer. However, this technique requires a large number of grains, takes a long time, and is only applicable to mature grains. In addition, the breakage rate of starch granules increases during continuous grinding, affecting the quantitative analysis of the granules. For developing caryopses, the distribution of starch granules can only be determined by image analysis of microscopic fields after sectioning. For example, some researchers once observed sections of caryopses 15 days after flowering and found that the diameter of starch granules in the subaleurone layer was between 1.5 μm and 25.5 μm, while the diameter distribution range of starch granules in the inner layer endosperm of the sample was 1.5 μm to 39.5 μm. Therefore, accurately and comprehensively analyzing the spatial distribution of starch granules in developing caryopses and mature grains is challenging.

[0004] At present, the methods for measuring starch granules include screening method, sedimentation method, microscopy method, Coulter counter method, laser diffraction method, near-infrared reflectance spectroscopy method, etc. The most commonly used is the particle size analyzer based on the screening method, and its principle is to separate the ground starch granules through a vibrating sieve and a series of standard sieves with different pore sizes; however, this method is time-consuming, laborious and the instrument is expensive. Microscopic imaging technology is one of the most effective methods for studying and analyzing starch structure: some researchers directly separate and purify type I and type II starch granules, take pictures under an optical microscope and analyze the particle size through an image analyzer; some other researchers obtain cross-sectional images of wheat grains, use Photoshop CS4 to perform color matching and marking on the starch granules in the images, and then determine the number and proportion of the granules through Image-ProPlus 6.0; however, starch granule segmentation is a necessary step in starch structure analysis, involving particle detection, shape recognition and size calculation, and the above image processing methods all require a large amount of manual operations.

[0005] Generally speaking, at present, there are at least the following three problems in these measurement methods for starch granules in wheat grains: 1) Using a particle size analyzer based on the screening method, it has high cost, is time-consuming, laborious and has low efficiency; 2) Combining with an optical microscope, every time the sample needs to be analyzed, operations such as separating, marking and size calculation are required, which need a large amount of manual operations, have low automation and consume a lot of manpower; 3) When measuring, it is difficult to take into account the different situations of the spatial distribution of starch in developing caryopses and mature grains, and the accuracy is insufficient. Summary of the Invention

[0006] Aiming at the above three problems, the purpose of the present invention is to propose a high-throughput analysis method for starch grains in wheat grains based on semantic segmentation, construct an SGnet model based on the DeepLabV3+ architecture, and after training such as fusing multi-scale features through dilated convolution and ASPP modules, obtain a final model that can run fully automatically, greatly reducing the tediousness of manual operations, and being able to effectively process irregular particles such as spherical and disc-shaped particles and dense overlapping scenes, support the rapid analysis of mature grains or young caryopses, without the need to use a costly and time-consuming particle size analyzer, and while improving the accuracy, also improving the calculation efficiency.

[0007] It is achieved through the following technical solutions: A high-throughput analysis method for starch grains in wheat grains based on semantic segmentation, characterized by comprising the following steps: S1. First, use an image annotation tool to outline the contours of each starch granule in each original microscopic image one by one, including: for each spherical granule with regular morphology, quickly mark it by fitting with the fewest vertices; for each irregular granule that overlaps, is polygonal or disc-shaped, increase the vertex density to control the boundary fitting and perform corresponding marking; assign a unique identifier ID to each marked granule, and then classify it into a preset starch granule group. Then, use the image annotation tool to automatically generate each mask image with the same name as each original microscopic image, and use the set of each mask image as a pre-annotated dataset; then perform multi-dimensional data augmentation on the pre-annotated dataset, including geometric transformation, pixel-level perturbation adjustment, and random erasing optimization; then, perform normalization processing to obtain an annotated dataset. S2. First, construct an SGnet model based on the DeepLabV3+ architecture. The encoder of the SGnet model uses ResNet50 as the backbone network, and decomposes the default 3×3 convolution of the SGnet model for the annotated dataset into a spatial convolution and a channel convolution through depthwise separable convolution. Use the annotated dataset in step S1 as the input of the SGnet model. Introduce atrous convolution in the last three layers of ResNet50 in the encoder and set the parameter AtrousRate = 2 of the atrous convolution to increase the resolution from 1 / 32 to 1 / 16; at the same time, in the ASPP module of the SGnet model, deploy multiple atrous convolution branches with different sampling rates in parallel and perform global average pooling; then, use the decoder to restore the resolution to 1 / 4 and perform one upsampling to start model training; during training, select the model with the highest mIoU on the test set as the final model through an early stopping mechanism. S3. Select any original microscopic image in step S1 for bilinear interpolation Resize to reset the pixel size, median filtering, and normalization preprocessing; input the preprocessed image into the final model in step S2. After the final model outputs the segmentation mask image, perform morphological closing operation and connected component analysis to remove interference; then, based on pure mask and ellipse fitting calculation, obtain the total number of starch granules in the segmentation mask image and the equivalent diameter of each starch granule, and automatically divide the A, B, and C type granules according to the equivalent diameter size. At the same time, use the centroid-based radial stratification algorithm to divide the endosperm stratification area into outer layer, middle layer, and inner layer, and count the quantity ratio, average diameter, and area distribution of different types of granules in each layer to characterize the spatial distribution characteristics.

[0008] Preferably, when making each mark in step S1, set two persons to make the corresponding marks independently, and then calculate their respective Dice coefficients to verify the consistency of the corresponding marks for each same mask image, and only retain each mask image with a Dice coefficient ≥ 0.95 as the pre-annotated dataset.

[0009] Preferably, in the labeled dataset of step S1, each mask image is divided into a training set, a validation set, and a test set according to 8:1:1 respectively.

[0010] Preferably, when performing multi-dimensional data augmentation in step S1, the geometric changes include random rotation of ±15°, random scaling of 0.8 - 1.2 times, and horizontal or vertical flipping, which are used to simulate angle deviation and shooting perspective changes; the pixel-level perturbation adjustment includes adding Gaussian noise with a mean of 0 and a standard deviation of 0.05, and randomly adjusting the brightness by ±20% change and the contrast by ±15% change; the random erasure optimization includes selecting 10% - 20% of any specific area as the erasure area from each mask image in the pre-labeled dataset.

[0011] Preferably, the normalization process in step S1 includes: through the normalization formula , the pixel values of each mask image in the pre-labeled dataset are normalized to a distribution with a mean of 0 and a standard deviation of 1 respectively, where x represents the pixel value before normalization, x' represents the pixel value after normalization, μ represents the mean, and σ represents the standard deviation.

[0012] Preferably, when starting training in step S2, a stochastic gradient descent optimizer and a Poly strategy for dynamic decay are used for adjustment. The initial learning rate of the stochastic gradient descent optimizer is set to 0.01, and the formula for the Poly strategy for dynamic decay is: , where lr represents the learning rate, lr_base represents the initial learning rate, iter represents the current iteration number, max_iter represents the total number of iterations, and power represents the order of the polynomial.

[0013] Preferably, during training in step S2, the SGnet model is trained end-to-end on the GPU, the batch size is set to 8, the total number of iterations is set to 30000 times, and the model parameters are saved every 500 iterations and monitored through the mIoU curve of the validation set; when the mIoU does not improve for 10 consecutive iterations, the early stopping mechanism is triggered, and the model with the highest mIoU in the test set is selected as the final model.

[0014] Preferably, before the decoder restores the resolution to 1 / 4 in step S2, the decoder first restores the output of the encoder to a resolution of 1 / 4 through bilinear upsampling, and then stitches it with the edge detail features extracted by ResNet50. After stitching, the corresponding upsampling is performed.

[0015] Preferably, in step S3, when performing bilinear interpolation Resize to reset the pixel size, the selected original microscopic image is reset to a resolution of 512×512 pixels, and then each pixel value is mapped to the interval [-1, 1] using mean subtraction and a normalization formula; median filtering includes: for each pixel value in the mapped image, the median filtering algorithm with a 3×3 kernel is used to sort the gray values in the pixel neighborhood after mapping and take the median for noise reduction; the processes of pre-standardization and standardization are the same; morphological closing operation uses a 5×5 circular structuring element, and connected component analysis is used to filter out isolated regions with an area less than 20 pixels to generate a pure mask.

[0016] Preferably, when calculating based on the pure mask and ellipse fitting in step S3, the best ellipse of each starch granule is fitted by the least squares method, the lengths of the major axis and minor axis within the best ellipse are obtained and converted into actual sizes respectively, and the average value of the actual sizes of the two is used as the equivalent diameter of the corresponding starch granule.

[0017] The beneficial effects of the present invention compared with the prior art are: The technical solution of the present invention constructs an SGnet model based on the DeepLabV3+ architecture. After training such as fusing multi-scale features through atrous convolution and the ASPP module, a final model that can run fully automatically is obtained, greatly reducing the tediousness of manual operations, and being able to effectively process irregular particles such as spherical and disc-shaped ones and dense overlapping scenarios, supporting the rapid analysis of mature grains or young caryopses, without the need to use expensive and time-consuming particle size analyzers. While improving the accuracy, the calculation efficiency is also improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flowchart of a high-throughput analysis method for starch granules in wheat grains based on semantic segmentation; Figure 2 is a diagram showing the starch granule recognition process. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] Next, the technical solutions in the embodiments of the present invention will be described in detail in conjunction with the attached Figures 1 to 2 drawings in the embodiments of the present invention.

[0020] Such as Figure 1As shown, it is a flowchart of a high-throughput analysis method for starch granules in wheat grains based on semantic segmentation, that is, a process of feature extraction and analysis of starch granules in the wheat endosperm region. This method constructs an SGnet model and conducts corresponding training to obtain a reliable final model, and can use this final model to automatically process any wheat grain image, greatly reducing the manual operation process during each detection and improving the operation efficiency. After constructing the SGnet model, based on operations such as consistency verification, data augmentation, and optimized design of the encoder and decoder, the recognition accuracy and applicable scenarios are further improved. The specific steps of this method are as follows: S1. In the first stage, data preparation and construction of a high-quality labeled dataset are carried out.

[0021] The training of deep learning models highly depends on high-quality labeled data. Therefore, the open-source image annotation tool Labelme can be selected for processing. Its JavaScript-based interactive interface supports precise pixel-level semantic segmentation marking.

[0022] In the specific implementation process, researchers first use the polygon drawing tool of Labelme to outline the contours of starch granules in each original microscopic image of wheat grains one by one. Specifically: for spherical granules with regular shapes, they are quickly marked by fitting with the fewest vertices; for irregular granules that overlap or are polygonal or discoid, the vertex density is increased to ensure that the boundary fits and corresponding marking is carried out, so that the edge contours of irregular granules are clearer and fitting errors in subsequent processes are avoided. By quickly marking with the fewest vertices, this method is applicable to those starch granules with regular shapes and easy to define, such as spherical granules. For these granules, since they have a relatively unified and simple shape, not many vertices are needed to accurately describe their boundaries; therefore, the general outline of the granules can be quickly outlined by placing as few vertices as possible. This method not only improves the annotation efficiency but also ensures the accuracy of annotation because for regular shapes such as circles or spheres, a small number of vertices are sufficient to capture their basic features. By increasing the vertex density to ensure that the boundary fits and corresponding marking is carried out, when facing overlapping granules or starch granules with irregular shapes such as polygons or discoids, simply using a small number of vertices cannot accurately depict their edges; in this case, to more accurately represent the true boundary of each granule, more vertices need to be added to the edge of the granule. This increases the vertex density and makes the drawn polygon fit more closely to the actual edge of the granule, ensuring that even granules with complex shapes or blurred boundaries can be accurately identified, thus avoiding possible fitting errors in subsequent processing. It should be noted that the meanings of annotation and marking are the same.

[0023] Each labeled particle is assigned a unique identifier ID and classified into a preset grouping of starch particles. The background area does not require additional annotation and is defaulted to a negative sample, thus removing the background influence. After labeling, continue to use this image annotation tool to automatically generate a mask map with the same name as each original microscopic image, with a gray value of 255 representing the particle area and 0 representing the background, making the comparison effect obvious, ensuring strict alignment of the image and label during subsequent data processing, and taking the set of each mask map as the pre-annotated dataset.

[0024] In this embodiment, considering the possible manual annotation errors in the model construction stage, all images need to be independently annotated by two researchers respectively, and the consistency is verified by calculating their respective Dice coefficients. Only each image with a Dice coefficient ≥ 0.95 is retained as a sample. For example, for two specific images P and Q, both are independently annotated by two researchers respectively. The coincidence rate of the annotations of the two for P is ≥ 0.95, indicating that P is relatively clear and distinguishable, so P is retained. The coincidence rate of the annotations of the two for Q is less than 0.95, indicating that the clarity of Q is insufficient and it is prone to misjudgment, so Q is discarded. Finally, a core dataset containing 48 highly consistent annotated images is constructed as the pre-annotated dataset, thus providing reliable basic data for subsequent model training.

[0025] In this embodiment, the 48 annotated images are also divided into a training set of 38 images, a validation set of 5 images, and a test set of 5 images according to the ratio of 8:1:1, which are used for model parameter optimization, generalization ability evaluation during training, and final performance verification respectively.

[0026] In this embodiment, due to the small sample size and considering the data volume requirements of the deep learning model, a multi-dimensional data augmentation strategy also needs to be adopted for the pre-annotated dataset to improve the robustness of the model, mainly including geometric transformation, pixel-level perturbation adjustment, and random erasure optimization. In terms of geometric transformation, the image is randomly rotated by ±15°, randomly scaled by 0.8 - 1.2 times, and horizontally or vertically flipped to simulate the angular deviation and shooting perspective change of each original microscopic image during section preparation. In terms of pixel-level perturbation, Gaussian noise with a mean of 0 and a standard deviation of 0.05 is added, and the brightness is randomly adjusted by ±20% and the contrast is adjusted by ±15% to enhance the model's adaptability to interferences such as noise and uneven illumination in microscopic imaging. When using the random erasure technique for optimization, the erasure area is set to account for 10% - 20% of the area of each image to simulate impurity contamination or wrinkles in the section and further expand data diversity.

[0027] Then, each image that has completed multi-dimensional data augmentation is normalized, including: passing each image through the formula , the pixel values are normalized to a distribution with a mean of 0 and a standard deviation of 1, thus ensuring the consistency of the input data. Among them, x represents the pixel value before standardization, x’ represents the pixel value after standardization, μ represents the mean, and σ represents the standard deviation. The above processing can expand the effective training sample size to nearly 400, significantly improving the generalization ability of the model for the size, shape, and complex background of starch granules.

[0028] S2. In the second stage, the DeepLabV3+ model is constructed and optimized for training.

[0029] Based on the DeepLabV3+ architecture, the SGnet model is constructed. The encoder built in the SGnet model uses ResNet50 as the backbone network. ResNet50 is a deep convolutional neural network architecture that contains 50 trainable network layers. The default 3×3 convolution of the SGnet model can be decomposed into spatial convolution and channel convolution through depthwise separable convolution, thereby reducing the computational amount by about 30% and compressing the parameter scale by 25% while maintaining the feature extraction ability, adapting to the training requirements of the samples.

[0030] In this embodiment, to capture multi-scale particle features, dilated convolutions are introduced in the last three layers of ResNet50 in the encoder and the dilated convolution parameter AtrousRate = 2 is set, which increases the resolution of the feature map from the default 1 / 32 to 1 / 16, expanding the receptive field while reducing information loss. AtrousRate is the dilation rate, setting it equal to 2 is equivalent to doubling the receptive field, thus improving the resolution.

[0031] At the same time, the ASPP module is set up, and four different sampling rate dilated convolution branches of 3, 6, 9, and 12 are deployed in parallel to capture the local details and global context information of the particles respectively, and the image-level semantic features are obtained through global average pooling, enabling the model to be trained by integrating local details, global context information, and image semantic features, effectively solving the context association problem in the dense particle scenario. ASPP, full name Atrous Spatial Pyramid Pooling, means dilated spatial pyramid pooling, which is an important component for the segmentation task in this model.

[0032] In this embodiment, it is also necessary to set up a decoder for bilinear upsampling, which restores the 1 / 16 low-resolution feature map output by the encoder to the original image size of 1 / 4, and then splices it with the edge detail features extracted by ResNet50 and upsamples again, so as to restore to the original image size again, which can significantly improve the boundary segmentation accuracy of small particles, such as C-type particles <2μm.

[0033] After the above settings are completed, use the labeled dataset with the expanded effective training sample size in step S1 as the input and input it into the SGnet model to start training. During the training process, use the Stochastic Gradient Descent (SGD) optimizer, set the initial learning rate to 0.01, and dynamically decay it through the Poly strategy to balance the fast convergence in the initial stage of training and the fine-tuning in the later stage. The decay formula is , where lr represents the learning rate, lr_base represents the initial learning rate, iter represents the current iteration number, max_iter represents the total number of iterations, and power represents the order of the polynomial.

[0034] To accelerate convergence and avoid overfitting during training, the SGnet model also needs to load the pre-trained ResNet50 weights on ImageNet, that is, the parameters of the ResNet50 model are pre-trained on the ImageNet dataset in advance and used to initialize the encoder parameters to improve the convergence speed and performance. Then, fine-tune the ASPP module and the decoder to shorten the training time by 40%. ImageNet is a large-scale visual database that can be effectively used for object recognition research in the field of vision to improve the recognition accuracy. Then, perform end-to-end training on the GPU hardware, set the batch size to 8, the total number of iterations to 30,000 times, save the model parameters every 500 iterations, monitor the training status through the mIoU curve of the validation set, and trigger the early stopping mechanism when the mIoU does not improve for 10 consecutive iterations. Finally, select the model with the highest mIoU of 80.58% on the test set as the optimal version, that is, the final model. The segmentation accuracy of this final model in the dense particle area is 15% higher than that of the traditional U-Net. The GPU hardware can use the NVIDIA RTX 3090 GPU.

[0035] It should be noted that mIoU is short for Mean Intersection over Union, that is, the average intersection over union. It is one of the evaluation metrics in semantic segmentation, used to measure the matching degree between the segmentation result predicted by the model and the true label, and can comprehensively reflect the recognition accuracy of the model for different category targets.

[0036] S3. In the third stage, select any original microscopic image for verification, and count the quantity ratio, average diameter, and area distribution of different types of particles in each layer. After completing step S2, the final model has been trained and can be directly used to automatically process any original microscopic image.

[0037] Such as Figure 2As shown in the figure, it is a flowchart for starch granule recognition. Select an original microscopic image of the wheat endosperm region and conduct experiments according to the aforementioned analysis method. First, remove the background; then, perform image segmentation; then, continue with starch granule recognition, and then combine and splice the starch granules recognized in each segmented part to obtain an image with restored resolution after splicing and showing the starch granules.

[0038] Combined with Figure 1 and Figure 2 As shown, when verifying by selecting any original microscopic image, first perform bilinear interpolation Resize to reset the pixel size, median filtering, and normalization preprocessing, so that the selected image can meet the input requirements of the final model. When bilinear interpolation Resize resets the pixel size, the original microscopic image with a default resolution of 96 dpi is Resize to 512×512 pixels through bilinear interpolation; then, using the mean subtraction and standard deviation normalization formula, map the pixel values to the interval [-1,1] to ensure the stability of the network input data distribution. The standard deviation normalization formula is the same as the aforementioned normalization processing formula, and μ = 127.5, σ = 127.5. Median filtering is for the random noise that may occur in section preparation. Use the median filtering algorithm with a 3×3 kernel to take the median value by sorting the gray values in the pixel neighborhood, effectively removing the noise while protecting the details of the particle edges. The normalization preprocessing process is the same as the aforementioned normalization processing.

[0039] Then, input the preprocessed image into the final model. After the encoder extracts multi-scale features, the ASPP module fuses context information, and the decoder upsamples to restore the resolution, a pixel-level segmentation mask image is output.

[0040] Since starch granules may be broken or have holes in the mask in the pixel-level segmentation mask image due to the cutting angle or adhesion in the section, therefore, it is also necessary to perform post-processing using morphological closing operation with a 5×5 circular structuring element: through the operation of dilation first and then erosion, connect the small broken areas between adjacent granules and repair the integrity of the granule contour.

[0041] Subsequently, based on connected component analysis, identify all foreground regions in the pixel-level segmentation mask image, filter out isolated regions with an area less than 20 pixels, and finally generate a pure foreground mask without noise interference, providing a high-quality data basis for subsequent operations. 20 pixels is approximately 0.2 μm², corresponding to extremely small noise under the microscope resolution. Based on the pure foreground mask, use the connected component analysis algorithm to identify each independent starch granule, so that the total number of granules in a single image, that is, the total number of starch granules, can be counted.

[0042] In this embodiment, for the irregular shape of starch granules, the elliptical fitting technology is also needed to calculate the equivalent diameter of each granule, including: fitting the best ellipse of the granule contour by the least square method, obtaining the lengths of the major axis and minor axis of the best ellipse, converting them into actual sizes in combination with the calibration parameters of the microscope actually used, and taking the average value of the two actual sizes as the equivalent diameter of the granule. The formula is: equivalent diameter D = ((major axis + minor axis) / 2) × pixel size). The granule area is calculated by counting the total number of pixels within the contour and multiplying it by the actual area of a single pixel. According to the different sizes of the equivalent diameter, the granules are automatically divided into three categories: category A, category B, and category C; the size division basis for the three categories can be freely set. At the same time, for the endosperm stratification region analysis, it can be divided into three parts: the outer layer, the middle layer, and the inner layer by the centroid-based radial stratification algorithm, that is, based on the contour edge and centroid position of the endosperm region.

[0043] Then, repeat the above feature extraction process for different layers respectively, and finally count the quantity ratio, average diameter, and area distribution of different types of granules in each layer, so as to reveal the spatial gradient characteristics of the granule distribution.

[0044] To sum up, the present invention constructs the SGnet model based on the DeepLabV3+ architecture. After training such as fusing multi-scale features through dilated convolution and the ASPP module, the final model that can operate fully automatically is obtained, which greatly reduces the cumbersome manual operations, and can effectively process irregular granules such as spherical and disc-shaped ones and dense overlapping scenes, supports the rapid analysis of mature grains or young caryopses, no longer requires the use of costly and time-consuming particle size analyzers, improves the calculation efficiency while enhancing the accuracy, and has significant progressiveness.

[0045] The above embodiments are only used to illustrate the technical idea of the present invention, and the protection scope of the present invention cannot be limited thereby. Any modification made on the basis of the technical solution according to the technical idea proposed by the present invention falls within the protection scope of the present invention.

Claims

1. A high-throughput analysis method for starch granules in wheat grains based on semantic segmentation, characterized in that: The steps include: S1. First, use the image annotation tool to outline each starch granule in each original microscopic image one by one, including: for each spherical granule with regular morphology, quickly mark it by fitting with the minimum number of vertices; for each irregular granule that is overlapping, polygonal or disc-shaped, increase the vertex density to control the boundary fit and mark it accordingly; assign a unique identifier ID to each marked granule, and then classify it into a preset starch granule group; Then, the image annotation tool is used to automatically generate each mask image with the same name as each original microscopic image, and the set of each mask image is used as the pre-annotated data set; the pre-annotated data set is then enhanced in multiple dimensions, including geometric changes, pixel-level perturbation adjustment, and random erasure optimization; and then, it is standardized to obtain the annotated data set; S2. First, build the SGnet model based on the DeepLabV3+ architecture. The encoder of the SGnet model uses ResNet50 as the backbone network. The default 3×3 convolution of the labeled dataset in the SGnet model is decomposed into spatial convolution and channel convolution through deep separable convolution. The labeled dataset in step S1 is used as the input of the SGnet model. The encoder is used to introduce dilated convolution in the last three layers of ResNet50 and the parameter AtrousRate of the dilated convolution is set to 2 to increase the resolution from 1 / 32 to 1 / 16. At the same time, in the ASPP module of the SGnet model, multiple dilated convolution branches with different sampling rates are deployed in parallel and global average pooling is performed. Then, the decoder is used to restore the resolution to 1 / 4 and perform an upsampling, and the model training is started. During training, the model with the highest mIoU on the test set is selected as the final model through the early stopping mechanism. S3, select any original microscopic image in step S1 to perform bilinear interpolation Resize to reset pixel size, median filtering and standardization preprocessing; input the image after standardization preprocessing into the final model in step S2, and the final model outputs the segmentation mask image and removes interference through morphological closing operation and connected domain analysis; then based on the pure mask and ellipse fitting calculation, the total number of starch granules and the equivalent diameter of each starch granule in the segmentation mask image are obtained, and A, B, and C type granules are automatically divided according to the equivalent diameter size. At the same time, the endosperm stratification area is divided into an outer layer, a middle layer and an inner layer based on a radial stratification algorithm based on the centroid, and the number ratio, average diameter and area distribution of different types of granules in each layer are counted to characterize the spatial distribution characteristics.

2. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: When performing each mark in step S1, two people are set to perform the corresponding mark independently, and then calculate their respective Dice coefficients to verify the consistency of the marks corresponding to each identical mask image. Only each mask image with a Dice coefficient ≥ 0.95 is retained as the pre-labeled data set.

3. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: In the labeled data set of step S1, each mask image is divided into a training set, a validation set, and a test set according to an 8:1:1 ratio.

4. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: When performing multi-dimensional data enhancement in step S1, geometric changes include ±15° random rotation, 0.8-1.2 times random scaling, and horizontal or vertical flipping to simulate angle deviation and shooting perspective changes; pixel-level perturbation adjustment includes adding Gaussian noise with a mean of 0 and a standard deviation of 0.05, and randomly adjusting the brightness by ±20% and the contrast by ±15%; random erasure optimization includes selecting 10%-20% of any specific area as the erasure area from each mask map of the pre-labeled dataset.

5. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: The normalization process in step S1 includes: , normalize the pixel values ​​of each mask image in the pre-labeled dataset to a distribution with a mean of 0 and a standard deviation of 1, where x represents the pixel value before normalization, x' represents the pixel value after normalization, μ represents the mean, and σ represents the standard deviation.

6. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: When training starts in step S2, the stochastic gradient descent optimizer and the Poly strategy dynamic attenuation are used for adjustment. The initial learning rate of the stochastic gradient descent optimizer is set to 0.01, and the formula for the dynamic attenuation of the Poly strategy is: , where lr represents the learning rate, lr_base represents the initial learning rate, iter represents the current number of iterations, max_iter represents the total number of iterations, and power represents the order of the polynomial.

7. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: During training in step S2, the SGnet model is trained end-to-end on the GPU, the batch size is set to 8, the total number of iterations is set to 30,000, the model parameters are saved every 500 iterations and monitored by the mIoU curve of the validation set; when the mIoU does not improve for 10 consecutive iterations, the early stopping mechanism is triggered, and the model with the highest mIoU in the test set is selected as the final model.

8. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: In step S2, before the decoder is used to restore the resolution to 1 / 4, the decoder first restores the resolution of the encoder output to 1 / 4 through bilinear upsampling, and then splices it with the edge detail features extracted by ResNet50. After the splicing is completed, the corresponding upsampling is performed.

9. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: In step S3, when performing bilinear interpolation Resize to reset the pixel size, the resolution of the selected original microscopic image is reset to 512×512 pixels, and then each pixel value is mapped to the interval [-1, 1] using mean subtraction and normalization formula; The median filter includes: for each pixel value in the mapped image, a 3×3 kernel median filter algorithm is used to sort the grayscale values ​​of the mapped pixel neighborhood and take the median value for noise reduction; The standardization preprocessing and standardization processing are the same; the morphological closing operation uses a 5×5 circular structure element, and the connected domain analysis is used to filter out isolated areas with an area less than 20 pixels to generate a pure mask.

10. The method for high-throughput analysis of starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that: In step S3, when calculating based on the pure mask and ellipse fitting, the optimal ellipse of each starch granule is fitted by the least squares method, the lengths of the major axis and the minor axis in the optimal ellipse are obtained and converted into actual sizes respectively, and the average of the actual sizes of the two is taken as the equivalent diameter of the corresponding starch granule.

Citation Information

Patent Citations

  • Night thermal infrared image semantic segmentation enhancement method based on improved ResNet

    CN115601723A

  • Target instance segmentation model establishment method based on automatic prompt learning and application thereof

    CN118279320A

  • Crop pest larva detection method based on YOLOv7-SV

    CN119049024A