A high-throughput analysis method for starch granules in wheat grains based on semantic segmentation
By constructing an SGnet model based on DeepLabV3+ architecture for semantic segmentation, the problems of high cost, low efficiency and low automation of wheat grain starch granules are solved, and efficient and accurate starch granules analysis is achieved.
Patent Information
- Application Number
- CN202510571513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-06
AI Technical Summary
The prior art has problems in the analysis of starch granules in wheat grains with high cost, time-consuming and labor-intensive, low degree of automation, and difficulty in taking into account the accuracy of the spatial distribution of starch in both developing and mature grains.
The SGnet model based on the DeepLabV3+ architecture is constructed, and multi-scale features are fused with the ASPP module through hollow convolution to perform semantic segmentation, reduce manual operations, and realize automated analysis of starch granules.
It realizes efficient and accurate starch granules analysis, supports rapid analysis of mature grains and young vegetarian fruits, reduces costs and improves calculation efficiency.
Smart Images

Figure CN120088783B_ABST
Abstract
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 accordingly, 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 small fields of view after sectioning. For example, some researchers once observed sections of caryopses at 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, whose 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 isolate and purify type I and type II starch granules, take images 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, among these measurement methods for starch granules in wheat grains, there are at least the following three problems:
[0006] 1) Using the particle size analyzer based on the screening method, it has high cost, is time-consuming, laborious and has low efficiency;
[0007] 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;
[0008] 3) During measurement, 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
[0009] 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 through training such as fusing multi-scale features by dilated convolution and ASPP module, obtain a final model that can run fully automatically, greatly reducing the cumbersome manual operations, and being able to effectively process irregular particles such as spherical and disc-shaped particles and dense overlapping scenes, supporting the rapid analysis of mature grains or young caryopses, without the need to use a costly and time-consuming particle size analyzer, and improving the calculation efficiency while enhancing the accuracy.
[0010] It is achieved through the following technical solutions:
[0011] A high-throughput analysis method for starch grains in wheat grains based on semantic segmentation, characterized by including the following steps:
[0012] 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 the minimum number of vertices; for each irregular granule that overlaps, is polygonal or disk-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.
[0013] 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.
[0014] S2. First, build 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 on the annotated dataset in the SGnet model into a spatial convolution and a channel convolution through depthwise separable convolution.
[0015] 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.
[0016] 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 the 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 the 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.
[0017] Preferably, when making each label in step S1, two persons are set to independently make the corresponding label, and then the Dice coefficients of each are calculated respectively to verify the consistency of the labels corresponding to each same mask image. Only the mask images with a Dice coefficient ≥ 0.95 are retained as the pre-annotated dataset.
[0018] Preferably, in the annotated 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.
[0019] 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% and the contrast by ±15%; the random erasure optimization includes selecting 10% - 20% of any specific area as the erasure area from each mask image in the pre-annotated dataset.
[0020] Preferably, the normalization process in step S1 includes: through the normalization formula , the pixel values of each mask image in the pre-annotated dataset are respectively normalized 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.
[0021] Preferably, when starting training in step S2, the random gradient descent optimizer and the Poly strategy for dynamic attenuation are used for adjustment. The initial learning rate of the random gradient descent optimizer is set to 0.01, and the formula for the Poly strategy for dynamic attenuation 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 iteration number, and power represents the order of the polynomial.
[0022] Preferably, when training in step S2, the SGnet model is trained end-to-end on the GPU. The batch size is set to 8, the total iteration number is set to 30000 times, and it is set to save the model parameters every 500 iterations and monitor 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.
[0023] Preferably, before the decoder restores the resolution to 1 / 4 in step S2, the decoder first restores the resolution of the encoder's output to 1 / 4 through bilinear upsampling, then stitches it with the edge detail features extracted by ResNet50, and performs corresponding upsampling after stitching is completed.
[0024] 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 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 and take the median of the gray values in the pixel neighborhood for denoising; the processes of pre-normalization and normalization 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.
[0025] 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 mean of the actual sizes of the two is used as the equivalent diameter of the corresponding starch granule.
[0026] The beneficial effects of the present invention compared with the prior art are:
[0027] 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 operate 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 particles and dense overlapping scenes, supporting the rapid analysis of mature grains or young caryopses, without the need to use expensive and time-consuming particle size analyzers, improving both accuracy and computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a flowchart of a high-throughput analysis method for starch granules in wheat grains based on semantic segmentation;
[0029] Figure 2 It is a diagram showing the starch granule recognition process. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] 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 , of the present invention.
[0031] 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:
[0032] S1. In the first stage, data preparation and construction of a high-quality labeled dataset are carried out.
[0033] 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.
[0034] 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 boundary fitting and corresponding marking, 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 boundaries of each granule, more vertices need to be added to the edges of the granules. This increases the vertex density and makes the drawn polygon fit more closely to the actual edges of the granules, ensuring that even granules with complex shapes or blurred boundaries can be accurately recognized, thus avoiding possible fitting errors in subsequent processing. It should be noted that the meanings of annotation and marking are the same.
[0035] Each labeled particle is assigned a unique identifier ID and classified into a preset grouping of starch granules. The background area does not require additional annotation and is defaulted to a negative sample, thus removing the background influence. After the labeling is completed, the image annotation tool is continued 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 the strict alignment of the image and label during subsequent data processing, and taking the set of each mask map as a pre-annotated data set.
[0036] In this embodiment, considering the possible manual annotation errors in the model construction stage, all images need to be independently annotated by two researchers, 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 P by the two is ≥ 0.95, indicating that P is relatively clear and distinguishable, so P is retained. The coincidence rate of the annotations of Q by the two 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 data set containing 48 highly consistent annotated images is constructed as a pre-annotated data set, thus providing reliable basic data for subsequent model training.
[0037] 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.
[0038] In this embodiment, due to the small sample size and considering the data volume requirement of the deep learning model, a multi-dimensional data augmentation strategy also needs to be adopted for the pre-annotated data set to improve the robustness of the model, mainly including geometric transformation, pixel-level perturbation adjustment, and random erasing 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 erasing technique for optimization, the erasing area is set to account for 10% - 20% of the area of each image to simulate impurities or wrinkles in the section and further expand the data diversity.
[0039] Then, each image after multi-dimensional data augmentation is normalized, including: each image is passed through the formula , the pixel values are normalized to a distribution with a mean of 0 and a standard deviation of 1, thereby ensuring the consistency of the input data. Among them, x represents the pixel value before normalization, x' represents the pixel value after normalization, μ represents the mean, and σ represents the standard deviation. The above processing can expand the effective training sample size to nearly 400 images, significantly improving the generalization ability of the model for starch granule size, morphology, and complex backgrounds.
[0040] S2. In the second stage, the DeepLabV3+ model is constructed and optimized for training.
[0041] Based on the DeepLabV3+ architecture, the SGnet model is constructed. The encoder built into 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 complexity by about 30% and compressing the parameter scale by 25% while maintaining the feature extraction ability, to adapt to the training requirements of the samples.
[0042] 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, thereby improving the resolution.
[0043] Meanwhile, the ASPP module is set up. Four dilated convolution branches with different sampling rates 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 dense particle scenarios. ASPP, short for Atrous Spatial Pyramid Pooling, means dilated spatial pyramid pooling and is an important component for the segmentation task in this model.
[0044] In this embodiment, a decoder is also set up 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 upsamples again after splicing with the edge detail features extracted by ResNet50, 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 smaller than 2μm.
[0045] 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.
[0046] 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 visual field 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 improved by 15% compared with the traditional U-Net. The GPU hardware can use the NVIDIA RTX 3090 GPU.
[0047] It should be noted that mIoU stands for Mean Intersection over Union, which is one of the evaluation metrics in semantic segmentation. It is 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.
[0048] 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.
[0049] Such as Figure 2As shown, it is a flowchart showing the process of starch granule recognition. Select an original microscopic image of the wheat endosperm area 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.
[0050] 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 performing bilinear interpolation Resize to reset the pixel size, the original microscopic image with a default resolution of 96 dpi is Resize to a size of 512×512 pixels through bilinear interpolation; then, using the mean subtraction and standard deviation normalization formula, the pixel values are mapped 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 a 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.
[0051] 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.
[0052] 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 a morphological closing operation with a 5×5 circular structuring element: through the operations of dilation first and then erosion, connect the small broken areas between adjacent granules and repair the integrity of the granule contour.
[0053] Subsequently, based on connected component analysis, identify all foreground areas in the pixel-level segmentation mask image, filter out isolated areas 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 as to be able to count the total number of granules in a single image, that is, the total number of starch granules.
[0054] In this embodiment, for the irregular shape of starch granules, an ellipse fitting technique is also required to calculate the equivalent diameter of each granule, including: fitting the best ellipse of the granule contour by the least squares 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 criteria for the three categories can be freely set. At the same time, for the endosperm stratification region, analysis can be carried out through a centroid-based radial stratification algorithm, that is, based on the contour edge and centroid position of the endosperm region, to divide the endosperm region into three parts: the outer layer, the middle layer, and the inner layer.
[0055] Then, repeat the above feature extraction process for different layers respectively. 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.
[0056] To sum up, the present invention constructs an SGnet model based on the DeepLabV3+ architecture. After training such as fusing multi-scale features through dilated convolution and the ASPP module, a final model that can operate fully automatically is obtained, greatly reducing the cumbersome manual operations, and being able to effectively process irregular granules 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 a costly and time-consuming particle size analyzer. While improving the accuracy, it also improves the calculation efficiency, showing significant progressiveness.
[0057] The above embodiments are only used to illustrate the technical idea of the present invention and cannot limit the protection scope of the present invention. Any changes made on the basis of the technical solution according to the technical idea proposed by the present invention fall 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, It includes 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 the minimum number of vertices; for each irregular granule that overlaps, is polygonal or discoid, 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 map with the same name as each original microscopic image, and use the set of each mask map 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 dilated convolutions in the last three layers of ResNet50 in the encoder and set the parameter of the dilated convolution AtrousRate = 2 to increase the resolution from 1 / 32 to 1 / 16; at the same time, in the ASPP module of the SGnet model, deploy multiple dilated 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 the 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 the outer layer, middle layer and inner layer, and count the number ratio, average diameter and area distribution of different types of granules in each layer to characterize the spatial distribution characteristics.
2. The high-throughput analysis method of starch granules in wheat grains based on semantic segmentation according to claim 1, wherein When making each mark in step S1, set two people 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 map, and only keep each mask map with a Dice coefficient ≥ 0.95 as the pre-annotated dataset.
3. The high-throughput analysis method of starch granules in wheat grains based on semantic segmentation according to claim 1, wherein In the annotated dataset of step S1, divide each mask map into a training set, a validation set and a test set according to 8:1:1 respectively.
4. A high-throughput analysis method for starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that, 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% and the contrast by ±15%; the random erasing optimization includes selecting 10% - 20% of any specific area in each mask map of the pre-annotated dataset as the erasing area from each mask map.
5. A high-throughput analysis method for starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that, The normalization process in step S1 includes: By using the normalization formula , the pixel values of each mask image in the pre-annotated dataset are respectively normalized 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 high-throughput analysis method for starch granules in wheat grains based on semantic segmentation according to claim 1, wherein When starting the training in step S2, it is adjusted by using a stochastic gradient descent optimizer and Poly strategy dynamic decay. The initial learning rate of the stochastic gradient descent optimizer is set to 0.01, and the formula for Poly strategy 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.
7. A high-throughput analysis method for 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, with the batch size set to 8 and the total number of iterations set to 30,000. 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.
8. A high-throughput analysis method for starch granules in wheat grains based on semantic segmentation according to claim 1, characterized in that, 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.
9. A high-throughput analysis method for 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 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 the 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 of the pixel neighborhood after mapping and take the median for noise reduction; The processes of standard preprocessing 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.
10. A high-throughput analysis method for 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 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 mean of the actual sizes of the two is used as the equivalent diameter of the corresponding starch granule.
Citation Information
Patent Citations
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