Ore particle segmentation method, device and equipment and storage medium

Through rotation and neural network detection combined with centroid clustering algorithm, the problems of large annotation amount and low accuracy in ore particle segmentation are solved, and efficient ore particle segmentation is achieved to meet industrial application needs.

CN120495660AInactive Publication Date: 2025-08-15BEIJING MINING & METALLURGICAL TECH GRP CO LTD

Patent Information

Application Number
CN202510569120.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has large amount of labeling and low recognition accuracy in ore particle segmentation, and repeated labeling is required in different scenarios, resulting in the inability to carry out the work quickly and effectively.

Method used

By acquiring multiple original ore images, labeling the rectangular bounding box and rotating it, building a neural network model for object detection, clustering ore particles using the centroid clustering algorithm, calculating the equivalent spherical diameter and weight distribution, and fitting the particle-level distribution curve.

Benefits of technology

It improves the accuracy of ore particle segmentation, reduces the labeling workload, reduces the learning sample error, shortens the implementation time, and has good industrial application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495660A_ABST
    Figure CN120495660A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an ore particle segmentation method and device, equipment and a storage medium. The method comprises the following steps: acquiring a plurality of original ore images, marking a rectangular bounding box for each original ore image, and rotating each original ore image to generate a plurality of enhanced ore images; constructing a neural network model, performing target detection on each enhanced ore image through the neural network model to obtain a rectangular detection frame, and rotating the rectangular detection frame back to the original image coordinate system to obtain a rotating rectangular bounding box; clustering different ore particles in each enhanced ore image by adopting a centroid clustering algorithm, and calculating a contour envelope of each ore particle; basic parameters, equivalent sphere diameters and weight distribution of all ore particles are calculated, a distribution function is adopted for fitting a size fraction distribution curve, and the particle size distribution of the ore is obtained. According to the method and the device, the requirement of ore fragment area measurement errors required by calculation of lumpiness distribution is met in precision, and the workload required in the labeling process is also reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for segmenting ore particles. Background Art

[0002] From mining to the extraction of the target mineral or element, a complex series of enrichment processes are required. Generally speaking, after the ore is stripped from the vein, the ore and gangue must first be separated; then the mineral is crushed through processes such as coarse crushing and medium and fine crushing. For some processes, the crushed ore requires further separation and enrichment to achieve a more economical entry grade, thereby maximizing economic benefits. In each of these steps, the ore must be transferred from one process to the next on a conveyor belt. During this process, the size detection, property judgment, and sorting of the ore are crucial.

[0003] Currently, various image segmentation methods have been piloted in industrial applications both domestically and internationally. The most prominent of these methods is to statistically analyze the particle distribution on the surface of ore to predict the distribution of incoming material during the subsequent crushing process. This allows for adjustments to equipment operating conditions, improves production efficiency, and reduces the occurrence of abnormal operating conditions. However, existing technologies still have certain drawbacks, including large amounts of annotation, low recognition accuracy, and the need for repeated annotation for repeated applications in different scenarios, which hinders efficient and rapid implementation. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to overcome the deficiencies in the prior art and to provide a method, device, equipment and storage medium for ore particle segmentation.

[0005] The present invention provides the following technical solutions:

[0006] In a first aspect, the present invention provides a method for segmenting ore particles, the method comprising:

[0007] Acquire a plurality of original ore images, mark each of the original ore images with a rectangular bounding box, rotate each of the original ore images marked with the rectangular bounding box, and generate a plurality of enhanced ore images based on the rotated ore images and the original ore images;

[0008] Constructing a neural network model, performing target detection on each of the enhanced ore images using the neural network model to obtain a rectangular detection frame of each of the enhanced ore images, and rotating the rectangular detection frame of each of the enhanced ore images back to the original image coordinate system to obtain a rotated rectangular bounding box of each of the enhanced ore images;

[0009] Clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm according to the rotated rectangular bounding box of each of the enhanced ore images, and calculating the contour envelope of each of the ore particles;

[0010] The basic parameters of each of the ore particles are calculated, and the equivalent spherical diameter and weight distribution of each of the ore particles are calculated based on the basic parameters of each of the ore particles. The RR distribution function is used to fit the particle size distribution curve through the equivalent spherical diameter and weight distribution of each of the ore particles to obtain the particle size distribution of the ore.

[0011] In an optional embodiment, rotating each of the original ore images marked with the rectangular bounding box, and generating a plurality of enhanced ore images according to the rotated ore images and the original ore images, includes:

[0012] rotating each of the original ore images marked with the rectangular bounding box by 90° according to a first clock rotation direction or a second clock rotation direction to obtain a plurality of first rotated ore images, wherein if the first clock rotation direction is clockwise, the second clock rotation direction is counterclockwise, or if the first clock rotation direction is counterclockwise, the second clock rotation direction is clockwise;

[0013] dividing each of the original ore images marked with the rectangular bounding box into a preset number of original data sets, rotating each of the original data sets according to a plurality of preset rotation angles, and performing grayscale filling on the rotated images to obtain a plurality of second rotated ore images;

[0014] The original ore images, the first rotated ore images, and the second rotated ore images are determined as a plurality of enhanced ore images.

[0015] In an optional embodiment, the steps of rotating each of the original data sets according to a plurality of preset rotation angles and performing grayscale filling on the rotated images to obtain a plurality of second rotated ore images include:

[0016] Determining an initial rotation center point of each of the original ore images in each of the original data sets, and generating a first rotation transformation matrix according to the initial rotation center point;

[0017] translating the initial rotation center point of each of the original ore images to the origin of the original image coordinate system using the first rotation transformation matrix to obtain a first rotation center point of each of the original ore images;

[0018] The first rotation transformation matrix is used to rotate each original ore image in each original data set along its corresponding first rotation center point by multiple preset rotation angles in the first clock rotation direction to obtain multiple intermediate rotated ore images, and grayscale filling is used to fill the tilted rectangular bounding box in each of the intermediate rotated ore images with a horizontal rectangular bounding box to obtain multiple second rotated ore images.

[0019] In an optional embodiment, rotating the rectangular detection frame of each enhanced ore image back to the original image coordinate system to obtain a rotated rectangular bounding box of each enhanced ore image includes:

[0020] generating a second rotation transformation matrix based on the height and rotation angle of each of the original ore images, and rotating each of the enhanced ore images by a plurality of the preset rotation angles according to the second clock rotation direction using the second rotation transformation matrix, with the upper left corner of the rectangular detection frame of each of the enhanced ore images as the origin, to obtain a plurality of third rotated ore images;

[0021] Each of the third rotated ore images is translated, with the upper left corner of the non-filled area as the origin of the original image coordinate system, and grayscale filling is used to fill the tilted rectangular bounding boxes in each of the translated third rotated ore images with horizontal rectangular bounding boxes to obtain a rotated rectangular bounding box of each of the enhanced ore images.

[0022] In an optional embodiment, the neural network model includes a Backbone network and a Head detection head, the Backbone network includes multiple continuous convolution modules, multiple first efficient feature enhancement modules, multiple convolution block attention modules and multiple first multi-scale pooling modules, and the Head detection head includes multiple convolution block attention modules, a spatial pyramid pooling module, multiple convolution modules, multiple second multi-scale pooling modules, multiple second efficient feature enhancement modules, multiple reparameterizable convolution modules, multiple upsampling modules and multiple splicing modules;

[0023] The continuous convolution module includes two convolution modules, the first efficient feature enhancement module, the second efficient feature enhancement module and the spatial pyramid pooling module each include multiple convolution modules, the first multi-scale pooling module and the second multi-scale pooling module each include multiple convolution modules and a maximum pooling module, the convolution module includes a convolution layer, a batch layer and a Leaky ReLU activation function, and the reparameterizable convolution module includes the convolution layer and the batch layer.

[0024] In an optional embodiment, clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm based on the rotated rectangular bounding box of each of the enhanced ore images, and calculating the contour envelope of each of the ore particles, includes:

[0025] Determining a centroid distance threshold based on the minimum area value in the rotated rectangular bounding box of each enhanced ore image, performing preliminary clustering based on the centroid distance threshold to generate multiple initial clusters, and checking whether each initial cluster contains leaf nodes with the same detection angle. If so, performing K-means re-clustering on the corresponding leaf nodes;

[0026] Calculating the average equivalent diameter of all leaf nodes in each of the initial clusters, setting an inter-cluster distance threshold based on the average equivalent diameter, calculating the Ward distance between any two of the initial clusters, and determining whether the Ward distance between any two of the initial clusters is greater than the inter-cluster distance threshold. If so, stopping clustering of the corresponding two initial clusters to generate multiple clusters;

[0027] An intersection operation is performed on all the rotated rectangular bounding boxes in the same cluster to obtain the contour envelope of the corresponding ore particles.

[0028] In an optional embodiment, the basic parameters include long side length, short side length, area, perimeter and density, and the calculating of the basic parameters of each of the ore particles and the calculating of the equivalent spherical diameter and weight distribution of each of the ore particles based on the basic parameters of each of the ore particles include:

[0029] Calculating the thickness of each of the ore particles based on the length of the long side, the length of the short side, the area, and the perimeter of each of the ore particles; and calculating the mass of each of the ore particles based on the area, density, and thickness of each of the ore particles;

[0030] Calculating the volume of each of the ore particles according to the mass and density of each of the ore particles, and calculating the equivalent spherical diameter of each of the ore particles according to the volume of each of the ore particles;

[0031] The equivalent spherical diameters of all the ore particles are grouped according to particle size, the number of particles in each particle size range is counted, and the mass distribution in each particle size range is calculated.

[0032] In a second aspect, the present invention provides an ore particle segmentation device, comprising:

[0033] a rotation module, configured to acquire a plurality of original ore images, mark each of the original ore images with a rectangular bounding box, rotate each of the original ore images marked with the rectangular bounding box, and generate a plurality of enhanced ore images based on the rotated ore images and the original ore images;

[0034] a detection module, configured to construct a neural network model, perform target detection on each of the enhanced ore images using the neural network model to obtain a rectangular detection frame for each of the enhanced ore images, and rotate the rectangular detection frame of each of the enhanced ore images back to the original image coordinate system to obtain a rotated rectangular bounding box for each of the enhanced ore images;

[0035] a clustering module for clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm according to the rotated rectangular bounding box of each of the enhanced ore images, and calculating a contour envelope of each of the ore particles;

