A data-driven ore prediction method and system based on deep learning algorithm

Through deep learning algorithms and data-driven methods, combined with Grad-CAM and dynamic cross-entropy loss function, the problems of high cost and low efficiency in ore sorting are solved, and efficient and low-cost ore prediction and interpretive analysis are achieved, which improves the The identification accuracy and robustness of multiple ores.

CN118521868BActive Publication Date: 2024-11-05CHINA UNIV OF GEOSCIENCES (BEIJING) +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410689777.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-11-05
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

Existing ore sorting methods have high cost, low efficiency and lack of interpretability. Artificial methods require professional knowledge, physical characteristics require high-precision instruments, and machine learning-based methods have low efficiency and low accuracy in sorting specific ore. , difficult to explain.

Method used

Using a data-driven ore prediction method based on deep learning algorithm, the parallel global-local model is constructed through data set preprocessing, and the results are visualized in combination with Grad-CAM. The cross entropy loss function and Focal loss processing category are not used. Balance the problem and improve the generalization ability and explanatory nature of the model.

Benefits of technology

It realizes efficient and low-cost ore sorting, improves the recognition accuracy and robustness of multiple ore images, provides scientific explanatory analysis, reduces dependence on a large number of labeled data, and improves the credibility of the model. degree and practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118521868B_ABST
    Figure CN118521868B_ABST
Patent Text Reader

Abstract

The present invention discloses a data-driven ore prediction method and system based on a deep learning algorithm, which can be used to implement the above-mentioned data-driven ore prediction method, specifically, including: data set preprocessing, preprocessing the original image data, including data set division, data enhancement, category imbalance processing, data standardization and pretesting; building a parallel global-local model, building and training parent models with ECA and without ECA, and further subdividing them into two sub-models, local and global. The trained model results are output and interpreted. Including model integration, obtaining the final model weight through hard voting, and visual output, using Grad-CAM to visualize the output of the model as a heat map, providing an explanatory analysis of the model prediction results. The advantages of the present invention are: improving the efficiency of ore sorting, improving the prediction accuracy and robustness of ore, and reducing training costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a data-driven ore prediction method and system based on a deep learning algorithm. Background Art

[0002] Mineral resources are the basic material for national economic construction. With the rapid development of my country's economy, the demand for mineral resources has also increased rapidly, and it has become particularly important to achieve efficient mining technology. Ore sorting is an important part of the mining industry, and the accuracy and efficiency of its operation have a significant economic impact on the mining industry. At present, most ore sorting methods are mainly based on manual sorting. Workers need to rely on naked eye identification and separate ore from waste rock by observing the appearance characteristics of the ore. Some ore sorting uses physical property-based technologies such as x-rays, electromagnetic methods, and radioactive detection to achieve high-precision sorting. At the same time, with the iterative update of machine learning algorithms, some ore sorting uses machine learning-based methods. For example, Wang Jiyuan collected hyperspectral mineral images and used convolutional neural networks for minerals to achieve mineral identification and sorting; Ashok KumarPatel et al. sorted single iron ore using the support vector machine method.

[0003] However, manual ore sorting methods often require researchers to have professional geological knowledge, require a lot of labor costs, and are time-consuming; although ore sorting methods based on physical properties reduce some labor costs, they require high-precision testing instruments and a strict working environment, which leads to high costs and low efficiency of these methods; and machine learning-based methods usually have certain requirements for the original image data, and can often only sort a certain specific ore, which is inefficient. At the same time, due to the difficulty in distinguishing the characteristic information of the samples to be sorted and the lack of interpretability of the ore sorting results, the sorting accuracy is low and difficult to explain.

[0004] Therefore, from an industrial perspective, it is of great significance to develop an efficient, low-cost and interpretable data-driven ore sorting method. Summary of the invention

[0005] In view of the defects of the prior art, the present invention provides a data-driven ore prediction method and system based on a deep learning algorithm.

[0006] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:

