Roadbed rammed earth water content intelligent detection method based on machine vision

Through intelligent detection methods based on machine vision, image recognition and machine learning models are used to solve the efficiency and accuracy of roadbed rammed earth moisture detection, fast and accurate detection is achieved, construction quality and efficiency are improved, and real-time Feedback support.

CN119091161APending Publication Date: 2024-12-06NANJING NORMAL UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410975204.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing roadbed rammed earth moisture content detection methods have problems such as low detection efficiency, low accuracy, and inability to monitor in real time, especially in terms of environmental adaptability and data processing efficiency.

Method used

Using intelligent detection methods based on machine vision, the rapid and accurate detection of rammed earth moisture content through image recognition technology and machine learning models, including data preprocessing, feature extraction, model training and optimization, combined with HOG feature extraction and random forests, Support vector machine and other models to predict soil moisture content.

Benefits of technology

It improves the accuracy and efficiency of soil moisture content detection, enhances environmental adaptability and real-time monitoring capabilities, improves the quality and efficiency of roadbed construction, reduces project construction costs, and provides real-time feedback and decision-making support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091161A_ABST
    Figure CN119091161A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent roadbed rammed earth water content detection method based on machine vision. The method comprises the following steps: step 1, acquiring sample data and performing data preprocessing; 2, training a plurality of machine learning models for the data set; 3, performing comprehensive analysis and evaluation on the fitting condition of the model prediction result by adopting a plurality of model evaluation indexes; 4, selecting the model with the best fitting effect as a final prediction model and optimizing the model; and 5, detecting the rammed earth image by adopting the final prediction model, and efficiently and accurately predicting the water content of the soil. According to the technical scheme, the water content of the rammed earth is rapidly and accurately detected by adopting an image recognition technology. In addition, the method further has good environmental adaptability and real-time monitoring capacity, and the quality and efficiency of roadbed construction can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a detection method, in particular to an intelligent detection method for water content of rammed earth of a roadbed based on machine vision, and in particular to a geotechnical material detection technology in a roadbed construction process, belonging to the technical field of civil engineering. Background Art

[0002] Roadbed is an important part of transportation infrastructure such as roads and railways. Its stability and bearing capacity are directly related to the safety and reliability of the entire transportation system. During the roadbed construction process, the moisture content of rammed earth is one of the key factors affecting the stability of the roadbed. Traditional methods for detecting the moisture content of rammed earth mainly rely on manual sampling and laboratory analysis. These methods have problems such as low detection efficiency, low accuracy, and inability to monitor in real time.

[0003] With the development of intelligent sensing technology and data processing algorithms, intelligent detection methods have been widely used in many fields. However, in the field of detecting the moisture content of rammed earth in roadbed, the existing intelligent detection methods still have certain limitations, such as poor adaptability to environmental conditions, detection accuracy needs to be improved, and data processing and analysis efficiency needs to be optimized.

[0004] Regarding the research on soil moisture detection, the research fields at home and abroad can be mainly summarized into four types: detection technology based on satellite remote sensing, based on drone remote sensing, based on ground sensors, and based on image recognition. The detection method based on satellite remote sensing is widely used in large-scale soil moisture monitoring. This method has the advantages of non-destructive, online monitoring and rapid response. UAV remote sensing technology has also shown considerable advantages in soil moisture monitoring. By carrying advanced equipment such as multi-spectral, hyperspectral cameras, thermal infrared imagers and RGB cameras, it can quickly and non-contactly detect and analyze key information such as soil composition and land use changes.

[0005] Obviously, the satellite remote sensing detection and drone remote sensing detection methods are not currently suitable for detecting the moisture content of construction soil on construction sites. Therefore, in the early days, sampling detection was often used on construction sites to estimate the soil moisture content in the construction area. The density of the soil taken out from the soil pit was calculated and its approximate moisture content was estimated to determine whether it was high-water content soil. With the advancement of sensor technology, the miniaturization of sensor volume and the improvement of its detection accuracy, some portable soil moisture detectors have gradually become the main means of detecting soil moisture content in construction operations. However, due to the poor reliability of ground sensor detection methods, they can often only detect soil moisture content in a small area, which has great limitations.

[0006] Research on soil moisture detection based on machine vision is still in the early stages of development in the engineering field, but this technology has shown significant potential and application prospects. Scholars at home and abroad have estimated soil moisture by analyzing factors such as soil color and surface texture. At present, both at home and abroad, the technology and its application of estimating soil moisture based on image data are mainly concentrated in the agricultural field, and there is little exploration of the application of this technology in the engineering field. Summary of the invention

[0007] The present invention aims at the technical problems existing in the prior art and provides a method for intelligent detection of the moisture content of rammed earth in roadbed based on machine vision. The technical solution uses image recognition technology to achieve rapid and accurate detection of the moisture content of rammed earth. In addition, the method also has good environmental adaptability and real-time monitoring capabilities, which can effectively improve the quality and efficiency of roadbed construction.

[0008] In order to achieve the above object, the technical solution of the present invention is as follows: a method for intelligently detecting the moisture content of rammed earth on a roadbed based on machine vision, the method comprising the following steps:

[0009] Step 1: Obtain sample data and perform data preprocessing;

[0010] Step 2 trained several machine learning models on this dataset;

[0011] Step 3 uses multiple model evaluation indicators to conduct a comprehensive analysis and evaluation of the fitting of the model prediction results;

[0012] Step 4: Select the model with the best fitting effect as the final prediction model and optimize it;

[0013] Step 5 uses the final prediction model to detect the rammed earth image and predict the soil moisture content efficiently and accurately.

[0014] The specific process in step 1 is as follows:

[0015] Step 1.1 Data collection:

[0016] a. Field collection in a variety of representative scenes, including campuses, hospitals, and residential areas, to ensure the comprehensiveness and diversity of the data.

[0017] b. Use professional photography equipment to photograph soil samples under controlled lighting conditions to simulate various soil forms that may occur in actual construction.

[0018] c. Change the morphology of the soil surface, use tools such as gardening shovels, and control soil moisture to collect soil images under different humidity conditions.

[0019] d. Pay special attention to soil images under special conditions, including ice and snow samples, to simulate the snow-soil mixture in harsh construction environments;

[0020] Step 1.2 Image data classification:

[0021] Based on the approximate water content of the soil and the visual characteristics of its surface, the image data is divided into four categories: dry soil, semi-dry soil, moist soil, and snow-soil mixed soil.

[0022] Step 1.3 Image data enhancement:

[0023] a Enhance the image data by random rotation, flipping, etc., so that the images in the data set are rotated at random angles between -45° and 45°.

[0024] b. Cut out a 224*224 image from the center of the rotated image, and then perform a random horizontal or vertical flip operation.

[0025] c. Through data enhancement operations, the size of the data set is significantly increased, enriching the training set and prediction set of the model;

[0026] Step 1.4 Dataset construction and division:

[0027] a The enhanced dataset is randomly shuffled and divided into training and test sets in a ratio of 8:2, where 80% of the images are used for training and 20% of the images are used for testing.