[0036] The calculation module is used to calculate the basic parameters of each of the ore particles, calculate the equivalent spherical diameter and weight distribution of each of the ore particles based on the basic parameters of each of the ore particles, and use the RR distribution function to fit the particle size distribution curve through the equivalent spherical diameter and weight distribution of each of the ore particles to obtain the particle size distribution of the ore.

[0037] In a third aspect, an embodiment of the present disclosure provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the ore particle segmentation method described in the first aspect are implemented.

[0038] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the ore particle segmentation method described in the first aspect are implemented.

[0039] Beneficial effects of this application:

[0040] The ore particle segmentation method provided in an embodiment of the present application obtains multiple original ore images, annotates each original ore image with a rectangular bounding box, rotates each original ore image annotated with the rectangular bounding box, and generates multiple enhanced ore images based on the rotated ore images and the original ore images; constructs a neural network model, performs target detection on each enhanced ore image using the neural network model to obtain a rectangular detection box for each enhanced ore image, and rotates the rectangular detection box of each enhanced ore image back to the original image coordinate system to obtain a rotated rectangular bounding box for each enhanced ore image; clusters different ore particles in each enhanced ore image using a centroid clustering algorithm based on the rotated rectangular bounding box of each enhanced ore image, and calculates the contour envelope of each ore particle; calculates basic parameters of each ore particle, calculates the equivalent spherical diameter and weight distribution of each ore particle based on the basic parameters of each ore particle, and uses the RR distribution function to fit a particle size distribution curve through the equivalent spherical diameter and weight distribution of each ore particle to obtain the particle size distribution of the ore. The contour representation method based on finding the convex hull of a rotated rectangular box proposed in this application not only meets the accuracy requirements of the ore fragment area measurement error required for calculating the block size distribution, but also greatly reduces the workload required for the labeling process. Especially in the migration process under repeated application scenarios, the low labeling workload can, on the one hand, reduce the learning sample error introduced by the difference in labeling quality of different annotators; on the other hand, it can effectively reduce the difficulty of project implementation and shorten the implementation time, and has good industrial application value.

[0041] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be considered as limiting the scope. A person of ordinary skill in the art can also derive other relevant drawings based on these drawings without inventive effort. Similar components are numbered similarly in the various drawings.

[0043] Figure 1 A flow chart of a method for segmenting ore particles provided in an embodiment of the present application is shown;

[0044] Figure 2 A schematic diagram of an original ore image provided in an embodiment of the present application is shown;

[0045] Figure 3A schematic diagram of translating an original ore image provided by an embodiment of the present application is shown;

[0046] Figure 4 A schematic diagram of a first rotated ore image provided in an embodiment of the present application is shown;

[0047] Figure 5 A schematic diagram of grayscale filling of a first rotated mineral image provided by an embodiment of the present application is shown;

[0048] Figure 6 A schematic diagram of the structure of a neural network model provided in an embodiment of the present application is shown;

[0049] Figure 7 A schematic diagram of the structure of a convolutional block attention module provided in an embodiment of the present application is shown;

[0050] Figure 8 A schematic diagram of an ore image after a third rotation at an original angle provided by an embodiment of the present application is shown;

[0051] Figure 9 A schematic diagram of a mineral image after a third rotation after grayscale filling and translation provided by an embodiment of the present application is shown;

[0052] Figure 10 A schematic structural diagram of an ore particle segmentation device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0053] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0054] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used in the template description herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0056] Example 1

[0057] like Figure 1 FIG. 1 is a flow chart of a method for segmenting ore particles in an embodiment of the present application. The method for segmenting ore particles provided in an embodiment of the present application includes the following steps:

[0058] Step S110 , obtaining a plurality of original ore images, marking each of the original ore images with a rectangular bounding box, rotating each of the original ore images marked with the rectangular bounding box, and generating a plurality of enhanced ore images based on the rotated ore images and the original ore images.

[0059] Understandably, multiple original ore images are first obtained. In this embodiment, the criteria for image selection are as follows: first, each image must contain at least one piece of ore of relatively large volume, which will obviously not be ignored by the annotator; second, the ore in the image must show sufficient diversity, obviously including mineral samples of different lithologies, and its shapes include round, triangular, flaky and long strips, etc.

[0060] The original ore images are divided into a training set and a validation set according to a preset ratio (e.g., 9:1), and a rectangular bounding box is annotated on each original ore image to obtain a plurality of original ore images annotated with rectangular bounding boxes. Then, the original ore images annotated with rectangular bounding boxes are rotated 90° according to the first clock rotation direction or the second clock rotation direction, and the corresponding annotated rectangular bounding boxes are also rotated, thereby obtaining a plurality of first rotated ore images. Wherein, if the first clock rotation direction is clockwise, the second clock rotation direction is counterclockwise, and vice versa, if the first clock rotation direction is counterclockwise, the second clock rotation direction is clockwise.

[0061] Furthermore, the original ore image marked with a rectangular bounding box is divided into a preset number (e.g., five) of original data sets, and each original data set is rotated according to multiple preset rotation angles (e.g., 15°, 30°, 45°, 60°, and 75°). Grayscale filling is performed on each rotated image, and the rotated image is also re-marked with a rectangular bounding box, thereby obtaining multiple second-rotated ore images. The specific process is as follows:

[0062] (1) First, determine the initial rotation center point RC(rx,ry) of each original ore image in each original data set, and generate the first rotation transformation matrix M based on the initial rotation center point. The magnification coefficient of the image transformation is 1, so the first rotation transformation matrix M can be expressed as:

[0063]

[0064] Where θ is the rotation angle.

[0065] (2) Then, each original ore image in each original data set is homogeneously transformed using the first rotation transformation matrix:

[0066]

[0067] Where x and y are the original coordinates of the image, and x' and y' are the coordinates after homogeneous transformation. M converts the two-dimensional vector into a three-dimensional vector and transforms the image by translating, rotating or scaling to the appropriate angle and position. The initial rotation center point of each original ore image is as follows Figure 2 As shown, the initial rotation center point of each original ore image is translated to the origin of the original image coordinate system, as shown in Figure 3 As shown, the first rotation center point RC of each original ore image is obtained. ′ (0,0).

[0068] (3) Each original ore image in each original data set is rotated along its corresponding first rotation center point by a plurality of preset rotation angles θ (e.g., 15°, 30°, 45°, 60°, and 75°) in a first clock rotation direction (e.g., counterclockwise) using a first rotation transformation matrix, as shown in FIG. Figure 4 As shown in FIG, multiple intermediate rotated ore images are obtained. After rotation, grayscale filling is used to fill the tilted rectangular bounding box in each intermediate rotated ore image into a horizontal rectangular bounding box, as shown in FIG. Figure 5 As shown, multiple second-rotated ore images are obtained, and the width and height of the second-rotated ore images are as follows:

[0069]

[0070] Where nw is the width of the ore image after the second rotation, nh is the height of the ore image after the second rotation, w is the width of the original ore image, and h is the height of the original ore image.

[0071] Finally, each original ore image, each ore image after the first rotation, and each ore image after the second rotation are determined as a plurality of enhanced ore images, which serve as inputs of a subsequent neural network model.

[0072] The above steps augment data by rotating the image, enabling the model to learn the characteristics of the ore at different angles and improving its robustness to changes in the ore's shape and posture. Using image rotation and bounding box adjustments reduces the workload of annotating new samples.

[0073] Step S120: construct a neural network model, perform target detection on each of the enhanced ore images through the neural network model, obtain a rectangular detection frame of each of the enhanced ore images, and rotate the rectangular detection frame of each of the enhanced ore images back to the original image coordinate system to obtain a rotated rectangular bounding box of each of the enhanced ore images.

[0074] In this embodiment, the construction Figure 6 The neural network model shown in FIG, the size of the input enhanced ore image of the neural network model is 640×640×3, representing a 640×640 RGB image, and the model structure includes a Backbone backbone network and a Head detection head.

[0075] The Backbone network includes multiple continuous convolution modules 2CBS (Convolutional Block), multiple first efficient feature enhancement modules ELAN (Efficient Layer Aggregation Network), multiple convolutional block attention modules CBAM (Convolutional Block Attention Module) and multiple first multi-scale pooling modules MP1 (Multi-scale Pooling). The modules in the Backbone network are mainly connected in series and parallel.

[0076] Among them, the continuous convolution module (2CBS) is composed of a convolution module CBS with a convolution kernel size of 3×3 and a stride of 1 and a convolution module CBS with a convolution kernel size of 3×3 and a stride of 2 in series. Each convolution module contains a convolution layer (Conv), a batch normalization layer (BN) and a Leaky ReLU activation function; the first efficient feature enhancement module ELAN is composed of multiple convolution modules CBS, which further perform feature extraction and fusion, and are connected in parallel and in series to enhance the diversity and robustness of features; the first multi-scale pooling module MP1 includes multiple convolution modules CBS and a maximum pooling module Maxpool, which is used for feature fusion and enhancement, and integrates feature maps of multiple different levels; the convolution block attention module CBAM includes a channel attention module (weighting the channel dimension of the feature map to emphasize important channels) and a spatial attention module (weighting the spatial dimension of the feature map to emphasize important areas). The structure diagram is as follows: Figure 7 shown.

[0077] Figure 7In [1], the dimension of the input feature map F is C×H×W, where C is the number of channels, and H and W are the height and width of the feature map. The channel attention module includes: ①GAP+GMP: Global Average Pooling (GAP) and Global Max Pooling (GMP) are performed on the input feature map to obtain two C×1×1 feature vectors; ②Conv+ReLU: The pooled features are passed through a 1×1 convolution layer and a ReLU activation function, and the output dimension is C / r×1×1; ③1×1Conv: Pass it through a 1×1 convolution layer again, and the output dimension is C×1×1; ④Sigmoid: Apply the Sigmoid activation function to the output to obtain the channel attention weight M c (F), the corresponding formula is:

[0078]

[0079] Where, F ′ is the feature map after applying channel attention, M c (F) is the channel attention weight, which is obtained by processing the results of GAP and GMP through MLP (multi-layer perceptron).

[0080] Furthermore, the spatial attention module includes: ①Channel Pool: channel pooling the input feature map, compressing the channel dimension to 1, and obtaining a 1×H×W feature map; ②7×7Conv: through a 7×7 convolution layer, the output dimension is 1×H×W; ③BN+Sigmoid: applying batch normalization and Sigmoid activation function to obtain the spatial attention weight M s (F), the corresponding formula is:

[0081]

[0082] Where, F ′′ is the feature map after applying spatial attention, M s (F) is the spatial attention weight, which is obtained by processing the channel pooling result through 7×7 convolution. The final output feature map F ′′ It is the result of channel and spatial attention enhancement of the input feature map.

