Method and system for evaluating substrate fertility based on container seedling root system image analysis

CN122597417BActive Publication Date: 2026-10-09YANGLING LINKE ECOLOGICAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202611082619.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-09
Estimated Expiration
2046-07-21

AI Technical Summary

Technical Problem

[0007]为解决现有基于根系图像分析的基质肥力评估技术存在复杂背景下容器苗根系分割精度低、多源特征融合效果差、评估结果准确性与稳定性不足的问题,本发明在如下的多个方面中提供方案

Benefits of technology

[0026] This invention employs an encoder that concatenates depthwise separable convolutions and porosity-increasing dilated convolutions to extract image features. It then uses channel variance to filter shallow, high-information channels and concatenates them with deep features to construct a multi-scale feature map. This is combined with a dual-stream attention module based on pixel gradient difference and channel entropy. The decoder incorporates sub-pixel convolutions and a residual edge correction unit based on the coding layer porosity. Finally, a hybrid regression model using gradient boosting tree residuals to dynamically adjust the activation threshold is employed for fertility assessment. These combined methods accurately segment container seedling roots in complex substrate environments, fully preserving micro-roots, root tips, and edge structures, mitigating edge blurring caused by upsampling. Simultaneously, it effectively integrates root morphology with multi-source features such as substrate color and texture, and adaptively adjusts the feature activation threshold through predictive residuals, thereby improving the accuracy and stability of fertility assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597417B_ABST
    Figure CN122597417B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image analysis, and particularly relates to a substrate fertility evaluation method and system based on container seedling root system image analysis, which comprises the following steps: inputting a pretreated image into a segmentation network, using deep separable convolution and hole convolution to extract and splice features, and obtaining a multi-scale feature map; then, an attention module is constructed to fuse spatial and channel weights; then, the fused features are input into a decoder, sub-pixel convolution upsampling is performed, an edge is corrected by a residual correction unit, and a segmentation mask is output; based on the mask, root system morphology, substrate color and texture features are extracted and spliced, and a full connection regression model is input; during training of the model, an activation threshold is adjusted according to a predicted residual, and during evaluation, the threshold is fixed, and finally, a substrate fertility evaluation value is output. The application can accurately segment the container seedling root system under a complex substrate background and retain edge details, effectively fuse multi-source features, and improve the accuracy and stability of substrate fertility evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology. More specifically, this invention relates to a method and system for assessing substrate fertility based on root system image analysis of container seedlings. Background Technology

[0002] Substrate fertility is a core factor determining the growth quality of container seedlings, and its detection and evaluation are crucial steps in the container seedling production process. Traditional substrate fertility testing mainly relies on physicochemical analysis methods, determining fertility levels by measuring the content of indicators such as nitrogen, phosphorus, potassium, and organic matter after sampling. Although this method has high detection accuracy, it suffers from problems such as cumbersome sampling, long testing cycles, and damage to the substrate, making it difficult to meet the needs of in-situ, continuous, and real-time monitoring during container seedling cultivation.

[0003] In recent years, with the development of computer vision and deep learning technologies, indirectly inferring substrate fertility levels by collecting plant root images and analyzing their growth status has become a promising non-destructive assessment method. As the main organs for plant water and nutrient absorption, the root system exhibits a close correlation between its morphological characteristics, such as total root length, root projected area, number of root tips, and fractal dimension, and substrate fertility levels. This provides a solid theoretical foundation for non-destructive assessment of substrate fertility based on root image analysis.

[0004] For example, Chinese patent application CN114266903A discloses a root image processing method. This method preprocesses the original root image by converting it to grayscale, using Gaussian filtering for noise reduction, and enhancing contrast. It then employs an improved U-Net network that integrates an attention mechanism and a residual module for semantic segmentation to obtain root feature images. Finally, morphological processing is used to extract multiple root phenotypic parameters, such as total root length and root projected area. This method automates the entire process of root phenotypic parameter extraction, improving the efficiency of root research and is applicable to root image analysis of various plants. In addition to the above methods, existing technologies also attempt to combine deep learning semantic segmentation networks with machine learning regression models to establish a mapping relationship between extracted root morphological parameters and substrate fertility.

[0005] However, this type of method still has technical shortcomings in several stages: In the feature extraction and multi-scale fusion stages, conventional segmentation networks tend to weaken shallow detail information in order to expand the receptive field. If shallow features are directly concatenated with deep features, background noise and redundant channels will be introduced, resulting in blurred multi-scale feature representation. In terms of attention mechanisms, existing attention mechanisms mostly rely on global pooling to allocate weights, which makes it difficult to make full use of pixel-level gradient similarity and channel information entropy differences in root images, and pays insufficient attention to fine roots and complex background boundaries. In the upsampling reconstruction process, conventional interpolation or transposed convolution can easily cause blurred root edges and local breaks, affecting the accuracy of subsequent morphological parameter calculations. In the fertility assessment stage, traditional regression networks usually use fixed feature activation thresholds, which are difficult to adapt to the complex correlation between multi-source heterogeneous features such as root morphology, matrix color and texture, and cannot dynamically calibrate feature representation based on prediction errors during the training stage, resulting in insufficient accuracy and stability of matrix fertility assessment values ​​in actual planting environments.