[0028] b. The data set is divided by the data averaging segmentation algorithm to ensure that the images of each category are evenly distributed in the training set and the test set.

[0029] Step 1.5 Data preprocessing:

[0030] a Normalize the image and convert the image data into a format that the model can process.

[0031] b. Extract the HOG features of the image, convert the image into a grayscale image, calculate the gradient and direction of each pixel in the image, generate a gradient image, divide the image into small units, and calculate the gradient histogram in each unit.

[0032] c. Combine adjacent units into blocks and normalize the gradient histogram within each block to eliminate the influence of factors such as illumination changes on the eigenvalues.

[0033] Step 1 completes the acquisition and preprocessing of sample data, providing a high-quality data set for subsequent machine learning model training.

[0034] The specific process in step 2 is as follows:

[0035] Step 2.1 Feature extraction,

[0036] The HOG feature extraction method is used to extract features from the preprocessed rammed earth image data. This step is to obtain key information from the image that can represent the changes in soil moisture content.

[0037] Step 2.2 Model selection,

[0038] According to the research purpose and data characteristics, three different machine learning models, including random forest, support vector machine (SVM), and bagging, were selected for training. The above three models showed good performance in dealing with classification problems.

[0039] Step 2.3 Model training preparation,

[0040] a The extracted features and the corresponding soil moisture labels (i.e. dry, semi-dry, wet, snow-soil mixed) form a training data set.

[0041] b. Divide the training set and the test set, usually in a ratio of 8:2, to ensure that the model has enough data to learn during training and that performance can be evaluated on an independent dataset.

[0042] Step 2.4 Hyperparameter setting:

[0043] Preliminary settings for the hyperparameters of each model, including the number of trees (n_estimators) and the minimum number of samples on leaf nodes (min_samples_leaf) in the random forest model; the kernel function type (kernel), regularization parameter (C), and kernel function coefficient (gamma) in the SVM model; the number of basic classifiers (n_estimators) and the minimum number of samples on leaf nodes (min_samples_leaf) in the bagging model.

[0044] Step 2.5 Model training,

[0045] The selected machine learning model is trained using the training set data. During the training process, the model learns the relationship between the features and the soil moisture content.

[0046] Step 2.6 Cross-validation and grid search:

[0047] In order to optimize the hyperparameters of the model, a grid search combined with cross-validation method is used. Through this method, multiple combinations of hyperparameters can be systematically traversed to find the optimal parameter settings, thereby improving the predictive performance of the model.

[0048] Step 2.7 Model tuning,

[0049] According to the results of cross-validation, the hyperparameters of the model are adjusted to obtain the best model performance.

[0050] Step 2 completes the process of training several machine learning models for the dataset obtained in Step 1, which will be used for subsequent soil moisture prediction and performance evaluation.

[0051] Among them, multiple model evaluation indicators are used to comprehensively analyze and evaluate the fitting of the model prediction results. The specific process in step 3 is as follows:

[0052] Step 3.1 Select evaluation indicators,

[0053] Determine the evaluation indicators used to evaluate the model performance, including accuracy, precision, recall and F1-score. These indicators can fully reflect the performance of the model in the classification task.

[0054] Step 3.2 Calculate the evaluation index,

[0055] aFor each trained machine learning model, use the test set data to make predictions and record the prediction results.

[0056] b. Calculate the accuracy, precision, recall and F1-score of each model based on the prediction results and the true labels of the test set.

[0057] Step 3.3 Confusion matrix construction,

[0058] Construct a confusion matrix to visualize the relationship between the model prediction results and the true label. Each cell in the confusion matrix represents the match between the model predicted category and the actual category.

[0059] Step 3.4 ROC curve and AUC value analysis,

[0060] Draw the receiver operating characteristic (ROC) curve to analyze the performance changes of the model under different threshold settings.

[0061] Calculate the area under the curve (AUC) value. The closer the AUC value is to 1, the better the classification performance of the model.

[0062] Step 3.5 PR curve drawing:

[0063] aDraw the precision-recall (PR) curve. Especially in the case of imbalanced data categories, the PR curve can provide more useful information than the ROC curve.

[0064] b. Analyze the area under the PR curve to evaluate the trade-off between the model’s precision and recall.

[0065] Step 3.6 Model performance comparison:

[0066] aCompare the evaluation index results of different models and analyze the performance differences of each model in predicting soil moisture content.

[0067] b. Determine which model performs best on a specific evaluation metric and which model is superior in comprehensive evaluation.

[0068] Step 3.7 Error analysis,

[0069] aAnalyze the samples where the model predicted errors to understand on which types of soil images the model performs poorly,

[0070] b. Explore the causes of errors, which may be due to data imbalance, insufficient feature extraction, or insufficient model complexity.

[0071] Step 3.8 Model optimization suggestions:

[0072] According to the evaluation results and error analysis, make suggestions for model optimization, including adjusting the model structure, reselecting features or trying different algorithms.

[0073] Step 3 completes the comprehensive analysis and evaluation of the fitting of the model prediction results, thereby selecting the model that best suits the soil moisture content prediction task and providing a basis for further model optimization.

[0074] The specific process in step 4 is as follows:

[0075] Step 4.1 Model performance evaluation:

[0076] According to the previously calculated accuracy, precision, recall, F1-score and other evaluation indicators, all trained machine learning models are evaluated for performance.

[0077] Step 4.2 Best model selection:

[0078] When selecting the model with the best fitting effect from the evaluation results, we usually first consider the model with the best comprehensive evaluation index, such as the model with the highest F1-score.

[0079] Step 4.3 Model parameter analysis:

[0080] Perform in-depth analysis of the parameters of the selected best model to identify which parameters have a significant impact on model performance,

[0081] Step 4.4 Grid Search Optimization:

[0082] Use the grid search method to further optimize the model's hyperparameters. By traversing the preset parameter space, find the optimal parameter combination.

[0083] Step 4.5 Cross Validation:

[0084] Cross-validation methods, including k-fold cross-validation, are used to ensure robustness and generalization during model optimization. Step 4.6 Feature importance evaluation:

[0085] Analyze the importance of each feature in the model and identify the features that have the greatest impact on the prediction results, which will help further streamline the feature set and improve the efficiency of the model.

[0086] Step 4.7 Model simplification:

[0087] According to the results of feature importance evaluation, those features that contribute less to model performance are removed to simplify the model complexity.

[0088] Step 4.8 Model integration:

[0089] When using ensemble learning methods, such as random forests or bagging, performance can be optimized by adjusting the number or type of models in the ensemble.

[0090] Step 4.9: Model parameter adjustment:

[0091] Fine-tune the model's hyperparameters to improve the model's predictive accuracy and generalization ability.

[0092] Step 4.10 Performance Verification:

[0093] Use an independent test set to verify the performance of the optimized model to ensure that the model maintains good predictive performance on unseen data.

[0094] Step 4.11 Error analysis:

[0095] Perform error analysis on the optimized model to understand on which types of data the model performs poorly and explore possible reasons.

