Rapid identification method for particle size distribution of shield rock ballast
Through multispectral imaging and deep learning technology, combined with adaptive threshold segmentation and morphological processing, a convolutional neural network model is constructed, which solves the accuracy and efficiency of identification of rock ballast particle size distribution on the shield machine, and achieves rapid and accurate identification of rock ballast particle size distribution, improving the reliability of engineering decisions.
Patent Information
- Application Number
- CN202510536989.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-12
AI Technical Summary
The prior art is that the rock ballast image quality is poor due to uneven light and background interference at the shield machine excavation site, which affects image preprocessing and feature extraction, making it difficult to accurately identify the rock ballast particle size distribution, and the model generalization ability is limited, resulting in inaccurate engineering decision-making and low efficiency.
Multispectral imaging technology is used to remove background interference and divide grayscale, and the ballast characteristics are extracted in combination with adaptive threshold segmentation and morphological processing technology. The convolutional neural network model is constructed after dimensionality reduction by principal component analysis to classify the ballast particle size, and smoothed through the nuclear density estimation method to generate the final particle size distribution information.
Effectively reduce the impact of light unevenness and background interference, improve the accuracy and automation of rock ballast particle size analysis, and provide reliable particle size distribution data support for geotechnical engineering and mining.
Smart Images

Figure CN120472311A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of rock slag identification, and in particular relates to a method for quickly identifying particle size distribution of shield rock slag. Background Art
[0002] When collecting rock slag images in real time at shield machine excavation sites, the complex operating environment and significant variations in rock slag distribution and morphology often lead to problems during image acquisition, such as uneven lighting and background interference. These issues directly impact image quality, making subsequent image preprocessing and feature extraction difficult. During image preprocessing, despite employing techniques such as denoising and contrast enhancement, the high similarity between rock slag and background often makes image segmentation accuracy difficult to guarantee. Some rock slag may be misclassified as background, or background interference objects may be misidentified as rock slag. This further impacts feature extraction accuracy, particularly in identifying rock slag shape, size, and color, resulting in significant errors. After feature extraction, despite employing advanced machine learning algorithms such as convolutional neural networks for model training, the diverse and complex rock slag particle size distribution in the training samples limits the model's generalization ability, making it difficult to accurately identify rock slag of different particle sizes. In particular, when the rock slag particle size distribution is relatively continuous, the model may be unable to accurately distinguish between rock slag within adjacent particle size ranges, resulting in biased particle size classification and recognition results. In addition, when the model outputs the rock slag particle size distribution information, due to the accumulated errors in the aforementioned links, the final particle size distribution information may not truly reflect the actual distribution of rock slag on site, affecting the accuracy of engineering decision-making and being inefficient. Summary of the Invention
[0003] In order to solve the above technical problems, the present invention proposes a method for quickly identifying the particle size distribution of shield rock slag to solve the problems existing in the above-mentioned prior art.
[0004] To achieve the above-mentioned object, the present invention provides a method for quickly identifying the particle size distribution of shield rock ballast, comprising:
[0005] Acquiring image data of shield rock ballast, processing the image data, and performing feature extraction on the processed image to obtain a feature vector;
[0006] The feature vector and the image data are identified by a deep learning model, and the identification results are statistically processed and smoothed to obtain the shield rock slag particle size distribution results.
[0007] Optionally, the process of preprocessing the image data includes:
[0008] Background interference removal, grayscale difference segmentation and noise removal are performed on the image data to obtain a preprocessed image, wherein the image is a hyperspectral image.
[0009] Optionally, the background interference removal process includes:
[0010] The image data is spectrally corrected, and characteristic bands are selected for the spectrally corrected image data to construct a background difference model. The difference values between the image pixels and the background are calculated using the background difference model. The difference values are judged, and the image is segmented based on the judgment result to obtain an image with background interference removed.
[0011] Optionally, grayscale difference segmentation is performed on the image with background interference removed using an adaptive threshold segmentation algorithm.
[0012] Optionally, the noise removal process includes:
[0013] The image after grayscale difference segmentation is processed by an edge detection algorithm to obtain contour information. Based on the contour information, a region growing algorithm is used to segment independent targets in the rock chip area, and features of the independent targets are extracted and classified. According to the classification results, a morphological reconstruction technique is used to obtain a processed image.
[0014] Optionally, the process of extracting features from the processed image includes:
[0015] The characteristic data of rock chippings are obtained from the processed image, and the characteristic data are subjected to dimensionality reduction processing by principal component analysis. A characteristic vector is obtained based on the eigenvalue after dimensionality reduction processing, and the dimension of the characteristic vector is judged. Based on the judgment result, the characteristic vector is further processed by a secondary dimensionality reduction algorithm to obtain a characteristic vector.
[0016] Optionally, before identifying the feature vector and the image data through the deep learning model, the method further includes:
[0017] The deep learning model is trained. If the loss function does not reach the preset threshold during model training, the learning rate is adjusted and training is repeated. Based on the trained model, a test set is used to perform model recognition and determine the model's accuracy. Based on the model recognition results, a confusion matrix is used to evaluate the performance and determine the model's classification performance. Based on the classification results, a model optimization algorithm is used to optimize the convolutional neural network model to obtain the optimized model.
[0018] Optionally, the process of collecting statistics on the recognition results includes:
[0019] Based on the particle size classification results, the number of rock slag images for each category is extracted, and the distribution data points of the particle size values are counted. A particle size distribution plot is generated based on the statistical values. The distribution shape is analyzed, and a statistical table is created to determine the completeness of the data points. If a data point is missing, an interpolation algorithm is used to supplement the missing value and regenerate the statistical table. A particle size distribution plot is drawn from the statistical table, and the distribution characteristic values are obtained and analyzed. The distribution characteristic values are compared with the preset model parameters to determine the rationality of the model parameters. If the model parameters are unreasonable, the gradient descent algorithm is used to adjust the model parameters and optimize the distribution characteristic values. The particle size distribution plot is regenerated based on the optimized distribution characteristic values.
[0020] Optionally, the process of smoothing the particle size distribution graph includes:
[0021] Obtain the original data points in the particle size distribution graph and calculate the bandwidth parameters required for kernel density estimation based on the distribution characteristics of the data points. Perform weighted calculations on the data points according to the bandwidth parameters and kernel function to generate a continuous probability density function curve. Use a Gaussian kernel function to smooth the probability density function to eliminate noise points in the distribution graph. If there are local anomalies in the smoothed probability density function, adjust the bandwidth parameters and recalculate the kernel density estimate. Based on the smoothed probability density function, extract the peak position and distribution width characteristic values of the particle size distribution. Compare the extracted characteristic values with the preset distribution model to determine whether the model matches. If the model does not match, use the gradient descent algorithm to optimize the kernel density estimation parameters and regenerate the final particle size distribution information.
[0022] Optionally, after obtaining the feature vector, the following steps are also included:
[0023] Based on the processed feature vectors, a clustering algorithm is used to classify the rock slag areas and determine their distribution patterns. Based on the classification results, a region labeling algorithm is used to mark the rock slag areas and generate a distribution map of the rock slag areas. Based on the distribution map of the rock slag areas, an image overlay technique is used to generate a fourth image, completing the classification and labeling of the rock slag areas.
[0024] Compared with the prior art, the present invention has the following advantages and technical effects:
[0025] The present invention discloses a method for rapidly identifying the particle size distribution of shield rock ballast. The method acquires rock ballast images through multispectral imaging and uses a background difference method and an adaptive threshold segmentation algorithm for image preprocessing. Morphological processing techniques are then applied to remove noise and extract the shape, size, and color characteristics of the rock ballast. After dimensionality reduction using principal component analysis, a convolutional neural network model is constructed to classify the rock ballast particle size. Finally, the present invention uses a kernel density estimation method to smooth the classification results and generate the final particle size distribution information. This method can effectively reduce the effects of uneven lighting and background interference, improve the accuracy and automation of rock ballast particle size analysis, and provide reliable particle size distribution data support for fields such as geotechnical engineering and mining. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0027] Figure 1 Schematic diagram of the process of a method for quickly identifying particle size distribution of shield rock ballast according to an embodiment of the present invention;
[0028] Figure 2 Schematic diagram of the structure of a system for rapid identification of shield rock slag particle size distribution according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0030] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] like Figure 1 As shown, a method for quickly identifying the particle size distribution of shield rock slag in this embodiment may specifically include:
[0032] S101. Acquire a rock chip image using multispectral imaging technology to reduce the impact of uneven illumination on image quality, and simultaneously use a background difference method to remove background interference to obtain a first image.
[0033] Multispectral imaging technology is used to collect rock chip surface information across multiple spectral bands to obtain raw image data. Spectral correction is performed on the raw image data to eliminate the effects of uneven illumination on image quality. Feature bands are selected from the multiple spectral bands to construct a background difference model. The background difference model calculates the difference between image pixels and the background to identify interference areas. If the difference exceeds a preset threshold, the pixel is marked as an interference pixel; otherwise, it is retained as a valid pixel. Based on the labeling results, the image is segmented to remove background interference areas. The processed multispectral image data is integrated to generate a first image.
[0034] For example, multispectral imaging uses different wavelengths to detect the electromagnetic radiation characteristics of an object or scene. Images from each wavelength reflect different properties of the rock ballast. For example, the visible light band reflects the surface color and texture of the rock ballast, the near-infrared band reflects the internal structure and moisture content, and the short-wave infrared band reflects the mineral composition of the rock ballast. Lighting conditions must be considered when acquiring images. Direct sunlight can cause strong reflections and shadows. Spectral correction can eliminate these effects. For example, a standard grayscale plate is placed on the rock ballast surface as a reference and the reflectance of each band is calculated. Using the theoretical reflectance of the standard grayscale plate as a benchmark, the image is scaled to produce an image that reflects the true spectral characteristics. Band selection should consider the significance of the rock ballast characteristics. In rock ballast samples, areas with high moisture content have low reflectance in the near-infrared band, while dry areas have high reflectance. Selecting the near-infrared and red light bands to construct a background difference model can effectively identify areas with abnormal moisture content. For example, iron minerals in rock slag have characteristic absorption in the blue light band of visible light. Selecting the blue light band can identify the distribution of iron minerals.
[0035] The background difference model achieves segmentation based on the spectral differences between the target and the background. For example, suppose a region on the rock ballast surface has a reflectivity of 30% in the near-infrared band, while the reflectivity of the normal background region is 50%. A threshold of 15% is set. If the difference is 20%, exceeding the threshold, the region is marked as an interference region. Image segmentation uses a region growing method, using the marked interference pixel as a seed point and merging surrounding similar pixels to form a complete interference region. After integrating the processed multispectral data, principal component analysis is used to fuse the information from each band, highlighting abnormal features on the rock ballast surface and generating the first image. This processing method not only preserves the true spectral information of the rock ballast surface, but also effectively identifies and removes interference regions, improving image quality. By comparing multispectral images from different periods and analyzing changes in rock ballast surface characteristics, the stability of the stockpile can be assessed and maintenance management can be guided. For example, areas of rock ballast water seepage will exhibit a distinct low reflectivity characteristic in the near-infrared band. Prompt detection and treatment can prevent landslides.
[0036] S102: Using an adaptive threshold segmentation algorithm on the first image, perform image segmentation based on the grayscale difference between the rock debris and the background to obtain a second image.
[0037] On the first image, an adaptive threshold segmentation algorithm is used to calculate the grayscale value of each pixel in the image and determine the grayscale difference range between the rock slag and the background. Based on the preset grayscale difference range, an adaptive threshold is set to determine whether the pixel value is within the threshold range. If it is within the range, the pixel is marked as a rock slag area; otherwise, it is marked as a background area. For the marked rock slag area, an image classification algorithm is used to extract the surface features of the rock slag and obtain its texture information. Based on the extracted texture information, a rock slag feature model is constructed, and the characteristic values of the rock slag area are calculated to determine the type and distribution of the rock slag. Based on the determined rock slag type and distribution, an image processing algorithm is used to remove interference information from the background area, retaining a clear image of the rock slag area. A second image is generated, completing the segmentation of the rock slag from the background.
[0038] Exemplarily, the adaptive threshold segmentation algorithm dynamically adjusts the segmentation threshold based on local image features to adapt to brightness changes in different areas. For example, when there are shadows or strong light areas on the rock ballast surface in the image, the optimal segmentation threshold for the area is determined by calculating the average grayscale value of the pixels in the local window. When the grayscale value of the rock ballast surface is between one hundred and one hundred and fifty, and the grayscale value of the background area is below fifty, the initial threshold can be set to seventy-five, and then dynamically adjusted according to the characteristics of the local area. Texture feature extraction mainly examines the roughness, regularity and directionality of the rock ballast surface. By calculating the grayscale co-occurrence matrix, a multidimensional feature value reflecting the texture of the rock ballast surface can be obtained. For example, a rough rock ballast surface will show a larger local variance value, while a smooth surface will have a smaller variance value. For angular rock ballast, its directional characteristics are obvious, which can be quantitatively described by calculating the gradient direction histogram.
[0039] The rock slag feature model is constructed using a multi-level feature fusion approach. First, color features, such as the RGB value distribution of the rock slag surface, are extracted. Next, shape features, including edge curvature and area ratio, are analyzed. Finally, texture features, such as local binary pattern descriptors, are extracted. By combining feature vectors, a complete rock slag feature description is established. For example, if a certain type of rock slag has high grayscale values, rough surface texture, and irregular edge features, these features can be combined to form a feature model. To remove background interference, morphological operations are combined with edge detection methods. First, an opening operation is used to remove small noise, and then a closing operation is used to fill voids within the rock slag area. Edges are detected using the Sobel operator, and then the region growing method is used to accurately delineate the rock slag outline. For areas with blurred boundaries, a watershed algorithm is used for further segmentation. During the generation of the second image, the integrity of the rock slag boundary and the continuity of the regions must be maintained. A region labeling algorithm is used to assign unique identifiers to different rock slag regions. Combining shape features with spatial location information accurately depicts the distribution of the rock slag. For overlapping areas, the hierarchical analysis method is used to determine the front-back relationship to ensure the authenticity of the image.
[0040] S103: Apply morphological processing technology to the second image to remove noise and interference in the image to obtain a third image.
[0041] On the second image, an edge detection algorithm is used to extract the contour information of the rock ballast area. Combined with the results of morphological processing, the boundary integrity of the rock ballast area is determined. Based on the extracted contour information, a region growing algorithm is used to segment independent targets in the rock ballast area and determine the connectivity of each target. For the segmented independent targets, a feature extraction algorithm is used to calculate the geometric shape parameters of each target, including area and perimeter. Based on the geometric shape parameters, a classification algorithm is used to determine the shape category of each target and distinguish between regular and irregular shapes. For irregular-shaped targets, morphological reconstruction technology is used to repair their boundary defects and obtain a complete rock ballast area. For regular-shaped targets, a contour fitting algorithm is used to generate a smooth boundary curve and determine the precise contour of the rock ballast. Based on the repaired and fitted rock ballast area, image overlay technology is used to generate a third image to complete the refined processing of the rock ballast area.
[0042] For example, edge detection algorithms extract contour information by detecting sharp changes in grayscale values within the rock ballast region. For example, distinct textures and abrupt changes on the rock ballast surface create prominent edge features. The Sobel operator detects horizontal and vertical grayscale gradients. When the gradient value exceeds a set threshold, it is marked as an edge point, thus outlining the rock ballast's contour. The region growing algorithm, based on an initial seed point, expands the region by comparing the grayscale similarity of adjacent pixels. For example, if the seed point has a grayscale value of 120 and the growth threshold is set to 20, adjacent pixels with grayscale values between 100 and 140 are incorporated into the region. This gradual expansion continues until growth is no longer possible, resulting in a complete rock ballast target. The calculation of geometric shape parameters involves area and perimeter features. The area can be calculated by counting the number of pixels within a connected region. For example, if a rock ballast region contains 800 pixels, and each pixel actually corresponds to 0.5 mm, the actual area is 200 square millimeters. The perimeter is calculated by counting the number of boundary pixels. If there are 120 boundary pixels, the actual side length is 60 mm. Shape classification is primarily based on metrics such as circularity and rectangularity. Circularity is the ratio of the square of the perimeter to the area, decreasing with increasing circularity. For example, the circularity of a rock ballast target is 12.5, exceeding the theoretical value for a regular circle, indicating an irregular shape. Rectangularity is the ratio of the target area to the area of its minimum circumscribed rectangle; closer to one, the more regular the shape. For irregular shapes, morphological reconstruction techniques are used to repair their boundaries. Dilation and erosion operations fill gaps and remove burrs, while morphological reconstruction using structuring elements can smooth irregular edges. For example, if the edge of a rock ballast has uneven edges, using a circular structuring element with a radius of three pixels can effectively repair these boundary defects. Contour fitting algorithms optimize regular shapes. The least squares method is used to fit a sequence of boundary points to generate a smooth curve. If the contour of a rock ballast approximates an ellipse, the ellipse equation can be used to fit its boundary points, resulting in a precise mathematical description. During image overlay, the repaired and fitted contour information is superimposed on the original image to produce a third image, achieving a more refined representation of the rock ballast area.
[0043] S104. Extract the shape, size, and color features of the rock debris from the third image, and use principal component analysis to reduce the dimension of the features to obtain a feature vector.
[0044] The shape, size, and color features of the rock slag are obtained from the third image, and a feature extraction algorithm is used to generate a feature set. For each feature in the feature set, the eigenvalues are calculated, and the eigenvalues are subjected to dimensionality reduction using principal component analysis. Based on the eigenvalues after dimensionality reduction, a feature vector is generated, and the dimensional information of the feature vector is determined. If the dimension of the feature vector is greater than a preset threshold, the feature vector is further processed using a secondary dimensionality reduction algorithm. Based on the processed feature vector, a clustering algorithm is used to classify the rock slag area and determine its distribution pattern. Based on the classification results, a region labeling algorithm is used to label the rock slag area and generate a distribution map of the rock slag area. Based on the distribution map of the rock slag area, an image overlay technique is used to generate a fourth image, completing the classification and labeling of the rock slag area.
[0045] Exemplarily, the feature extraction algorithm primarily uses a texture feature extraction method based on a gray-level co-occurrence matrix, characterizing the shape characteristics of the rock ballast by calculating parameters such as contrast, entropy, and energy in the rock ballast image. For example, for large pieces of rock ballast, its texture characteristics are characterized by high contrast and large entropy, while small particles of rock ballast are characterized by low contrast and small entropy. Color features can be represented by extracting three components of the image: hue, saturation, and brightness. Rock ballast typically appears grayish white or grayish brown, with hue values fluctuating within a certain range. During dimensionality reduction using principal component analysis, the eigenvector and corresponding eigenvalue are obtained by calculating the covariance matrix of the eigenvalues. Assuming that ten feature parameters are extracted, by analyzing the contribution rate of the eigenvalues, it may be found that the cumulative contribution rate of the first three eigenvalues has reached 85%. At this point, the feature dimension can be reduced from ten to three, preserving the key information while reducing the amount of computation. If the eigenvector dimension after dimensionality reduction is still high, kernel principal component analysis can be used for secondary dimensionality reduction. By introducing the kernel function to map the feature vector to a high-dimensional space and then performing dimensionality reduction in the high-dimensional space, nonlinear feature information can be better preserved.
[0046] Cluster analysis uses an improved fuzzy clustering algorithm to classify rock ballast into different categories based on its shape and size. For example, rock ballast can be classified into three categories: large, medium, and crushed stone. The category is determined by calculating the degree of membership of each sample point to each category center. In implementation, initial values for cluster centers can be set, followed by iterative optimization until the inter-cluster distance is maximized and the intra-cluster distance is minimized. The region labeling algorithm uses a connected region labeling method to assign different labels to rock ballast regions of different categories. During the labeling process, spatial proximity between regions is considered to ensure that adjacent regions of the same type have the same label. For example, large rock ballast regions can be labeled red, medium rock ballast regions green, and crushed stone regions blue, creating a visually intuitive distribution map. Finally, using layer overlay technology, the original image is fused with the labeled region distribution map to generate a fourth image with clear identification. The overlay requires careful consideration of transparency, ensuring that the labeled information is clearly visible while not excessively obscuring details in the original image. By properly setting the overlay parameters, the distribution characteristics of the rock ballast and the classification results can be intuitively displayed.
[0047] The feature vectors are further processed using a quadratic dimensionality reduction algorithm.
[0048] A covariance matrix calculation method is used to obtain eigenvalues and eigenvectors. These are then sorted by eigenvalue size using a sorting method. The top k principal components are selected, and the original eigenvectors are processed using dimensionality reduction to obtain reduced eigenvectors. The dimensionality of the reduced eigenvector is then determined. If the dimensionality exceeds a preset threshold, further processing is performed using a secondary dimensionality reduction method to obtain the final eigenvector. Based on the final eigenvector, a clustering algorithm is used to classify the data and obtain the classification results. Based on the classification results, a region labeling algorithm is used to label the data, producing the labeled data. Image overlay technology is then used to generate the final image from the labeled data.
[0049] For example, covariance matrix calculation is an analytical method based on the relationship between feature dimensions. Taking rock slag characteristics as an example, rock slag shape can be characterized by factors such as roundness and the ratio of the major axis to the minor axis; color features include hue and saturation; and size features include area and perimeter. These features are correlated, and the covariance matrix can be used to reflect these dependencies. Suppose ten features are extracted from rock slag in a certain area. After constructing the covariance matrix, the corresponding eigenvalues and eigenvectors can be obtained. The eigenvalue ranking reflects the importance of each principal component. For example, in an analysis of a batch of rock slag samples, the first three eigenvalues are 8.5, 4.2, and 2.1, respectively, while the remaining eigenvalues are all less than 1, indicating that the first three principal components contain the primary information. Selecting the principal component with a cumulative contribution rate of 85% as the dimensionality reduction benchmark effectively preserves key information. Dimensionality reduction projects the original eigenvector into the principal component space. Taking rock slag shape analysis as an example, the original eigenvector is ten-dimensional. After principal component analysis reduces it to three dimensions, the rock slag characteristics can be characterized by three numerical values. If the dimension remains greater than the preset threshold (for example, if the dimension threshold is set to two) after dimensionality reduction, secondary dimensionality reduction is required. Nonlinear dimensionality reduction methods such as kernel principal component analysis (KPRA) can be used. Cluster analysis classifies rock ballast based on the reduced feature vectors. When using K-means clustering, it is assumed that rock ballast is divided into three categories: large and uniform, fragmented and mixed, and finely distributed. The initialization of cluster centers significantly impacts the results, and stable classification can be achieved through multiple iterations of optimization. A region labeling algorithm visualizes the classification results. Different rock ballast categories can be labeled with different colors, such as red for large areas, yellow for mixed areas, and green for finely distributed areas. Labeling considers regional connectivity, and adjacent similar areas are grouped into the same category. Image overlay technology fuses the labeled results with the original image. A semi-transparent overlay can be used to ensure that the labeled color does not obscure the details of the original image. Adjusting the transparency balances the display quality. A setting of 0.4 clearly displays the classification labels without excessively obscuring the original image details. The overlay results intuitively demonstrate the distribution patterns of rock ballast and serve as labels to facilitate subsequent analysis and decision-making.
[0050] S105. Construct a convolutional neural network model based on the feature vector, train the model to identify rock chips of different particle sizes, and obtain a trained model.
[0051] Based on the feature vector, a convolutional neural network model is used to construct the network and determine the network structure and parameters. Feature extraction is performed on the feature vector and the original image through convolution processing to obtain the output of the convolution layer. Based on the output of the convolution layer, a fully connected layer is used to train the network model to determine the model weights and biases. If the loss function does not reach the preset threshold during model training, the learning rate is adjusted and training is repeated. Based on the trained model, a test set is used to perform model recognition and determine the model's accuracy. Based on the model recognition results, a confusion matrix is used to evaluate the performance and determine the model's classification performance. Based on the classification performance, a model optimization algorithm is used to optimize the convolutional neural network model to obtain the optimized model.
[0052] For example, building a convolutional neural network model requires determining the network structure and parameters. A classic network architecture can be chosen, such as a network structure consisting of three convolutional layers and two fully connected layers. Each convolutional layer uses a different convolution kernel size, such as a three-by-three kernel in the first layer, a five-by-five kernel in the second layer, and a seven-by-seven kernel in the third layer. This allows for the extraction of higher-level features layer by layer. Regarding parameter settings, the initial learning rate can be set to 0.01, and the batch size to 32. During feature extraction, convolution produces feature maps. For example, after the first convolution layer, the input rock slag feature vector generates 16 feature maps, each representing texture information from a different angle. The second convolution layer generates 32 feature maps, extracting more complex shape features. The third convolution layer generates 64 feature maps, capturing higher-level structural features. During model training, fully connected layers convert feature maps into classification results. The output dimension of the first fully connected layer is 128, while the dimension of the second fully connected layer (the output layer) is the number of rock slag categories. During training, if the loss function value exceeds 0.1, the learning rate needs to be adjusted. A learning rate decay strategy can be used, reducing the learning rate to 0.1 times the original value every 50 training cycles. Model recognition performance is evaluated using a confusion matrix. Assuming there are four types of rock slag, the confusion matrix is a four-by-four matrix. Model performance is evaluated by calculating metrics such as accuracy, recall, and precision. For example, in one evaluation, the model achieved 95% accuracy for the first type of rock slag, but only 85% accuracy for the second type, indicating that the model's feature extraction for the second type of rock slag was insufficient. For unsatisfactory recognition results, model optimization can be used to improve performance. Optimization methods include adding data augmentation, regularization layers, and adjusting the network structure. Data augmentation can expand the training sample through random rotation, scaling, and cropping. Adding a batch normalization layer can accelerate training convergence and improve model stability. In the case of underfitting, the number of network layers or the number of neurons in each layer can be appropriately increased. In the case of overfitting, a random dropout layer can be added with a dropout rate of 0.5. These optimizations improve the model's overall recognition accuracy. The optimized model's average accuracy on the test set increased from 88% to 93%, and the variance in recognition accuracy across various types of rock debris decreased, demonstrating improved generalization. This improvement enables the model to more reliably perform rock debris classification tasks in practical applications.
[0053] S106: Input a new rock chip image into the trained model, perform particle size classification, and obtain a classification result.
[0054] A trained convolutional neural network model is used as input for a new rock slag image. Image features are extracted using preprocessing methods to obtain a feature vector. Feature extraction is performed using a convolutional layer on the feature vector and the new image, and classification calculations are performed using a fully connected layer to obtain the particle size classification results. If the confidence level of the classification result falls below a preset threshold, image features are re-extracted and a secondary classification calculation is performed. Based on the secondary classification results, a confusion matrix is used to evaluate model performance. Based on the performance evaluation results, a gradient descent algorithm is used to adjust model parameters and optimize the classification effect. The optimized model is then re-input into the rock slag image to obtain the final particle size classification results. Based on the classification results, a clustering algorithm is used to group rock slag images of similar particle sizes to determine the classification category.
[0055] For example, when a convolutional neural network model processes rock slag image classification, it first extracts features from the new rock slag image. For example, in an image containing rock slag of varying particle sizes, the convolutional layer identifies features such as the rock slag's edges, texture, and shape based on the feature vectors and the original image. For example, for rock slag with a particle size of 30 to 50 millimeters, the feature vector will exhibit relatively regular edge features and a uniform texture distribution. During classification, the fully connected layer maps the extracted feature vectors to different particle size categories. Assuming five particle size classes, with an 85% confidence threshold for each class, if the classification result for a rock slag image falls below this threshold, the system will re-perform feature extraction. For example, for a rock slag with a complex surface, the initial classification might yield a confidence level of only 70%. In this case, the feature extraction parameters need to be adjusted and the classification process repeated. The confusion matrix evaluates model performance, focusing on metrics such as precision and recall. For example, for the classification of large, medium, and small particle sizes, the confusion matrix visually displays the number of correct and incorrect predictions in the classification results. For example, in a sample of 100 test images, the accuracy of identifying large-sized rock slag reaches 92%, while the accuracy of identifying small-sized rock slag may drop to 85% due to less distinct features. When optimizing model parameters using the gradient descent algorithm, the focus is on adjusting the convolution kernel size and neuron weights. If the model's recognition of fine particles is poor, the convolution kernel size can be reduced to improve the refinement of feature extraction. If overfitting occurs, the regularization parameter should be increased to prevent the model from overfitting the training data. The final classification results are clustered using a similarity-based grouping method. For example, rock slag with a particle size between 40 and 60 mm is clustered into one category, and the degree of similarity is measured by calculating the Euclidean distance between the rock slag feature vectors. If the distance between the feature vectors of two rock slag samples is less than a preset threshold, they are classified into the same category. This clustering method effectively handles continuously varying particle sizes, improving classification adaptability. In practical applications, the model's recognition accuracy can be affected by image acquisition conditions. For example, uneven lighting conditions can cause rock slag of the same particle size to exhibit different features. By adding data enhancement methods, such as rotation, scaling and other preprocessing methods, the model's adaptability to various practical scenarios can be improved.
[0056] S107. Based on the classification results, calculate the particle size distribution of the rock slag and generate a particle size distribution map.
[0057] Based on the particle size classification results, the number of rock slag images for each category is extracted, and the distribution data points of the particle size values are counted. A particle size distribution graph is generated based on the statistical values, and the distribution shape is analyzed to form a statistical table to determine whether the data points are complete. If data points are missing, an interpolation algorithm is used to supplement the missing values and regenerate the statistical table. A particle size distribution graph is plotted from the statistical table, and the distribution characteristic values are obtained and analyzed for distribution patterns. The distribution characteristic values are compared with the preset model parameters to determine the rationality of the model parameters. If the model parameters are unreasonable, a gradient descent algorithm is used to adjust the model parameters and optimize the distribution characteristic values. Based on the optimized distribution characteristic values, the particle size distribution graph is regenerated to determine the final distribution results.
[0058] For example, statistical analysis of particle size distribution is an important tool for studying the morphological characteristics of rock slag. Taking rock slag particle size classification as an example, assuming that after rock slag is classified, the distribution of the number of images in each particle size category may appear uneven. Statistics show that large-size rock slag accounts for 35%, medium-size rock slag accounts for 45%, and small-size rock slag accounts for 20%. This distribution reflects the overall condition of shield rock slag and is important for assessing the stability of the shield process. When generating a particle size distribution graph, a combination of bar charts and line charts is used to visually display the distribution of the number of particles in each size category. By observing the peaks and valleys of the distribution graph, the concentrated ranges of the rock slag particle size distribution can be identified. For example, in the statistics of a certain section, the particle size values are mainly concentrated between 35 and 50 mm, indicating that the particle size distribution of the rock slag in this section is relatively uniform. Data point integrity verification is key to ensuring analysis accuracy. When data in certain particle size intervals is missing, interpolation algorithms are used to supplement it. For example, if data is missing in the 40-45 mm range, linear interpolation can be performed using data from adjacent ranges to ensure data continuity. The interpolated data must be consistent with actual engineering experience to avoid unreasonable values. Distribution characteristic values include statistical indicators such as average particle size and standard deviation. These indicators can be used to quantitatively describe the particle size distribution characteristics of rock ballast. For example, the average particle size of rock ballast in a certain railway section is 42 mm, with a standard deviation of 5 mm, indicating a relatively concentrated particle size distribution in this section. Comparing these characteristic values with the preset model parameters can assess model accuracy. If deviations in model parameters are detected, parameter optimization is necessary. For example, if the preset model's recognition accuracy for large-sized rock ballast is low, parameters such as the convolution kernel size and weights can be adjusted to improve recognition accuracy. The optimized model should more accurately reflect the actual particle size distribution characteristics of rock ballast. The final particle size distribution results must meet the actual engineering requirements. Railway subgrades require a uniform particle size distribution of rock ballast, with an appropriate ratio of large, medium, and small particles, to ensure the subgrade's load-bearing capacity and drainage performance. Analyzing the optimized distribution results can assess the quality of the rock ballast in the current section, providing a basis for subsequent maintenance. In practice, the accuracy of particle size statistics directly impacts the reliability of subsequent analysis. By appropriately setting statistical intervals, such as using every five millimeters as a statistical unit, we can obtain distribution data that is neither overly coarse nor overly complex. This statistical approach balances the requirements for analytical accuracy and computational efficiency.
[0059] S108. On the particle size distribution graph, a kernel density estimation method is used to smooth the particle size distribution to obtain final particle size distribution information.
[0060] Obtain the original data points in the particle size distribution graph and calculate the bandwidth parameters required for kernel density estimation based on the distribution characteristics of the data points. Perform weighted calculations on the data points according to the bandwidth parameters and kernel function to generate a continuous probability density function curve. Use a Gaussian kernel function to smooth the probability density function to eliminate noise points in the distribution graph. If there are local anomalies in the smoothed probability density function, adjust the bandwidth parameters and recalculate the kernel density estimate. Based on the smoothed probability density function, extract the peak position and distribution width characteristic values of the particle size distribution. Compare the extracted characteristic values with the preset distribution model to determine whether the model matches. If the model does not match, use the gradient descent algorithm to optimize the kernel density estimation parameters and regenerate the final particle size distribution information.
[0061] For example, when obtaining raw data points from a particle size distribution graph, the data points must first be preprocessed. For example, in rock slag image analysis, particle detection yields a set of particle size data, including the number of rock slag particles in multiple size ranges. This raw data may be discrete and discontinuous, requiring smoothing using kernel density estimation. When calculating the bandwidth parameter for kernel density estimation, empirical formulas or cross-validation methods can be used. For example, for a set of rock slag particle size data containing particles ranging in size from small to large, an appropriate bandwidth can be determined based on the data's standard deviation and sample size. A larger bandwidth results in a smoother curve but may lose detailed features, while a smaller bandwidth preserves more detail but may introduce noise. The Gaussian kernel function is a common choice for kernel functions. By representing each data point as a Gaussian distribution centered at that point and then superimposing the distributions of all points, a continuous probability density function can be obtained. For example, in a rock slag particle size distribution, if the number of particles in a particular size range is high, a peak will form in the probability density function for that range. When smoothing the probability density function, the characteristics of the data must be considered. If you notice unusual fluctuations in certain areas, this may be due to uneven sampling or noise. In this case, you can optimize the smoothing effect by adjusting the bandwidth parameters. For example, in the rock ballast particle size distribution, if the data points in a certain size range are too sparse, you can appropriately increase the bandwidth value for that region. When extracting particle size distribution feature values, it is important to pay attention to the peak position and distribution width. The peak position reflects the most predominant particle size, while the distribution width reflects the uniformity of the particle size. For example, in railway ballast, if the peak position deviates from the design requirements or the distribution is too dispersed, the screening process needs to be adjusted. During the model matching process, the extracted feature values can be compared with the preset distribution model. Common distribution models include normal distribution and lognormal distribution. If the actual distribution differs significantly from the model, the kernel density estimation parameters need to be optimized using the gradient descent algorithm. For example, by adjusting the bandwidth values for different regions, the final distribution curve can better meet the actual project requirements. The optimized particle size distribution information can be used to guide production practices. By analyzing the changing trends of the distribution curve, problems in the screening process can be promptly identified and appropriate improvement measures can be implemented. For example, if you find that the proportion of certain particle size ranges is too high, you can adjust the screen specifications or vibration parameters.
[0062] like Figure 2 As shown, the present invention provides a shield rock ballast particle size distribution rapid identification system, which mainly includes:
[0063] A multispectral imaging module is used to obtain rock chip images using multispectral imaging technology to reduce the impact of uneven illumination on image quality and remove background interference using a background difference method to obtain a first image;
[0064] A background difference module is used to segment the first image using an adaptive threshold segmentation algorithm based on the grayscale difference between the rock slag and the background to obtain a second image;
[0065] an adaptive threshold segmentation module, for applying morphological processing technology to the second image to remove noise and interference in the image to obtain a third image;
[0066] A morphological processing module is used to extract the shape, size and color features of the rock slag from the third image, and reduce the dimension of the features using principal component analysis to obtain a feature vector;
[0067] The feature extraction and dimensionality reduction module is used to build a convolutional neural network model based on the feature vector, train the model to identify rock chips of different particle sizes, and obtain a trained model;
[0068] The convolutional neural network module is used to input new rock chip images into the trained model, perform particle size classification, and obtain classification results;
[0069] The particle size classification module is used to calculate the particle size distribution of rock slag based on the classification results and generate a particle size distribution map;
[0070] The particle size distribution processing module is used to smooth the particle size distribution on the particle size distribution graph using the kernel density estimation method to obtain the final particle size distribution information.
[0071] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for quickly identifying the particle size distribution of shield rock ballast, characterized in that: include: Acquiring image data of shield rock ballast, processing the image data, and performing feature extraction on the processed image to obtain a feature vector; The feature vector and the image data are identified by a deep learning model, and the identification results are statistically processed and smoothed to obtain the shield rock slag particle size distribution results.
2. The method according to claim 1, characterized in that The process of preprocessing the image data includes: Background interference removal, grayscale difference segmentation and noise removal are performed on the image data to obtain a preprocessed image, wherein the image is a hyperspectral image.
3. The method according to claim 1, characterized in that The process of background interference removal includes: The image data is spectrally corrected, and characteristic bands are selected for the spectrally corrected image data to construct a background difference model. The difference values between the image pixels and the background are calculated using the background difference model. The difference values are judged, and the image is segmented based on the judgment result to obtain an image with background interference removed.
4. The method according to claim 1, wherein The grayscale difference segmentation of the image with background interference removed is performed using an adaptive threshold segmentation algorithm.
5. The method according to claim 1, wherein The noise removal process includes: The image after grayscale difference segmentation is processed by an edge detection algorithm to obtain contour information. Based on the contour information, a region growing algorithm is used to segment independent targets in the rock chip area, and features of the independent targets are extracted and classified. According to the classification results, a morphological reconstruction technique is used to obtain a processed image.
6. The method according to claim 1, wherein The process of feature extraction on the processed image includes: The characteristic data of rock chippings are obtained from the processed image, and the characteristic data are subjected to dimensionality reduction processing by principal component analysis. A characteristic vector is obtained based on the eigenvalue after dimensionality reduction processing, and the dimension of the characteristic vector is judged. Based on the judgment result, the characteristic vector is further processed by a secondary dimensionality reduction algorithm to obtain a characteristic vector.
7. The method according to claim 1, characterized in that Before identifying the feature vector and the image data through the deep learning model, the following steps are also included: The deep learning model is trained. If the loss function does not reach the preset threshold during model training, the learning rate is adjusted and training is repeated. Based on the trained model, a test set is used to perform model recognition and determine the model's accuracy. Based on the model recognition results, a confusion matrix is used for performance evaluation to determine the model's classification performance. Based on the classification results, a model optimization algorithm is used to optimize the convolutional neural network model to obtain the optimized model.
8. The method according to claim 1, characterized in that The process of collecting statistics on the recognition results includes: Based on the particle size classification results, the number of rock slag images for each category is extracted, and the distribution data points of the particle size values are counted. A particle size distribution graph is generated based on the statistical values, and the distribution shape is analyzed to form a statistical table to determine the completeness of the data points. If data points are missing, an interpolation algorithm is used to supplement the missing values and regenerate the statistical table. A particle size distribution graph is then plotted from the statistical table to obtain the distribution characteristic values. These distribution characteristic values are then compared with the preset model parameters to determine their rationality. If the model parameters are inappropriate, a gradient descent algorithm is used to adjust the model parameters and optimize the distribution characteristic values. The particle size distribution graph is then regenerated based on the optimized distribution characteristic values.
9. The method according to claim 8, characterized in that The process of smoothing the particle size distribution graph includes: Obtain the original data points from the particle size distribution graph and calculate the bandwidth parameters required for kernel density estimation based on the distribution characteristics of the data points. Perform a weighted calculation on the data points based on the bandwidth parameters and the kernel function to generate a continuous probability density function curve. Smooth the probability density function using a Gaussian kernel function to eliminate noise points in the distribution graph. If the smoothed probability density function has local anomalies, adjust the bandwidth parameters and recalculate the kernel density estimate. Based on the smoothed probability density function, extract the peak position and distribution width eigenvalues of the particle size distribution. Compare the extracted eigenvalues with the preset distribution model to determine whether the model matches. If the model does not match, optimize the kernel density estimation parameters using a gradient descent algorithm to regenerate the final particle size distribution information.
10. The method according to claim 1, characterized in that After obtaining the feature vector, it also includes: Based on the processed feature vectors, a clustering algorithm is used to classify the rock slag areas and determine their distribution patterns. Based on the classification results, a regional labeling algorithm is used to mark the rock slag areas and generate a distribution map of the rock slag areas. Based on the distribution map of the rock slag areas, an image overlay technique is used to generate a fourth image, completing the classification and labeling of the rock slag areas.