[0006] Therefore, how to accurately segment the root system of container seedlings in complex contexts, effectively integrate multi-source features, and establish a high-precision and high-stability substrate fertility assessment model are the technical problems that urgently need to be solved. Summary of the Invention

[0007] To address the problems of low root segmentation accuracy, poor multi-source feature fusion effect, and insufficient accuracy and stability of evaluation results in existing substrate fertility assessment technologies based on root image analysis, this invention provides solutions in the following aspects.

[0008] In a first aspect, the present invention provides a method for evaluating substrate fertility based on root system image analysis of container seedlings, comprising: S1, acquiring and preprocessing root system images of container seedlings to be evaluated, inputting the preprocessed images into a segmentation network, wherein the encoder of the segmentation network employs a concatenation of depthwise separable convolution and dilated convolution to extract shallow and deep features; filtering the shallow features according to channel variance, and concatenating the filtered shallow features with the deep features to obtain a multi-scale feature map; S2, constructing an attention module for the multi-scale feature map, wherein the spatial path constructs a spatial weight matrix based on pixel gradient difference, and the channel path calculates channel weights based on channel entropy values, and the two paths are added by scalar coefficients. Weighted fusion yields fused features; the fused features are input into the decoder for sub-pixel convolution upsampling, and residual correction units are inserted at each level to correct edges. The correction intensity of the residual correction units is determined based on the porosity of the dilated convolution in the corresponding coding layer, and a segmentation mask is output; S3, root morphology parameters, matrix color, and texture features are extracted based on the segmentation mask; S4, the root morphology parameters and matrix color and texture features are concatenated and input into a regression model. The regression model contains a fully connected network. The feature activation threshold of the fully connected network during the training phase is adjusted by the prediction residual of the gradient boosting tree, and a fixed truncation threshold is used during the evaluation phase to output a matrix fertility evaluation value.

[0009] The encoder employs a concatenation of depthwise separable convolutions and dilated convolutions, balancing computational efficiency with receptive field expansion. Shallow features are filtered using channel variance and concatenated with deeper features, preserving high-information detail channels while suppressing redundant background noise. The attention module enhances effective features from both spatial and channel dimensions: the spatial path uses pixel gradient differences to focus on root boundaries and fine branches, while the channel path highlights channels with rich feature responses based on information entropy. In the decoding stage, sub-pixel convolutions and residual correction units are introduced, and the edge correction intensity is dynamically adjusted based on the dilation rate of the encoding layer, improving the continuity of segmentation boundaries. Finally, morphological, color, and texture features are fused and fed into a hybrid regression model. The prediction residuals of the gradient boosting tree are used to adaptively adjust the activation threshold of the fully connected network. During training, feature representation is dynamically sparsified, and during evaluation, a fixed threshold is used to stabilize the output, thereby improving the accuracy and stability of matrix fertility assessment in complex backgrounds.

[0010] Preferably, the process of generating the preprocessed image includes: acquiring the original root system image of the matrix in three primary colors through a camera at a preset position and converting it into a grayscale image; performing background illumination correction and noise reduction on the grayscale image by combining Gaussian filtering operator and top-hat transform to generate the preprocessed image.

[0011] First, the color image is converted to grayscale to simplify the calculation. Then, Gaussian filtering is used to suppress high-frequency noise, and top-hat transformation is used to eliminate background interference from gradual lighting, highlighting the subtle root texture in the shadows. This improves the quality of the preprocessed image, provides clear input for the subsequent segmentation network, and reduces segmentation errors caused by image quality issues.

[0012] Preferably, the step of filtering the shallow features according to channel variance and concatenating the filtered shallow features with the deep features to obtain a multi-scale feature map includes: calculating the variance of pixel values ​​in each channel of the shallow features and arranging them in descending order; calculating the mean of the variance of activation intensity in each channel of the deep features and obtaining a target threshold through normalization mapping; accumulating the variance of the shallow feature channels in descending order and extracting the first K channels whose cumulative variance ratio first reaches the target threshold to form a combined channel group; and concatenating the combined channel group with the deep features in the channel dimension to construct the multi-scale feature map.

[0013] This scheme uses channel variance to measure the amount of information in shallow features and dynamically determines the screening threshold by combining the activation intensity of deep features. It retains shallow detail channels with high information density, which avoids the background noise introduced by directly splicing all shallow features and retains key details such as micro-roots, thus achieving high-quality multi-scale feature fusion.

