Soil species identification method based on residual graph convolution

By integrating soil pH and color space information, and combining a multi-scale edge space adaptive enhancement module, the hierarchical relationship between soil genus and soil species is learned, and a soil species identification model is constructed. This solves the problem of insufficient soil species identification accuracy in existing technologies and achieves high-precision soil species identification.

CN119478534BActive Publication Date: 2025-11-18CHONGQING NORMAL UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411636919.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-11-18
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Existing technologies neglect the hierarchical relationship of soil species in soil species identification, resulting in insufficient identification accuracy and failing to meet practical needs.

Method used

A residual graph convolution-based method is adopted to integrate soil pH index and soil color space information. A multi-scale edge space adaptive enhancement module is used to extract soil image edge texture information. A soil species identification model is constructed by learning the hierarchical relationship between soil genus and soil species.

Benefits of technology

It improves the accuracy and robustness of soil type identification, provides accurate data support for agricultural production, and is highly adaptable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478534B_ABST
    Figure CN119478534B_ABST
Patent Text Reader

Abstract

The application provides a soil species identification method based on residual graph convolution, which comprises the following steps: mapping a sample soil image from an RGB color space to a Lab color space, removing a brightness component L in the Lab color space, and forming first input information by combining components of three color channels of the RGB color space of the sample soil image with a component a and a component b of the Lab color space; converting the sample soil image into a gray-scale image and forming second input information from the gray-scale image; constructing a soil species identification model, wherein the soil species identification model comprises a PH color channel correlation enhancement module, a multi-scale edge space self-adaptive enhancement module, an average pooling layer, a soil layer graph convolution module and a priori layer level guiding module; inputting first input information and second input information of a soil sample to be tested, soil genus-soil species layer level label word embedding features and a soil genus-soil species layer level relationship adjacency matrix into the soil species identification model which has been trained to obtain a soil species of the soil sample to be tested.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to a soil type identification method, in particular to a soil type identification method based on residual graph convolution. BACKGROUND

[0002] Classification of soil plays a very important role in identifying agricultural production.

[0003] In the prior art, soil type identification of soil is generally realized based on machine vision, that is, an image of sample soil is acquired, a corresponding neural network is constructed, the neural network is trained based on the sample soil image, and after the training is completed, a soil image to be measured is input into the corresponding neural network to obtain a final soil type classification probability. Although the prior art can identify soil types to a certain extent, the common focus in the prior art is concentrated on color, brightness and texture of the acquired soil image, and the relationship between soil type levels is ignored, so that the accuracy of final soil type identification still cannot meet the actual demand.

[0004] Therefore, in order to solve the above technical problems, it is urgent to propose a new technical means. SUMMARY

[0005] Therefore, the purpose of the present application is to provide a soil type identification method based on residual graph convolution, which can effectively guarantee the final accuracy of soil type identification by fusing the pH value of soil and the soil color space information, and using a multi-scale edge space adaptive enhancement module to extract the edge texture information of the soil image, and learning the hierarchical relationship between soil genera and soil types, providing accurate data support for subsequent agricultural production, and the whole process is adaptive and robust.

[0006] The application provides a soil type identification method based on residual graph convolution, which comprises the following steps:

[0007] S1. acquiring a sample soil image and a pH value of the sample soil;

[0008] S2. mapping the sample soil image from an RGB color space to a Lab color space, removing a brightness component L in the Lab color space, and forming first input information by combining components of three color channels of the RGB color space of the sample soil image with a and b components of the Lab color space;

[0009] S3. converting the sample soil image into a gray-scale image, and forming second input information from the gray-scale image;