[0007] A data-driven ore prediction method based on a deep learning algorithm comprises the following steps:

[0008] 1. Dataset preprocessing, including:

[0009] The image data of surrounding rock and ore body are divided into training set, validation set and test set.

[0010] Data augmentation with random rotation, saturation, brightness, hue, and contrast was performed on the training and validation sets.

[0011] Use dynamically scaled cross entropy loss function to handle class imbalance problem.

[0012] Discard the mean and variance of the pre-trained weight dataset, and calculate the mean and variance of the dataset itself for standardization.

[0013] Conduct empirical testing with fewer rounds and data for subsequent model analysis and construction.

[0014] 2. Construct a parallel global-local model, including:

[0015] Model architecture: ResNet50 is used as the basic framework, with 4 layers, each of which contains a different number of BottleNeck layers, including convolutional layers, pooling layers, and BN layers.

[0016] We use two parent models: the efficient channel attention model with ECA and the one without ECA. The model with ECA is called ECA-ResNet50, and ECA is added to the BottleNeck of each Layer.

[0017] Construction of sub-model:

[0018] Each parent model is further divided into two sub-models, local and global, by cropping and scaling the image.

[0019] Local model: First scale the training image, then randomly crop it, scale it again, and finally perform center cropping.

[0020] Global model: First scale the training image and then perform center cropping.

[0021] Model training:

[0022] All four sub-models are trained using transfer learning.

[0023] Use pre-trained weights, modify the last Fc layer of the ResNet50 framework, set the random seed, and set the hyperparameter settings.

[0024] Use the Adam optimizer, set the Learning Rate, and set the weight decay.

[0025] 3. Result output, including:

[0026] Model integration: The results of the four sub-models are weighted in parallel through hard voting to obtain the final model weight.

[0027] Visualization output: The Layer4[-1] outputs of the four sub-models are visualized as heat maps using Grad-CAM’s gradient-based class activation maps, providing explanation diagrams.

[0028] Furthermore, the data enhancement process is specifically as follows:

[0029] The training set and validation set were randomly rotated by 30 and 50 degrees, saturation ±20%, brightness ±20%, hue ±10%, and contrast ±30% to improve data quality and increase data quantity.

[0030] The data increased from the original 4521 to 13563.

[0031] Furthermore, the formula of the dynamically scaled cross entropy loss function is as follows:

[0032] Focal_Loss=-1*log(pt)*alpha*(1-pt)^gamma

[0033] The gamma parameter and pt parameter are used to improve the type imbalance of the data, where the parameter gamma is set to 2 and the parameter alpha is set to 0.25.

[0034] Furthermore, the local model: first scales the training image to 1792×1792, then randomly crops it to 896×896, scales it to 448×448, and finally performs a center crop of 224×224.

[0035] The global model: the training image is first scaled to 448×448, and then the center is cropped to 224×224.

[0036] Furthermore, the random seed is set to 42, the hyperparameters are set as follows: Batch=32, Epoch=85, LearningRate is set to 0.005, and weight decay is set to 0.01.

[0037] The present invention also discloses a data-driven ore prediction system, which can be used to implement the above-mentioned data-driven ore prediction method, specifically comprising:

[0038] The dataset preprocessing module is used to preprocess the original image data, including dataset partitioning, data enhancement, category imbalance processing, data standardization and pretesting;

[0039] Parallel global-local model building module: Build and train parent models with and without ECA, and further subdivide them into local and global sub-models, respectively.

[0040] Result output module: Output and explain the trained model results, including model integration, obtaining the final model weight through hard voting, and visualization output. Grad-CAM is used to visualize the model output as a heat map, providing explanatory analysis of the model prediction results.

[0041] The present invention also discloses a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned data-driven ore prediction method when executing the program.

[0042] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the data-driven ore prediction method is implemented.

[0043] Compared with the prior art, the advantages of the present invention are:

[0044] 1. Provides an efficient and low-cost deep learning method for ore sorting technology.