[0014] Preferably, constructing an attention module for the multi-scale feature map includes: in the spatial path, calculating the average absolute difference of each pixel in its spatial neighborhood, mapping it using a positive correlation gain function to generate the spatial weight matrix, and multiplying it with the multi-scale feature map to output spatial path features; in the channel path, calculating the image entropy of each channel feature map and normalizing it to the channel weight, multiplying it with the multi-scale feature map to output channel path features; calculating the ratio of the mean of the spatial weight matrix to the mean of the channel weight, mapping it using a normalized Logistic function as the scalar coefficient, and using the scalar coefficient to perform a weighted summation of the spatial path features and the channel path features to output the fused features.

[0015] Preferably, the step of inserting a residual correction unit at each level to correct the edges, wherein the correction strength of the residual correction unit is determined based on the porosity of the dilated convolution in the corresponding coding layer, includes: constructing a residual correction unit after each upsampling, extracting the edge detail residuals from the previous upsampling output; normalizing the porosity of the dilated convolution in the coding layer that matches the current decoding layer by dividing it by the maximum porosity to generate a correction coefficient; and multiplying the residual feature map output by the residual correction unit by the correction coefficient and then superimposing it onto the corresponding upsampled feature map to sharpen the root edges.

[0016] Preferably, the root morphology parameters are extracted based on the segmentation mask, including: refining the segmentation mask to obtain the root system's central skeleton; counting the total number of pixels in the central skeleton to obtain the total root length; identifying the total number of endpoints in the central skeleton as the root tip number; counting the total number of pixels belonging to the root system within the segmentation mask to obtain the root projection area; dividing the root projection area by the total root length to obtain the average root diameter; covering the central skeleton using the box-counting method, and obtaining the fractal dimension by fitting the slope of the curve relating the logarithm of the number of grids containing skeleton pixels to the inverse logarithm of the grid side length; the root morphology parameters consist of the total root length, the root tip number, the root projection area, the average root diameter, and the fractal dimension.

[0017] The root system skeleton is obtained by morphological refinement. Based on this, basic parameters such as total root length and number of root tips are calculated. Fractal dimension is introduced to characterize the root branch topology. Multi-dimensional morphological parameters can more comprehensively reflect the root growth status and spatial distribution characteristics, providing a reliable biological basis for substrate fertility assessment.

[0018] Preferably, the extraction of matrix color and texture features includes: determining non-root matrix regions based on the segmentation mask, and mapping the matrix regions onto the root image of the container seedling to be evaluated; extracting color histogram distribution features within the mapped matrix regions as the matrix color features; converting the matrix regions into grayscale images, extracting the contrast, homogeneity, energy, and correlation parameters of the grayscale co-occurrence matrix in a preset direction, and calculating the average value as the texture features.

[0019] Preferably, the regression model is a hybrid regression model that includes the gradient boosting tree and the fully connected network; the step of concatenating the root morphology parameters and the matrix color and texture features into the regression model includes: concatenating the root morphology parameters, the matrix color and texture features in the feature dimension to form a one-dimensional comprehensive feature vector, and inputting it into the hybrid regression model.

[0020] By concatenating three heterogeneous features—root morphology, matrix color, and texture—into a unified one-dimensional vector and inputting it into a hybrid model composed of a gradient boosting tree and a fully connected network, the complementary information of different features is integrated. This fully leverages the decision tree's ability to process structured features and the neural network's nonlinear fitting ability, thereby improving the overall performance of the fertility assessment model.

[0021] Preferably, the feature activation threshold of the fully connected network during the training phase is adjusted by the prediction residual of the gradient boosting tree, and a fixed truncation threshold is used during the evaluation phase. This includes: during model training, obtaining the prediction residual of the gradient boosting tree for the training samples; calculating the mean square value of the prediction residuals for all samples in the current batch, and dynamically adjusting a preset base threshold accordingly to generate the feature activation threshold, where a larger mean square value of the prediction residual results in a lower generated feature activation threshold; during the forward propagation of the fully connected network, setting the activation values ​​of hidden layer neurons with absolute values ​​lower than the feature activation threshold to zero; and during model evaluation, extracting the average value of the feature activation thresholds from multiple iterations at the end of the training convergence phase as the fixed truncation threshold.

[0022] During the training phase, the activation threshold of the fully connected network is dynamically adjusted using the prediction residuals of the gradient boosting tree. When the residual is large, the threshold is lowered to retain more features and enhance the fitting ability to difficult samples; when the residual is small, the threshold is raised to suppress redundant features. During the evaluation phase, a fixed average threshold is used to ensure the stability of the inference process and improve the reliability of the evaluation results.

[0023] Secondly, the present invention provides a substrate fertility assessment system based on root system image analysis of container seedlings, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned substrate fertility assessment method based on root system image analysis of container seedlings is implemented.

[0024] By adopting the above technical solution, a computer program is generated from the above-mentioned substrate fertility assessment method based on root system image analysis of container seedlings, and stored in a memory so that it can be loaded and executed by a processor. In this way, a terminal device can be made based on the memory and processor for convenient use.