[0083] The head detection head includes multiple convolution block attention modules CBAM, a spatial pyramid pooling module SPPCSPC (Spatial Pyramid Pooling-Cross Stage Partial Connection), multiple convolution modules CBS with a convolution kernel size of 1×1 and a step size of 1, multiple second multi-scale pooling modules MP2, multiple second efficient feature enhancement modules ELAN-H, multiple re-parameterized convolution modules RepConv, multiple upsampling modules UpSample and multiple splicing modules Concat. The modules of the head detection head are mainly connected in series and parallel.

[0084] Among them, the spatial pyramid pooling module SPPCSPC includes multiple convolution modules CBS with a convolution kernel size of 1×1 and a stride of 1, and a convolution module CBS with a convolution kernel size of 3×3 and a stride of 1, which are used for spatial pyramid pooling to extract multi-scale features. Through pooling operations at different scales, the model's robustness to target scale changes is enhanced; the second efficient feature enhancement module ELAN-H also includes multiple convolution modules CBS with a convolution kernel size of 1×1 and a stride of 1, and a convolution module CBS with a convolution kernel size of 3×3 and a stride of 1, which are used for further feature extraction and fusion. They are connected in parallel and series to improve the diversity and accuracy of features. The reparameterizable convolution module RepConv has different configurations in the training and deployment stages, both of which include convolutional layers and batch reduction layers to enhance feature representation; the upsampling module UpSample is used to perform upsampling operations to increase the resolution of feature maps and perform upsampling at multiple scales to facilitate fusion with feature maps at different levels; the splicing module Concat is used to splice feature maps, integrating feature maps at multiple different levels into one. Through the splicing operation, the feature information at different levels is fused to improve the expressiveness of the model.

[0085] Understandably, during the model design process, since this application focuses on single-class target detection, the initial weights of transfer learning commonly used in other target recognition methods were not adopted. These methods usually involve freezing the training of the backbone network in the initial stage of model learning. In contrast, this application directly initialized and trained the entire network. In the multi-scale feature output of the Head detection head (20×20×18, 40×40×18, 80×80×18), the final number of channels directly corresponds to the number of detected classes. Each rectangular detection box in each feature layer has three sets of parameters. The first four parameters of each group are used to determine the regression parameters of each rectangular detection box, such as coordinates and size, and the fifth parameter indicates whether the rectangular detection box contains the target object. Since this study focuses on a single category, only the sixth parameter (representing the "ore" category) is used to classify the recognition results. Therefore, the final dimension of each feature layer is 3×(4+1+1)=18.

[0086] Experiments have shown that the proposed neural network model performs optimally across evaluation metrics for ore particle image processing. The particle size distribution and screening results, analyzed and compared on two data sets, demonstrate an error rate that meets the requirements for continuous measurement in industrial applications. The model introduced by this method requires minimal new sample annotation for repeated application, making it effectively applicable to ore size imaging systems.

[0087] Furthermore, after target detection is performed on the enhanced ore image, the target detection result, i.e., the rectangular detection frame of the enhanced ore image, needs to be rotated back to the original image coordinate system for subsequent ore particle contour envelope calculation. The specific process is as follows:

[0088] (1) Generate the second rotation transformation matrix M according to the height and rotation angle of each original ore image ′ :

[0089]

[0090] Where m 13 = -hsinθcosθ, h is the height of the original ore image. The second rotation transformation matrix converted in this form is only related to the height of the original ore image.

[0091] With the origin of the coordinate axis (i.e. the upper left corner of the enhanced ore image) as the rotation center, the second rotation transformation matrix M ′ The enhanced ore image marked with a rectangular detection frame is rotated by multiple preset rotation angles θ (such as 15°, 30°, 45°, 60° and 75°) in the second clock rotation direction (such as clockwise) to obtain multiple third rotated ore images at the original angle, such as Figure 8 shown.

[0092] (2) Each third rotated ore image is translated, and the upper left corner of the non-filled area is used as the origin of the original image coordinate system. Grayscale filling is used to fill the tilted rectangular bounding box in each translated third rotated ore image with a horizontal rectangular bounding box to obtain the rotated rectangular bounding box of each enhanced ore image, as shown in FIG. Figure 9 As shown in the figure, when the image is rotated back to the original position of the ore image, the gray edge of the image will be cut off. Obviously, the image with the gray edge cut off is the same size as the original ore image. The width and height of the newly transformed image are:

[0093]

[0094] Where re_w is the width of the rotated rectangular bounding box of each enhanced ore image, and re_h is the height of the rotated rectangular bounding box of each enhanced ore image.

[0095] The neural network model constructed in the above steps can accurately detect ore particles and output a rectangular detection frame, providing a basis for subsequent processing. By outputting multi-scale features, it captures the characteristics of the ore at different scales, improving detection accuracy.

[0096] Step S130 , clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm according to the rotated rectangular bounding box of each of the enhanced ore images, and calculating the contour envelope of each of the ore particles.