[0010] S4. Construct a soil species identification model, wherein the soil species identification model comprises a PH color channel correlation enhancement module, a multi-scale edge space adaptive enhancement module, an average pooling layer, a soil hierarchical graph convolution module, and a priori hierarchical guidance module; an output end of the PH color channel correlation enhancement module is connected to an input end of the multi-scale edge space adaptive enhancement module, an output end of the multi-scale edge space adaptive enhancement module is connected to an input end of the average pooling layer, output ends of the average pooling layer are respectively connected to input ends of a first full connection layer and a second full connection layer, output information of the first full connection layer and the second full connection layer is input to the priori hierarchical guidance module, output information of the soil hierarchical graph convolution module is input to the priori hierarchical guidance module, and the priori hierarchical guidance module outputs a soil species identification result;

[0011] S5. Input the first input information to the PH color channel correlation enhancement module, input the second input information to the multi-scale edge space adaptive enhancement module, input the soil genus-soil species hierarchical label word embedding feature and the soil genus-soil species hierarchical relationship adjacency matrix of the sample soil to the soil hierarchical graph convolution module, and train the soil species identification model;

[0012] S6. Obtain a to-be-tested soil image, process the to-be-tested soil image through steps S2 and S3, input the first input information, the second input information, and the soil genus-soil species hierarchical label word embedding feature and the soil genus-soil species hierarchical relationship adjacency matrix of the to-be-tested soil image to the trained soil species identification model, and obtain a soil species of the to-be-tested soil.

[0013] Further, in step S4, the PH color channel correlation enhancement module extracts PH color channel features by the following method:

[0014] Determine three color channel features in the RGB color space and the a component and the b component of the Lab color space, and determine the correlation coefficient of the PH value and the color channel;

[0015] Multiply the PH value of the soil with the correlation coefficient, and then multiply the three color channel features in the RGB color space and the a component and the b component of the Lab color space to obtain color features, and perform normalization processing on the color features;

[0016] Add the normalized color features to the three color channel features in the initial RGB color space of the soil image and the a component and the b component of the Lab color space to form the final PH color channel correlation enhancement features and input to the multi-scale edge space adaptive enhancement module.

[0017] Further, the multi-scale edge space adaptive enhancement module comprises a first processing layer, a second processing layer, a third processing layer, a fourth processing layer, a first spatial adaptive normalization module, and a second spatial adaptive normalization module.

[0018] The first processing layer includes a 3x3 convolution kernel, a 5x5 convolution kernel, a 7x7 convolution kernel, a batch normalization module, a maximum pooling module, and a ReLU function module;

[0019] The PH color channel associated enhanced features are respectively input into the 3x3 convolution kernel, the 5x5 convolution kernel, and the 7x7 convolution kernel for processing, the outputs of the 3x3 convolution kernel, the 5x5 convolution kernel, and the 7x7 convolution kernel are added and input into the batch normalization module, the output of the batch normalization module is processed and output to the maximum pooling layer for processing, and finally the output is input into the ReLU function module for processing and output to the second processing layer;

[0020] The second processing layer, the third processing layer, and the fourth processing layer all use BasicBlock modules.

[0021] Further, the output information of the first full connection layer and the output information of the second full connection layer are added and input into the prior guidance module;

[0022] The output information of the average pooling layer is multiplied by the output information of the soil level map convolution module, and then added to the output information of the second full connection layer and input into the prior guidance module.

[0023] Further, the soil level map convolution module convolves the soil level map features through the following process:

[0024] Determine the soil genus label set G of the sample soil: G = {g1, g2, …, g m};

[0025] Determine the soil species label set S of the sample soil: S = {s1, s2, …, s k};

[0026] Define the mapping relationship function H: S→G, which represents that the soil species s i corresponds to the soil genus g i , and the mapping is represented as H(s i ) = g j ;

[0027] Define the indication function I(·) of the soil species belonging to the soil genus:

[0028]

[0029] Define the soil level adjacency matrix R:

[0030]

[0031] Add the identity matrix I to the adjacency matrix R to obtain the matrix R': R' = R + I;

[0032] The normalized matrix R is obtained by normalizing the matrix R' norm :

[0033] R norm = D -1 / 2 (R+I)D -1 / 2 ;

[0034] D = ||R+I||; wherein D is a degree matrix, and ||·|| represents a non-zero element count;