[0025] The technical solution of the present invention has the following beneficial technical effects:

[0026] This invention employs an encoder that concatenates depthwise separable convolutions and porosity-increasing dilated convolutions to extract image features. It then uses channel variance to filter shallow, high-information channels and concatenates them with deep features to construct a multi-scale feature map. This is combined with a dual-stream attention module based on pixel gradient difference and channel entropy. The decoder incorporates sub-pixel convolutions and a residual edge correction unit based on the coding layer porosity. Finally, a hybrid regression model using gradient boosting tree residuals to dynamically adjust the activation threshold is employed for fertility assessment. These combined methods accurately segment container seedling roots in complex substrate environments, fully preserving micro-roots, root tips, and edge structures, mitigating edge blurring caused by upsampling. Simultaneously, it effectively integrates root morphology with multi-source features such as substrate color and texture, and adaptively adjusts the feature activation threshold through predictive residuals, thereby improving the accuracy and stability of fertility assessment. Attached Figure Description

[0027] Figure 1 The flowchart shows a method for assessing substrate fertility based on root system image analysis of container seedlings. Figure 2 This is a schematic diagram of the Shannon entropy weight distribution of multi-scale feature map channels; Figure 3 This is a comparison diagram of the root system segmentation accuracy and the error ablation experiment in predicting substrate fertility. Detailed Implementation

[0028] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0029] This invention discloses a method for evaluating substrate fertility based on root system image analysis of container seedlings, referring to... Figure 1 This includes the following steps: S1. Image preprocessing and multi-scale feature fusion of container seedling root system.

[0030] Conventional segmentation networks, in their efforts to expand the receptive field, often weaken shallow details, resulting in the loss of fine roots and edge structures. Direct multi-scale stitching, on the other hand, easily introduces redundant channels and background noise. This step aims to balance computational efficiency and receptive field expansion through a specific network cascade structure, and introduces a feature truncation mechanism based on channel variance to eliminate low-information-density, shallow, redundant features, achieving high-quality multi-scale feature fusion and laying the foundation for subsequent accurate segmentation.

[0031] Specifically, the root system images of the container seedlings to be evaluated are acquired and preprocessed. The specific steps are as follows: Using an industrial camera positioned 15cm directly in front of the plant root observation chamber, raw RGB images of the substrate are acquired at a resolution of 1920×1080 pixels. These images are then converted into 8-bit single-channel grayscale images using a weighted averaging formula. The weighted averaging formula is as follows: ; In this relation, This represents the converted grayscale pixel value; , , These represent the color intensity values ​​of the red, green, and blue channels of the corresponding pixels in the original image, respectively; 0.299, 0.587, and 0.114 are the weighting coefficients for each color channel configured according to the characteristics of human visual perception.

[0032] Subsequently, using a kernel size of 5×5 and a standard deviation A Gaussian filter of 1.5 is used to spatially smooth the grayscale image to suppress high-frequency noise. After denoising, a top-hat transform is used for background illumination correction and foreground enhancement. Specifically, a disk structuring element with a diameter of 15 pixels is selected as the morphological detection benchmark, and the difference image between the original image and the result after morphological opening (i.e., erosion followed by dilation) is calculated using this structuring element. Finally, the corrected single-channel image is normalized to the 0-1 interval by mapping the maximum and minimum values ​​to generate a preprocessed image, which is then used as the input to the subsequent feature segmentation network.

[0033] The preprocessed image is input into the segmentation network. In the encoder stage, a standard 2D convolutional layer is used to extract shallow features from the preprocessed image. These shallow features typically originate from the front-end layers of the encoder, with a channel count of 64 and a spatial size of 256×256. Subsequently, the feature map is input into a cascaded module consisting of depthwise separable convolutions and dilated convolutions to extract deep features. The depthwise separable convolutions are implemented by combining channel-wise convolutions (where the number of input channels equals the number of groups) with pointwise convolutions of size 1×1. The porosity parameters of the dilated convolutions are arranged in increasing order of 1, 2, 4, and 8. Each cascaded layer is activated using a linear rectified function and downsampled using a max-pooling layer; its channel count is set to 256, and its spatial size is 16×16.

[0034] In the feature fusion stage, a variance screening mechanism is adopted: First, the global variance of the feature pixel values ​​in each channel is extracted along the spatial dimension of the shallow features using the tensor variance function to represent the richness of the texture features detected by different channels. Then, a sorting algorithm is called to sort all shallow feature channels in descending order of variance value.