[0096] Step 4 completes the process of obtaining an optimized, best-fitting final prediction model to provide accurate and reliable soil moisture content predictions.

[0097] The specific process in step 5 is as follows:

[0098] Step 5.1 Image acquisition and upload:

[0099] Use digital cameras or digital video cameras to capture rammed earth images on site to ensure that the image quality meets the model input requirements.

[0100] Upload the collected images to the detection system and prepare for moisture content prediction.

[0101] Step 5.2 Image preprocessing:

[0102] Preprocess the uploaded images, including resizing and normalizing them, to ensure that the image format is consistent with the data format used during model training.

[0103] Step 5.3 Feature extraction:

[0104] Extract features from the preprocessed image using the same feature extraction method used for model training (such as HOG feature extraction).

[0105] Step 5.4 Model loading:

[0106] Load the final prediction model that has been optimized and validated. This usually involves reading the model file from the file system and initializing the model in memory.

[0107] Step 5.5 Model prediction:

[0108] The extracted image features are input into the final prediction model to predict soil moisture content. The model will output the moisture content prediction results for each image.

[0109] Step 5.6 Result analysis and conversion:

[0110] The output of the model is parsed to convert the predicted values ​​into easily understandable soil moisture levels or percentages.

[0111] Step 5.7 Error analysis:

[0112] Conduct error analysis on the prediction results, identify possible prediction deviations of the model under specific conditions, and explore possible causes.

[0113] Step 5.8 Result recording and storage:

[0114] Record the prediction results in a log file or database for subsequent analysis and reporting.

[0115] Step 5.9 Result report and presentation:

[0116] The prediction results are organized into a report and displayed to the user through the user interface, including the predicted value of soil moisture content, the confidence level of the prediction, the possible error range, etc.

[0117] Step 5.10: Result application and decision support:

[0118] The prediction results are applied to actual engineering construction to provide reference for construction decision-making, including adjusting construction plans and optimizing soil treatment methods.

[0119] Step 5.11 User feedback collection and system iteration:

[0120] a. Collect user feedback on prediction results to further improve model performance and user experience,

[0121] b. Regularly iterate the model based on user feedback and new data to improve prediction accuracy and overall system performance.

[0122] Step 5.12 Performance monitoring and optimization:

[0123] Monitor the model's predictive performance, regularly check the model's accuracy and response time, and ensure that the model remains efficient and accurate in actual applications.

[0124] Step 5 completes the final prediction model, which can efficiently and accurately predict soil moisture content in practical applications and provide reliable data support for engineering construction.

[0125] A machine vision-based intelligent detection system for rammed earth moisture content in roadbed, used to implement the machine vision-based intelligent detection method for rammed earth moisture content in roadbed, the detection system comprises an image acquisition unit, an image preprocessing and feature extraction unit, a model loading and prediction unit, a result analysis and display unit, and a result application and feedback unit.

[0126] An electronic device, comprising:

[0127] processor;

[0128] a memory for storing instructions executable by the processor;

[0129] Wherein, the processor is configured to execute the instructions to implement the intelligent detection method for moisture content of rammed earth in roadbed based on machine vision.

[0130] A computer-readable storage medium having computer instructions stored thereon, characterized in that: when the computer instructions are executed by a processor, the steps of the intelligent detection method for the moisture content of rammed earth on a roadbed based on machine vision are implemented.

[0131] The present invention provides a method for establishing a correspondence between the moisture content of rammed earth soil of a roadbed and the characteristic information features of rammed earth soil images, and a prediction model for obtaining the target soil moisture based on the correspondence. The present invention can perform a large-scale, efficient, and real-time detection of the moisture content of rammed earth soil, so as to promote the development of smart construction sites in my country.

[0132] In the above scheme, the key technologies include preprocessing and feature extraction of rammed earth images. Specifically, a high-resolution camera is used to capture rammed earth images, and the image size and normalization are adjusted through image processing algorithms to eliminate the influence of lighting and shadows. The HOG (Histogram of Oriented Gradients) feature extraction algorithm is further used to extract key feature vectors from the processed images. These feature vectors can effectively represent the changes in soil moisture content.

[0133] The core technology of this application is to use machine learning models to predict soil moisture content. By training advanced machine learning algorithms such as random forests, support vector machines (SVMs) or bagging models, the model can learn and identify the relationship between image features and soil moisture content. In addition, grid search and cross-validation methods are used to optimize model hyperparameters to improve the prediction accuracy and generalization ability of the model.

[0134] This application also includes a real-time soil moisture detection system, which can display the model prediction results to users in real time and provide construction suggestions based on the prediction results. The system has a user-friendly interface and can intuitively display the predicted value and confidence of the soil moisture content of each image. In addition, the system also includes a user feedback collection mechanism, which continuously optimizes the model performance by collecting user feedback on the prediction results to improve the accuracy of detection and user satisfaction.

[0135] The above key points outline the core innovations of this patented technology, including image processing and feature extraction, application and optimization of machine learning models, and real-time detection and feedback mechanisms, which together constitute an efficient and accurate soil moisture detection method.

[0136] Compared with the prior art, the present invention has the following advantages:

[0137] 1) This technical solution improves the accuracy of soil moisture detection:

[0138] The present invention significantly improves the accuracy of soil moisture detection by using advanced image processing technology and machine learning models. The HOG feature extraction algorithm can extract key features reflecting soil moisture changes from rammed earth images, while the optimized machine learning model can accurately identify the complex relationship between these features and soil moisture content, thereby providing more accurate prediction results;

[0139] 2) Enhance the efficiency of soil moisture detection: Traditional soil moisture detection methods are often time-consuming and inefficient. The real-time detection system created by the present invention can quickly process image data and provide prediction results, greatly shortening the detection time and improving work efficiency. This is especially important for engineering construction projects that require rapid response.

[0140] 3) Improve the intelligent level of engineering construction: The present invention combines modern information technology with engineering construction, and provides scientific data support for engineering construction through an intelligent soil moisture detection system. This intelligent detection method helps to realize the automation and intelligent management of engineering construction and improve the overall technical level of engineering construction.

[0141] 4) Reduce engineering construction costs: Accurate soil moisture detection helps avoid engineering quality problems caused by improper soil moisture, thereby reducing rework and material waste. The efficient detection system created by the present invention can save costs for engineering construction and improve the economic efficiency of the project.

[0142] 5) Enhance the generalization ability of the model: Through hyperparameter optimization methods such as grid search and cross-validation, the machine learning model created by the present invention has better generalization ability, can adapt to soil moisture detection under different environmental conditions, and improves the applicability and reliability of the model.

[0143] 6) Provide real-time feedback and decision support: The present invention can not only provide real-time soil moisture test results, but also provide construction suggestions based on the prediction results to support engineering decision-making. This real-time feedback mechanism helps to adjust the construction plan in time to ensure the smooth progress of engineering construction.

