Phosphate ore separation method, device, readable storage medium and equipment
By constructing a neural network and introducing a soft threshold module and a feature extraction network, the problem of low accuracy in phosphate ore sorting is solved, efficient automatic sorting of phosphate ore is achieved, and the accuracy of mine waste sorting is improved.
Patent Information
- Application Number
- CN202410354314.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-03-27
AI Technical Summary
The existing technology has low accuracy when sorting phosphate ore, especially when high-grade phosphate ore samples are scarce, resulting in poor mine waste sorting results.
Construct a neural network, introduce a soft threshold module and feature extraction network, generate a phosphate rock sorting model through deep learning training, and use soft threshold operations to highlight the fine colloidal characteristics of minerals and improve sorting accuracy.
The accuracy of phosphate rock sorting and the effect of mine waste sorting are improved, and the problem of low accuracy in the existing technology is solved.
Smart Images

Figure CN117953315B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ore sorting, and in particular to a phosphate ore sorting method, device, readable storage medium and equipment. Background Art
[0002] At present, most phosphate ores must be beneficiated and enriched to meet production requirements. Among the proven reserves, most are medium- and low-grade ores with fine mineral particles, densely embedded, and many harmful impurities. The difficulty of beneficiation is very great, which brings certain difficulties to the development and utilization of phosphate ores. Especially in recent years, with the continuous development and utilization of phosphate resources, the resources of rich phosphate ores and easy-to-be-benefit phosphate ores are decreasing, and the production and processing costs are gradually increasing.
[0003] Traditional mineral processing methods include magnetic separation, gravity separation and flotation. These processes require grinding the ore into fine particles or powder, so they are energy-intensive, polluting and costly. However, with the rapid development of artificial intelligence, a number of emerging high-tech mineral processing equipment manufacturers have emerged at home and abroad, which use advanced X-ray imaging combined with artificial intelligence identification technology. This new technology can directly perform dry sorting after ore crushing, effectively reducing the dilution rate, which is both efficient and reduces pollution costs.
[0004] For X-ray imaging of ores, the distribution of image data fluctuates greatly due to differences in ore sources and different radiation attenuation capabilities, so a large number of new samples are required for each retraining. Using image recognition technology based on convolutional neural networks, the characteristics of the ore can be effectively extracted, improving the accuracy of sorting. However, the proportion of high-grade ore in phosphate mines is small and the characteristics of mine waste are not obvious. Manual selection is difficult, and the difficulty in obtaining samples affects the quality of training set samples, making it impossible for the network to effectively learn the fine colloidal mineral characteristics of phosphate mines, which in turn leads to poor sorting accuracy. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a phosphate ore sorting method, device, readable storage medium and equipment, aiming to solve the problem of low accuracy in phosphate ore sorting in the prior art.
[0006] The embodiment of the present invention is implemented as follows:
[0007] A method for separating phosphate ore, comprising:
[0008] Constructing a neural network, the neural network at least comprising a soft thresholding module, the soft thresholding module being used to obtain a scale parameter according to a preset rule from a received input feature map, and to obtain a threshold value by multiplying the average of the input feature map with the scale parameter, so as to perform a soft thresholding operation through the threshold value;
[0009] Performing deep learning training on the neural network to obtain a trained phosphate rock separation model;
[0010] The image of the phosphate rock to be sorted is obtained, and the image of the phosphate rock to be sorted is input into the trained phosphate rock sorting model to obtain the final sorting result.
[0011] Furthermore, in the above-mentioned phosphate rock separation method, the step of obtaining a scale parameter according to a preset rule from the received input feature map, and averaging the input feature map and multiplying the average value by the scale parameter to obtain a threshold value comprises:
[0012] The input feature map is subjected to global average pooling to convert the input feature map in matrix form into a feature map vector;
[0013] The feature map vector is sequentially passed through a fully connected layer, a batch normalization operation, and an activation function, and then passed through a fully connected layer to obtain the scale parameter;
[0014] The scale parameter is converted into a numerical value by using a preset function, and the threshold value is obtained by multiplying the average of the input feature map with the numerical value.
[0015] Furthermore, in the above phosphate rock separation method, the formula for performing soft thresholding operation through the threshold is:
[0016] ;
[0017] Among them, x represents the input feature, y represents the output feature, is the threshold value.
[0018] Furthermore, in the above-mentioned phosphate rock separation method, the neural network further includes a feature extraction network and a feature reconstruction network, wherein the feature extraction network is used to receive an input image and generate feature maps with different resolutions according to the input image;
[0019] The feature reconstruction network is used to amplify the resolution of the feature map and restore the feature map into a three-channel image;
[0020] Furthermore, in the above-mentioned phosphate rock separation method, the step of using the feature reconstruction network to amplify the resolution of the feature map comprises:
[0021] The bicubic interpolation method is used to enlarge the resolution of the feature map. The formula of the bicubic interpolation method is:
[0022] ;
[0023] ;
[0024] Where (x, y) is the coordinate of the pixel to be interpolated, f(x, y) represents the value to be interpolated, (x i ,y j ) represents the point in the i×j area near the point to be interpolated, i, j = 0, 1, 2, 3, a is a constant, which is -0.5, and W(x) is the weight function.
[0025] Furthermore, in the above-mentioned phosphate rock separation method, the step of performing deep learning training on the neural network to obtain a trained phosphate rock separation model comprises:
[0026] Collecting historical phosphate rock image data, and dividing the historical phosphate rock image data into labeled phosphate rock image data and unlabeled phosphate rock image data;
[0027] The unlabeled phosphate rock image data is input into the feature extraction network after mask operation to obtain output features;
[0028] The output features are densified and then input into a feature reconstruction network to obtain a phosphate rock reconstructed image;
[0029] Performing mean square error loss on the reconstructed image of the phosphate ore and the original image of the phosphate ore respectively to obtain a mean square error loss value;
[0030] Add all mean square error loss values and perform back propagation to obtain the trained feature extraction network model;
[0031] The labeled phosphate rock image data is input into a trained feature extraction network model to adjust the model's hyperparameters to obtain the phosphate rock separation model.
[0032] Furthermore, in the above phosphate rock separation method, the calculation formula of the mean square error loss value is:
[0033] ;
[0034] Among them, y i and f xi They represent the true value of the i-th sample and its corresponding predicted value, and n is the number of samples.
[0035] Another object of the present invention is to provide a phosphate ore separation device, the device comprising:
[0036] A construction module, used to construct a neural network, the neural network at least comprising a soft thresholding module, the soft thresholding module being used to obtain a scale parameter according to a preset rule from a received input feature map, and to obtain a threshold value by multiplying the average of the input feature map with the scale parameter, so as to perform a soft thresholding operation through the threshold value;
[0037] A training module, used for performing deep learning training on the neural network to obtain a trained phosphate rock separation model;
[0038] The sorting module is used to obtain the image of the phosphate rock to be sorted, and input the image of the phosphate rock to be sorted into the trained phosphate rock sorting model to obtain the final sorting result.
[0039] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of any one of the methods described above.
[0040] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0041] The present invention realizes automatic ore sorting by training a phosphate rock sorting model. Since the phosphate rock sorting model masters the logic of ore sorting, automatic ore sorting can be realized. In addition, when constructing a neural network for training the phosphate rock sorting model, a soft thresholding module is introduced. The soft thresholding module utilizes the soft thresholding operation to perform soft thresholding on the input, which can highlight important features and help the network focus more on learning the fine colloidal features of phosphate ore. The accuracy of the phosphate rock sorting model is guaranteed, and the accuracy of phosphate rock sorting is finally guaranteed, solving the problem of low accuracy in phosphate rock sorting in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the pre-training process of the backbone network in the phosphate rock separation method provided in one embodiment of the present invention;
[0043] Figure 2 Flow chart of the phosphate rock separation method in the first embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the structure of the CCS module in the phosphate rock separation method in the first embodiment of the present invention;
[0045] Figure 4 It is a schematic diagram of the CS module structure of the residual block in the phosphate rock separation method in the first embodiment of the present invention;
[0046] Figure 5 It is a schematic diagram of the structure of the feature extraction network in the phosphate rock separation method in the first embodiment of the present invention;
[0047] Figure 6 It is a schematic diagram of the structure of the down-sampling layer in the phosphate rock separation method in the first embodiment of the present invention;
[0048] Figure 7 It is a schematic diagram of the structure of the feature reconstruction network in the phosphate rock separation method in the first embodiment of the present invention;
[0049] Figure 8 It is a schematic diagram of the structure of an up-sampling module in the phosphate rock separation method in the first embodiment of the present invention;
[0050] Fig. 9 It is a schematic diagram of the training process of the phosphate rock separation model in the phosphate rock separation method in the first embodiment of the present invention;
[0051] Fig.10 It is a structural block diagram of a phosphate rock separation device in a third embodiment of the present invention.
[0052] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0053] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0055] The following embodiments can be applied to Figure 1 The backbone neural network of the phosphate rock sorting model shown in the figure adopts a pre-training framework in the style of mask image modeling, including an encoder and a decoder. In the network structure, the encoder (feature extraction network) uses sparse convolution to encode the phosphate rock mask image. Sparse convolution skips the mask position and only calculates at the unmasked position. Sparse convolution is only used in the pre-training stage and is replaced by standard convolution in the fine-tuning stage. The encoder generates four feature maps with different resolutions, that is, different scales, which are , before being input into the decoder (feature reconstruction network), a densification operation will be performed to fill all empty positions on the sparse feature map, and then the phosphate mine reconstructed image will be obtained through the decoder.
[0056] In addition, an improved ConvNeXt-CCS network is introduced. Self-supervised pre-training enables the network to fully learn the characteristic information of phosphate rock samples. The CCS module added to the ConvNeXt network uses the soft thresholding operation. By calculating the weights after global average pooling, the input is soft-thresholded, so that the network can adaptively adjust the information of the channel, which helps to improve the network's perception of the fine colloidal characteristics of phosphate rock, thereby improving the network's sorting accuracy.
[0057] It should be pointed out that Figure 1 The structure shown does not constitute a limitation on the backbone neural network in the phosphate rock sorting model. In other embodiments, the backbone neural network may include fewer or more components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0058] How to improve the accuracy of phosphate rock separation will be described in detail below with reference to specific embodiments and drawings.
[0059] Embodiment 1
[0060] See also Figure 2 , shown is a phosphate rock separation method in a first embodiment of the present invention, the method includes steps S10~S12.
[0061] Step S10, constructing a neural network, the neural network at least includes a soft thresholding module, the soft thresholding module is used to obtain a scale parameter according to a preset rule from the received input feature map, and to obtain a threshold value after averaging the input feature map and multiplying the result by the scale parameter, so as to perform a soft thresholding operation through the threshold value.
[0062] Among them, the main problem solved by the present invention is that the network cannot capture and learn the fine colloidal characteristics of the ore due to the scarcity of high-grade phosphate ore samples, resulting in poor waste separation results. Therefore, the CCS module is introduced to utilize the soft thresholding operation. By calculating the weight after global average pooling, the input is soft-thresholded. Such an operation can highlight important features and help the network focus more on learning the fine colloidal characteristics of phosphate ore. A high accuracy rate of waste separation of phosphate ore is guaranteed.
[0063] Specifically, the step of obtaining a scale parameter according to a preset rule from the received input feature map, and averaging the input feature map and multiplying the average value by the scale parameter to obtain a threshold value includes:
[0064] The input feature map is subjected to global average pooling to convert the input feature map in matrix form into a feature map vector;
[0065] The feature map vector is sequentially passed through a fully connected layer, a batch normalization operation, and an activation function, and then passed through a fully connected layer to obtain the scale parameter;
[0066] The scale parameter is converted into a numerical value by using a preset function, and the threshold value is obtained by multiplying the average of the input feature map with the numerical value.
[0067] Among them, Figure 3 and Figure 4 As shown in the figure, the soft threshold processing module includes a CCS module, and the CCS module includes a 7*7 convolution module and a 1*1 convolution module. The number of channels of the input feature remains unchanged after the 7*7 convolution and a layer normalization operation, and then the GELU activation function is used after the 1*1 convolution to unify the number of channels. For example, the number of channels of the input feature is 96. The number of channels remains unchanged after the 7*7 convolution and a layer normalization operation, and then the GELU activation function is used after the 1*1 convolution to unify the number of channels to 384.
[0068] In order to reduce the gradient vanishing problem during training and improve the stability of training, a CS module, namely the CS soft threshold processing method module, is used, in which each channel shares a threshold. Then the Drop Path random depth operation is performed.
[0069] Specifically, the input feature map is subjected to global average pooling, and the feature map is transformed from a matrix of [h,w,c] to a vector of [1,1,c]; a fully connected layer is used to transform the vector into [1,1,c / r]; after batch normalization and ReLU activation function, a fully connected layer is used to obtain the scale parameter; where r is a parameter factor, usually referring to the "reduction ratio", which is used to compress c, i.e., the feature channel. c / r means that the number of feature channels is reduced by r times. A Sigmoid function is used, and the scale parameter is converted to a value in (0, 1); the feature map is averaged and multiplied by the scale parameter to obtain the threshold; then a soft thresholding operation is performed. The formula for the soft thresholding operation is:
[0070] ;
[0071] Where x represents the input feature and y represents the output feature. is the threshold value.
[0072] Step S11, performing deep learning training on the neural network to obtain a trained phosphate rock separation model.
[0073] Among them, deep learning training of the neural network can obtain an accurate phosphate rock sorting model. Specifically, historical ore image data is collected, and the ore image data is enhanced as a training data set. The neural network is trained with the training data set to obtain a phosphate rock sorting model that can master the ore sorting logic.
[0074] Step S12, obtaining an image of the phosphate rock to be sorted, and inputting the image of the phosphate rock to be sorted into the trained phosphate rock sorting model to obtain a final sorting result.
[0075] Among them, the trained ore sorting model has mastered the logic of ore sorting. Therefore, the ore sorting model can be used to identify the phosphate ore image, that is, the image of the phosphate ore, to realize automatic sorting of the ore, and because the accuracy of the ore sorting model is improved, the accuracy of ore sorting is improved.
[0076] In summary, the phosphate rock sorting method in the above embodiment of the present invention realizes automatic sorting of ore by training the phosphate rock sorting model. Since the phosphate rock sorting model masters the logic of ore sorting, it can realize automatic sorting of ore. In addition, when constructing a neural network for training the phosphate rock sorting model, a soft thresholding module is introduced. The soft thresholding module utilizes the soft thresholding operation to perform soft thresholding on the input, which can highlight important features and help the network focus more on learning the fine colloidal features of phosphate ore. The accuracy of the phosphate rock sorting model is guaranteed, and the accuracy of phosphate rock sorting is ultimately guaranteed, solving the problem of low accuracy in phosphate rock sorting in the prior art.
[0077] Embodiment 2
[0078] The difference between the phosphate ore separation method in this embodiment and the phosphate ore separation method in the first embodiment is that:
[0079] The neural network also includes a feature extraction network and a feature reconstruction network, wherein the feature extraction network is used to receive an input image and generate feature maps with different resolutions according to the input image;
[0080] The feature reconstruction network is used to enlarge the resolution of the feature map and restore the feature map into a three-channel image.
[0081] Among them, Figure 5 , Figure 6As shown in the figure, the feature extraction network is used to receive the input image and generate feature maps with different resolutions based on the input image. Specifically, the feature extraction network in the model uses sparse convolution to encode the phosphate mine mask image. Sparse convolution skips the mask position and only calculates at the unmasked position. Sparse convolution is only used in the pre-training stage and is switched back to standard convolution in the fine-tuning stage. The encoder generates four feature maps with different resolutions, that is, different scales. Before being input to the decoder (feature reconstruction network), a densification operation is performed to fill all empty positions on the sparse feature map, and then the phosphate mine reconstructed image is obtained through the decoder.
[0082] like Figure 7 , Figure 8 As shown in the figure, the feature reconstruction network uses bicubic interpolation to enlarge the feature map to a higher resolution and restore it to a three-channel image through 1×1 convolution. The bicubic interpolation formula is:
[0083] ;
[0084] ;
[0085] Where (x, y) is the coordinate of the pixel to be interpolated, f(x, y) represents the value to be interpolated, (x i ,y j ) represents the point in the i×j area near the point to be interpolated, i, j = 0, 1, 2, 3, a is a constant, which is -0.5, and W(x) is the weight function.
[0086] Among them, W(x) uses different polynomial expressions according to the value of x:
[0087] For example, W(xx i ), is based on The formula is calculated, the steps are as follows:
[0088] Calculate x and grid point x i The difference between d=xx i ;
[0089] Take the absolute value of this difference |d|;
[0090] Use the value of |d| to decide which of the three functions to apply.
[0091] More specifically, feature 4 output by the feature extraction network is input into the network, and is first upsampled through a deconvolution to restore the dimension; then feature extraction is performed through two 3×3 convolutions and layer normalization; the output feature 3 is added to the output after the first two steps and then restored to the original image size through an upsampling module to obtain the phosphate mine reconstructed image D4; the above steps are repeated to obtain the phosphate mine reconstructed image D3 and the phosphate mine reconstructed image D2; finally, a deconvolution, two 3×3 convolutions and layer normalization are performed to obtain the phosphate mine reconstructed image D1.
[0092] In addition, in some optional embodiments of the present invention, the step of performing deep learning training on the neural network to obtain a trained phosphate rock separation model includes:
[0093] Collecting historical phosphate rock image data, and dividing the historical phosphate rock image data into labeled phosphate rock image data and unlabeled phosphate rock image data;
[0094] The unlabeled phosphate rock image data is input into the feature extraction network after mask operation to obtain output features;
[0095] The output features are densified and then input into a feature reconstruction network to obtain a phosphate rock reconstructed image;
[0096] Performing mean square error loss on the reconstructed image of the phosphate ore and the original image of the phosphate ore respectively to obtain a mean square error loss value;
[0097] Add all mean square error loss values and perform back propagation to obtain the trained feature extraction network model;
[0098] The labeled phosphate rock image data is input into a trained feature extraction network model to adjust the model's hyperparameters to obtain the phosphate rock separation model.
[0099] Specifically, Fig. 9As shown, unlabeled phosphate rock image data is collected for pre-training, and labeled phosphate rock image data is used for fine-tuning; the phosphate rock image data is input into the feature extraction network model after mask operation to obtain output feature 1, output feature 2, output feature 3, and output feature 4; all output features are input into the feature reconstruction network after densification to obtain phosphate rock reconstructed images D1, D2, D3, and D4; mean square error loss is performed on D1 and the original image of phosphate rock, D2 and the original image of phosphate rock, D3 and the original image of phosphate rock, and D4 and the original image of phosphate rock, respectively, to obtain loss values, which are loss 1, loss 2, loss 3, and loss 4 respectively; all losses are added up for back propagation, and the model is optimized to obtain a pre-trained feature extraction network model; the phosphate rock labeled image data is input into the pre-trained feature extraction network model to adjust the model's hyperparameter learning rate and optimizer method to obtain the optimal network model; the fine-tuned ConvNeXt-CCS network model is used to sort phosphate rock.
[0100] The loss value is calculated as:
[0101]
[0102] Where y i and f xi They represent the true value of the i-th sample and its corresponding predicted value, and n is the number of samples.
[0103] It can be understood that using a large amount of unlabeled data to learn a universal representation can capture sufficient information from limited labeled data for accurate classification. The embodiment of the present invention uses a large amount of unlabeled data for pre-training, so that the network can fully mine the potential information of phosphate rock samples. Fine-tuning the pre-trained ConvNeXt-CCS network can enable the network to better learn and capture the fine colloidal characteristics of phosphate rock minerals, thereby improving the accuracy of classification. Even when there are fewer labeled phosphate rock samples, the accuracy of ore sorting can still be achieved.
[0104] In summary, the phosphate rock sorting method in the above embodiment of the present invention realizes automatic sorting of ore by training the phosphate rock sorting model. Since the phosphate rock sorting model masters the logic of ore sorting, it can realize automatic sorting of ore. In addition, when constructing a neural network for training the phosphate rock sorting model, a soft thresholding module is introduced. The soft thresholding module utilizes the soft thresholding operation to perform soft thresholding on the input, which can highlight important features and help the network focus more on learning the fine colloidal features of phosphate ore. The accuracy of the phosphate rock sorting model is guaranteed, and the accuracy of phosphate rock sorting is ultimately guaranteed, solving the problem of low accuracy in phosphate rock sorting in the prior art.
[0105] Embodiment 3
[0106] See also Fig.10 , shown is a phosphate rock separation device proposed in the third embodiment of the present invention, the device comprises:
[0107] A construction module 100, for the neural network at least includes a soft thresholding module, the soft thresholding module is used to obtain a scale parameter according to a preset rule from the received input feature map, and to obtain a threshold value by multiplying the average of the input feature map with the scale parameter, so as to perform a soft thresholding operation through the threshold value;
[0108] A training module 200 is used to perform deep learning training on the neural network to obtain a trained phosphate rock separation model;
[0109] The sorting module 300 is used to obtain the image of the phosphate rock to be sorted, and input the image of the phosphate rock to be sorted into the trained phosphate rock sorting model to obtain the final sorting result.
[0110] Furthermore, in some optional embodiments of the present invention, the building blocks include:
[0111] A pooling unit, configured to perform global average pooling on the input feature map to convert the input feature map in matrix form into a feature map vector;
[0112] A normalization unit, used for sequentially passing the feature map vector through a fully connected layer, a batch normalization operation, and an activation function, and then passing it through a fully connected layer to obtain the scale parameter;
[0113] A conversion unit is used to convert the scale parameter into a numerical value by using a preset function, and obtain the threshold by multiplying the average of the input feature map with the numerical value.
[0114] Further, in some optional embodiments of the present invention, the formula for performing a soft thresholding operation using the threshold is:
[0115] ;
[0116] Among them, x represents the input feature, y represents the output feature, is the threshold value.
[0117] Furthermore, in some optional embodiments of the present invention, the neural network further includes a feature extraction network and a feature reconstruction network, wherein the feature extraction network is used to receive an input image and generate feature maps with different resolutions according to the input image;
[0118] The feature reconstruction network is used to enlarge the resolution of the feature map and restore the feature map into a three-channel image.
[0119] Furthermore, in some optional embodiments of the present invention, the step of the feature reconstruction network for enlarging the resolution of the feature map includes:
[0120] The bicubic interpolation method is used to enlarge the resolution of the feature map. The formula of the bicubic interpolation method is:
[0121] ;
[0122] ;
[0123] Where (x, y) is the coordinate of the pixel to be interpolated, f(x, y) represents the value to be interpolated, (x i ,y j ) represents the point in the i×j area near the point to be interpolated, i, j = 0, 1, 2, 3, a is a constant, taking -0.5, and W(x) is the weight function.
[0124] Furthermore, in some optional embodiments of the present invention, the training module is specifically used for:
[0125] Collecting historical phosphate rock image data, and dividing the historical phosphate rock image data into labeled phosphate rock image data and unlabeled phosphate rock image data;
[0126] The unlabeled phosphate rock image data is input into the feature extraction network after mask operation to obtain output features;
[0127] The output features are densified and then input into a feature reconstruction network to obtain a phosphate rock reconstructed image;
[0128] Performing mean square error loss on the reconstructed image of the phosphate ore and the original image of the phosphate ore respectively to obtain a mean square error loss value;
[0129] Add all mean square error loss values and perform back propagation to obtain the trained feature extraction network model;
[0130] The labeled phosphate rock image data is input into a trained feature extraction network model to adjust the model's hyperparameters to obtain the phosphate rock separation model.
[0131] The calculation formula of the mean square error loss value is:
[0132] ;
[0133] Among them, y i and f xi They represent the true value of the i-th sample and its corresponding predicted value, and n is the number of samples.
[0134] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.
[0135] Embodiment 4
[0136] Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method described in any one of the above embodiments 1 to 2 are implemented.
[0137] Embodiment 5
[0138] Another aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the above-mentioned embodiments one to two when executing the program.
[0139] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0140] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0141] More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0142] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0143] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0144] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for separating phosphate ore, characterized in that: The method comprises: Constructing a neural network, the neural network at least comprising a soft thresholding module, the soft thresholding module being used to obtain a scale parameter according to a preset rule from a received input feature map, and to obtain a threshold value by multiplying the average of the input feature map with the scale parameter, so as to perform a soft thresholding operation through the threshold value; Performing deep learning training on the neural network to obtain a trained phosphate rock separation model; Acquire an image of the phosphate rock to be sorted, and input the image of the phosphate rock to be sorted into the trained phosphate rock sorting model to obtain a final sorting result; The step of obtaining a scale parameter according to a preset rule from the received input feature map, and obtaining a threshold by multiplying the average of the input feature map with the scale parameter comprises: The input feature map is subjected to 7*7 convolution and layer normalization operations to keep the number of channels unchanged, and then subjected to 1*1 convolution and a GELU activation function to unify the number of channels of the input feature map; The input feature map is subjected to global average pooling to convert the input feature map in matrix form into a feature map vector; The feature map vector is sequentially passed through a fully connected layer, a batch normalization operation, and an activation function, and then passed through a fully connected layer to obtain the scale parameter; The scale parameter is converted into a numerical value by using a preset function, and the input feature map is averaged and then multiplied by the numerical value to obtain the threshold value; The neural network also includes a feature extraction network and a feature reconstruction network, wherein the feature extraction network is used to receive an input image and generate feature maps with different resolutions according to the input image; The feature reconstruction network is used to enlarge the resolution of the feature map and restore the feature map into a three-channel image; The step of performing deep learning training on the neural network to obtain a trained phosphate rock separation model includes: Collecting historical phosphate rock image data, and dividing the historical phosphate rock image data into labeled phosphate rock image data and unlabeled phosphate rock image data; The unlabeled phosphate rock image data is input into the feature extraction network after mask operation to obtain output features; The output features are densified and then input into a feature reconstruction network to obtain a phosphate rock reconstructed image; Performing mean square error loss on the reconstructed image of the phosphate ore and the original image of the phosphate ore respectively to obtain a mean square error loss value; Add all mean square error loss values and perform back propagation to obtain the trained feature extraction network model; The labeled phosphate rock image data is input into a trained feature extraction network model to adjust the model's hyperparameters to obtain the phosphate rock separation model.
2. The phosphate rock separation method according to claim 1, characterized in that: The formula for soft thresholding operation by the threshold is: ; Among them, x represents the input feature, y represents the output feature, is the threshold value.
3. The phosphate rock separation method according to claim 1, characterized in that: The step of the feature reconstruction network for enlarging the resolution of the feature map comprises: The bicubic interpolation method is used to enlarge the resolution of the feature map. The formula of the bicubic interpolation method is: ; ; Where (x, y) is the coordinate of the pixel to be interpolated, f(x, y) represents the value to be interpolated, (x i ,y j ) represents the point in the i×j area near the point to be interpolated, i, j = 0, 1, 2, 3, a is a constant, taking -0.5, and W(x) is the weight function.
4. The method for separating phosphate ore according to claim 1, characterized in that: The calculation formula of the mean square error loss value is: ; Among them, y i and f xi They represent the true value of the i-th sample and its corresponding predicted value, and n is the number of samples.
5. A phosphate rock separation device, characterized in that: Used to implement the phosphate ore separation method according to any one of claims 1 to 4, the device comprises: A construction module, used to construct a neural network, the neural network at least comprising a soft thresholding module, the soft thresholding module being used to obtain a scale parameter according to a preset rule from a received input feature map, and to obtain a threshold value by multiplying the average of the input feature map with the scale parameter, so as to perform a soft thresholding operation through the threshold value; A training module, used for performing deep learning training on the neural network to obtain a trained phosphate rock separation model; A sorting module, used for acquiring an image of the phosphate rock to be sorted, and inputting the image of the phosphate rock to be sorted into the trained phosphate rock sorting model to obtain a final sorting result; The building blocks include: A pooling unit, configured to perform global average pooling on the input feature map to convert the input feature map in matrix form into a feature map vector; A normalization unit, used for sequentially passing the feature map vector through a fully connected layer, a batch normalization operation, and an activation function, and then passing it through a fully connected layer to obtain the scale parameter; A conversion unit is used to convert the scale parameter into a numerical value by using a preset function, and obtain the threshold by multiplying the average of the input feature map with the numerical value.
6. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
7. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods of claims 1 to 4 when executing the program.