[0035] Simultaneously, deep features from the deepest layer output of the network are obtained, the variance of the activation intensity of each deep channel is calculated and its mean is taken to obtain the mean deep activation variance. This mean is then mapped to a value between 0 and 1 using a Logistic function or a min-max normalization method, serving as the target threshold. Following the previously arranged descending sequence of shallow features, the variance values ​​of the corresponding channels are accumulated sequentially. When the accumulation reaches the... When there are multiple channels, if the cumulative variance as a percentage of the total variance of all shallow channels is greater than or equal to the target threshold for the first time, then the channel at the top will be ranked higher. Each high-information-volume channel is extracted to form a combined channel group. Among them, The specific value is dynamically determined by the target threshold and the channel variance distribution, and is usually distributed between 15 and 35.

[0036] Finally, a bilinear interpolation algorithm is used to upsample the deep features to the same spatial dimension as the combined channel group, and the selected features are then processed along the channel axis. Shallow and deep features are cascaded and fused to generate multi-scale feature maps.

[0037] S2, The output segmentation mask is corrected by attention weighting and decoder.

[0038] Existing mechanisms struggle to fully utilize pixel-level gradient similarity and channel entropy differences in root images. To address this, this step constructs a dual-stream concurrent attention module, combining spatial and channel-based weighting to enhance the network's ability to focus on fine root systems and complex background boundaries. Furthermore, during the decoding stage, a residual correction unit based on porosity adaptive adjustment is incorporated to improve edge blurring and breakage issues.

[0039] A dual-stream concurrent attention module is constructed from the multi-scale feature maps output by the above steps. In spatial path processing, the gradient maps of the feature maps are calculated in the horizontal and vertical directions. Specifically, a 3×3 eight-neighborhood computation window is set for each center pixel, and the absolute difference between the activation values ​​of the center point and the other 8 pixels in the neighborhood is calculated pixel by pixel, and the average value is obtained. Assume the coordinates of the center point are... And the mean of this difference is denoted as ; in terms of natural constant As the base, a positive correlation gain function is used. The weights at each location are calculated to construct a spatial weight matrix consistent with the spatial dimensions. Then, a channel-by-channel, element-by-element Hadamard product operation is performed between this matrix and the original feature map via a broadcast mechanism to output the spatial path features.

[0040] In channel processing, the two-dimensional response plane of each channel is extracted, and the values ​​are discretized to a grayscale range of 0 to 255. The global image information entropy of each channel is then calculated using the Shannon entropy formula. ; In the formula, This represents the global image information entropy of the current channel; Indicates the first grayscale; Indicates the first The probability of a gray level appearing in the current two-dimensional feature channel plane. For example... Figure 2 As shown in the figure, the distribution of Shannon entropy weights for each channel of the multi-scale feature map is shown. There are significant differences in the Shannon entropy weights of different channels, indicating that the amount of image information contained in each channel is different. This distribution feature provides data support for the attention mechanism that uses channel entropy values ​​for weighting.

[0041] The obtained entropy value set is subjected to min-max normalization to obtain normalized channel entropy values, which are then processed by the Softmax function to obtain channel weight vectors. These vectors are then applied to the corresponding feature map slices through tensor multiplication along the channel dimension to output the channel features.

[0042] During the fusion phase, the average value of all elements in the spatial weight matrix and the average value of the normalized channel entropy are calculated separately. The ratio between the two is then input into the normalized logistic function and mapped to the interval between 0 and 1 as a scalar coefficient. This mapping function includes network learnable parameters. The spatial path features are multiplied by the scalar coefficients, and 1 is added to the result of multiplying the difference between the spatial path features and the channel path features, thus completing the dual-path weighted fusion.

[0043] The fused features are input into the decoder network for image reconstruction. Specifically, sub-pixel convolutions are used instead of regular deconvolution layers for upsampling. After each upsampling, a residual correction unit consisting of two 3×3 standard convolutional layers and a batch normalization layer is constructed to extract the edge detail residuals from the previous sub-pixel convolution output. Simultaneously, the porosity value of the dilated convolution in the encoding layer matching the current decoding layer is obtained, normalized by dividing it by the maximum porosity set in the network, and a correction coefficient is generated based on this. The larger the porosity, the larger the correction coefficient, and a preset upper limit of 0.8 is used to limit this coefficient to avoid over-sharpening of edges. This upper limit is determined through pre-experiments on the edge correction effect under different porosities. The residual feature map output by the residual correction unit is multiplied by the correction coefficient and then element-wise superimposed onto the corresponding upsampled feature map to sharpen the root edges. The above operations are repeated until the original resolution is restored, and finally, a binarized root segmentation mask (background 0, root 1) is output through a 1×1 convolutional layer.

[0044] S3. Extract multi-source features of root system and matrix based on segmentation mask.

[0045] This step aims to quantitatively extract root morphology parameters based on high-precision segmentation masks using connected component analysis and fractal geometry algorithms, while simultaneously obtaining matrix color and texture characteristics of non-root regions, thereby constructing a more powerful multidimensional comprehensive feature vector.