[0144] 7) Promote user participation and model iteration and optimization: Include a user feedback mechanism to encourage users to participate in the evaluation and optimization process of the model. By collecting user feedback, the model can be continuously iterated and updated to improve the accuracy of predictions and user satisfaction of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0145] Figure 1 The steps for implementing the intelligent detection method for rammed soil moisture content are as follows:

[0146] Figure 2 Build a flowchart for the random forest model,

[0147] Figure 3 This is a schematic diagram of the support vector machine model.

[0148] Figure 4 This is the flowchart of the Bagging model.

[0149] Figure 5 These are example pictures of four types of soil: dry, semi-dry, moist, and mixed snow and soil.

[0150] Figure 6 This is the PR curve of the random forest model.

[0151] Figure 7 This is the ROC curve of the random forest model.

[0152] Figure 8 It is the PR curve of the support vector machine model.

[0153] Fig. 9 This is the ROC curve of the support vector machine model.

[0154] Fig.10 This is the PR curve of the Bagging model.

[0155] Fig.11 This is the ROC curve of the Bagging model.

[0156] Fig.12 is the confusion matrix of the random forest model,

[0157] Fig.13 is the confusion matrix of the vector machine model,

[0158] Fig.14 It is the confusion matrix of the Bagging model. DETAILED DESCRIPTION

[0159] In order to deepen the understanding of the present invention, the present embodiment is described in detail below with reference to the accompanying drawings.

[0160] Example 1: See Figure 1-Figure 14 , an intelligent detection method for water content of rammed earth on roadbed based on machine vision, the method comprising the following steps:

[0161] Step 1: Obtain sample data and perform data preprocessing;

[0162] Step 2 trained several machine learning models on this dataset;

[0163] Step 3 uses multiple model evaluation indicators to conduct a comprehensive analysis and evaluation of the fitting of the model prediction results;

[0164] Step 4: Select the model with the best fitting effect as the final prediction model and optimize it;

[0165] Step 5 uses the final prediction model to detect the rammed earth image and predict the soil moisture content efficiently and accurately.

[0166] The specific process in step 1 is as follows:

[0167] Step 1.1 Data collection:

[0168] a. Field data collection is carried out in a variety of representative scenes, including urban construction sites, urban road construction sites, and inter-city highway subgrade construction sites to ensure the comprehensiveness and diversity of the data.

[0169] b. Use photographic equipment to take photos of soil samples under controlled lighting conditions to simulate various soil forms that may occur in actual construction.

[0170] c. Change the morphology of the soil surface, use a gardening shovel tool, and control the soil moisture to collect soil images under different moisture conditions.

[0171] d. Focus on soil images under special conditions, including ice and snow samples, to simulate snow-soil mixtures in harsh construction environments;

[0172] Step 1.2 Image data classification:

[0173] Based on the approximate water content of the soil and the visual characteristics of its surface, the image data is divided into four categories: dry soil, semi-dry soil, moist soil, and snow-soil mixed soil.

[0174] Step 1.3 Image data enhancement:

[0175] a Enhance the image data by random rotation, flipping, etc., so that the images in the data set are rotated at random angles between -45° and 45°.

[0176] b. Cut out a 224*224 image from the center of the rotated image, and then perform a random horizontal or vertical flip operation.

[0177] c. Through data enhancement operations, the size of the data set is significantly increased, enriching the training set and prediction set of the model;

[0178] Step 1.4 Dataset construction and division:

[0179] a The enhanced dataset is randomly shuffled and divided into training and test sets in a ratio of 8:2, where 80% of the images are used for training and 20% of the images are used for testing.

[0180] b. The data set is divided by the data averaging segmentation algorithm to ensure that the images of each category are evenly distributed in the training set and the test set.

[0181] Step 1.5 Data preprocessing:

[0182] a Normalize the image and convert the image data into a format that can be processed by the model.

[0183] b. Extract the HOG features of the image, convert the image into a grayscale image, calculate the gradient and direction of each pixel in the image, generate a gradient image, divide the image into small units, and calculate the gradient histogram in each unit.

[0184] c. Combine adjacent units into blocks and normalize the gradient histogram within each block to eliminate the influence of factors such as illumination changes on the eigenvalues.

[0185] Step 1 completes the acquisition and preprocessing of sample data, providing a high-quality data set for subsequent machine learning model training.

[0186] The specific process in step 2 is as follows:

[0187] Step 2.1 Feature extraction,

[0188] The HOG feature extraction method is used to extract features from the preprocessed rammed earth image data. First, the input image is preprocessed and converted into a grayscale image to reduce the interference of color information on texture feature extraction, so as to better capture the texture details of the image. By calculating the gradient and direction of each pixel in the image, a gradient image can be generated. Among them, methods such as the Sobel operator are often used to calculate the gradient of the image to further highlight the edge and texture information of the image. The calculation formula is:

[0189]

[0190] This step is to obtain key information from the image that can represent the change in soil moisture content, as shown in Algorithm 1:

[0191]

[0192] Step 2.2 Model selection,

[0193] According to the research purpose and data characteristics, three different machine learning models, random forest, support vector machine (SVM), and bagging, were selected for training. The above three models showed good performance in dealing with classification problems. Figure 2-Figure 4 ,

[0194] Step 2.3 Model training preparation,

[0195] a The extracted features and the corresponding soil moisture labels (i.e., dry, semi-dry, wet, and snow-soil mixed) form a training dataset, see Figure 5 ,

[0196] b. Divide the training set and the test set, usually in a ratio of 8:2, to ensure that the model has enough data to learn during training and that performance can be evaluated on an independent dataset.

[0197] Step 2.4 Hyperparameter setting:

[0198] The hyperparameters of each model are preliminarily set, including the number of trees (n_estimators) and the minimum number of samples on leaf nodes (min_samples_leaf) in the random forest model; the kernel function type (kernel), regularization parameter (C), and kernel function coefficient (gamma) in the SVM model; the number of basic classifiers (n_estimators) and the minimum number of samples on leaf nodes (min_samples_leaf) in the bagging model.

[0199] Step 2.5 Model training,

[0200] The selected machine learning model is trained using the training set data. During the training process, the model learns the relationship between the features and the soil moisture content.

[0201] Random forest is an ensemble learning technology that combines multiple decision trees constructed by random sampling for prediction or classification to reduce overfitting and variance. When predicting, random forest will integrate the prediction results of all trees and use voting or average to get the final result. The construction process of the random forest model is: first, randomly extract samples from the training data set through the bootstrap sampling method to form multiple subsets, and then, for each subset, randomly select features to form a feature set. Subsequently, this process is repeated to build multiple decision trees. Finally, the prediction results of each decision tree are summarized through a voting mechanism, and the category with the most votes is selected as the final output.

[0202] Support vector machine is a powerful supervised learning algorithm for classification and regression tasks. The training process of support vector machine involves optimizing a convex quadratic programming problem. The goal is to minimize the loss function and model complexity while satisfying the training samples within the interval boundary. When predicting, SVM uses support vector construction function to predict new samples.

[0203] f(x)=w T x+b

[0204] f(x)+ε

[0205] f(x)-ε