[0035] Determine the soil level map convolution feature:

[0036] F h' = σ(R norm σ(R norm F h W (0) )W (1) );

[0037] wherein σ(·) represents a LeakyReLU activation function, and W is a weight matrix of the graph convolution;

[0038] L g represents a soil genus label projection, and L s represents a soil species label projection, and m and k respectively represent the number of classes of soil genus and soil species.

[0039] Further, the prior guidance module outputs the soil species category by the following method:

[0040] Construct a soil genus-soil species hierarchical relationship matrix:

[0041]

[0042] Determine the hierarchical guidance factor τ:

[0043]

[0044] wherein p g represents a soil genus probability distribution, and p s is a soil species probability distribution, represents an element-wise multiplication operation, and represents a Hadamard product;

[0045] Normalize the hierarchical guidance factor:

[0046]

[0047] Correct the initial soil species prediction probability p s to obtain p i,j :

[0048]

[0049] wherein: a is a weighting coefficient;

[0050] determining the final soil species prediction probability p norm :

[0051]

[0052] The application has the beneficial effects that: through the application, by fusing the soil pH value index and the soil color space information, and by using the multi-scale edge space adaptive enhancement module to extract the soil image edge texture information, and by learning the hierarchical relationship between the soil genus and the soil species, the final precision of soil species identification can be effectively ensured, accurate data support is provided for subsequent agricultural production, and the whole process has strong adaptability and good robustness. BRIEF DESCRIPTION OF DRAWINGS

[0053] The application will be further described below in combination with the drawings and embodiments:

[0054] Figure 1 The flowchart of the application.

[0055] Figure 2 The soil species identification model structure diagram of the application.

[0056] Figure 3 The multi-scale edge space adaptive enhancement module structure diagram of the application.

[0057] Figure 4 The first processing layer structure diagram of the application.

[0058] Figure 5 The PH color channel correlation enhancement module diagram of the application.

[0059] Figure 6 The soil hierarchical graph convolution module diagram of the application. DETAILED DESCRIPTION

[0060] The application will be further described below in combination with the drawings and embodiments:

[0061] The application provides a soil species identification method based on residual graph convolution, which comprises the following steps:

[0062] S1. Obtain a sample soil image and a PH value of the sample soil.

[0063] S2. Map the sample soil image from an RGB color space to a Lab color space, remove a luminance component L in the Lab color space, and form first input information by combining components of three color channels of the RGB color space of the sample soil image with a and b components of the Lab color space; wherein the mapping of the image from the RGB color space to the Lab color space is realized by using an existing method.

[0064] S3. converting the sample soil image into a gray image, and forming second input information from the gray image;

[0065] S4. constructing a soil species identification model, the soil species identification model comprising a PH color channel correlation enhancement module, a multi-scale edge space adaptive enhancement module, an average pooling layer, a soil hierarchical graph convolution module, and a priori hierarchical guidance module; an output end of the PH color channel correlation enhancement module is connected to an input end of the multi-scale edge space adaptive enhancement module, an output end of the multi-scale edge space adaptive enhancement module is connected to an input end of the average pooling layer, output ends of the average pooling layer are connected to input ends of a first full connection layer and a second full connection layer respectively, output information of the first full connection layer and the second full connection layer are both input to the priori hierarchical guidance module, output information of the soil hierarchical graph convolution module is input to the priori hierarchical guidance module, and the priori hierarchical guidance module outputs a soil species identification result;

[0066] S5. inputting the first input information to the PH color channel correlation enhancement module, inputting the second input information to the multi-scale edge space adaptive enhancement module, inputting the soil family-soil species hierarchical label word embedding feature and the soil family-soil species hierarchical relationship adjacency matrix to the soil hierarchical graph convolution module, and training the soil species identification model;