[0046] In the root morphology parameter extraction stage: the 2D root segmentation mask is subjected to multiple rounds of iterative erosion using the Zhang-Suen fast parallel thinning algorithm to peel off the target boundary pixels, obtaining a continuous root axial skeleton with a single pixel width. Based on this, the following parameters are calculated: (1) Total root length: The total root length is obtained by multiplying the number of all non-zero pixels in the skeleton by the calibration size (in mm / pixel) obtained by calibrating with a standard ruler in advance.

[0047] (2) Root tip number: Perform a 3×3 eight-neighbor connected domain search on the central skeleton, screen out the endpoints in the eight adjacent grids where the non-zero pixel count is strictly equal to 1, and record the total number as the root tip number.

[0048] (3) Root projection area: Count all non-zero pixels in the unrefined original segmentation mask, multiply by the area of ​​a single pixel, and output the total root projection area.

[0049] (4) Average root diameter: The root projection area is divided by the total root length using a two-dimensional projection width approximation model.

[0050] (5) Fractal dimension: Using the box dimension method, a series of side lengths are defined as follows. Square grid, The preferred values ​​are 2, 4, 8, 16, 32, and 64 pixels. The skeleton image is completely covered using a grid at each level, and the total number of grids containing at least one non-zero skeleton pixel is counted at each scale. .by The x-axis is... A scatter plot is constructed for the vertical axis, and a univariate linear fit is performed using the least squares method. The slope of the fitted line is the fractal dimension.

[0051] In the matrix feature extraction stage, the matrix background region is obtained after excluding the main root region based on a segmentation mask, and then mapped onto the original root image for extraction. (1) Color characteristics: The matrix region is converted to the HSV color space, and the hue channel is divided into 8 intervals, and the saturation and brightness channels are each divided into 4 intervals. This division method is determined based on the statistical distribution characteristics of the matrix color, and a 16-dimensional normalized color histogram distribution characteristics are generated by splicing.

[0052] (2) Texture features: Convert the region to a grayscale image and set the scan step size to 1. The step size, which balances the fineness of texture features with computational efficiency, is used to calculate four Haralick parameters—contrast, homogeneity, energy, and correlation—of the gray-level co-occurrence matrix in four directions: 0°, 45°, 90°, and 135°. By averaging these four directions, a rotation-invariant 4D matrix texture feature vector is generated.

[0053] Finally, the 5-dimensional morphological feature vector, the 16-dimensional color feature, and the 4-dimensional texture feature are sequentially concatenated horizontally to generate a 25-dimensional one-dimensional comprehensive feature vector, which is then processed by min-max normalization for use in subsequent regression models.

[0054] S4. Input regression model to dynamically adjust threshold to assess substrate fertility.

[0055] Traditional regression networks with fixed activation thresholds struggle to adapt to complex associations involving multi-source heterogeneous features and are susceptible to interference from high-error samples. To address this issue, this step constructs a hybrid collaborative regression model consisting of a gradient boosting decision tree (GBDT) and a multi-layer fully connected network. During training, the prediction residuals from the prior tree model are used to dynamically calibrate the activation retention of the hidden layers in the fully connected network, enhancing its expressive power for difficult samples and ultimately outputting stable and reliable matrix fertility assessment values.

[0056] Specifically, a hybrid regression model is constructed, consisting of a GBDT model and a fully connected network with three linear hidden layers. In each micro-batch training iteration, the one-dimensional composite feature vector generated by S3 is simultaneously input.

[0057] First, the initial prediction values ​​of the trained or periodically updated GBDT model for the current training sample are obtained. The GBDT model and the fully connected network receive the same 25-dimensional comprehensive feature vector as input. During the training of the hybrid model, an alternating update strategy is adopted: the GBDT model is pre-trained first, then the GBDT model is fixed, and its prediction residuals are used to dynamically adjust the feature activation thresholds of the fully connected network to update the fully connected network parameters. After a certain number of iterations, the GBDT model is incrementally updated based on the prediction residuals of the current model. The two are iterated alternately until convergence. The absolute value of the difference between the predicted value output by the GBDT model and the normalized manually labeled true fertilizer label is taken as the prediction residual for that single sample.

[0058] Next, the data from all samples in the current batch are aggregated, and the mean square value of the residuals is calculated by summing the squares of all predicted residuals and then taking the mean. Based on this real-time feedback mean square value of the residuals, an adaptive cutoff threshold is set for the fully connected network, and its calculation formula is as follows: ; In the formula, For dynamically calculated forward propagation truncation thresholds; This is a function that takes the maximum value and is used to constrain the lower limit of the threshold. This represents the mean square value of the predicted residuals for all samples within the current batch. The lower limit constraint is a preset value. The pre-configured basic cutoff threshold; This is the sensitivity ratio coefficient.