[0206] The variable ε in the formula is the maximum deviation of ε between f(x) and y, that is, a deviation of 2ε is allowed between the model prediction value and the true value. w and b are model parameters. In order to obtain the regression function, the value of f(x) is made as close to the value of y as possible. If the sample falls within the interval of 2ε constructed with f(x) as the center, the prediction is considered accurate.

[0207] Bagging is an integrated learning technology. Its core concept is to improve the stability and accuracy of the classifier by self-sampling the original data and aggregating multiple weak classifiers. In the Bagging method, multiple training sets are generated by replacement sampling. Each training set independently trains a weak classifier, and the prediction results of each weak classifier are weighted averaged or voted to obtain the final prediction result.

[0208] Step 2.6 Cross-validation and grid search,

[0209] In the process of hyperparameter tuning, the grid search method is used to traverse all possible combinations in the preset hyperparameter value space, and the ten-fold cross-validation method is used to comprehensively test the performance of each combination. Finally, by comparing the performance of different combinations, the best combination is selected to optimize the model performance. There are n hyperparameters, each with m i possible values, then the total number of combinations to try in the grid search is:

[0210]

[0211] Step 2.7 Model tuning,

[0212] According to the results of cross-validation, the hyperparameters of the model are adjusted to obtain the best model performance.

[0213] Four basic indicators are used to describe its performance, namely TP, TN, FP and FN. Among them, T represents the actual category is true, F represents the actual category is false, P represents the prediction is positive, and N represents the prediction is negative. Therefore, TP represents the number of samples that are actually positive and predicted to be positive; TN represents the number of samples that are actually negative and predicted to be negative; FP represents the number of samples that are actually negative but predicted to be positive; FN represents the number of samples that are actually positive but predicted to be negative. These indicators provide an important reference for evaluating the performance of the classification model. The specific description is shown in Table 1:

[0214] Table 1 Basic indicators for model evaluation

[0215]

[0216] Step 2 completes the process of training several machine learning models for the dataset obtained in Step 1, which will be used for subsequent soil moisture prediction and performance evaluation.

[0217] Among them, multiple model evaluation indicators are used to comprehensively analyze and evaluate the fitting of the model prediction results. The specific process in step 3 is as follows:

[0218] Step 3.1 Select evaluation indicators,

[0219] Determine the evaluation indicators used to evaluate model performance, including accuracy, precision, recall and F1-score,

[0220] Accuracy refers to the ratio of the number of samples correctly predicted by the classifier to the total number of samples. It is an indicator used to evaluate the possibility of correct classification by the classifier. The higher the accuracy, the stronger the model's ability to predict correctly in the classification task. The formula is as follows:

[0221]

[0222] Precision, as the precision of the prediction results, measures the proportion of data that are actually positive samples among all the data predicted by the model as positive samples. The formula is as follows:

[0223]

[0224] Recall, also known as recall rate, is used to measure the model's ability to predict correctly among similar samples. It reflects the proportion of data that is actually positive samples that is correctly predicted as positive samples by the model. The formula is as follows:

[0225]

[0226] F1-score is a comprehensive evaluation indicator, which is calculated by weighting the precision and recall. It aims to more comprehensively evaluate the performance of the classification model. The larger the F1-score value, the better the model's precision and recall performance. The formula is as follows:

[0227]

[0228] Step 3.2 Calculate the evaluation index,

[0229] aFor each trained machine learning model, use the test set data to make predictions and record the prediction results.

[0230] b. Calculate the accuracy, precision, recall and F1-score of each model based on the prediction results and the true labels of the test set.

[0231] The parameters of the random forest model are introduced in Table 2:

[0232] Table 2 Introduction to random forest model parameters

[0233]

[0234] The random forest model parameter settings are shown in Table 3:

[0235] Table 3 Random forest model parameter settings

[0236]

[0237] In the actual application of soil moisture detection, construction efficiency and detection accuracy need to be balanced. The size of the n_estimators parameter is appropriately reduced. The random forest soil moisture detection model constructed with the optimal parameters has an Accuracy value of 0.75. This evaluation index not only shows the good performance of the model in soil moisture detection, but also proves that the model has certain stability and reliability in practical applications. The specific evaluation indicators are shown in Table 4:

[0238] Table 4 Random forest model evaluation indicators

[0239]

[0240] The support vector machine model parameters are introduced in Table 5:

[0241] Table 5 Brief introduction to support vector machine model parameters

[0242]

[0243]

[0244] The random forest model parameter settings are shown in Table 6:

[0245] Table 6 Support vector machine model parameter settings

[0246]

[0247] The RBF kernel function is called to train the model, and its performance is evaluated by evaluation indicators. The results are shown in Table 7:

[0248] Table 7 Support vector machine model (RBF) evaluation indicators

[0249]

[0250] The Bagging model uses the BaggingClassifier function in the Scikit-Learn library to build a decision tree. The hyperparameters that need to be adjusted are shown in Table 8:

[0251] Table 8 Brief introduction of Bagging model parameters

[0252]

[0253] The parameter settings of the Bagging model are shown in Table 9:

[0254] Table 9 Bagging model parameter settings

[0255]

[0256] The weighted accuracy of the bagging soil moisture detection model established by appropriately reducing the size of the n_estimators parameter and using the optimized optimal parameters is as high as 0.98. This evaluation index shows the excellent performance of the model, especially in soil moisture detection. The specific evaluation indicators are shown in Table 10.

[0257] Table 10 Bagging model evaluation indicators

[0258]

[0259] Step 3.3 Confusion matrix construction, see Figure 12-14 ,

[0260] Construct a confusion matrix to visualize the relationship between the model prediction results and the true label. Each cell in the confusion matrix represents the match between the model predicted category and the actual category.

[0261] The specific weighted evaluation index results are shown in Table 11:

[0262] Table 11 Weighted evaluation indicators of each model

[0263]

[0264] From the weighted evaluation indicators of each model in Table 11, it can be seen that the Accuracy of the three models is above 0.5, the Precision is above 0.78, the Recall is above 0.48, and the F1-score is above 0.39, indicating that the three models have good performance in the detection of rammed soil moisture content.

[0265] In order to comprehensively evaluate the performance of each model in soil moisture detection, the present invention focuses on observing the degree of agreement between the measured value and the predicted value, and quantitatively compares and analyzes the performance of different models in prediction accuracy and their differences. To this end, the prediction results of three different models are evaluated based on actual data by constructing a confusion matrix, an intuitive tool. Fig.12 ,

[0266] Step 3.4 ROC curve and AUC value analysis,

[0267] Draw the receiver operating characteristic (ROC) curve to analyze the performance changes of the model under different threshold settings.

[0268] Calculate the area under the curve (AUC) value. The closer the AUC value is to 1, the better the classification performance of the model. For specific values, see Figure 7, Fig. 9 , Fig.11 ,

[0269] Step 3.5 PR curve drawing:

[0270] aDraw the precision-recall (PR) curve. Especially in the case of imbalanced data categories, the PR curve can provide more useful information than the ROC curve. For specific values, see Figure 6 , Figure 8 , Fig.10 ,

