A pseudo dual-energy X-ray ore image recognition method based on a probability prediction model
By mapping the ore image to the equivalent R-value space and using a multi-layer perceptron model, the problem of difficulty in identifying the continuous ore in the prior art is solved, and efficient identification of ore and dynamic adjustment of waste rate is achieved.
Patent Information
- Application Number
- CN202310468096.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-04-26
AI Technical Summary
The prior art is difficult to effectively identify contiguous ores between concentrate and tailings, and cannot meet the actual demand for dynamically adjusting the waste throwing rate on site.
By mapping the ore image to the equivalent R value space, the distance between the equivalent R value of each ore and a set threshold is calculated, tag information is assigned, and offline training and deployment is used by multi-layer perceptron model to extract feature feature values to achieve probability prediction of ore.
The identification of concentrate, tailings and continuous ore is achieved, and the waste throwing rate can be dynamically adjusted to meet the sorting requirements of industrial sites.
Smart Images

Figure CN116486264B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of ore sorting and computer vision, and more particularly, to a method for identifying pseudo-dual energy X-ray ore images based on a probability prediction model. Background Art
[0002] In recent years, with the increasing mining dilution rate and raw material cost, the ore pre-rejection process has been gradually adopted by various mining enterprises. It is usually located in the process stage after coarse crushing and before ball milling of the ore, and is of great significance for improving the production efficiency of mining enterprises and effectively reducing power consumption.
[0003] Among many ore pre-separation methods, using X-Ray Transmission (XRT) technology to sort and identify ores is a current research hotspot in this field. XRT technology usually needs to combine image information for sorting and identification. It uses a pseudo-dual energy X-ray system composed of a set of independent X-ray sources (generating high-energy and low-energy X-rays through filtered copper sheets) and two groups of detectors with different energy spectra responses to obtain pseudo-dual energy X-ray ore images, and then uses image processing methods to segment and identify the obtained X-ray images.
[0004] Currently, the threshold discrimination method based on the R value is often used in industrial sites to identify ores. Since different ores with different metal contents have different absorption degrees of X-rays when X-rays penetrate the ores, the gray values reflected in the images will be different. Based on this, relevant statistics can be carried out according to the gray information reflected by the X-ray images, the R value can be calculated through the Lambert-Beer law, and corresponding thresholds can be set for ores with different precisions and particle sizes according to experience, so as to realize ore identification through these thresholds.
[0005] However, in the actual ore sorting process, the above method cannot effectively identify the intergrown ores between concentrate (a type of ore with a relatively high content of useful metals inside the ore) and tailings (a type of ore with a very low content of useful metals inside the ore, also called waste rock in the pre-separation process), nor can it meet the requirement of dynamically adjusting the waste rejection rate in the actual field. Summary of the Invention
[0006] According to the above-mentioned technical problems, a method for identifying pseudo-dual energy X-ray ore images based on a probability prediction model is provided. The present invention maps the ore image to the equivalent R value space, and calculates the distance between its equivalent R value and a certain set threshold as the probability of the ore, thereby assigning label information to each ore including the intergrown ore, and thus converting the binary classification problem of either concentrate or tailings into a regression problem of probability prediction.
[0007] The technical means adopted by the present invention are as follows:
[0008] A pseudo dual-energy X-ray ore image recognition method based on a probability prediction model, comprising:
[0009] Obtain classified pseudo dual-energy X-ray mineral area images, including low-energy I l and high energy I h Two parts;
[0010] Based on the acquired pseudo dual-energy X-ray ore regional image, the equivalent R value of each ore is calculated;
[0011] Assign a label probability to each piece of ore, set a double threshold based on the equivalent R value of each piece of ore, and normalize the distance between the equivalent R value of each piece of ore and the threshold of its category;
[0012] Assign a weight to each piece of ore. Different weights are assigned to each piece of ore according to the distance between its equivalent R value and the threshold of its category, to indicate the confidence level of the ore being a concentrate or tailings.
[0013] The corner point features, grayscale minimum value features and particle size features of each ore after sharpening are extracted as the feature values of the ore;
[0014] The features and label probabilities extracted from each piece of ore are input into the constructed multi-layer perceptron model for offline training, and the model threshold and expected scrap rate curve are obtained;
[0015] Convert offline trained models and parameter files, write C++ programs to deploy the models, and use LibTorch to speed up model inference.
[0016] Collect images of the ore to be sorted on site and obtain pseudo dual-energy X-ray images of each ore, including low-energy and high-energy parts;
[0017] Use the deployed model and parameters to extract the characteristics of each ore and obtain the predicted value of each ore.
[0018] Furthermore, the equivalent R value of each piece of ore is calculated based on the acquired pseudo dual-energy X-ray ore region image, and the calculation process is as follows:
[0019]
[0020] in, and Respectively represent the first N low-energy and high-energy gray values of all pixels in the ore area after sorting by gray value; I l0 and I h0 They represent the background values of low-energy and high-energy areas respectively, depending on the obtained ore area background.
[0021] Further, assign a label probability to each ore block, delimit double thresholds based on the equivalent R value of each ore block, and normalize the distance from the equivalent R value of each ore block to the threshold of its belonging category. The calculation process is as follows:
[0022]
[0023] Among them, represents the label probability; R0 and R1 respectively represent the equivalent R values of concentrate and tailings samples; T0 and T1 are the set double thresholds, taking the maximum and minimum values of the equivalent R values of concentrate and tailings as the double thresholds respectively; c0 and c1 are respectively label setting constants, set according to the actual situation.
[0024] Further, assign a weight to each ore block. Assign different weights to each ore block according to the distance from the equivalent R value of each ore block to the threshold of its belonging category to represent the confidence that the ore is concentrate or tailings. The calculation process is as follows:
[0025]
[0026] Among them, w represents the weight, R0 and R1 respectively represent the equivalent R values of concentrate and tailings samples; T0 and T1 are the set double thresholds; c w0 and c w1 are respectively weight setting constants, set according to the actual situation.
[0027] Further, extract the sharpened corner feature, the sharpened minimum gray value feature and the particle size feature of each ore block respectively as the eigenvalue of the ore. The calculation process is as follows:
[0028]
[0029] Among them, V p 、I min 、P respectively represent the sharpened corner feature, the sharpened minimum gray value feature and the particle size feature extracted from each ore block; I′(x,y) and I′(p,q) respectively represent the gray values of the (x,y) and (p,q) points after sharpening the high-energy ray image; I ε ′(p,q) represents the gray values of the pixel points on the circle with (p,q) as the center and radius ε, t is the corner threshold, V represents the score value, when I εIf there are N consecutive gray values of I′(p,q) greater than I′(p,q)+t or less than I′(p,q)-t, then the point (p,q) is considered a feature point, and the differences between these gray values and the gray value of the point (p,q) are summed. Finally, the feature point with a larger score value among the neighboring feature points is taken as the corner point. Among them, the Count function is used for counting, and the number of corner points is used as the corner feature of the ore; A represents the pixel area of the image region of the ore; c0 is the sensor coefficient; Laplacian operator method is used for image sharpening, and the processing process is expressed as:
[0030]
[0031] Among them, represents the Laplacian operator.
[0032] Furthermore, the features and label probabilities extracted from each piece of ore are input into the constructed multi-layer perceptron model for offline training, and the model threshold and expected waste rejection rate curve are obtained. The calculation process is as follows:
[0033]
[0034] Among them, X is the model input vector, which is composed of n ore samples. The features extracted from each piece of ore are combined to form an ore sample feature vector x i ;
[0035] Furthermore, the offline trained model and parameter file are transformed, and a C++ program is written for model deployment. LibTorch is used to accelerate the inference speed of the model. The process is as follows:
[0036] The trained pth model file is transformed into a pt file to facilitate LibTorch to read the model structure and parameter information of the network. By writing a C++ program on the Visual Studio platform, including feature extraction and model inference programs, the transformed model is deployed to the actual industrial environment, and LibTorch is used to achieve accelerated inference of the model.
[0037] Furthermore, the features of each piece of ore are extracted using the deployed model and parameters, and the predicted value of each piece of ore is obtained. The calculation process is as follows:
[0038]
[0039] Among them, y is the final result of ore recognition, 0 represents concentrate, and 1 represents tailings; sigmoid is the activation function, which maps the output value to the interval (0,1); k represents the threshold of the model, k∈[0,1], and this value is determined according to the waste rejection rate requirement of the actual site through the determined model threshold and expected waste rejection rate curve; w and b represent the network weights and biases of the model respectively.
[0040] Compared with the prior art, the present invention has the following advantages:
[0041] 1. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model provided by the present invention proposes an equivalent R-value calculation method. By mapping the ore image to the equivalent R-value space, the distance from the equivalent R-value of each piece of ore to a certain set threshold is calculated as the probability of that piece of ore, thereby assigning label and weight information to each piece of ore including the composite ore.
[0042] 2. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model provided by the present invention can identify ores with different useful metal contents (concentrates, tailings, and composite ores), and can dynamically adjust the waste rejection rate according to the model threshold. Compared with directly using a binary classification model of either concentrate or tailings, the proposed method has a larger optional range of model thresholds, and can achieve a larger range of waste rejection rate adjustment by changing the threshold while maintaining a certain overall recognition accuracy.
[0043] 3. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model provided by the present invention can be effectively deployed in the industrial field and applied to the actual ore pre-separation system, and meets the waste rejection rate and separation grade requirements for actual separation on some difficult ore samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0045] Figure 1 It is the flow chart of the method of the present invention.
[0046] Figure 2 It is a pseudo dual-energy X-ray ore image provided by an embodiment of the present invention
[0047] Figure 3 It is the equivalent R-value of the ore image in the training set provided by an embodiment of the present invention
[0048] Figure 4 It is the label distribution diagram of the ore image in the training set provided by an embodiment of the present invention
[0049] Figure 5 It is the weight distribution diagram of the ore image in the training set provided by an embodiment of the present invention
[0050] Figure 6The visualization result of the features of the ore images in the training set provided by the embodiments of the present invention.
[0051] Figure 7 The curve result of the model threshold and the expected waste rejection rate provided by the embodiments of the present invention.
[0052] Figure 8 The flowchart of model conversion and deployment provided by the embodiments of the present invention.
[0053] Figure 9 The results of the model threshold, the actual waste rejection rate, and the ore grade assay provided by the embodiments of the present invention. Detailed implementation manners
[0054] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the drawings and in combination with the embodiments.
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part rather than all of the embodiments of the present invention. The following description of at least one exemplary embodiment is actually only illustrative and in no way restrictive of the present invention and its application or use. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0056] It should be noted that the terms used herein are only for describing the specific implementation manners and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they specify the presence of the described features, steps, operations, devices, components, and / or their combinations.
[0057] Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be clear that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn in actual proportional relationships. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods, and devices should be regarded as part of the authorization specification. In all the examples shown and discussed here, any specific values should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that like reference numerals and letters denote like items in the following drawings, and thus, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0058] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by orientation words such as "front, rear, upper, lower, left, right", "lateral, vertical, perpendicular, horizontal", and "top, bottom" are generally based on the orientation or positional relationships shown in the drawings. These are only for the convenience of describing the present invention and simplifying the description. Without contrary instructions, these orientation words do not indicate or imply that the devices or elements referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the scope of protection of the present invention: the orientation words "inside, outside" refer to the inside and outside relative to the contour of each component itself.
[0059] For ease of description, spatial relative terms such as "above...", "over...", "on the upper surface of...", "above" can be used here to describe the spatial positional relationships of one device or feature to other devices or features as shown in the drawings. It should be understood that the spatial relative terms are intended to encompass different orientations in use or operation in addition to the orientations described in the drawings for the devices. For example, if the device in the drawing is inverted, the device described as "above other devices or structures" or "over other devices or structures" will then be positioned as "below other devices or structures" or "under other devices or structures". Thus, the exemplary term "above..." can include both the orientations of "above..." and "below...". The device can also be positioned in other different ways (rotated 90 degrees or in other orientations), and corresponding interpretations are made for the spatial relative descriptions used here.
[0060] In addition, it should be noted that the use of words such as "first", "second" to limit components is only for the convenience of differentiating the corresponding components. Without additional statements, the above words have no special meanings and thus should not be construed as limiting the scope of protection of the present invention.
[0061] Embodiment
[0062] The present invention uses experimental data from a certain model of scheelite mined by a Jiangxi mining company. Several pseudo-dual-energy X-ray images were acquired using a certain type of (XRT) intelligent sorting machine. These images consist of low-energy and high-energy X-ray images, with the data dimensions measuring two spatial dimensions: horizontal and vertical, and 16-bit, single-channel grayscale images. To train the proposed probabilistic prediction model, 1,637 ore images, previously manually identified and collected, were used as the training and test sets for the model. Of these, 560 ore images (201 of concentrate and 359 of tailings) served as the training set, and 1,077 ore images (399 of concentrate and 678 of tailings) served as the test set.
[0063] like Figure 1 As shown, the present invention provides a pseudo dual-energy X-ray ore image recognition method based on a probability prediction model, comprising:
[0064] S1. Obtain classified pseudo dual-energy X-ray ore area images as training sets, including low-energy I l and high energy I h Two parts;
[0065] S2. Calculate the equivalent R value of each ore in the training set based on the acquired pseudo dual-energy X-ray ore region image;
[0066] S3. Assign a label probability to each ore in the training set, set a double threshold based on the equivalent R value of each ore, and normalize the distance between the equivalent R value of each ore and the threshold of its category;
[0067] S4. Assign a weight to each piece of ore in the training set. The metal content of each piece of ore is often different, and the equivalent R value of the ore reflects the metal content inside it to a certain extent. Therefore, different weights can be assigned to each piece of ore based on the distance between the equivalent R value of each piece of ore and the threshold of its category to indicate the confidence level of the ore being a concentrate or tailings.
[0068] S5, extracting the corner point features, grayscale minimum value features and particle size features of each ore after sharpening as the feature values of the ore;
[0069] S6. Input the features and label probabilities extracted from each piece of ore into the constructed multi-layer perceptron model for offline training, and obtain the model threshold and expected scrap rate curve;
[0070] S7. Convert the offline trained model and parameter files, write a C++ program to deploy the model, and use LibTorch to speed up the model's inference.
[0071] S8, collecting images of the ore to be sorted on site and obtaining pseudo dual-energy X-ray images of each ore, including low-energy and high-energy parts;
[0072] S9. Use the deployed model and parameters to extract the characteristics of each piece of ore and obtain the predicted value of each piece of ore.
[0073] In specific implementation, as a preferred embodiment of the present invention, in step S1, an image of a concentrate and a tailings is selected for display, such as Figure 2 As shown, (a) is the low-energy part of the concentrate image, (b) is the high-energy part of the concentrate image, (c) is the low-energy part of the tailings image, and (d) is the high-energy part of the tailings image;
[0074] In specific implementation, as a preferred embodiment of the present invention, in step S2, based on the acquired pseudo dual-energy X-ray ore region image, the equivalent R value of each ore in the training set is calculated, and the calculation process is as follows:
[0075]
[0076] in, and Respectively represent the first N low-energy and high-energy gray values of all pixels in the ore area after sorting by gray value; I l0 and I h0 Respectively represent the background values of low energy and high energy areas, which are determined according to the background of the ore area. Figure 3 As shown in the figure, it is the equivalent R value of the ore image in the training set, where the horizontal axis is the particle size of the ore, the vertical axis is the equivalent R value of the ore, the stars represent tailings, and the circles represent concentrates.
[0077] In specific implementation, as a preferred embodiment of the present invention, in step S3, a label probability is assigned to each piece of ore in the training set, a double threshold is defined based on the equivalent R value of each piece of ore, and the distance between the equivalent R value of each piece of ore and the threshold of its category is normalized. The calculation process is as follows:
[0078]
[0079] in, Represents the label probability; R0 and R1 represent the equivalent R values of concentrate and tailings samples respectively; T0 and T1 are the set double thresholds, and the maximum and minimum values of the equivalent R values of concentrate and tailings are taken as the double thresholds respectively; c0 and c1 are label setting constants, which are set according to actual conditions. In this embodiment, c0 and c1 both take the empirical value of 10. The label probability distribution of each piece of ore is as follows Figure 4 shown.
[0080] In specific implementation, as a preferred implementation manner of the present invention, in step S4, weights are assigned to each piece of ore in the training set. Different weights are assigned to each piece of ore according to the distance between the equivalent R value of each piece of ore and the threshold of its belonging category, so as to represent the confidence that the ore is concentrate or tailings. The calculation process is as follows:
[0081]
[0082] Wherein, w represents the weight, and R0 and R1 respectively represent the equivalent R values of concentrate and tailings samples; T0 and T1 are set double thresholds; c w0 and c w1 are respectively weight setting constants, which are set according to the actual situation. In this embodiment, c w0 and c w1 respectively take empirical values 2 and 5. The weight distribution of each piece of ore is as Figure 5 shown;
[0083] In specific implementation, as a preferred implementation manner of the present invention, in step S5, the high-energy images of each piece of ore in the training set are selected, and the sharpened corner features, sharpened minimum gray value features and particle size features of each piece of ore are respectively extracted as the eigenvalue of the ore. The calculation process is as follows:
[0084]
[0085] Wherein, V p , I min , P respectively represent the sharpened corner features, sharpened minimum gray value features and particle size features extracted from each piece of ore; I′(x,y) and I′(p,q) respectively represent the gray values of the (x,y) and (p,q) points after sharpening the high-energy ray image; I ε ′(p,q) represents the gray values of the pixel points on the circle with (p,q) as the center and radius ε, such as the gray values of 16 pixel points on the Bresenham circle with a radius of 3 around the pixel point (p,q); t is the corner threshold, V represents the score value. When I ε ′(p,q) has N consecutive gray values greater than I′(p,q)+t or less than I′(p,q)-t, then the (p,q) point is considered as a feature point, and the sum of the differences between these gray values and the gray value of the (p,q) point is calculated. Finally, the feature point with the larger score value among the adjacent feature points is taken as the corner point. Among them, the Count function is used for counting, and the number of corner points is used as the corner feature of the ore; A represents the pixel area of the image area of the ore; c0 is the sensor coefficient; the image sharpening adopts the Laplace operator method, and the processing process is expressed as:
[0086]
[0087] Wherein, represents the Laplace operator. As Figure 6 shown, the first row is the concentrate of the embodiment, and the second row is the tailings of the embodiment. From left to right are the sharpened ore images, the corner feature of the ore, the minimum gray value feature, and the particle size feature. The circles represent the visualization results of the extracted features;
[0088] Specifically in implementation, as a preferred implementation manner of the present invention, in step S6, the features and label probabilities extracted from each piece of ore in the training set are input into the constructed multi-layer perceptron model for offline training, and a model threshold and an expected waste rejection rate curve are obtained. As Figure 7 shown, the abscissa in the figure is the model threshold, and the ordinate is the percentage. It is not difficult to see from the figure that compared with directly using a binary classification model of either concentrate or tailings, the range of selectable model thresholds of the method of the present invention is larger. It can adjust the waste rejection rate within a larger range by changing the threshold while maintaining a certain overall recognition accuracy. The specific calculation process is as follows:
[0089]
[0090] Among them, X is the model input vector, which consists of n ore samples. The feature combinations extracted from each piece of ore (including the sharpened corner feature, the sharpened minimum gray value feature, and the particle size feature) are combined to form an ore sample feature vector x i . In this embodiment, the multi-layer perceptron model is a three-layer fully connected layer, including an input layer, a hidden layer, and an output layer, and the number of nodes is 100, 50, and 1 respectively. The Adam optimization algorithm is used during the model training, the learning rate is set to 0.0005, the number of iterations for network training is 8000 times, and the mean squared error loss is used as the loss function. The loss function MSE can be expressed as:
[0091]
[0092] Among them, y is the model prediction result, represents the label probability, and n is the number of training samples;
[0093] Specifically in implementation, as a preferred implementation manner of the present invention, in step S7, the offline trained model and parameter files are converted, a C++ program is written for model deployment, and LibTorch is used to accelerate the inference speed of the model. The process is as follows:
[0094] On the premise of ensuring that the pth file obtained from offline training has been accurately generated, import the model and set relevant parameters, and convert the model into a model file in pt format by creating a serialized and optimizable method; then write a C++ program on the VisualStudio platform, and use LibTorch to call the converted model in the C++ program; read the image through the OpenCV library and perform feature extraction; then, convert the extracted feature data into a data format available for model inference and pass it to the loaded model, and use the GPU to achieve fast prediction and inference; finally, convert the inference result into the corresponding data format and output the recognition result. The model conversion and deployment process is as Figure 8 shown;
[0095] Specifically, as a preferred implementation manner of the present invention, in step S9, the features of each piece of ore are extracted by using the model and parameters deployed in step S6, and the predicted value of each piece of ore is obtained. The calculation process is as follows:
[0096]
[0097] Among them, y is the final result of ore recognition, 0 represents concentrate, and 1 represents tailings; sigmoid is the activation function, which maps the output value in the interval (0, 1); k represents the threshold of the model, k ∈ [0, 1], and this value is determined according to the waste rejection rate requirement of the actual site through the determined model threshold and the expected waste rejection rate curve; w and b represent the network weights and biases of the model respectively. As Figure 9 shown, where the abscissa is the model threshold, and the ordinate is the actual waste rejection rate and ore grade value. It is not difficult to see from the figure that as the model threshold increases, the actual waste rejection rate gradually decreases, the concentrate grade gradually decreases, and the tailings grade gradually increases. This is consistent with the model threshold and the expected waste rejection rate curve predicted in step S6, and it meets the waste rejection rate and separation grade requirements for actual separation.
[0098] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A pseudo dual-energy X-ray ore image recognition method based on a probability prediction model, characterized in that, Including: Obtain the classified pseudo dual-energy X-ray ore region image, including low-energy I l and high-energy I h in two parts; Based on the obtained pseudo-dual-energy X-ray ore area image, calculate the equivalent R value of each ore; Assign a label probability to each ore, delimit double thresholds according to the equivalent R value of each ore, and normalize the distance from the equivalent R value of each ore to the threshold of its belonging category; Assign a weight to each ore, and assign different weights to each ore according to the distance from the equivalent R value of each ore to the threshold of its belonging category, to represent the confidence that the ore is concentrate or tailings; Extract the sharpened corner feature, the sharpened minimum gray value feature and the particle size feature of each ore respectively as the eigenvalue of the ore; Input the features and label probabilities extracted from each ore into the constructed multi-layer perceptron model for offline training, and obtain the model threshold and the expected rejection rate curve; Convert the offline trained model and parameter files, write a C++ program for model deployment, and use LibTorch to accelerate the inference speed of the model; Collect the images of the ore to be sorted at the actual site and obtain the pseudo-dual-energy X-ray images of each ore, including low energy and high energy parts; Use the deployed model and parameters to extract the features of each ore, and obtain the predicted value of each ore. The calculation process is as follows: Where y is the final result of ore identification, 0 represents concentrate, 1 represents tailings; sigmoid is the activation function to map the output value within the interval (0,1); X is the model input vector; k represents the threshold of the model, k ∈ [0,1], and this value is determined according to the rejection rate requirement of the actual site through the determined model threshold and the expected rejection rate curve; ω and b represent the network weights and biases of the model respectively.
2. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model according to claim 1, wherein The calculation process of calculating the equivalent R value of each ore based on the obtained pseudo-dual-energy X-ray ore area image is as follows: Among them, and respectively represent the first N low-energy and high-energy gray values after sorting all pixel points in the ore area according to the gray value size; I l0 and I h0 respectively represent the background values of the low-energy and high-energy regions, which are determined according to the background of the obtained ore area.
3. The pseudo-dual-energy X-ray ore image recognition method based on a probability prediction model according to claim 1, characterized in that The calculation process of assigning a label probability to each ore, delimit double thresholds according to the equivalent R value of each ore, and normalize the distance from the equivalent R value of each ore to the threshold of its belonging category is as follows: Among them, represents the label probability; R0 and R1 respectively represent the equivalent R values of the concentrate and tailings samples; T0 and T1 are the set double thresholds, taking the maximum and minimum values of the equivalent R values of the concentrate and tailings as the double thresholds respectively; c0 and c1 are the label setting constants, which are set according to the actual situation.
4. The pseudo-dual-energy X-ray ore image recognition method based on a probability prediction model according to claim 1, characterized in that, The calculation process of assigning a weight to each ore, and assigning different weights to each ore according to the distance from the equivalent R value of each ore to the threshold of its belonging category, to represent the confidence that the ore is concentrate or tailings is as follows: Among them, w represents the weight, and R0 and R1 represent the equivalent R values of the concentrate and tailings samples respectively; T0 and T1 are the set double thresholds; c w0 and c w1 and c are the weight setting constants respectively, which are set according to the actual situation.
5. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model according to claim 1, characterized in that The calculation process of extracting the sharpened corner feature, the sharpened minimum gray value feature and the particle size feature of each ore respectively as the eigenvalue of the ore is as follows: Among them, V p , I min , and P respectively represent the sharpened corner feature, the sharpened minimum gray value feature, and the particle size feature extracted from each piece of ore; I′(x,y) and I′(p,q) respectively represent the gray values of the (x,y) and (p,q) points after sharpening the high-energy ray image; I ε ′(p,q) represents the gray values of the pixel points on the circle with the (p,q) point as the center and a radius of ε, t is the corner threshold, V represents the score value. When I ε ′(p,q) has N consecutive gray values greater than I′(p,q)+t or less than I′(p,q)-t, then the (p,q) point is considered a feature point, and the sum of the differences between these gray values and the gray value of the (p,q) point is calculated. Finally, the feature point with a larger score value among the adjacent feature points is taken as the corner point. Among them, the Count function is used for counting, and the number of corner points is used as the corner feature of the ore; A represents the pixel area of the image region of the ore; c3 is the sensor coefficient; the image sharpening adopts the Laplacian operator method, and the processing process is expressed as: Among them, ▽ 2 I(x, y) represents the Laplacian operator.
6. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model according to claim 1, wherein The calculation process of inputting the features and label probabilities extracted from each ore into the constructed multi-layer perceptron model for offline training, and obtaining the model threshold and the expected rejection rate curve is as follows: Among them, X is the model input vector, which consists of n ore samples. The features extracted from each ore are combined to form an ore sample feature vector x i .
7. The pseudo dual-energy X-ray ore image recognition method based on a probability prediction model according to claim 1, characterized in that The process of converting the offline trained model and parameter files, writing a C++ program for model deployment, and using LibTorch to accelerate the inference speed of the model is as follows: Convert the trained pth model file into a pt file so that LibTorch can read the model structure and parameter information of the network. By writing a C++ program on the Visual Studio platform, including a feature extraction program and a model inference program, deploy the converted model to the actual industrial environment and use LibTorch to achieve accelerated inference of the model.
Citation Information
Patent Citations
Pseudo dual-energy ray imaging-based ore separation system and method
CN104138854A
Image recognition model training method and apparatus, computer system, and storage medium
WO2021155650A1