[0059] Based on the characteristics of this formula, as the batch prediction deviation increases, the calculated... The threshold decreases accordingly, allowing more hidden layer neuron activations with lower absolute values ​​to be retained instead of being set to zero during forward propagation in the fully connected network, thus improving the network's ability to fit difficult samples with high errors. Conversely, when batch prediction bias decreases, the threshold rises back to near the baseline level, forcing more weak activation values ​​to zero, suppressing the interference of redundant features on the regression results. The fully connected network completes training through the above adaptive hard threshold truncation mechanism.

[0060] At the end of the model training phase, when the root mean square error of the validation set decreases by less than 0.01 over 10 consecutive iterations, the model is considered to have converged. The average cutoff threshold, saved using an exponential moving average strategy throughout the entire model training cycle and representing the last 10 iterations at the time of training convergence, is retrieved and used as the fixed cutoff threshold. Subsequently, when the model is deployed to the inference and evaluation phase, all threshold updates are stopped, and this fixed cutoff threshold is incorporated into the activation function of the fully connected network. The fully connected network then outputs a continuous numerical value, which represents the substrate fertility evaluation result.

[0061] The experiment used a self-built plant root and substrate fertility dataset, containing 5000 samples, randomly divided into training and test sets at an 8:2 ratio. During the training phase, the ground truth root segmentation masks were obtained by domain experts using image annotation tools to perform pixel-level fine annotations on preprocessed images. The training process of the feature segmentation network employed a binary cross-entropy loss function to calculate the pixel-level error between the network's predicted segmentation mask and the ground truth mask, and backpropagation was used to update the weights based on this error. The hardware platform consisted of two RTX 3090 graphics processors, and the deep learning environment was built using the PyTorch framework. The initial learning rate was set to 0.001, the batch size to 32, and the Adam optimizer was used for 150 iterations of training. The mean intersection-union ratio (OCR) was used to represent the accuracy of the two-dimensional root segmentation of the feature segmentation network, while the root mean square error (RMSE) and mean absolute error (MAE) were used to evaluate the substrate fertility prediction accuracy of the regression model.

[0062] This experiment set up four control models. The baseline model used a conventional multi-scale splicing segmentation network and a standard fully connected layer as the regressor. Variant 1 added a multi-scale splicing module based on descending sorting of feature channel variance to filter shallow features. Variant 2 utilized a two-stream attention module based on local difference exponent and channel Shannon entropy, building upon Variant 1. Variant 3 was a complete implementation model that used gradient boosting tree prediction residuals to adjust the activation threshold of the fully connected network. The root segmentation accuracy and substrate fertility prediction error results for each model are shown below. Figure 3 As shown.

[0063] The test set evaluation results show that the baseline model has an average crossover ratio (CUP) of 82.5%, a root mean square error (RMSE) of 6.48, and a mean absolute error (MAE) of 5.26. Variant 1 achieves an average CUP of 85.9%, with the RMS decreasing to 5.72 and the MAE to 4.53. Variant 2 achieves an average CUP of 88.8%, with the RMS decreasing to 5.04 and the MAE to 3.95. Variant 3 maintains an average CUP of 88.8%, while the RMS decreases to 3.85 and the MAE to 2.98. These results demonstrate that with the sequential addition of each technical module of this invention, the root segmentation accuracy gradually improves, and the substrate fertility prediction error gradually decreases, directly verifying the effectiveness of the various technical methods of this invention.

[0064] This invention also discloses a substrate fertility assessment system based on container seedling root system image analysis, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a substrate fertility assessment method based on container seedling root system image analysis according to the present invention.

[0065] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0066] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for evaluating substrate fertility based on root system image analysis of container seedlings, characterized in that, include: S1. Obtain the root system image of the container seedling to be evaluated and perform preprocessing. Input the preprocessed image into the segmentation network. The encoder of the segmentation network uses a concatenation of depthwise separable convolution and dilated convolution to extract shallow and deep features. Filter the shallow features according to channel variance and concatenate the filtered shallow features with the deep features to obtain a multi-scale feature map. S2. Construct an attention module for the multi-scale feature map. The spatial path constructs a spatial weight matrix based on the pixel gradient difference, and the channel path calculates the channel weight based on the channel entropy value. The two paths are fused by weighting with scalar coefficients to obtain the fused feature. The fused features are input into the decoder for sub-pixel convolution upsampling. A residual correction unit is inserted at each level to correct the edges. The correction intensity of the residual correction unit is determined based on the porosity of the dilated convolution in the corresponding coding layer. The output is a segmentation mask. S3. Extract root morphology parameters, matrix color, and texture features based on the segmentation mask; S4. The root morphology parameters and the matrix color and texture features are concatenated and input into the regression model. The regression model includes a fully connected network. The feature activation threshold of the fully connected network during the training phase is adjusted by the prediction residual of the gradient boosting tree. During the evaluation phase, a fixed cutoff threshold is used to output the matrix fertility evaluation value.

2. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, The process of generating the preprocessed image includes: acquiring the original root system image of the matrix in three primary colors through a camera at a preset position, and converting it into a grayscale image; The grayscale image is subjected to background illumination correction and denoising by combining Gaussian filtering operator and top-hat transform to generate the preprocessed image.

3. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, The step of filtering the shallow features according to the channel variance and concatenating the filtered shallow features with the deep features to obtain a multi-scale feature map includes: calculating the variance of the pixel values ​​in each channel of the shallow features and arranging them in descending order; The mean of the variance of the activation intensity of each channel of the deep feature is calculated and normalized to obtain the target threshold; the variance of the shallow feature channels is accumulated in descending order, and the first K channels whose cumulative variance ratio reaches the target threshold for the first time are extracted to form a combined channel group. The combined channel group and the deep features are concatenated along the channel dimension to construct the multi-scale feature map.

4. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, Constructing an attention module for the multi-scale feature map includes: calculating the average absolute difference of each pixel in the spatial neighborhood in the spatial path, generating the spatial weight matrix by mapping with a positive correlation gain function, and multiplying it with the multi-scale feature map to output the spatial path features; In the channel path, the image entropy of each channel feature map is calculated and normalized to the channel weight, which is then multiplied by the multi-scale feature map to output the channel path features; The ratio of the mean of the spatial weight matrix to the mean of the channel weight is calculated, and after being mapped by the normalized Logistic function, it is used as the scalar coefficient. The scalar coefficient is then used to perform a weighted summation of the spatial path features and the channel path features to output the fused features.

5. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, The step of inserting a residual correction unit at each level to correct the edge, wherein the correction strength of the residual correction unit is determined based on the porosity of the dilated convolution in the corresponding coding layer, includes: constructing a residual correction unit after each upsampling and extracting the edge detail residuals from the previous upsampling output; The porosity of the dilated convolution in the coding layer that matches the current decoding layer is normalized by dividing it by the maximum porosity to generate a correction coefficient. The residual feature map output by the residual correction unit is multiplied by the correction coefficient and then superimposed onto the corresponding upsampled feature map to sharpen the root edges.

6. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, Extracting root morphology parameters based on the segmentation mask includes: refining the segmentation mask to obtain the root system's central skeleton; counting the total number of pixels in the central skeleton to obtain the total root length; and identifying the total number of endpoints in the central skeleton as the root tip number. The root projection area is obtained by counting the total number of pixels belonging to the root system within the segmentation mask; the average root diameter is obtained by dividing the root projection area by the total root length. The box-counting method is used to cover the central skeleton. The fractal dimension is obtained by fitting the slope of the curve relating the logarithm of the number of grids containing the skeleton pixels to the inverse logarithm of the grid side length. The root morphology parameters consist of the total root length, the number of root tips, the root projected area, the average root diameter, and the fractal dimension.

7. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, Extracting root morphology parameters, matrix color features, and texture features based on the segmentation mask includes: determining non-root matrix regions based on the segmentation mask, and mapping the matrix regions onto the root image of the container seedling to be evaluated; The color histogram distribution features are extracted within the mapped matrix region and used as the matrix color features. The matrix region is converted into a grayscale image, and the contrast, homogeneity, energy, and correlation parameters of the grayscale co-occurrence matrix in a preset direction are extracted and averaged as the texture features.

8. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 1, characterized in that, The regression model is a hybrid regression model that includes the gradient boosting tree and the fully connected network; The step of concatenating the root morphology parameters with the matrix color and texture features and inputting them into the regression model includes: The root morphology parameters, matrix color, and texture features are sequentially concatenated along the feature dimension to form a one-dimensional comprehensive feature vector, which is then input into the hybrid regression model.

9. The substrate fertility assessment method based on root system image analysis of container seedlings according to claim 8, characterized in that, The feature activation threshold of the fully connected network during the training phase is adjusted by the prediction residual of the gradient boosting tree, and a fixed truncation threshold is used during the evaluation phase, including: during the model training phase, obtaining the prediction residual of the gradient boosting tree for the training samples. Calculate the mean square value of the prediction residuals of all samples in the current batch, and dynamically adjust the preset base threshold accordingly to generate the feature activation threshold. The larger the mean square value of the prediction residuals, the lower the generated feature activation threshold. During the forward propagation of the fully connected network, the activation values ​​of hidden layer neurons whose absolute values ​​are lower than the feature activation threshold are set to zero. During the model evaluation phase, the average value of the feature activation thresholds from multiple iterations at the end of the training convergence phase is extracted as the fixed cutoff threshold.

10. A substrate fertility assessment system based on root system image analysis of container seedlings, characterized in that, include: The processor and memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the substrate fertility assessment method based on root system image analysis of container seedlings according to any one of claims 1-9.

Citation Information

Patent Citations

  • Root system image processing method

    CN114266903A

  • Pedestrian re-identification method and system based on multi-scale feature extension, and medium

    CN117893776A

  • Data visualization pathological diagram analysis system

    CN120543480A