[0067] S6. obtaining a to-be-tested soil image, processing the to-be-tested soil image through steps S2 and S3, inputting first input information, second input information, and soil family-soil species hierarchical label word embedding feature and soil family-soil species hierarchical relationship adjacency matrix of the to-be-tested soil image to the trained soil species identification model to obtain a soil species of the to-be-tested soil. Through the above method, by fusing the soil pH index and the soil color space information, and using the multi-scale edge space adaptive enhancement module to extract the edge texture information of the soil image, and by learning the hierarchical relationship between the soil family and the soil species, the final accuracy of the soil species identification can be effectively guaranteed, accurate data support can be provided for subsequent agricultural production, and the whole process has strong adaptability and good robustness.

[0068] In step S4, the PH color channel correlation enhancement module extracts PH color channel features by the following method: as shown in Figure 5

[0069] determining three color channel features in the RGB color space and a and b components of the Lab color space, and determining a correlation coefficient of the PH value and the color channel; that is, the PH value has a correlation with the color of the soil, and the correlation coefficient is determined by an existing method;

[0070] ​The soil pH value is multiplied by the correlation coefficient, and then multiplied by the three color channel features in the RGB color space and the a and b components in the Lab color space to obtain the color features. The color features are then normalized.

[0071] The normalized color features are added to the three color channel features in the initial RGB color space of the soil image, as well as the a and b components of the Lab color space, to form the final pH color channel association enhancement feature, which is then input into the multi-scale edge space adaptive enhancement module. Through the above, the soil pH features are associated with the color features, thereby improving the final recognition accuracy of the entire prediction model.

[0072] In this embodiment, the multi-scale edge space adaptive enhancement module includes a first processing layer, a second processing layer, a third processing layer, a fourth processing layer, a first spatial adaptive normalization module, and a second spatial adaptive normalization module.

[0073] The first processing layer includes a 3×3 convolution kernel, a 5×5 convolution kernel, a 7×7 convolution kernel, a batch normalization module, a max pooling module, and a ReLU function module;

[0074] The PH color channel association enhancement features are input into 3×3 convolution kernels, 5×5 convolution kernels, and 7×7 convolution kernels for processing. The outputs of the 3×3 convolution kernel, 5×5 convolution kernel, and 7×7 convolution kernel are added together and then input into the batch normalization module. After processing by the batch normalization module, the output is sent to the max pooling layer for processing. Finally, it is input into the ReLU function module for processing and then output to the second processing layer.

[0075] The second, third, and fourth processing layers all use BasicBlock modules, and the inputs and outputs of the second, third, and fourth processing layers are connected sequentially. The BasicBlock module is a structure in the RESNET34 network, which is existing technology and will not be described in detail here.

[0076] Both the first spatial adaptive normalization module and the second spatial adaptive normalization module use the existing SPADE module for edge extraction. The extraction process uses existing technology, which is briefly described below:

[0077] Edge extraction ψ(I)∈R B×H×W×3 :

[0078]

[0079] G x and G y represents the horizontal and vertical intensities of the soil image, respectively; B represents the batch size; and Conv represents the convolution operation.

[0080] The channel number of ψ(I) is adjusted by SPADE and bilinear interpolation is performed to obtain the projection feature to match the feature size and dimension of each layer of the backbone network.

[0081]

[0082] wherein, and denote the scaling factor and the offset, respectively, is the value of the input feature at (n, c, y, x), and denote the mean and the variance, respectively, subscript c denotes the number of soil categories, n denotes the nth batch, y and x denote the position of the nth batch, and BN denotes the batch normalization processing.

[0083] Feature fusion calculation of each layer:

[0084]

[0085] wherein, ε i edge projection feature, I gray is a soil grayscale image, f i denotes the feature extracted by the ith layer, denotes element-wise addition.

[0086] In the embodiment, the output information of the first fully connected layer is added to the output information of the second fully connected layer and then input into the priori guidance module;

[0087] The output information of the average pooling layer is multiplied by the output information of the soil hierarchy map convolution module, and then added to the output information of the second fully connected layer and then input into the priori guidance module.