[0271] b. Analyze the area under the PR curve to evaluate the trade-off between the model’s precision and recall.

[0272] Step 3.6 Model performance comparison:

[0273] aCompare the evaluation index results of different models and analyze the performance differences of each model in predicting soil moisture content.

[0274] b. Determine which model performs best on a specific evaluation metric and which model is superior in comprehensive evaluation.

[0275] Step 3.7 Error analysis,

[0276] aAnalyze the samples where the model predicted errors to understand on which types of soil images the model performs poorly,

[0277] b. Explore the causes of errors, which may be due to data imbalance, insufficient feature extraction, or insufficient model complexity.

[0278] Step 3.8 Model optimization suggestions:

[0279] According to the evaluation results and error analysis, make suggestions for model optimization, including adjusting the model structure, reselecting features or trying different algorithms.

[0280] Step 3 completes the comprehensive analysis and evaluation of the fitting of the model prediction results, thereby selecting the model that best suits the soil moisture content prediction task and providing a basis for further model optimization.

[0281] The specific process in step 4 is as follows:

[0282] Step 4.1 Model performance evaluation:

[0283] According to the previously calculated accuracy, precision, recall, F1-score and other evaluation indicators, all trained machine learning models are evaluated for performance.

[0284] Step 4.2 Best model selection:

[0285] When selecting the model with the best fitting effect from the evaluation results, we usually first consider the model with the best comprehensive evaluation index, such as the model with the highest F1-score.

[0286] Step 4.3 Model parameter analysis:

[0287] Perform in-depth analysis of the parameters of the selected best model to identify which parameters have a significant impact on model performance,

[0288] Step 4.4 Grid Search Optimization:

[0289] Use the grid search method to further optimize the model's hyperparameters. By traversing the preset parameter space, find the optimal parameter combination.

[0290] Step 4.5 Cross Validation:

[0291] Cross-validation methods, including k-fold cross-validation, are used to ensure robustness and generalization during model optimization. Step 4.6 Feature importance evaluation:

[0292] Analyze the importance of each feature in the model and identify the features that have the greatest impact on the prediction results.

[0293] Step 4.7 Model simplification:

[0294] According to the results of feature importance evaluation, those features that contribute less to model performance are removed to simplify the model complexity.

[0295] Step 4.8 Model integration:

[0296] When using ensemble learning methods, such as random forests or bagging, performance can be optimized by adjusting the number or type of models in the ensemble.

[0297] Step 4.9: Model parameter adjustment:

[0298] Fine-tune the model's hyperparameters to improve the model's predictive accuracy and generalization ability.

[0299] Step 4.10 Performance Verification:

[0300] Use an independent test set to verify the performance of the optimized model to ensure that the model maintains good predictive performance on unseen data.

[0301] Step 4.11 Error analysis:

[0302] Perform error analysis on the optimized model to understand on which types of data the model performs poorly and explore possible reasons.

[0303] Step 4 completes the process of obtaining an optimized, best-fitting final prediction model to provide accurate and reliable soil moisture content predictions.

[0304] The specific process in step 5 is as follows:

[0305] Step 5.1 Image acquisition and upload:

[0306] Use digital cameras or digital video cameras to capture rammed earth images on site to ensure that the image quality meets the model input requirements.

[0307] Upload the collected images to the detection system and prepare for moisture content prediction.

[0308] Step 5.2 Image preprocessing:

[0309] Preprocess the uploaded images, including resizing and normalizing them to ensure that the image format is consistent with the data format used during model training.

[0310] Step 5.3 Feature extraction:

[0311] Extract features from the preprocessed image using the same feature extraction method used for model training (such as HOG feature extraction).

[0312] Step 5.4 Model loading:

[0313] Load the final prediction model that has been optimized and validated. This usually involves reading the model file from the file system and initializing the model in memory.

[0314] Step 5.5 Model prediction:

[0315] The extracted image features are input into the final prediction model to predict soil moisture content. The model will output the moisture content prediction results for each image.

[0316] Step 5.6 Result analysis and conversion:

[0317] Analyze the output of the model and convert the predicted values ​​into easily understandable soil moisture levels or percentages. Step 5.7 Error Analysis:

[0318] Conduct error analysis on the prediction results, identify possible prediction deviations of the model under specific conditions, and explore possible causes.

[0319] Step 5.8 Result recording and storage:

[0320] Record the prediction results in a log file or database for subsequent analysis and reporting.

[0321] Step 5.9 Result report and presentation:

[0322] The prediction results are organized into a report and displayed to the user through the user interface, including the predicted value of soil moisture content, the confidence level of the prediction, and the possible error range information.

[0323] Step 5.10: Result application and decision support:

[0324] The prediction results are applied to actual engineering construction to provide reference for construction decision-making, including adjusting construction plans and optimizing soil treatment methods.

[0325] Step 5.11 User feedback collection and system iteration:

[0326] a. Collect user feedback on prediction results to further improve model performance and user experience,

[0327] b. Regularly iterate the model based on user feedback and new data to improve prediction accuracy and overall system performance.

[0328] Step 5.12 Performance monitoring and optimization:

[0329] Monitor the model's predictive performance, regularly check the model's accuracy and response time, and ensure that the model remains efficient and accurate in actual applications.

[0330] Step 5 completes the final prediction model, which can efficiently and accurately predict soil moisture content in practical applications and provide reliable data support for engineering construction.

[0331] Example 2: See Figure 1 , Figure 2 The present invention provides a method for measuring the moisture content of rammed earth soil based on machine vision, which mainly adopts the following method:

[0332] 1) Image acquisition:

[0333] At the construction site, a high-resolution camera was used to capture images of the rammed earth area. The images were made sure to cover soil samples under different moisture conditions, including dry, semi-dry, wet, and snow-soil mixed soils.

[0334] The captured images are transmitted to the server of the soil moisture detection system.

[0335] 2) Image preprocessing and feature extraction:

[0336] The system automatically preprocesses the uploaded images, including resizing them to a uniform resolution (e.g., 224x224 pixels) and normalizing them to eliminate the effects of lighting and shadows.

[0337] The HOG feature extraction algorithm is applied to extract key features from each preprocessed image to form a feature vector.

[0338] 3) Model loading and prediction:

[0339] Load the final optimized and validated prediction model, which may be a random forest, support vector machine, or bagging model that has been trained on a large amount of rammed earth image data.

[0340] The extracted feature vectors are input into the model, and the model predicts the soil moisture content of each image based on the relationship between the learned features and moisture content.

[0341] 4) Result analysis and presentation:

[0342] The system parses the predictions output by the model, converting the numerical values ​​of moisture content into easily understandable category labels (such as "dry," "semi-dry," "humid").

[0343] The prediction results are displayed in the user interface in the form of graphics and text, including the predicted value and confidence of soil moisture content for each image, such as Figure 5 shown.

[0344] 5) Application of results and feedback:

[0345] Based on the prediction results, site managers can adjust construction plans in real time, such as increasing or decreasing the number of soil compaction times to ensure that soil moisture meets construction standards.

[0346] Collect user feedback on the prediction results to evaluate the accuracy and practicality of the model. Based on the feedback, regularly fine-tune the model to improve the accuracy of the prediction and user satisfaction of the system.

[0347] Collect user feedback on the prediction results to evaluate the accuracy and practicality of the model. Based on the feedback, regularly fine-tune the model to improve the accuracy of the prediction and user satisfaction of the system.

[0348] It should be noted that the above embodiments are not intended to limit the protection scope of the present invention, and equivalent changes or substitutions made on the basis of the above technical solutions all fall within the protection scope of the claims of the present invention.

Claims

1. A machine vision-based intelligent detection method for the moisture content of rammed earth on roadbed, characterized in that: The method comprises the following steps: Step 1: Obtain sample data and perform data preprocessing; Step 2 trained several machine learning models on this dataset; Step 3 uses multiple model evaluation indicators to conduct a comprehensive analysis and evaluation of the fitting of the model prediction results; Step 4: Select the model with the best fitting effect as the final prediction model and optimize it; Step 5 uses the final prediction model to detect the rammed earth image and predict the soil moisture content efficiently and accurately.

2. The intelligent detection method for water content of rammed earth in roadbed based on machine vision according to claim 1 is characterized in that: The specific process in step 1 is as follows: Step 1.1 Data collection: a. Field data collection is carried out in a variety of representative scenes, including urban construction sites, urban road construction sites, and inter-city highway subgrade construction sites to ensure the comprehensiveness and diversity of the data. b. Use photographic equipment to take photos of soil samples under controlled lighting conditions to simulate various soil forms that may occur in actual construction. c. Change the morphology of the soil surface, use a gardening shovel tool, and control the soil moisture to collect soil images under different moisture conditions. d. Focus on soil images under special conditions, including ice and snow samples, to simulate snow-soil mixtures in harsh construction environments; Step 1.2 Image data classification: Based on the approximate water content of the soil and the visual characteristics of its surface, the image data is divided into four categories: dry soil, semi-dry soil, moist soil, and snow-soil mixed soil. Step 1.3 Image data enhancement: a Enhance the image data by random rotation, flipping, etc., so that the images in the data set are rotated at random angles between -45° and 45°. b. Cut out a 224*224 image from the center of the rotated image, and then perform a random horizontal or vertical flip operation. c. Through data enhancement operations, the size of the data set is significantly increased, enriching the training set and prediction set of the model; Step 1.4 Dataset construction and division: a The enhanced dataset is randomly shuffled and divided into training and test sets in a ratio of 8:2, where 80% of the images are used for training and 20% of the images are used for testing. b. The data set is divided by the data averaging segmentation algorithm to ensure that the images of each category are evenly distributed in the training set and the test set. Step 1.5 Data preprocessing: a Normalize the image and convert the image data into a format that can be processed by the model. b. Extract the HOG features of the image, convert the image into a grayscale image, calculate the gradient and direction of each pixel in the image, generate a gradient image, divide the image into small units, and calculate the gradient histogram in each unit. c. Combine adjacent units into blocks and normalize the gradient histogram within each block to eliminate the influence of factors such as illumination changes on the eigenvalues. Step 1 completes the acquisition and preprocessing of sample data, providing a high-quality data set for subsequent machine learning model training.

3. The intelligent detection method for water content of rammed earth in roadbed based on machine vision according to claim 1 is characterized in that: The specific process in step 2 is as follows: Step 2.1 Feature extraction, The HOG feature extraction method is used to extract features from the preprocessed rammed earth image data. First, the input image is preprocessed and converted into a grayscale image to reduce the interference of color information on texture feature extraction, so as to better capture the texture details of the image. By calculating the gradient and direction of each pixel in the image, a gradient image can be generated. Among them, methods such as the Sobel operator are often used to calculate the gradient of the image to further highlight the edge and texture information of the image. The calculation formula is: Step 2.2 Model selection, According to the research purpose and data characteristics, three different machine learning models, random forest, support vector machine (SVM), and bagging, were selected for training. The above three models showed good performance in dealing with classification problems. Step 2.3 Model training preparation, a The extracted features and the corresponding soil moisture labels (i.e. dry, semi-dry, wet, snow-soil mixed) form a training data set. b. Divide the training set and the test set, usually in a ratio of 8:2, to ensure that the model has enough data to learn during training and that performance can be evaluated on an independent dataset. Step 2.4 Hyperparameter setting: The hyperparameters of each model are preliminarily set, including the number of trees (n_estimators) and the minimum number of samples on leaf nodes (min_samples_leaf) in the random forest model; the kernel function type (kernel), regularization parameter (C), and kernel function coefficient (gamma) in the SVM model; the number of basic classifiers (n_estimators) and the minimum number of samples on leaf nodes (min_samples_leaf) in the bagging model. Step 2.5 Model training, The selected machine learning model is trained using the training set data. During the training process, the model learns the relationship between the features and the soil moisture content. When predicting, SVM uses the support vector to build a function and predict new samples. f(x)=w T x+b f(x)+ε f(x)-ε The variable ε in the formula is the maximum deviation of ε between f(x) and y, that is, a deviation of 2ε is allowed between the model prediction value and the true value. w and b are model parameters. In order to obtain the regression function, the value of f(x) is made as close to the value of y as possible. If the sample falls within the interval of 2ε constructed with f(x) as the center, the prediction is considered accurate. Step 2.6 Cross-validation and grid search, In the process of hyperparameter tuning, the grid search method is used to traverse all possible combinations in the preset hyperparameter value space, and the ten-fold cross-validation method is used to comprehensively test the performance of each combination. Finally, by comparing the performance of different combinations, the best combination is selected to optimize the model performance. There are n hyperparameters, and each hyperparameter has m i possible values, then the total number of combinations to try in the grid search is: Step 2.7 Model tuning, According to the results of cross-validation, the hyperparameters of the model are adjusted to obtain the best model performance. Four basic indicators are used to describe its performance, namely TP, TN, FP and FN, where T represents the actual category is true, F represents the actual category is false, P represents the prediction is positive, and N represents the prediction is negative. Therefore, TP represents the number of samples that are actually positive and predicted to be positive; TN represents the number of samples that are actually negative and predicted to be negative; FP represents the number of samples that are actually negative but predicted to be positive; and FN represents the number of samples that are actually positive but predicted to be negative. These indicators provide an important reference for evaluating the performance of the classification model. Step 2 completes the process of training several machine learning models for the dataset obtained in Step 1, which will be used for subsequent soil moisture prediction and performance evaluation.