[0045] 2. The present invention improves the problem that geological image data is difficult to combine with deep learning through data enhancement and focal loss, improves the generalization ability, and can be applied to a variety of ore image data.

[0046] 3. The present invention combines the industrial perspective of ore sorting with the professional perspective of earth science, and provides a scientific explanation for the accuracy of sorting results through Grad-CAM.

[0047] 4. The parallel global-local model combines global and local feature learning, which can more comprehensively capture the texture and shape information in geological images, thereby improving the prediction accuracy and robustness of ore.

[0048] 5. The use of transfer learning and pre-trained weights speeds up the training speed and convergence of the model, while being able to utilize the features learned from existing large-scale image datasets, thereby reducing dependence on large amounts of labeled data and reducing training costs.

[0049] 6. The model integration and visualization output methods in the result output make the prediction results more reliable and more interpretable, which can help users better understand the prediction process and results of the model, and improve the credibility and practicality of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1is a flow chart of a data-driven ore prediction method according to an embodiment of the present invention;

[0051] Figure 2 This is an ECA framework diagram added to the embodiment of the present invention;

[0052] Figure 3 It is a BottleNeck framework diagram of ResNet50 after adding ECA in an embodiment of the present invention;

[0053] Figure 4 is the accuracy confusion matrix of the four sub-models in the test set of the embodiment of the present invention;

[0054] Figure 5 is a confusion matrix diagram of the accuracy of the final model in the test set of the embodiment of the present invention;

[0055] Figure 6 It is a Grad-CAM visualization thermal map of the visualization diagram of the white marble sample of the Guocheng gold deposit of the four sub-models of the embodiment of the present invention.

[0056] Figure 7 It is a Grad-CAM visualized thermal map of the ore body sample of the Guocheng gold deposit of the four sub-models of the embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples.

[0058] like Figure 1 As shown, the present invention is a data-driven ore prediction method based on a deep learning algorithm, which mainly includes three parts: data set preprocessing, a parallel global-local model, and result output.

[0059] Part 1 Dataset preprocessing: Use Python code to take the images of surrounding rocks and ore bodies as the original data set and divide them into training set, validation set and test set in the form of 6:2:2, and perform data enhancement processing on the training set and validation set by randomly rotating 30 degrees and 50 degrees, saturation ±20%, brightness ±20%, hue ±10%, and contrast ±30% to improve data quality and increase the data quantity, and finally increase the data from the original 4521 to 13563; geological image data usually have type imbalance problems (including imbalance in information amount and imbalance in sample number, which will lead to overfitting of the model and decreased generalization ability). The traditional method for dealing with category imbalance problems is mainly resampling, but this method can only solve the imbalance in sample number, so the present invention additionally considers the processing of category imbalance problems from the aspect of loss function, and adjusts the Focal according to the actual data amount and number of categories of each category after augmentation. The gamma parameter and pt parameter of loss (dynamically scaled cross entropy loss function, Focal_Loss = -1*log(pt)*alpha*(1-pt)^gamma) are used to improve the type imbalance of the data, where the parameter gamma is set to 2 and the parameter alpha is set to 0.25. In order to make the data set during training more consistent with its own data structure, the present invention abandons the mean (mean) and std (variance) of the pre-training weight data set, calculates the mean and variance of the data set itself, and uses them for standardization. Pre-testing is an empirical test with fewer rounds and data, which is used for analysis and construction of subsequent models.