[0097] Understandably, in this embodiment, four basic criteria are established as clustering rules: (1) Due to non-maximum suppression in model detection, a cluster cannot contain two leaf nodes with the same angle; (2) The areas of the circumscribed rectangular boxes of the same ore particle at different angles are close. For example, according to the statistically significant minimum value of the ratio, it is 0.741. In other words, the square root of the area ratio of any two child nodes in the cluster is between 0.74 and 1.35. Of course, considering the detection accuracy and statistical representativeness, the above constraints can be appropriately relaxed for greater generalization. , but it is still an important constraint; (3) The minimum number of clusters in the clustering result is the maximum number of centroids in the image detected at any rotation angle, because after non-maximum suppression, the detection rectangle result after any rotation should be an ore, so if the intersection area of the sub-node rectangle is zero after clustering and the ore is eliminated, it is obviously unreasonable, so the number detection is a basic verification item; (4) Except for some rare crescent-shaped ores, most of the rotated centroids are located inside the ore, and the distance between these points is less than the radius of the circle equivalent to their intersection area.

[0098] Specifically, we first determine the centroid distance threshold based on the minimum area within the rotated rectangular bounding box of each enhanced mineral image. We then perform preliminary clustering based on this centroid distance threshold to generate multiple initial clusters. This simple clustering method focuses solely on the geometric location of cluster points within the image, ignoring any bounding box features. We then check whether the clusters contain leaf nodes with the same detection angle. If so, we re-cluster the corresponding leaf nodes within the cluster using a K-means algorithm with equivalent radius values.

[0099] Calculate the average equivalent diameter of all leaf nodes in each initial cluster, set the inter-cluster distance threshold based on the average equivalent diameter, calculate the Ward distance between any two initial clusters, cluster from bottom to top based on the Ward distance, and determine whether the nodes can be clustered. Determine whether the Ward distance between any two initial clusters is greater than the inter-cluster distance threshold. If so, stop clustering the corresponding two initial clusters, or if the number of clusters of any child node in a node is greater than or equal to 2, stop clustering the cluster and its parent node. The final clustering termination condition is one of the above two cases. Preferably, in order to prevent excessive clustering, if the distance between the centroids is greater than the radius of the equivalent circle of their intersection area, clustering should also be stopped, that is, constraint condition (4), and finally generate multiple clusters.

[0100] It can be understood that after clustering is completed, each cluster represents the outline of an ore particle, and the outline envelope of the corresponding ore particle is obtained by performing an intersection operation on all rotated rectangular bounding boxes in the same cluster.

[0101] The above bottom-up distance clustering method can effectively solve the problems of large number of rectangular parameters after ore prediction and high amount of image intersection calculation during the rotation process. By using clustering rules (such as area ratio, centroid distance, etc.), false detection and over-clustering can be reduced.

[0102] The above steps construct a new fast rectangle center clustering method for the algorithm of solving the intersection of multiple rotated rectangles, which greatly reduces the processing speed of the algorithm implementation.

[0103] Step S140, calculating the basic parameters of each of the ore particles, calculating the equivalent spherical diameter and weight distribution of each of the ore particles based on the basic parameters of each of the ore particles, and using the RR distribution function to fit the particle size distribution curve through the equivalent spherical diameter and weight distribution of each of the ore particles to obtain the particle size distribution of the ore.

[0104] After obtaining the contour envelope results of the ore particles, the basic parameters of the ore particles are calculated, including the long side length L, the short side length B, the area Perimeter P and density ρ, where L = max(a, b), B = min(a, b), a and b represent the two side lengths of the ore particle in the best matching rectangle. These two values are usually geometric parameters extracted from the outline or rectangular bounding box of the ore.

[0105] According to the long side length, short side length, area and perimeter of each ore particle, calculate the thickness of each ore particle:

[0106]

[0107] According to the area, density and thickness of each ore particle, calculate the mass of each ore particle:

[0108]

[0109] Where, d pix Indicates the actual physical distance between two pixels in the ore particle (unit: cm / pixel).

[0110] Based on the mass and density of each ore particle, the volume V of each ore particle is calculated:

[0111]

[0112] According to the calculated volume of each ore particle, substitute into the formula Calculate the equivalent spherical diameter D of each ore particle ES :

[0113]

[0114] The equivalent spherical diameter of all ore particles is grouped by size, and the number of particles within each size range is counted. For each size range, the cumulative mass distribution is calculated. For ore particles in a specific size range (e.g., 40-80 mm), the corresponding obstruction factor can be multiplied to compensate for the effect of obstruction on the measurement results.

[0115] The RR (Rosin-Rammler) distribution function is used to fit the particle size distribution curve. The formula is as follows:

[0116]

[0117] Where Y d represents mass distribution (unit: dimensionless), d represents particle size (unit: cm), a represents average particle size (unit: cm), and b represents distribution index (unit: dimensionless).

