Soil compaction detection method, system and medium based on image recognition processing
Through image recognition processing and convolutional neural network technology, the problem of insufficient detection efficiency and accuracy in soil compaction detection is solved, rapid and accurate detection of soil density, moisture content and compaction is achieved, simplifying operations. process and reduce costs.
Patent Information
- Application Number
- CN202210417102.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-04-20
AI Technical Summary
Existing soil compaction detection methods have long cycle times, large human operation errors, expensive and complex equipment, especially the ring knife method, sand filling method and nuclear ray method, which have shortcomings in detection efficiency and accuracy.
Using a method based on image recognition processing, through convolutional neural network technology, the image of the soil sample is used to extract local information, construct a convolution layer, a sampling layer and a fully connected layer, and calculate the moisture content, density and compaction of the soil sample. degree, adjust network weights to reduce errors and achieve fast and accurate detection.
It improves the speed and accuracy of detection, reduces labor and material costs, reduces human operating errors, simplifies the operation process, and can quickly and accurately obtain soil density, moisture content and compaction parameters at the construction site.
Smart Images

Figure CN114898343B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of soil detection, and in particular to a soil compaction detection method, system and medium based on image recognition processing. Background Art
[0002] In the field of civil infrastructure, artificial intelligence technology is deeply integrated into the entire life cycle of civil infrastructure planning, design, construction and maintenance, profoundly transforming the development of civil engineering.
[0003] In the field of geotechnical engineering, the soil compaction index can reflect the degree of soil compression. At present, the quality of municipal, water conservancy and port projects is controlled by controlling the compaction index of foundation soil. For example, JTS237-2017 "Technical Code for Testing and Inspection of Foundations of Water Transport Engineering" mainly uses the ring knife method, sand injection method, water injection method and nuclear ray method to detect the in-situ density and compaction of foundation soil.
[0004] However, the ring knife method, sand filling method, water filling method and nuclear radiation method all have certain defects: (1) The ring knife method soil compaction test cycle is long, and the test results are easily affected by the test personnel. Because different test personnel have different test operation habits and different operation proficiency, each time the soil sample is taken back to the laboratory, there may be different test personnel operating, which may cause certain errors in the results. (2) The sand filling method and water filling method require on-site density test. During the test, the sand (water) tank and the emptying sand (water) operation must be repeated. The test operation is relatively complicated, and the test results are greatly dependent on the proficiency of the test personnel. (3) The nuclear radiation method instrument is a nuclear density meter, which is relatively expensive and has a certain degree of radioactivity.
[0005] Common existing technologies such as publication number CN113326659A disclose a method for rapid detection of red clay compaction, which uses PFWD equipment to lift the equipment hammer to a certain height and let it fall freely, obtain a series of data related to the dynamic stress response of the soil during the impact process, and calculate the compaction information by establishing the relationship between deflection or dynamic modulus and compaction. It requires additional PFWD equipment, the test operation is relatively complicated, and the detection efficiency is low. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a method, system and medium for rapid detection of soil compaction index, which can, on the basis of traditional geotechnical engineering compaction detection methods, combine artificial intelligence convolutional neural network technology, based on image recognition and processing technology, and obtain the input of local sample images, so as to timely, effectively and accurately measure the actual density, moisture content and compaction parameter results of on-site filling earthwork.
[0007] Compared with the traditional compaction detection method, the present invention is faster, simpler and more convenient to operate and the measurement result is more accurate. It not only solves the error influence of manual operation of different test personnel, but also greatly reduces the human resource and material cost.
[0008] In order to solve the above technical problems, the present invention provides a soil compaction index rapid detection method, system and medium, comprising the following steps: S1, obtaining an image of a soil sample, and performing interception, grayscale calibration and de-biasing field processing on the image; extracting local information from the processed image to obtain a local sample image; S2, constructing a convolutional neural network, which includes a convolution layer, a sampling layer, a fully connected layer and an output layer; the convolution layer performs a convolution operation on the local sample image so that the local sample image is mapped into multiple feature image images; the sampling layer downsamples the feature image Operation, generating a scaled image corresponding to the feature image; the fully connected layer combines the scaled images of each feature image to form global information; the output layer calculates the global information to obtain a calculation result, and the calculation result includes the moisture content, density and compaction degree of the soil sample; S3, comparing the calculation result with the actual moisture content, density and compaction degree of the soil sample to obtain a relative error; if the relative error is within a preset range, outputting the calculation result; if the relative error is not within the preset range, adjusting the weight of the convolutional neural network and returning to step S2.
[0009] Preferably, the convolution formula of the convolution layer is:
[0010] Wherein, f is the activation function, i and j are the row and column subscripts of the feature map image, k is the convolution kernel element, b is the bias term, l is the number of input layers, and s is the weight component; the activation function is:
[0011] Preferably, in S2, the convolution layer performs a convolution operation on the local sample image, specifically: the convolution kernel performs a convolution operation in the local sample image in a sequence from left to right and from top to bottom with a preset step size, so that the local sample image is mapped into multiple feature image images.
[0012] Preferably, in S2, the sampling layer downsamples the feature image, specifically: the sampling layer abstractly represents the feature image output by the convolution layer to reduce the size of the feature image; and further maps the feature image using a mean convolution kernel to generate a scaled image corresponding to the feature image.
[0013] Preferably, the weights of the convolutional neural network are adjusted using an error propagation learning algorithm; the error propagation learning algorithm includes a recursive calculation formula for the error term: δ (l-1) =(W (l) ) T δ (l-1) ⊙f′(u (l-1) ), where W is the weight matrix, T is the matrix transpose operation, u is a temporary variable, and f is an activation function; the activation function is:
[0014] Preferably, the convolutional neural network includes n convolutional layers and n sampling layers, where n≥1.
[0015] Preferably, before S1, the step also includes: performing on-site sampling using a ring knife method to obtain a plurality of soil samples; and performing indoor tests on each of the soil samples in a laboratory to obtain the actual moisture content, density and compaction degree of each of the soil samples.
[0016] The soil compaction detection system based on image recognition processing preferably includes: an image acquisition module, which is used to collect images of soil samples, and to perform interception, grayscale calibration and de-biasing field processing on the images; local information extraction on the processed images to obtain local sample images; a convolutional neural network module, which includes a convolution layer, a sampling layer, a fully connected layer and an output layer; the convolution layer performs a convolution operation on the local sample image so that the local sample image is mapped into multiple feature image images; the sampling layer performs a downsampling operation on the feature image image to generate a scaled image corresponding to the feature image image; the fully connected layer combines the scaled images of each feature image image to form global information; the output layer calculates the global information to obtain a calculation result; an error calculation module, which is used to compare the calculation result output by the convolutional neural network with the actual moisture content, density and compaction degree of the soil sample to obtain a relative error value; and a weight adjustment module, which is used to adjust the weight of the convolutional neural network so that the relative error is within a preset range.
[0017] Preferably, the output layer outputs three calculation results, including the moisture content, density and compaction degree of the soil sample.
[0018] A computer-readable storage medium stores instructions, which, when executed by a processor, execute the soil compaction detection method based on image recognition processing.
[0019] The above technical solution of the present invention has the following advantages compared with the prior art:
[0020] 1. The present invention obtains an image of a soil sample, and extracts local information from the processed image to obtain a local sample image. The local sample image is used instead of the overall information as the input file of the convolutional neural network, eliminating the extraction link of the feature value; by establishing a convolutional neural network model, compared with the traditional neural network, the complexity of the structure and the number of weights are reduced, the efficiency is improved, and it also has certain advantages in processing large-scale images.
[0021] 2. Compared with the traditional ring knife method, water injection method and sand injection method, the method proposed by the present invention ignores the influence of human operation errors, is simple to operate, and better saves human resources and material costs.
[0022] 3. The present invention can better control the construction quality. The method is simple to operate and can be implemented at the construction site. The local sample image is used as the input file, and the density, moisture content and compaction parameter results can be obtained through convolutional neural network calculation, which ensures the detection speed while also ensuring the accuracy of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0024] Figure 1 It is a schematic diagram of the flow of the soil compaction detection method of the present invention;
[0025] Figure 2 Schematic diagram of the structure of the convolutional neural network in the present invention;
[0026] Figure 3 It is a schematic diagram of the image processing grid of the soil sample from a bird's-eye view;
[0027] Figure 4 Schematic diagram of the image processing grid of the soil sample from a cross-sectional perspective. DETAILED DESCRIPTION
[0028] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0029] The present invention discloses a soil compaction detection method based on image recognition processing, referring to Figure 1 As shown, the following steps are included:
[0030] Step 1: Use the ring knife method to collect soil samples on site to obtain soil samples. There can be multiple soil samples, and the soil samples are numbered. Perform indoor tests on each soil sample in the laboratory to obtain the result parameters of each soil sample, including actual moisture content, density and maximum dry density parameters, and summarize the result parameter information of each soil sample: actual moisture content, density and compaction degree.
[0031] Each soil sample is photographed and imaged to obtain an image of each soil sample. Figure 3 and Figure 4 As shown, the above images are automatically intercepted according to a preset size, preferably 60*60 mm. Grayscale calibration and offset field removal are performed on each of the above images after interception to remove grayscale deviation and grayscale unevenness, and the result parameters of the soil sample indoor test are assigned to the corresponding soil sample image.
[0032] The local information of the above image after interception, grayscale calibration and de-biasing is extracted to obtain a local sample image.
[0033] During the construction process, the soil is rolled and compacted, and the pores in the soil are relatively small. Therefore, in the entire soil sample image, the long-distance pixel relationship is weak, and the local pixels are closely related. By extracting local information, global information can be obtained. The present invention uses the local sample image instead of the whole as the input file, eliminating the feature value extraction step. Compared with the traditional compaction detection method, the operation is faster, simpler and more convenient.
[0034] Step 2: Construct a convolutional neural network. The convolutional neural network includes: convolutional layer, sampling layer, fully connected layer and output layer. The convolutional neural network includes n convolutional layers and n sampling layers, n≥1. The specific operation method is:
[0035] Input operation: Input the above local sample image into the convolutional neural network.
[0036] Convolution layer operation: The convolution layer performs convolution operation on the above local sample image, so that the local sample image is mapped into multiple feature image images. Specifically, the convolution kernel performs convolution processing in the local sample image from left to right and from top to bottom with a specific step size, and each soil sample image is mapped into multiple different abstract images. The convolution layer is activated using the tanh activation function, and multiple new feature image images are obtained after the operation. The multiple feature image images are used as the input of the sampling layer.
[0037] Among them, the convolution formula of the above convolutional layer is:
[0038] f is the activation function of the convolution layer, i and j are the row and column subscripts of the feature map image, k is the convolution kernel element, b is the bias term, l is the number of input layers, s is the weight component, and the activation function of the convolution layer is:
[0039] Sampling layer operation: The sampling layer downsamples the feature image to generate a scaled image of the corresponding feature image. Specifically, the sampling layer further abstracts the feature image output by the convolution layer, downsamples it, reduces the size of the feature image to reduce the number of fully connected neural clouds, and uses the mean convolution kernel to map the input feature image to generate a scaled image of the corresponding feature image, thereby reducing the feature image.
[0040] Fully connected layer: It is used to combine the scaled images of each feature map output by the sampling layer to form global information.
[0041] Output layer: The above output layer calculates the global information and obtains the calculation results. There are three calculation results, including the moisture content, density and compaction degree of the soil sample.
[0042] The present invention obtains an image of a soil sample, and extracts local information from the processed image to obtain a local sample image. The local sample image is used as the input file of the convolutional neural network instead of the overall information, eliminating the extraction link of the characteristic value; by establishing a convolutional neural network model, compared with the traditional neural network, the complexity of the structure and the number of weights are reduced, the efficiency is improved, and it has certain advantages in processing large-scale images.
[0043] Step 3: Compare the moisture content, density and compaction of the soil sample calculated by the convolutional neural network with the actual moisture content, density and compaction obtained from the indoor test to obtain the relative error value. If the relative error is within the preset range, the calculation result is output; if the relative error is not within the preset range, the weight of the convolutional neural network is adjusted and the process returns to step 2.
[0044] The calculation formula for the compaction degree of soil samples is: Where: d is the dry density, ω is the moisture content, ρ is the density, ρ dmax is the maximum dry density.
[0045] The error propagation learning algorithm is used to adjust the weights of the convolutional neural network. The error propagation learning algorithm includes the error term recursive calculation formula: δ (l-1) =(W (l) ) T δ (l-1) ⊙f′(u (l-1)), where W is the weight matrix, T is the matrix transpose operation, u is a temporary variable, and f is the activation function. The activation function is:
[0046] Compared with the traditional ring knife method, water injection method and sand injection method, the present invention ignores the influence of human operation errors, is simple to operate, and better saves human resources and material costs.
[0047] Reference Figure 2 As shown, in another preferred embodiment, the image of each soil sample is automatically intercepted according to a preset size, and the intercepted size is 60*60mm. Grayscale calibration and de-biasing field processing are performed on each of the intercepted images, and an image with a size of 30*30mm is intercepted again.
[0048] The local information of the above-mentioned image with a size of 30*30 mm is extracted to obtain a local sample image.
[0049] It is determined that there are two convolutional layers and two sampling layers, and the structure of the convolutional neural network is: input-convolutional layer-sampling layer-convolutional layer-sampling layer-fully connected layer-output layer. Based on the convolutional neural network algorithm, the convolution kernel size of all convolutional layers of the convolutional neural network is determined to be 3*3, and the size of the sampling layer is 2*2.
[0050] The image sizes of each layer in the convolution layer-sampling layer-convolution layer-sampling layer are 30*30mm, 28*28mm, 24*24mm, 20*20mm and 16*16mm respectively. The number of feature maps of the first convolution layer is set to 16, and the number of feature maps of the second convolution layer is set to 8. The output layer outputs 3 results: density, moisture content and compaction degree.
[0051] The present invention can better control the construction quality, the method is simple to operate, and can be implemented at the construction site. The local sample image is used as the input file, and the density, moisture content and compaction parameter results can be obtained through convolutional neural network calculation, which ensures the detection speed and the accuracy of the detection results.
[0052] Based on the above-mentioned soil compaction detection method based on image recognition processing, the present invention also proposes a soil compaction detection system based on image recognition processing, comprising:
[0053] The image acquisition module is used to collect images of soil samples, and to perform cropping, grayscale calibration and de-biasing on the images according to preset sizes, and to extract local information from the processed images to obtain local sample images.
[0054] Convolutional neural network module, which includes convolutional layer, sampling layer, fully connected layer and output layer.
[0055] Among them, the convolution layer performs a convolution operation on the local sample image so that the local sample image is mapped into multiple feature image images; the sampling layer performs a downsampling operation on the feature image to generate a scaled image of the corresponding feature image image; the fully connected layer combines the scaled images of each feature image image to form global information, and the output layer calculates the global information to obtain the calculation result.
[0056] The error calculation module is used to compare the calculation results output by the convolutional neural network with the actual moisture content, density and compaction degree of the soil sample to obtain a relative error value.
[0057] The weight adjustment module is used to adjust the weights of the convolutional neural network so that the relative error is within a preset range.
[0058] The present invention also includes a computer-readable storage medium, in which instructions are stored. When the instructions are executed by a processor, the above-mentioned soil compaction index rapid detection method is executed.
[0059] Furthermore, in the construction of a new embankment, soil samples were collected by ring knife method after the first layer of soil was compacted. The ring knife volume was set to 100cm 3 , bottom area is 20cm 2 , the height is 5cm, and the number of soil samples obtained is 900 groups of soil samples. The soil samples are numbered one by one, numbered 1-900, and the images of the soil samples are obtained. The soil samples No. 1-800 are set as training samples, and the optimal convolutional neural network is obtained through convolutional neural network training and weight fine-tuning using the error discovery propagation algorithm; No. 801-900 are set as test samples to test and debug the convolutional neural network.
[0060] Preferably, the relative error control index in the convolutional neural network model is set to be less than 2%.
[0061] The test was carried out. Samples were taken from the first layer of soil filling, and samples were taken from the second, third and fourth layers of filling for comparison. The comparison results are shown in Table 1 below. The maximum dry density is 1.66 g / cm 3 .
[0062] Table 1 Summary of actual parameters and calculation results of convolutional neural network
[0063]
[0064] It can be seen from Table 1 that the relative errors of various parameters are less than 2%, which meets the set requirements, indicating that the results obtained by the present invention are relatively accurate and can be applied to practical engineering applications.
[0065] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0066] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0067] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0069] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A soil compaction detection method based on image recognition processing, characterized in that: The following steps are involved: S1, obtaining an image of a soil sample, and extracting local information from the processed image to obtain a local sample image; S2. Construct a convolutional neural network, which includes a convolutional layer, a sampling layer, a fully connected layer and an output layer; The convolution layer performs a convolution operation on the local sample image so that the local sample image is mapped into a plurality of feature map images; Among them, the convolution formula of the convolution layer is: f is the activation function of the convolution layer, i and j are the row and column subscripts of the feature map image, k is the convolution kernel element, b is the bias term, l is the number of input layers, s is the weight component, and the activation function is: The sampling layer performs a downsampling operation on the feature map image to generate a scaled image corresponding to the feature map image; The fully connected layer combines the scaled images of each of the feature map images to form global information; The output layer calculates the global information to obtain a calculation result, wherein the calculation result includes the moisture content, density and compaction degree of the soil sample; The calculation formula for the compaction degree of the soil sample is: Where: d is the dry density, ω is the moisture content, ρ is the density, ρ dmax is the maximum dry density; S3, comparing the calculation result with the actual moisture content, density and compaction degree of the soil sample; if the relative error is within the preset range, outputting the calculation result; if the relative error is not within the preset range, returning to S2 and adjusting the weights of the convolutional neural network; Adjusting the weights of the convolutional neural network using an error propagation learning algorithm; The error propagation learning algorithm includes the error term recursive calculation formula: δ (l) =(W (l+1) ) T δ (l+1) ⊙σ′(z (l) ), Where T is the matrix transpose operation, 2. The soil compaction detection method based on image recognition processing according to claim 1 is characterized in that: In S1, the image of the soil sample is intercepted, grayscale calibrated and de-biased.
3. The soil compaction detection method based on image recognition processing according to claim 1 is characterized in that: In S2, the convolution layer performs a convolution operation on the local sample image, specifically: The convolution kernel performs convolution operation processing in the local sample image in a sequence from left to right and from top to bottom with a preset step size, so that the local sample image is mapped into a plurality of feature map images.
4. The soil compaction detection method based on image recognition processing according to claim 1 is characterized in that: In S2, the sampling layer performs a downsampling operation on the feature map image, specifically: The sampling layer abstractly represents the feature map image output by the convolution layer to reduce the size of the feature map image; The feature map image is further mapped using a mean convolution kernel to generate a reduction map corresponding to the feature map image.
5. The soil compaction detection method based on image recognition processing according to claim 1 is characterized in that: The convolutional neural network includes n convolutional layers and n sampling layers, where n≥1.
6. The soil compaction detection method based on image recognition processing according to claim 1 is characterized in that: The S1 also includes: On-site sampling was performed using the ring knife method to obtain multiple soil samples; Indoor tests are carried out on each of the soil samples in a laboratory to obtain the actual moisture content, density and compaction degree of each of the soil samples.
7. The soil compaction detection system based on image recognition processing is characterized by: include: An image acquisition module, which is used to collect images of soil samples, and perform interception, grayscale calibration and de-biasing field processing on the images; Extracting local information from the processed image to obtain a local sample image; A convolutional neural network module, which includes a convolutional layer, a sampling layer, a fully connected layer, and an output layer; The convolution layer performs a convolution operation on the local sample image so that the local sample image is mapped into multiple feature image images; the sampling layer performs a downsampling operation on the feature image image to generate a scaled image corresponding to the feature image image; the fully connected layer combines the scaled images of each feature image image to form global information; the output layer calculates the global information to obtain a calculation result; the convolution formula of the convolution layer is: f is the activation function of the convolution layer, i and j are the row and column subscripts of the feature map image, k is the convolution kernel element, b is the bias term, l is the number of input layers, s is the weight component, and the activation function is: An error calculation module, which is used to compare the calculation result output by the convolutional neural network with the actual moisture content, density and compaction degree of the soil sample to obtain a relative error value; The calculation formula for the compaction degree of the soil sample is: Where: d is the dry density, ω is the moisture content, ρ is the density, ρ dmax is the maximum dry density; A weight adjustment module, which is used to adjust the weights of the convolutional neural network so that the relative error is within a preset range, wherein the weights of the convolutional neural network are adjusted using an error propagation learning algorithm; The error propagation learning algorithm includes the error term recursive calculation formula: δ (l) =(W (l+1) ) T δ (l+1) ⊙σ′(z (l) ), Where T is the matrix transpose operation, 8. The soil compaction detection system based on image recognition processing according to claim 7 is characterized in that: The output layer outputs three calculation results, including the moisture content, density and compaction degree of the soil sample.
9. A computer-readable storage medium storing instructions, wherein when the instructions are executed by a processor, the soil compaction detection method based on image recognition processing as described in claims 1-6 is executed.