[0060] Part 2 Parallel global-local model (ECA-ResNet50): ResNet50 (a residual network structure with 4 layers, each layer has a different number of BottleNeck layers, each BottleNeck has convolutional layers, pooling layers and BN layers, 50 represents a total of 50 layers of convolutional layers, pooling layers and BN layers) is used as the model framework, and the framework with ECA (an efficient channel attention model that can improve the recognition ability of ore bodies but reduce the recognition ability of surrounding rocks) and without ECA are used as two parent models. The ResNet framework with ECA is called ECA-ResNet50, in which ECA is added to the BottleNeck of each Layer ( Figure 2 and Figure 3), each parent model is further divided into two sub-models, local and global, by changing the order of cropping and scaling the image, so that the model can learn texture features of different scales and improve recognition ability. The model that is cropped first and then scaled is called a local model. The specific steps are to scale the training image to a resolution of 1792*1792 in Transform, then randomly crop it to a resolution of 896*896, then scale it to a resolution of 448*448, and finally perform a center crop of 224*224. The model that is scaled first and then cropped is called a global model. The specific steps are to scale the training image to a resolution of 1792*1792 in Transform, then randomly crop it to a resolution of 896*896, then scale it to a resolution of 448*448, and finally perform a center crop of 224*224. In ansform, the training image is first scaled to a resolution of 448*448, and then the center is cropped to a resolution of 224*224; the four sub-models all use transfer learning to speed up the training, that is, pre-trained weights are used for training, and the last Fc layer of the ResNet50 framework is changed, the random seed is 42, the hyperparameter Batch is set to 32, and the Epoch is set to 85; the four sub-models all use Adam (a learning rate optimizer that can adjust the learning rate according to the size and stability of the Loss during training), where the Learning Rate is set to 0.005 and the Weight Decay is set to 0.01.

[0061] Part 3 Result output: Finally, the results of the parallel model are output. The output results are as follows: 1. The four sub-models are weighted in parallel by hard voting, and a final model weight is output. The test shows that the final model has improved the accuracy of surrounding rock and ore body compared with the single sub-model. 2. Grad-CAM (gradient-based class activation map) is used to output the Layer4[-1] of the four sub-models into a visual heat map, which is used as an interpretable map ( Figure 6 and Figure 7 ).

[0062] The user needs to put the path of the augmented dataset (classified, one type in one folder) into the preprocessing code for preprocessing, and then put the Excel path table of the obtained data into the four sub-models to obtain the corresponding training results. The training results use Acc (accuracy), Precision (precision), recall (recall rate), and F1_score (F1 score) as evaluation indicators; the training results are put into the integrated learning code for hard voting to get the final model weights. The user puts the image data to be predicted into the prediction code with the final model weights (or the four sub-model weights) to get the prediction results. The results include the prediction type of each predicted image and the accuracy confusion matrix of the prediction results ( Figure 4 and Figure 5); Put the image data to be predicted into the Grad-CAM code to get the explanation graph. The explanation graph can get different visualization results by adjusting the model layer (such as Layer4[-1]) that needs to be output in the Grad-CAM code. Modifying the parameters alpha and beta of the code can change the contrast and brightness of the explanation graph.

[0063] like Figure 7 As shown in the figure, the heat map shows the image regions that the model focuses on when predicting the ore body sample of the Guocheng gold deposit. The heat maps of the four sub-models show the different image regions they focus on during the prediction process. This shows that the differences in feature learning of each sub-model help to fully capture the diverse features in geological images and improve the accuracy and robustness of predictions. Figure 7 Explain the model's decision-making process, demonstrate differences in feature learning, and evaluate the model's performance.

[0064] In another embodiment of the present invention, a data-driven ore prediction system is provided. The system can be used to implement the above-mentioned data-driven ore prediction method, specifically including:

[0065] The dataset preprocessing module is used to preprocess the original image data, including dataset partitioning, data enhancement, category imbalance processing, data standardization and pretesting;

[0066] Parallel global-local model building module: Build and train parent models with and without ECA, and further subdivide them into local and global sub-models, respectively.

[0067] Result output module: Output and explain the trained model results, including model integration, obtaining the final model weight through hard voting, and visualization output. Grad-CAM is used to visualize the model output as a heat map, providing explanatory analysis of the model prediction results.

[0068] In another embodiment of the present invention, a terminal device is provided, the terminal device includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of the data-driven ore prediction method.

[0069] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0070] One or more instructions stored in a computer-readable storage medium may be loaded and executed by a processor to implement the corresponding steps of the data-driven ore prediction method in the above-mentioned embodiment; one or more instructions in the computer-readable storage medium may be loaded and executed by a processor.