[0118] The specific fitting process is: plot the particle size distribution data into a scatter plot, use nonlinear regression methods (such as Python's curve_fit function) to fit the data, obtain parameters a and b, and draw the particle size distribution curve based on the fitting results to obtain the final particle size distribution of the ore. This method can meet the needs of real-time detection and process control.

[0119] The above steps use the RR distribution function to fit the particle size distribution curve to obtain the ore's particle size distribution, meeting the needs of real-time detection and process control. Applying an occlusion factor to particles within a specific size range compensates for the effects of occlusion on the measurement results. This curve regression compensates for the forgotten areas between large and small ore pieces that are not marked by the naked eye, thereby improving measurement accuracy.

[0120] The ore particle segmentation method provided in the embodiment of the present application not only meets the ore fragment area measurement error requirements required for calculating the block size distribution in terms of accuracy, but also greatly reduces the workload required for the labeling process. Especially in the migration process under repeated application scenarios, the low labeling workload can, on the one hand, reduce the learning sample error introduced by the difference in labeling quality of different annotators; on the other hand, it can effectively reduce the difficulty of project implementation and shorten the implementation time, and has good industrial application value.

[0121] Example 2

[0122] like Figure 10 FIG. 1 is a schematic structural diagram of an ore particle segmentation device 100 according to an embodiment of the present application, wherein the device comprises:

[0123] a rotation module 110 for acquiring a plurality of original ore images, marking each of the original ore images with a rectangular bounding box, rotating each of the original ore images marked with the rectangular bounding box, and generating a plurality of enhanced ore images based on the rotated ore images and the original ore images;

[0124] a detection module 120 configured to construct a neural network model, perform target detection on each of the enhanced ore images using the neural network model to obtain a rectangular detection frame for each of the enhanced ore images, and rotate the rectangular detection frame of each of the enhanced ore images back to the original image coordinate system to obtain a rotated rectangular bounding box for each of the enhanced ore images;

[0125] A clustering module 130 is configured to cluster different ore particles in each of the enhanced ore images using a centroid clustering algorithm according to the rotated rectangular bounding box of each of the enhanced ore images, and calculate a contour envelope of each of the ore particles;

[0126] The calculation module 140 is used to calculate the basic parameters of each of the ore particles, calculate the equivalent spherical diameter and weight distribution of each of the ore particles based on the basic parameters of each of the ore particles, and use the RR distribution function to fit the particle size distribution curve through the equivalent spherical diameter and weight distribution of each of the ore particles to obtain the particle size distribution of the ore.

[0127] The ore particle segmentation device provided in the embodiment of the present application can implement each process of the ore particle segmentation method corresponding to Example 1 and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0128] The ore particle segmentation device provided in the embodiment of the present application not only meets the ore fragment area measurement error requirements required for calculating the block size distribution in terms of accuracy, but also greatly reduces the workload required for the labeling process. Especially in the migration process under repeated application scenarios, the low labeling workload can, on the one hand, reduce the learning sample error introduced by the difference in labeling quality of different labelers; on the other hand, it can effectively reduce the difficulty of project implementation and shorten the implementation time, and has good industrial application value.

[0129] A computer device is also provided in an embodiment of the present disclosure. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the ore particle segmentation method described in Example 1 are implemented.

[0130] A computer-readable storage medium is also provided in an embodiment of the present disclosure. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the ore particle segmentation method described in Example 1 are implemented.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0132] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0133] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium can be a non-volatile storage medium or a volatile storage medium. For example, the storage medium can be: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and other media that can store program codes.

[0134] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.

Claims

1. A method for segmenting ore particles, characterized in that: The method comprises: Acquire a plurality of original ore images, mark each of the original ore images with a rectangular bounding box, rotate each of the original ore images marked with the rectangular bounding box, and generate a plurality of enhanced ore images based on the rotated ore images and the original ore images; Constructing a neural network model, performing target detection on each of the enhanced ore images using the neural network model to obtain a rectangular detection frame of each of the enhanced ore images, and rotating the rectangular detection frame of each of the enhanced ore images back to the original image coordinate system to obtain a rotated rectangular bounding box of each of the enhanced ore images; Clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm according to the rotated rectangular bounding box of each of the enhanced ore images, and calculating the contour envelope of each of the ore particles; The basic parameters of each of the ore particles are calculated, and the equivalent spherical diameter and weight distribution of each of the ore particles are calculated based on the basic parameters of each of the ore particles. The RR distribution function is used to fit the particle size distribution curve through the equivalent spherical diameter and weight distribution of each of the ore particles to obtain the particle size distribution of the ore.

2. The method for dividing ore particles according to claim 1, characterized in that: The step of rotating each of the original ore images marked with the rectangular bounding box and generating a plurality of enhanced ore images according to the rotated ore images and the original ore images includes: rotating each of the original ore images marked with the rectangular bounding box by 90° according to a first clock rotation direction or a second clock rotation direction to obtain a plurality of first rotated ore images, wherein if the first clock rotation direction is clockwise, the second clock rotation direction is counterclockwise, or if the first clock rotation direction is counterclockwise, the second clock rotation direction is clockwise; dividing each of the original ore images marked with the rectangular bounding box into a preset number of original data sets, rotating each of the original data sets according to a plurality of preset rotation angles, and performing grayscale filling on the rotated images to obtain a plurality of second rotated ore images; The original ore images, the first rotated ore images, and the second rotated ore images are determined as a plurality of enhanced ore images.

3. The ore particle segmentation method according to claim 2, characterized in that: The method of rotating each of the original data sets according to a plurality of preset rotation angles and performing grayscale filling on the rotated images to obtain a plurality of second rotated ore images comprises: Determining an initial rotation center point of each of the original ore images in each of the original data sets, and generating a first rotation transformation matrix according to the initial rotation center point; translating the initial rotation center point of each of the original ore images to the origin of the original image coordinate system using the first rotation transformation matrix to obtain a first rotation center point of each of the original ore images; The first rotation transformation matrix is used to rotate each original ore image in each original data set along its corresponding first rotation center point by multiple preset rotation angles in the first clock rotation direction to obtain multiple intermediate rotated ore images, and grayscale filling is used to fill the tilted rectangular bounding box in each of the intermediate rotated ore images with a horizontal rectangular bounding box to obtain multiple second rotated ore images.