[0088] In the embodiment, the soil hierarchy map convolution module convolves the soil hierarchy map feature through the following process:

[0089] Determine the soil genus label set G of the sample soil: G = {g1, g2, …, g m};

[0090] Determine the soil species label set S of the sample soil: S = {s1, s2, …, s k};

[0091] Define the mapping relationship function H: S→G, which represents that the soil species s i corresponds to the soil genus g i , and the mapping is represented as H(s i ) = g j ;

[0092] Define the indication function I(·) that the soil species belongs to the soil genus:

[0093]

[0094] Define the soil level adjacency matrix R:

[0095]

[0096] Add the identity matrix I to the adjacency matrix R to obtain the matrix R': R' = R + I;

[0097] Normalize the matrix R' to obtain the normalized matrix R norm :

[0098] R norm = D -1 / 2 (R + I)D -1 / 2 ;

[0099] D = ||R + I||; where D is the degree matrix, and ||·|| represents the non-zero element count;

[0100] Determine the soil level graph convolution feature:

[0101] F h' = σ(R norm σ(R norm F h W (0) )W (1) );

[0102] Where: σ(·) represents the LeakyReLU activation function, and W is the weight matrix of graph convolution.

[0103] L g represents the soil genus label projection, L s represents the soil species label projection, and m and k represent the number of classes of soil genus and soil species, respectively.

[0104] In this embodiment, the prior guidance module outputs the soil species categories by the following method:

[0105] Construct the soil genus-soil species level relationship matrix:

[0106]

[0107] Determine the level guidance factor τ:

[0108]

[0109] Where: p g represents the soil genus probability distribution, p s is the soil species probability distribution, represents element-wise multiplication, and ⊙ represents Hadamard product.

[0110] Normalizing the hierarchical guide factor:

[0111]

[0112] Correcting the initial soil type prediction probability p s Subsequently obtaining p i,j :

[0113]

[0114] Wherein, a is a weighting coefficient;

[0115] Determining the final soil type prediction probability p norm :

[0116]

[0117] Finally, it should be pointed out that the above examples are merely intended to illustrate the technical solutions of the present application and not to limit it. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and they should all be covered in the scope of the claims of the present application.

Claims

1. A soil type identification method based on residual map convolution, characterized in that: Includes the following steps: S1. Obtain the soil sample image and the pH value of the soil sample; S2. Map the sample soil image from RGB color space to Lab color space, remove the luminance component L in Lab color space, and form the first input information by combining the components of the three color channels of the RGB color space of the sample soil image with the a component and b component of the Lab color space. S3. Convert the sample soil image into a grayscale image, and use the grayscale image to form the second input information; S4. Construct a soil type identification model, which includes a pH color channel association enhancement module, a multi-scale edge space adaptive enhancement module, an average pooling layer, a soil hierarchy map convolution module, and a priori hierarchy guidance module. The output of the pH color channel association enhancement module is connected to the input of the multi-scale edge space adaptive enhancement module. The output of the multi-scale edge space adaptive enhancement module is connected to the input of the average pooling layer. The output of the average pooling layer is connected to the input of the first fully connected layer and the second fully connected layer, respectively. The output information of the first fully connected layer and the second fully connected layer are both input to the prior level guidance module. The output information of the soil level map convolution module is input to the prior level guidance module. The prior level guidance module outputs the soil type identification result. S5. Input the first input information into the PH color channel association enhancement module, input the second input information into the multi-scale edge space adaptive enhancement module, input the soil genus-soil species hierarchical tag word embedding features and soil genus-soil species hierarchical relationship adjacency matrix into the soil hierarchy graph convolution module to train the soil species identification model; S6. Obtain the soil image to be tested. After processing the soil image to be tested through steps S2 and S3, input the first input information, the second input information, the soil genus-soil species hierarchical tag word embedding features, and the soil genus-soil species hierarchical relationship adjacency matrix of the soil image to be tested into the trained soil species identification model to obtain the soil species of the soil to be tested.