4. The intelligent detection method for water content of rammed earth in roadbed based on machine vision according to claim 1 is characterized in that: A number of model evaluation indicators are used to comprehensively analyze and evaluate the fitting of the model prediction results. The specific process in step 3 is as follows: Step 3.1 Select evaluation indicators, Determine the evaluation indicators used to evaluate model performance, including accuracy, precision, recall and F1-score, Accuracy refers to the ratio of the number of samples correctly predicted by the classifier to the total number of samples. The formula is as follows: Precision, as the precision of the prediction results, measures the proportion of data that are actually positive samples among all the data predicted by the model as positive samples. The formula is as follows: Recall, also known as recall rate, is used to measure the model's ability to predict correctly among similar samples. The formula is as follows: F1-score is a comprehensive evaluation indicator, which is calculated by weighting the precision and recall. It aims to more comprehensively evaluate the performance of the classification model. The larger the F1-score value, the better the model's precision and recall performance. The formula is as follows: Step 3.2 Calculate the evaluation index, aFor each trained machine learning model, use the test set data to make predictions and record the prediction results. b. Calculate the accuracy, precision, recall and F1-score of each model based on the prediction results and the true labels of the test set. Step 3.3 Confusion matrix construction, Construct a confusion matrix to visualize the relationship between the model prediction results and the true label. Each cell in the confusion matrix represents the match between the model predicted category and the actual category. Step 3.4 ROC curve and AUC value analysis, Draw the receiver operating characteristic (ROC) curve to analyze the performance changes of the model under different threshold settings. Step 3.5 PR curve drawing: aDraw the precision-recall (PR) curve. Especially in the case of imbalanced data categories, the PR curve can provide more useful information than the ROC curve. b. Analyze the area under the PR curve to evaluate the trade-off between the model’s precision and recall. Step 3.6 Model performance comparison: aCompare the evaluation index results of different models and analyze the performance differences of each model in the task of predicting soil moisture content. b. Determine which model performs best on a specific evaluation metric and which model is superior in comprehensive evaluation. Step 3.7 Error Analysis, aAnalyze the samples where the model predicted errors to understand on which types of soil images the model performs poorly, b. Explore the causes of the error, which may be due to data imbalance, insufficient feature extraction or insufficient model complexity. Step 3.8 Model optimization suggestions: According to the evaluation results and error analysis, make suggestions for model optimization, including adjusting the model structure, reselecting features or trying different algorithms. Step 3 completes the comprehensive analysis and evaluation of the fitting of the model prediction results, thereby selecting the model that best suits the soil moisture content prediction task and providing a basis for further model optimization.

5. The intelligent detection method for water content of rammed earth in roadbed based on machine vision according to claim 1 is characterized in that: The specific process in step 4 is as follows: Step 4.1 Model performance evaluation: According to the previously calculated accuracy, precision, recall, F1-score and other evaluation indicators, all trained machine learning models are evaluated for performance. Step 4.2 Best model selection: When selecting the model with the best fitting effect from the evaluation results, we usually first consider the model with the best comprehensive evaluation index, such as the model with the highest F1-score. Step 4.3 Model parameter analysis: Perform an in-depth analysis of the parameters of the selected best model to identify which parameters have a significant impact on model performance. Step 4.4 Grid Search Optimization: Use the grid search method to further optimize the model's hyperparameters and find the optimal parameter combination by traversing the preset parameter space. Step 4.5 Cross Validation: Cross-validation methods, including k-fold cross-validation, are used to ensure robustness and generalization during model optimization. Step 4.6 Feature importance evaluation: Analyze the importance of each feature in the model and identify the features that have the greatest impact on the prediction results. Step 4.7 Model simplification: According to the results of feature importance evaluation, remove those features that contribute less to model performance and simplify the model complexity. Step 4.8 Model integration: When using ensemble learning methods, such as random forests or bagging, you can optimize performance by adjusting the number or type of models in the ensemble. Step 4.9: Model parameter adjustment: Fine-tune the model’s hyperparameters to improve the model’s predictive accuracy and generalization capabilities, Step 4.10 Performance Verification: Use an independent test set to verify the performance of the optimized model to ensure that the model maintains good predictive performance on unseen data. Step 4.11 Error analysis: Perform error analysis on the optimized model to understand on which types of data the model performs poorly and explore possible reasons. Step 4 completes the process of obtaining an optimized, best-fitting final prediction model to provide accurate and reliable soil moisture content predictions.

6. The intelligent detection method for water content of rammed earth in roadbed based on machine vision according to claim 1 is characterized in that: The specific process in step 5 is as follows: Step 5.1 Image acquisition and upload: Use digital cameras or digital video cameras to capture images of rammed earth on site to ensure that the image quality meets the model input requirements. Upload the collected images to the detection system and prepare for moisture content prediction. Step 5.2 Image preprocessing: Preprocess the uploaded images, including resizing and normalizing them to ensure that the image format is consistent with the data format used during model training. Step 5.3 Feature extraction: Use the same feature extraction method as model training (such as HOG feature extraction) to extract features from the preprocessed image. Step 5.4 Model loading: Load the final prediction model that has been optimized and validated, which usually involves reading the model file from the file system and initializing the model in memory. Step 5.5 Model prediction: The extracted image features are input into the final prediction model to predict the soil moisture content. The model will output the moisture content prediction results for each image. Step 5.6 Result analysis and conversion: Analyze the output of the model and convert the predicted values ​​into easily understandable soil moisture levels or percentages. Step 5.7 Error Analysis: Conduct error analysis on the prediction results, identify possible prediction deviations of the model under specific conditions, and explore possible causes. Step 5.8 Result recording and storage: Record the prediction results in a log file or database for subsequent analysis and reporting. Step 5.9 Result report and presentation: The prediction results are organized into a report and displayed to the user through the user interface, including the predicted value of soil moisture content, the confidence level of the prediction, and the possible error range information. Step 5.10: Result application and decision support: The prediction results are applied to actual engineering construction to provide reference for construction decision-making, including adjusting construction plans and optimizing soil treatment methods. Step 5.11 User feedback collection and system iteration: a. Collect user feedback on prediction results to further improve model performance and user experience, b. Regularly iterate the model based on user feedback and new data to improve prediction accuracy and overall system performance. Step 5.12 Performance monitoring and optimization: Monitor the model's predictive performance, regularly check the model's accuracy and response time, and ensure that the model remains efficient and accurate in actual applications. Step 5 completes the final prediction model, which can efficiently and accurately predict soil moisture content in practical applications and provide reliable data support for engineering construction.

7. An intelligent detection system for the moisture content of rammed earth on roadbed based on machine vision, characterized in that: Used to implement the machine vision-based intelligent detection method for moisture content of roadbed rammed earth as described in any one of claims 1-6, the detection system includes an image acquisition unit, an image preprocessing and feature extraction unit, a model loading and prediction unit, a result analysis and display unit, and a result application and feedback unit.

8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the intelligent detection method for moisture content of rammed earth on roadbed based on machine vision as described in any one of claims 1 to 6.

9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by the processor, the steps of the intelligent detection method for moisture content of rammed earth on roadbed based on machine vision as described in any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Bladder urination tracking training system based on ultrasonic detection

    CN120339243A

  • Hazardous waste landfill underground water monitoring project optimization method and system based on artificial intelligence

    CN120387536A