4. The method for dividing ore particles according to claim 3, characterized in that: The step of rotating the rectangular detection frame of each enhanced ore image back to the original image coordinate system to obtain a rotated rectangular bounding box of each enhanced ore image comprises: generating a second rotation transformation matrix based on the height and rotation angle of each of the original ore images, and rotating each of the enhanced ore images by a plurality of the preset rotation angles according to the second clock rotation direction using the second rotation transformation matrix, with the upper left corner of the rectangular detection frame of each of the enhanced ore images as the origin, to obtain a plurality of third rotated ore images; Each of the third rotated ore images is translated, with the upper left corner of the non-filled area as the origin of the original image coordinate system, and grayscale filling is used to fill the tilted rectangular bounding boxes in each of the translated third rotated ore images with horizontal rectangular bounding boxes to obtain a rotated rectangular bounding box of each of the enhanced ore images.

5. The method for dividing ore particles according to claim 1, characterized in that: The neural network model includes a backbone network and a head detection head, wherein the backbone network includes multiple continuous convolution modules, multiple first efficient feature enhancement modules, multiple convolution block attention modules and multiple first multi-scale pooling modules, and the head detection head includes multiple convolution block attention modules, a spatial pyramid pooling module, multiple convolution modules, multiple second multi-scale pooling modules, multiple second efficient feature enhancement modules, multiple reparameterizable convolution modules, multiple upsampling modules and multiple splicing modules; The continuous convolution module includes two convolution modules, the first efficient feature enhancement module, the second efficient feature enhancement module and the spatial pyramid pooling module each include multiple convolution modules, the first multi-scale pooling module and the second multi-scale pooling module each include multiple convolution modules and a maximum pooling module, the convolution module includes a convolution layer, a batch layer and a Leaky ReLU activation function, and the reparameterizable convolution module includes the convolution layer and the batch layer.

6. The method for dividing ore particles according to claim 1, characterized in that: The method of clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm based on the rotated rectangular bounding box of each of the enhanced ore images and calculating the contour envelope of each of the ore particles includes: Determining a centroid distance threshold based on the minimum area value in the rotated rectangular bounding box of each enhanced ore image, performing preliminary clustering based on the centroid distance threshold to generate multiple initial clusters, and checking whether each initial cluster contains leaf nodes with the same detection angle. If so, performing K-means re-clustering on the corresponding leaf nodes; Calculating the average equivalent diameter of all leaf nodes in each of the initial clusters, setting an inter-cluster distance threshold based on the average equivalent diameter, calculating the Ward distance between any two of the initial clusters, and determining whether the Ward distance between any two of the initial clusters is greater than the inter-cluster distance threshold. If so, stopping clustering of the corresponding two initial clusters to generate multiple clusters; An intersection operation is performed on all the rotated rectangular bounding boxes in the same cluster to obtain the contour envelope of the corresponding ore particles.

7. The method for dividing ore particles according to claim 1, characterized in that: The basic parameters include the length of the long side, the length of the short side, the area, the perimeter and the density. The calculating of the basic parameters of each of the ore particles and the calculating of the equivalent spherical diameter and weight distribution of each of the ore particles based on the basic parameters of each of the ore particles include: Calculating the thickness of each of the ore particles based on the length of the long side, the length of the short side, the area, and the perimeter of each of the ore particles; and calculating the mass of each of the ore particles based on the area, density, and thickness of each of the ore particles; Calculating the volume of each of the ore particles according to the mass and density of each of the ore particles, and calculating the equivalent spherical diameter of each of the ore particles according to the volume of each of the ore particles; The equivalent spherical diameters of all the ore particles are grouped according to particle size, the number of particles in each particle size range is counted, and the mass distribution in each particle size range is calculated.

8. An ore particle splitting device, characterized in that: The device comprises: a rotation module, configured to acquire a plurality of original ore images, mark each of the original ore images with a rectangular bounding box, rotate each of the original ore images marked with the rectangular bounding box, and generate a plurality of enhanced ore images based on the rotated ore images and the original ore images; a detection module, configured to construct a neural network model, perform target detection on each of the enhanced ore images using the neural network model to obtain a rectangular detection frame for each of the enhanced ore images, and rotate the rectangular detection frame of each of the enhanced ore images back to the original image coordinate system to obtain a rotated rectangular bounding box for each of the enhanced ore images; a clustering module for clustering different ore particles in each of the enhanced ore images using a centroid clustering algorithm according to the rotated rectangular bounding box of each of the enhanced ore images, and calculating a contour envelope of each of the ore particles; The calculation module is used to calculate the basic parameters of each of the ore particles, calculate the equivalent spherical diameter and weight distribution of each of the ore particles based on the basic parameters of each of the ore particles, and use the RR distribution function to fit the particle size distribution curve through the equivalent spherical diameter and weight distribution of each of the ore particles to obtain the particle size distribution of the ore.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the ore particle segmentation method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the ore particle segmentation method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Target detection model training method and device, storage medium and computer equipment

    CN111241947A

Cited By

  • Feature extraction method, device and equipment for segment to be spliced, medium and product

    CN122049406A

  • A pipe splicing feature extraction method, device, equipment, medium and product

    CN122049406B