2. The soil type identification method based on residual map convolution according to claim 1, characterized in that: In step S4, the pH color channel association enhancement module extracts pH color channel features using the following method: Determine the characteristics of the three color channels in the RGB color space and the a and b components of the Lab color space, and determine the correlation coefficient between the pH value and the color channels; The soil pH value is multiplied by the correlation coefficient, and then multiplied by the three color channel features in the RGB color space and the a and b components in the Lab color space to obtain the color features. The color features are then normalized. The normalized color features are added to the three color channel features in the initial RGB color space of the soil image, as well as the a and b components of the Lab color space, to form the final PH color channel association enhancement feature, which is then input into the multi-scale edge space adaptive enhancement module.

3. The soil type identification method based on residual map convolution according to claim 2, characterized in that: The multi-scale edge space adaptive enhancement module includes a first processing layer, a second processing layer, a third processing layer, a fourth processing layer, a first spatial adaptive normalization module, and a second spatial adaptive normalization module. The first processing layer includes a 3×3 convolution kernel, a 5×5 convolution kernel, a 7×7 convolution kernel, a batch normalization module, a max pooling module, and a ReLU function module; The PH color channel association enhancement features are input into 3×3 convolution kernels, 5×5 convolution kernels, and 7×7 convolution kernels for processing. The outputs of the 3×3 convolution kernel, 5×5 convolution kernel, and 7×7 convolution kernel are added together and then input into the batch normalization module. After processing by the batch normalization module, the output is sent to the max pooling layer for processing. Finally, it is input into the ReLU function module for processing and then output to the second processing layer. The second, third, and fourth processing layers all use the BasicBlock module.

4. The soil type identification method based on residual map convolution according to claim 1, characterized in that: The output information of the first fully connected layer and the output information of the second fully connected layer are added together and then input into the prior guidance module; The output information of the average pooling layer is multiplied by the output information of the soil hierarchy map convolution module, then added to the output information of the second fully connected layer, and then input into the prior guidance module.

5. The soil type identification method based on residual map convolution according to claim 1, characterized in that: The soil hierarchy map convolution module features soil hierarchy map convolution through the following process: Determine the soil genus tag set G of the sample soil: G = {g1, g2, ..., g m }; Determine the soil type label set S for the sample soil: S = {s1, s2, ..., s k }; Define a mapping function H:S→G, representing soil type s i The corresponding earth element g i The mapping is represented as H(s) i ) = g j ; Define the indicator function I(·) for soil species to belong to the soil genus: Define the soil hierarchical adjacency matrix R: Adding the identity matrix I to the adjacency matrix R yields matrix R': R' = R + I; Normalizing matrix R' yields the normalized matrix R. norm : R norm =D -1 / 2 (R+I)D -1 / 2 ; D = ||R + I||; where D is the degree matrix, and ||·|| represents the count of non-zero elements; Determine the convolutional features of soil hierarchy maps: F h' =σ(R norm σ(R norm F h W (0) )W (1) ); Where: σ(·) represents the LeakyReLU activation function, and W is the weight matrix of the graph convolution; L g Indicates the projection of the soil element label, L s This represents the soil type label projection, where m and k represent the number of soil genus and soil type categories, respectively.

6. The soil type identification method based on residual map convolution according to claim 5, characterized in that: The prior guidance module outputs the soil type category using the following method: Constructing a hierarchical relationship matrix of soil genus and soil species: Determine the hierarchical guiding factor τ: Where: p g p represents the probability distribution of the Earth element. s For soil type probability distribution, ⊙ represents element-wise multiplication; ⊙ represents the Hadamard product. Normalize the hierarchical guiding factor: Correcting the initial soil type prediction probability p s ρ was then obtained i,j : Where: α is the weighting coefficient; Determine the final soil type prediction probability ρ norm :

Citation Information

Patent Citations

  • Soil lithology intelligent identification method and system based on deep learning

    CN117874469A

  • Red soil pH measuring system and method based on image pixel numerical parameter identification

    CN118334009A