[0071] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0072] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0074] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0075] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A data-driven ore prediction method based on deep learning algorithm, characterized in that: The following steps are involved:

1. Dataset preprocessing, including: The image data of surrounding rocks and ore bodies are divided into training set, validation set and test set; Perform random rotation, saturation, brightness, hue, and contrast augmentation on the training and validation sets; Use dynamically scaled cross entropy loss function to handle class imbalance problem; Discard the mean and variance of the pre-trained weight dataset, and calculate the mean and variance of the dataset itself for standardization; Conduct empirical testing with fewer rounds and data for subsequent model analysis and construction; 2. Construct a parallel global-local model, including: Model architecture: ResNet50 is used as the basic framework, with 4 layers, each of which contains a different number of BottleNeck layers, including convolutional layers, pooling layers, and BN layers; Use two parent models with ECA efficient channel attention model and without ECA; the model with ECA is called ECA-ResNet50, and ECA is added to the BottleNeck of each Layer; Construction of sub-model: Each parent model is further divided into two sub-models, local and global, by cropping and scaling the image; Local model: First scale the training image, then randomly crop it, scale it again, and finally perform center cropping; Global model: first scale the training image and then perform center cropping; Model training: All four sub-models are trained using transfer learning; Use pre-trained weights to modify the last Fc layer of the ResNet50 framework, set the random seed, and set the hyperparameter settings; Use the Adam optimizer, set the Learning Rate, and set the weight decay; 3. Result output, including: Model integration: The results of the four sub-models are weighted and connected in parallel through hard voting to obtain the final model weight; Visualization output: The Layer4[-1] outputs of the four sub-models are visualized as heat maps using Grad-CAM’s gradient-based class activation maps, providing explanation diagrams.

2. The data-driven ore prediction method according to claim 1, characterized in that: The data enhancement process is specifically as follows: The training set and validation set were randomly rotated by 30 and 50 degrees, saturation ±20%, brightness ±20%, hue ±10%, and contrast ±30% to improve data quality and increase data quantity; The data increased from the original 4521 to 13563.

3. The data-driven ore prediction method according to claim 1, characterized in that: The formula of the dynamically scaled cross entropy loss function is as follows: The gamma parameter and pt parameter of Focal_Loss=-1-log(pt)*alpha*(1-pt)^gamma are used to improve the type imbalance of the data, where the parameter gamma is set to 2 and the parameter alpha is set to 0.

25.

4. The data-driven ore prediction method according to claim 1, characterized in that: The local model: first scale the training image to 1792×1792, then randomly crop it to 896×896, scale it to 448×448, and finally perform a center crop of 224×224; The global model: the training image is first scaled to 448×448, and then the center is cropped to 224×224.

5. The data-driven ore prediction method according to claim 1, characterized in that: The random seed is set to 42, the hyperparameter settings are: Batch=32, Epoch=85, Learning Rate is set to 0.005, and weight decay is set to 0.

01.

6. A data-driven ore prediction system, characterized in that: The system can be used to implement the data-driven ore prediction method according to any one of claims 1 to 5, specifically comprising: The dataset preprocessing module is used to preprocess the original image data, including dataset partitioning, data enhancement, category imbalance processing, data standardization and pretesting; Parallel global-local model building module: build and train parent models with and without ECA, and further subdivide them into local and global sub-models respectively; Result output module: outputs and explains the trained model results; including model integration, obtaining the final model weights through hard voting, and visualization output. Grad-CAM is used to visualize the model output as a heat map, providing explanatory analysis of the model prediction results.

7. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data-driven ore prediction method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the data-driven ore prediction method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Ore deposit type identification method and system based on XGBoost

    CN115148299A

  • Ore sorting model training method and system based on multi-scale feature fusion

    CN116597258A

  • Weak ore spot ore sorting method and device, readable storage medium and equipment

    CN117975167A