CN111460947A - Method and system for identifying metal minerals under microscope based on BP neural network - Google Patents
Method and system for identifying metal minerals under microscope based on BP neural network Download PDFInfo
- Publication number
- CN111460947A CN111460947A CN202010216536.2A CN202010216536A CN111460947A CN 111460947 A CN111460947 A CN 111460947A CN 202010216536 A CN202010216536 A CN 202010216536A CN 111460947 A CN111460947 A CN 111460947A
- Authority
- CN
- China
- Prior art keywords
- metal mineral
- neural network
- unknown
- image
- mineral image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/69—Microscopic objects, e.g. biological cells or cellular parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Multimedia (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method and a system for identifying metal minerals under a microscope based on a BP (back propagation) neural network, which relate to the technical field of metal mineral identification and mainly comprise the steps of obtaining an unknown metal mineral image shot by a reflection polarization microscope, processing the unknown metal mineral image by MAT L AB software to obtain initial characteristic data of the unknown metal mineral image, determining environmental difference characteristics, calculating final characteristic data of the unknown metal mineral image according to the initial characteristic data of the unknown metal mineral image and the environmental difference characteristics, inputting the final characteristic data of the unknown metal mineral image into a trained BP neural network model, and determining the type of the unknown metal mineral.
Description
Technical Field
The invention relates to the technical field of metal mineral identification, in particular to a method and a system for identifying metal minerals under a microscope based on a BP neural network.
Background
With the development of economy and society, the demand of metals is increasing, and higher requirements are put on the mining and identification of metal ores. The identification methods of metal ores are more, and an electronic probe analysis technology and a reflection polarization microscope technology are common identification methods.
With the development of science and technology and information, the electronic probe analysis technology is continuously improved and innovated, and is continuously upgraded and improved on the basis of the conventional multi-element analysis technology. However, the electron probe analysis technique has the following disadvantages: the electronic probe analysis instrument has high cost, the unit price of one electronic probe analysis instrument reaches millions of RMB, special maintenance is needed in the later period, and the electronic probe analysis instrument is not suitable for being used in the study and work of common colleges and universities; the electronic probe analysis instrument is heavy and not easy to carry, and the application range is limited; requiring a person with some experience to operate.
The reflection polarization microscope technology is to identify metal minerals by using a reflection polarization microscope, and mainly uses optical properties and physical properties of the metal minerals to identify the metal minerals. Generally, minerals with similar reflectivity are difficult to measure by simple comparison, and minerals with similar reflection colors are difficult to describe by accurate language. In addition, due to individual differences of people, especially for patients with color blindness or poor color, the observation of mineral colors under a microscope is more difficult, such as cream yellow, light yellow, brown, and tan, which are sometimes difficult to distinguish, even the practitioners with abundant experience cannot guarantee hundreds of accuracy, and the error is large.
Disclosure of Invention
The invention aims to provide a method and a system for identifying metal minerals under a microscope based on a BP neural network, which solve the problems of high cost and large error in identifying part of metal minerals in daily geological activities by using a machine learning means.
In order to achieve the purpose, the invention provides the following scheme:
a method for identifying microscopic metal minerals based on a BP neural network comprises the following steps:
acquiring an unknown metal mineral image shot by a reflection polarization microscope;
processing the unknown metal mineral image by using MAT L AB software to obtain the primary characteristic data of the unknown metal mineral image;
determining the difference characteristics of the environment; the environmental difference characteristic is a difference value between the first characteristic data and the second characteristic data; the first characteristic data is characteristic data of a first metal mineral image under the illumination intensity of an unknown metal mineral image, and the second characteristic data is characteristic data of a second metal mineral image under the illumination intensity adopted in the process of training a BP neural network model; the illumination intensity of the first metal mineral image is different from that of the second metal mineral image, and the types of metal minerals are the same;
calculating final characteristic data of the unknown metal mineral image according to the primary characteristic data of the unknown metal mineral image and the environment difference characteristics;
inputting the final characteristic data of the unknown metal mineral image into a trained BP neural network model to determine the type of the unknown metal mineral; the input of the trained BP neural network model is the final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of the metal mineral.
Optionally, the processing of the unknown metal mineral image by MAT L AB software to obtain preliminary feature data of the unknown metal mineral image specifically includes:
reading the unknown metal mineral image into MAT L AB software by adopting an imread function, wherein the storage form of the unknown metal mineral image in the MAT L AB software is a three-dimensional array form, and the three-dimensional array form contains RGB color information of the unknown metal mineral image;
sequentially carrying out mean value filtering and normalization processing on the unknown metal mineral image;
and performing feature extraction on the normalized unknown metal mineral image to obtain the primary feature data of the unknown metal mineral image.
Optionally, the step of performing feature extraction on the normalized unknown metal mineral image to obtain preliminary feature data of the unknown metal mineral image includes:
carrying out dimension separation on the normalized unknown metal mineral image to obtain three one-dimensional arrays; the three one-dimensional arrays are respectively a first one-dimensional array, a second one-dimensional array and a third one-dimensional array;
calculating the average value of each one-dimensional array by using a mean function;
determining the primary characteristic data of the unknown metal mineral image according to the average value of all the one-dimensional arrays; the preliminary feature data of the unknown metal mineral image comprises four elements, wherein the first element is an average value of a first one-dimensional array, the second element is an average value of a second one-dimensional array, the third element is an average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
Optionally, the calculating final feature data of the unknown metal mineral image according to the preliminary feature data of the unknown metal mineral image and the environment difference feature specifically includes:
and superposing the environmental difference characteristics to the primary characteristic data of the unknown metal mineral image to obtain the final characteristic data of the unknown metal mineral image.
Optionally, the step of training the BP neural network model includes:
acquiring different types of historical metal mineral images under the same illumination intensity;
processing all the historical metal mineral images by using MAT L AB software;
grouping the processed historical metal mineral images to obtain a training set and a test set;
training a BP neural network model by using the data in the training set, and stopping training the BP neural network model when a set training stopping condition is met to obtain a preliminary BP neural network model;
testing the preliminary BP neural network model by adopting the data in the test set, stopping testing the preliminary BP neural network model when set test conditions are met, and storing the preliminary BP neural network model meeting the test conditions; and the preliminary BP neural network model meeting the test conditions is a trained BP neural network model.
A recognition system for microscopic metal minerals based on a BP neural network comprises:
the unknown metal mineral image acquisition module is used for acquiring an unknown metal mineral image shot by a reflection polarization microscope;
the unknown metal mineral image preliminary characteristic data calculation module is used for processing the unknown metal mineral image by using MAT L AB software to obtain the unknown metal mineral image preliminary characteristic data;
the environment difference characteristic determining module is used for determining environment difference characteristics; the environmental difference characteristic is a difference value between the first characteristic data and the second characteristic data; the first characteristic data is characteristic data of a first metal mineral image under the illumination intensity of an unknown metal mineral image, and the second characteristic data is characteristic data of a second metal mineral image under the illumination intensity adopted in the process of training a BP neural network model; the illumination intensity of the first metal mineral image is different from that of the second metal mineral image, and the types of metal minerals are the same;
the unknown metal mineral image final characteristic data calculation module is used for calculating the unknown metal mineral image final characteristic data according to the unknown metal mineral image preliminary characteristic data and the environment difference characteristics;
the unknown metal mineral type determining module is used for inputting the final characteristic data of the unknown metal mineral image into a trained BP neural network model to determine the type of the unknown metal mineral; the input of the trained BP neural network model is the final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of the metal mineral.
Optionally, the module for calculating the preliminary characteristic data of the unknown metal mineral image specifically includes:
the reading unit is used for reading the unknown metal mineral image into MAT L AB software by adopting an immead function, wherein the storage form of the unknown metal mineral image in the MAT L AB software is a three-dimensional array form, and the three-dimensional array form contains RGB color information of the unknown metal mineral image;
the processing unit is used for sequentially carrying out mean value filtering and normalization processing on the unknown metal mineral image;
and the unknown metal mineral image preliminary characteristic data determining unit is used for extracting the characteristics of the normalized unknown metal mineral image to obtain the unknown metal mineral image preliminary characteristic data.
Optionally, the unit for determining the preliminary characteristic data of the unknown metal mineral image specifically includes:
the dimension separation subunit is used for performing dimension separation on the normalized unknown metal mineral image to obtain three one-dimensional arrays; the three one-dimensional arrays are respectively a first one-dimensional array, a second one-dimensional array and a third one-dimensional array;
the mean value operator unit is used for calculating the mean value of each one-dimensional array by using a mean function;
the unknown metal mineral image preliminary characteristic data determining subunit is used for determining the unknown metal mineral image preliminary characteristic data according to the average value of all the one-dimensional arrays; the preliminary feature data of the unknown metal mineral image comprises four elements, wherein the first element is an average value of a first one-dimensional array, the second element is an average value of a second one-dimensional array, the third element is an average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
Optionally, the module for calculating final feature data of the unknown metal mineral image specifically includes:
and the final feature data calculation unit of the unknown metal mineral image is used for superposing the environmental difference features to the primary feature data of the unknown metal mineral image to obtain the final feature data of the unknown metal mineral image.
Optionally, the recognition system further includes a BP neural network model training module; the BP neural network model training module specifically comprises:
the historical metal mineral image acquisition unit is used for acquiring different types of historical metal mineral images under the same illumination intensity;
the historical metal mineral image processing unit is used for processing all the historical metal mineral images by using MAT L AB software;
the training set and test set determining unit is used for grouping the processed historical metal mineral images to obtain a training set and a test set;
a preliminary BP neural network model determining unit, configured to train the BP neural network model by using the data in the training set, and stop training the BP neural network model when a set training stop condition is met, so as to obtain a preliminary BP neural network model;
the trained BP neural network model determining unit is used for testing the preliminary BP neural network model by adopting the data concentrated by the test, stopping testing the preliminary BP neural network model when set test conditions are met, and storing the preliminary BP neural network model meeting the test conditions; and the preliminary BP neural network model meeting the test conditions is a trained BP neural network model.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
according to the method and the system for identifying the metal minerals under the microscope based on the BP neural network, the images are automatically identified by means of computer software and a reflection polarization microscope, the interference of personal factors and environmental factors is eliminated on the basis of ensuring low identification cost of the metal minerals, the identification accuracy is improved, and the application range is expanded.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a method for identifying microscopic metal minerals based on a BP neural network according to an embodiment of the present invention;
FIG. 2 is a structural diagram of a recognition system for microscopic metal minerals based on a BP neural network according to an embodiment of the present invention;
FIG. 3 is a drawing of a square lead ore under a 40-fold mirror according to an embodiment of the present invention;
FIG. 4 is a graph showing the luminance distribution of the surface of a galena picture according to an embodiment of the invention;
FIG. 5 is a 40-fold under-the-mirror boron-magnesium-iron ore map according to an embodiment of the present invention;
FIG. 6 is a 40-fold under-the-mirror zinc blende drawing of an embodiment of the present invention;
fig. 7 is a structural diagram of a BP neural network model according to an embodiment of the present invention.
Detailed Description
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, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example one
As shown in fig. 1, the method for identifying a microscopic metal mineral based on a BP neural network provided in this embodiment specifically includes the following steps.
Step 101: and acquiring an unknown metal mineral image shot by a reflection polarization microscope.
And 102, processing the unknown metal mineral image by using MAT L AB software to obtain the primary characteristic data of the unknown metal mineral image.
Step 103: determining the difference characteristics of the environment; the environmental difference characteristic is a difference value between the first characteristic data and the second characteristic data; the first characteristic data is characteristic data of a first metal mineral image under the illumination intensity of an unknown metal mineral image, and the second characteristic data is characteristic data of a second metal mineral image under the illumination intensity adopted in the process of training a BP neural network model; the illumination intensity of the first metal mineral image is different from that of the second metal mineral image, and the metal mineral types are the same.
Step 104: and calculating final characteristic data of the unknown metal mineral image according to the primary characteristic data of the unknown metal mineral image and the environment difference characteristic.
Step 105: inputting the final characteristic data of the unknown metal mineral image into a trained BP neural network model to determine the type of the unknown metal mineral; the input of the trained BP neural network model is the final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of the metal mineral.
Step 102 specifically includes:
the unknown metal mineral image is read into MAT L AB software by adopting an immead function, the storage form of the unknown metal mineral image in the MAT L AB software is a three-dimensional array form, and the three-dimensional array form contains RGB color information of the unknown metal mineral image.
And sequentially carrying out mean value filtering and normalization processing on the unknown metal mineral image.
And performing feature extraction on the normalized unknown metal mineral image to obtain the primary feature data of the unknown metal mineral image. The method specifically comprises the following steps: firstly, carrying out dimension separation on an unknown metal mineral image after normalization processing to obtain three one-dimensional arrays; the three one-dimensional arrays are respectively a first one-dimensional array, a second one-dimensional array and a third one-dimensional array; secondly, calculating the average value of each one-dimensional array by using a mean function; thirdly, determining the primary characteristic data of the unknown metal mineral image according to the average value of all the one-dimensional arrays; the preliminary feature data of the unknown metal mineral image comprises four elements, wherein the first element is an average value of a first one-dimensional array, the second element is an average value of a second one-dimensional array, the third element is an average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
Step 104 specifically includes:
and superposing the environmental difference characteristics to the primary characteristic data of the unknown metal mineral image to obtain the final characteristic data of the unknown metal mineral image.
Preferably, the present invention further comprises a step of training the BP neural network model, which specifically comprises:
and acquiring historical metal mineral images of different types under the same illumination intensity.
All of the historical metal mineral images were processed using MAT L AB software.
And grouping the processed historical metal mineral images to obtain a training set and a testing set.
And training the BP neural network model by using the data in the training set, and stopping training the BP neural network model when a set training stopping condition is met to obtain a preliminary BP neural network model.
Testing the preliminary BP neural network model by adopting the data in the test set, stopping testing the preliminary BP neural network model when set test conditions are met, and storing the preliminary BP neural network model meeting the test conditions; and the preliminary BP neural network model meeting the test conditions is a trained BP neural network model.
Example two
As shown in fig. 2, the present embodiment further provides a system for identifying microscopic metal minerals based on a BP neural network, including:
an unknown metal mineral image obtaining module 201, configured to obtain an unknown metal mineral image captured by the reflection polarization microscope.
And the unknown metal mineral image preliminary characteristic data calculation module 202 is configured to process the unknown metal mineral image by using MAT L AB software, so as to obtain the unknown metal mineral image preliminary characteristic data.
An environment difference characteristic determining module 203, configured to determine an environment difference characteristic; the environmental difference characteristic is a difference value between the first characteristic data and the second characteristic data; the first characteristic data is characteristic data of a first metal mineral image under the illumination intensity of an unknown metal mineral image, and the second characteristic data is characteristic data of a second metal mineral image under the illumination intensity adopted in the process of training a BP neural network model; the illumination intensity of the first metal mineral image is different from that of the second metal mineral image, and the metal mineral types are the same.
And an unknown metal mineral image final feature data calculating module 204, configured to calculate final feature data of an unknown metal mineral image according to the unknown metal mineral image preliminary feature data and the environment difference feature.
An unknown metal mineral type determining module 205, configured to input the final feature data of the unknown metal mineral image into a trained BP neural network model, and determine the type of the unknown metal mineral; the input of the trained BP neural network model is the final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of the metal mineral.
The unknown metal mineral image preliminary feature data calculation module 202 specifically includes:
the reading unit is used for reading the unknown metal mineral image into MAT L AB software by adopting an immead function, the storage form of the unknown metal mineral image in the MAT L AB software is a three-dimensional array form, and the three-dimensional array form contains RGB color information of the unknown metal mineral image.
And the processing unit is used for sequentially carrying out mean value filtering and normalization processing on the unknown metal mineral image.
And the unknown metal mineral image preliminary characteristic data determining unit is used for extracting the characteristics of the normalized unknown metal mineral image to obtain the unknown metal mineral image preliminary characteristic data.
The unknown metal mineral image preliminary characteristic data determining unit specifically comprises:
the dimension separation subunit is used for performing dimension separation on the normalized unknown metal mineral image to obtain three one-dimensional arrays; the three one-dimensional arrays are respectively a first one-dimensional array, a second one-dimensional array and a third one-dimensional array.
And the average value operator unit is used for calculating the average value of each one-dimensional array by using a mean function.
The unknown metal mineral image preliminary characteristic data determining subunit is used for determining the unknown metal mineral image preliminary characteristic data according to the average value of all the one-dimensional arrays; the preliminary feature data of the unknown metal mineral image comprises four elements, wherein the first element is an average value of a first one-dimensional array, the second element is an average value of a second one-dimensional array, the third element is an average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
The unknown metal mineral image final feature data calculation module 204 specifically includes:
and the final feature data calculation unit of the unknown metal mineral image is used for superposing the environmental difference features to the primary feature data of the unknown metal mineral image to obtain the final feature data of the unknown metal mineral image.
Preferably, the recognition system further comprises a BP neural network model training module; the BP neural network model training module specifically comprises:
and the historical metal mineral image acquisition unit is used for acquiring different types of historical metal mineral images under the same illumination intensity.
And the historical metal mineral image processing unit is used for processing all the historical metal mineral images by using MAT L AB software.
And the training set and test set determining unit is used for grouping the processed historical metal mineral images to obtain a training set and a test set.
And the preliminary BP neural network model determining unit is used for training the BP neural network model by using the data in the training set, and stopping training the BP neural network model when a set training stopping condition is met to obtain the preliminary BP neural network model.
The trained BP neural network model determining unit is used for testing the preliminary BP neural network model by adopting the data concentrated by the test, stopping testing the preliminary BP neural network model when set test conditions are met, and storing the preliminary BP neural network model meeting the test conditions; and the preliminary BP neural network model meeting the test conditions is a trained BP neural network model.
EXAMPLE III
Introduction to recognition principle
The RGB color scheme is a color standard in the industry, and various colors are obtained by changing three color channels of red (R), green (G) and blue (B) and superimposing the three color channels on each other, where RGB represents the colors of the three channels of red, green and blue, and the color standard includes almost all colors that can be perceived by human vision, and is one of the most widely used color systems.
Generally, RGB has 256 levels of brightness, which are represented by numbers from 0, 1, 2.. to 255, where 0 represents darkest, 255 represents brightest, and the magnitude of the value varies with the change in brightness, and the change is linear.256 levels of RGB colors can combine about 1678 thousands of colors in total, i.e., 256 × 256 × — 16777216.
For example, a picture of galena (as shown in fig. 3) is read, and the distribution of the luminance (the luminance is represented by RGB color components) is examined (as shown in fig. 4). The surface brightness of the galena is found to be relatively uniform. In fact, the reflectivity (positive correlation with brightness) of the galena and other metal minerals is a definite value, which means that the brightness distribution of the metal minerals is relatively uniform, and the brightness fluctuation is small in a very small range after the brightness is averaged.
Introduction to neural network principle
The BP (Back propagation) network is proposed by a group of scientists including Rumelhart and McCelland in 1986, is a multi-layer feedforward network trained according to an error inverse propagation algorithm, and is one of the most widely applied neural network models at present. The BP network can learn and store a large number of input-output pattern mappings without prior disclosure of mathematical equations describing such mappings. The learning rule is that the steepest descent method is used, and the weight and the threshold value of the network are continuously adjusted through back propagation, so that the error square sum of the network is minimum. The BP neural network model topology comprises an input layer (input), a hide layer (hide layer) and an output layer (output layer). Each layer is composed of units (also called nerve nodes), the input layer has the characteristics of a training set, the characteristics are transmitted into the next layer through the weights of connecting points, the output of one layer is the input of the next layer, the number of hidden layers is arbitrary, each layer is subjected to weighted summation and then output according to a nonlinear transformation equation. The weight of each connection is updated by a bp (backpropagation) algorithm, i.e. comparing the error of the predicted value of the output layer of the neural network with the true value, and minimizing the error in the opposite direction (from the output layer > the hidden layer > the input layer). The method is widely applied to the fields of classification recognition, approximation, regression, compression and the like.
Based on the above principle, the method for identifying metal minerals under a microscope based on the BP neural network provided by this embodiment mainly includes the following steps.
The method comprises the following steps: and (5) image acquisition.
Specifically, the method comprises the steps of setting an exposure time of 750 mu S, a sensitivity (ISO) of 200 and a resolution of 1600 × 1200 by using an O L YMPUS-BX51M reflection polarization microscope, and respectively collecting minerals such as galena, sphalerite, ludwigite and the like by using a digital camera carried by the reflection polarization microscope, wherein about 20 pictures of each mineral are shown in FIGS. 3, 5 and 6.
Step two: and (4) image processing and feature extraction.
The image is placed under the root path specified by MAT L AB software, and the image is imported by using its own function, at this time, the image is stored in MAT L AB software in the form of a three-dimensional digital group, namely the RGB color information of the image.
The image processing specifically includes:
1. digitalizing, and reading the image into MAT L AB software by using an immead function, wherein the image becomes a three-dimensional matrix, and the size of each element in the matrix is between 0 and 256.
2. The method mainly adopts a neighborhood averaging method, and the core idea of the mean filtering is that the whole image is regarded as being composed of a plurality of small blocks with constant gray scale, the correlation between adjacent pixels is strong, but the noise has statistical independence.
3. Normalization, using premmx (P, T) function in MAT L AB software, where P and T are the original input and output data, normalization is to change the number to a decimal number between (0, 1), firstly to eliminate dimension, and secondly to facilitate data processing.
The feature extraction specifically comprises:
1. dimension separation; since the image to be read is a three-dimensional array, the three-dimensional array needs to be divided into three one-dimensional arrays.
2. Averaging: averaging each dimension of the three-dimensional array; the arrays of each dimension are averaged directly using the mean function. Three mean values exist in three dimensions, three mean values are obtained from one picture, the three mean values are stored in an array with the size of 4, the first three mean values are stored, and the fourth mean value is stored. For example: galena: array {250, 253, 253, galena }. There were 20 pictures for each mineral, resulting in a total of 20 arrays.
Step three: and (5) training a BP neural network model.
Firstly, dividing image characteristic data into a training set and a testing set; there were 20 arrays of each mineral, 15 of which were training sets and 5 of which were test sets. And (4) taking the training set of all the minerals as a training set, and taking the test set as a test set.
Secondly, training a neural network; as shown in FIG. 7, the essence of neural network training is to make the output value of a mineral and the mineral labelError is small enough, using WijThe weights are represented, theta represents a bias, and a main line for realizing the process is to update the weights and the bias in the training process, namely to obtain the most appropriate weights and bias, because the values of a hidden layer and an output layer in the neural network mainly depend on the weights and the bias. The method specifically comprises the following steps:
1. input layer- > hidden layer- > output layer.
Three nodes of the input layer, x1, x2, x3, are artificially input eigenvalues, which are embodied in MAT L AB software function as net newff (P.,), where P is a matrix of input eigenvalues x1, x2, and x3, and then propagate backward from the input layer, specifically, propagate or advance to the hidden layer, where it is necessary to calculate the values of two nodes of the hidden layer, multiply the value of each input layer by the weight of the corresponding node, sum the summed values, add a bias to obtain a value, and then bring the value into the conversion function sigmoid (f (x) ((x) (-1/1 + e-x), for example, the value of node No. 4 is f (x) (-1/1 + e-x), where x ═ 1 × w14+x2×w24+x3×w34+θ1Similarly, the value of node 5 can be obtained, where the value of each node is OiAnd (4) showing.
After the value of the hidden layer is obtained, the neural network continues to propagate backwards. Since the values of nodes 4 and 5 are known, the value of node 6, i.e., the value of the output layer, can be obtained in the same way. The error of the output layer needs to be calculated next.
2. And outputting the error of the layer.
Since the aim of the training is to minimize the error of the output value of a mineral from the mineral signature. In fact, the actual label of the output layer is known, and this is already contained in the training set. For example, if the characteristic value {190, 195, 205} of the galena is input and the corresponding mark of the galena is 1, the error between the value of the output layer and the corresponding mark is calculated, and the corresponding calculation formula is Errj=Oj(1-Oj)(Tj-Oj)。
Wherein, TjIs the corresponding label, OiThat is, to calculate the value of the error node, the predicted value and of the output layer can be calculatedThe error between the true values, if small enough, stops training and saves the weights and biases of the existing neural network. Otherwise, the training is continued to update the weights and biases. The strategy for updating is back-propagation, i.e. output layer to hidden layer but input layer.
3. Output layer- > hidden layer- > input layer.
4. The layer error is concealed.
The hidden layer is the same as the output layer, the error of each node of the hidden layer needs to be calculated, and the formula is
Wherein, ErrkThe error of the node of the next layer of the calculated node. w is ajkAnd the weight of the node and the node of the next layer. For example, calculate error, Err, for node 55=O5(1-O5)Err6*w56. If there are multiple output layer nodes, the error of each output layer node is multiplied by the weight corresponding to the previous layer node, then the sum is added, and then the sum is multiplied by oj(1-Oj). Similarly, the error of node 4 can be obtained.
After errors of the 4, 5, and 6 nodes are obtained, the weights and biases need to be updated next.
5. And updating the weight.
The weight update formula is:
Δwij=(l)ErrjOj;
wij=wij+Δwij;
Δwijthe variable quantity of the weight is equal to the error of the node multiplied by the value of the node multiplied by the learning rate l (which is a common default value and is not set by the user), and then the original weight is added to the variable quantity of the weight to form a new weight. The weights of all nodes can be calculated by the formula.
6. The bias is updated.
The weight update formula is:
Δθj=(l)Errj
θj=θj+Δθj
the weight update formula is similar to the weight update formula, but the value of Δ θ becomes the learning rate multiplied by the error, and there is no value of the node. All biases are updated by the above formula.
The above process is a complete training flow, and after the weight and the bias are updated, a group of characteristic values are input into the neural network to continuously repeat the above process.
Conditions under which the training process is stopped: the weight is lower than a certain set threshold value; the predicted error rate is below a certain threshold; reaching the preset cycle number.
After stopping, the optimal weight and bias should be obtained at the moment, and the network data at the moment can be stored to predict and classify minerals.
The core code is to input the training set into the neural network. And then training is performed. This process mainly uses the characteristics of neural network to find an optimal input (first three items of array) and output (fourth item of array) mapping. The method mainly comprises the following steps:
1. a neural network is created using net newff (P, [. ], {.. }) with P as input data and ellipses as other parameters.
Net, trainparam, epochs 5000; the number of training times is set.
Net, trainparam, good 0.0001; a convergence error is set.
[ net, tr ] train (net); and training the network.
Finally, the test set data is used for testing accuracy
After training, inputting the test set as a parameter into the trained neural network, and researching the accuracy of the output result. For example, test data for galena is input and an observation period output is whether galena is present. If the accuracy is low, the training and testing are repeated.
Step four: and inputting the images acquired in real time into the trained BP neural network model to realize the identification of the metal minerals.
The three-dimensional statistical features extracted at present are brightness and color features of images, which are related to the illumination intensity when the microscope takes a picture (related to instruments), and the image statistical features change when the illumination intensity is different. The following method is adopted: when the network is initially trained, a standard image (denoted as a1) is taken, and the features F of the standard image are extracted, namely { x1, x2, x3, x4 }. When an unknown mineral image is identified (the light intensity is changed during shooting), an image of a standard mineral A1 is collected by light with changed light intensity (or an instrument), the characteristic F 'of the standard mineral A1 is extracted as { Z1, Z2, Z3 and Z4}, then the F' and the F are subtracted to obtain a difference Y as { Y1, Y2, Y3 and Y4} (correction number), and then the correction number is added to the characteristic of the unknown mineral to be identified, so that the problem of identification errors caused by different light intensities or different instruments is solved.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.
Claims (10)
1. A method for identifying microscopic metal minerals based on a BP neural network is characterized by comprising the following steps:
acquiring an unknown metal mineral image shot by a reflection polarization microscope;
processing the unknown metal mineral image by using MAT L AB software to obtain the primary characteristic data of the unknown metal mineral image;
determining the difference characteristics of the environment; the environmental difference characteristic is a difference value between the first characteristic data and the second characteristic data; the first characteristic data is characteristic data of a first metal mineral image under the illumination intensity of an unknown metal mineral image, and the second characteristic data is characteristic data of a second metal mineral image under the illumination intensity adopted in the process of training a BP neural network model; the illumination intensity of the first metal mineral image is different from that of the second metal mineral image, and the types of metal minerals are the same;
calculating final characteristic data of the unknown metal mineral image according to the primary characteristic data of the unknown metal mineral image and the environment difference characteristics;
inputting the final characteristic data of the unknown metal mineral image into a trained BP neural network model to determine the type of the unknown metal mineral; the input of the trained BP neural network model is the final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of the metal mineral.
2. The method for identifying the metal mineral under the microscope based on the BP neural network according to claim 1, wherein the processing the unknown metal mineral image by MAT L AB software to obtain the preliminary feature data of the unknown metal mineral image specifically comprises:
reading the unknown metal mineral image into MAT L AB software by adopting an imread function, wherein the storage form of the unknown metal mineral image in the MAT L AB software is a three-dimensional array form, and the three-dimensional array form contains RGB color information of the unknown metal mineral image;
sequentially carrying out mean value filtering and normalization processing on the unknown metal mineral image;
and performing feature extraction on the normalized unknown metal mineral image to obtain the primary feature data of the unknown metal mineral image.
3. The method for identifying the metal mineral under the microscope based on the BP neural network according to claim 2, wherein the step of performing feature extraction on the normalized unknown metal mineral image to obtain the preliminary feature data of the unknown metal mineral image specifically comprises the steps of:
carrying out dimension separation on the normalized unknown metal mineral image to obtain three one-dimensional arrays; the three one-dimensional arrays are respectively a first one-dimensional array, a second one-dimensional array and a third one-dimensional array;
calculating the average value of each one-dimensional array by using a mean function;
determining the primary characteristic data of the unknown metal mineral image according to the average value of all the one-dimensional arrays; the preliminary feature data of the unknown metal mineral image comprises four elements, wherein the first element is an average value of a first one-dimensional array, the second element is an average value of a second one-dimensional array, the third element is an average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
4. The method for identifying the metal mineral under the microscope based on the BP neural network according to claim 1, wherein the calculating the final feature data of the unknown metal mineral image according to the preliminary feature data of the unknown metal mineral image and the environmental difference features specifically comprises:
and superposing the environmental difference characteristics to the primary characteristic data of the unknown metal mineral image to obtain the final characteristic data of the unknown metal mineral image.
5. The method for identifying the metal minerals under the microscope based on the BP neural network as claimed in claim 1, wherein the step of training the BP neural network model comprises:
acquiring different types of historical metal mineral images under the same illumination intensity;
processing all the historical metal mineral images by using MAT L AB software;
grouping the processed historical metal mineral images to obtain a training set and a test set;
training a BP neural network model by using the data in the training set, and stopping training the BP neural network model when a set training stopping condition is met to obtain a preliminary BP neural network model;
testing the preliminary BP neural network model by adopting the data in the test set, stopping testing the preliminary BP neural network model when set test conditions are met, and storing the preliminary BP neural network model meeting the test conditions; and the preliminary BP neural network model meeting the test conditions is a trained BP neural network model.
6. A recognition system for microscopic metal minerals based on a BP neural network is characterized by comprising:
the unknown metal mineral image acquisition module is used for acquiring an unknown metal mineral image shot by a reflection polarization microscope;
the unknown metal mineral image preliminary characteristic data calculation module is used for processing the unknown metal mineral image by using MAT L AB software to obtain the unknown metal mineral image preliminary characteristic data;
the environment difference characteristic determining module is used for determining environment difference characteristics; the environmental difference characteristic is a difference value between the first characteristic data and the second characteristic data; the first characteristic data is characteristic data of a first metal mineral image under the illumination intensity of an unknown metal mineral image, and the second characteristic data is characteristic data of a second metal mineral image under the illumination intensity adopted in the process of training a BP neural network model; the illumination intensity of the first metal mineral image is different from that of the second metal mineral image, and the types of metal minerals are the same;
the unknown metal mineral image final characteristic data calculation module is used for calculating the unknown metal mineral image final characteristic data according to the unknown metal mineral image preliminary characteristic data and the environment difference characteristics;
the unknown metal mineral type determining module is used for inputting the final characteristic data of the unknown metal mineral image into a trained BP neural network model to determine the type of the unknown metal mineral; the input of the trained BP neural network model is the final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of the metal mineral.
7. The system for identifying the metal mineral under the microscope based on the BP neural network as claimed in claim 6, wherein the unknown metal mineral image preliminary feature data calculation module specifically comprises:
the reading unit is used for reading the unknown metal mineral image into MAT L AB software by adopting an immead function, wherein the storage form of the unknown metal mineral image in the MAT L AB software is a three-dimensional array form, and the three-dimensional array form contains RGB color information of the unknown metal mineral image;
the processing unit is used for sequentially carrying out mean value filtering and normalization processing on the unknown metal mineral image;
and the unknown metal mineral image preliminary characteristic data determining unit is used for extracting the characteristics of the normalized unknown metal mineral image to obtain the unknown metal mineral image preliminary characteristic data.
8. The system for identifying the metal mineral under the microscope based on the BP neural network according to claim 7, wherein the unit for determining the preliminary feature data of the unknown metal mineral image specifically comprises:
the dimension separation subunit is used for performing dimension separation on the normalized unknown metal mineral image to obtain three one-dimensional arrays; the three one-dimensional arrays are respectively a first one-dimensional array, a second one-dimensional array and a third one-dimensional array;
the mean value operator unit is used for calculating the mean value of each one-dimensional array by using a mean function;
the unknown metal mineral image preliminary characteristic data determining subunit is used for determining the unknown metal mineral image preliminary characteristic data according to the average value of all the one-dimensional arrays; the preliminary feature data of the unknown metal mineral image comprises four elements, wherein the first element is an average value of a first one-dimensional array, the second element is an average value of a second one-dimensional array, the third element is an average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
9. The system for identifying the metal mineral under the microscope based on the BP neural network as claimed in claim 6, wherein the unknown metal mineral image final feature data calculation module specifically comprises:
and the final feature data calculation unit of the unknown metal mineral image is used for superposing the environmental difference features to the primary feature data of the unknown metal mineral image to obtain the final feature data of the unknown metal mineral image.
10. The under-microscope metal mineral recognition system based on the BP neural network as claimed in claim 6, wherein the recognition system further comprises a BP neural network model training module; the BP neural network model training module specifically comprises:
the historical metal mineral image acquisition unit is used for acquiring different types of historical metal mineral images under the same illumination intensity;
the historical metal mineral image processing unit is used for processing all the historical metal mineral images by using MAT L AB software;
the training set and test set determining unit is used for grouping the processed historical metal mineral images to obtain a training set and a test set;
a preliminary BP neural network model determining unit, configured to train the BP neural network model by using the data in the training set, and stop training the BP neural network model when a set training stop condition is met, so as to obtain a preliminary BP neural network model;
the trained BP neural network model determining unit is used for testing the preliminary BP neural network model by adopting the data concentrated by the test, stopping testing the preliminary BP neural network model when set test conditions are met, and storing the preliminary BP neural network model meeting the test conditions; and the preliminary BP neural network model meeting the test conditions is a trained BP neural network model.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010216536.2A CN111460947B (en) | 2020-03-15 | 2020-03-15 | BP neural network-based method and system for identifying metal minerals under microscope |
AU2020103251A AU2020103251A4 (en) | 2020-03-15 | 2020-11-05 | Method and system for identifying metallic minerals under microscope based on bp nueral network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010216536.2A CN111460947B (en) | 2020-03-15 | 2020-03-15 | BP neural network-based method and system for identifying metal minerals under microscope |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111460947A true CN111460947A (en) | 2020-07-28 |
CN111460947B CN111460947B (en) | 2022-05-31 |
Family
ID=71685691
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010216536.2A Active CN111460947B (en) | 2020-03-15 | 2020-03-15 | BP neural network-based method and system for identifying metal minerals under microscope |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111460947B (en) |
AU (1) | AU2020103251A4 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950427A (en) * | 2020-08-06 | 2020-11-17 | 中国地质科学院矿产资源研究所 | Garnet subclass identification method based on thermal infrared spectrum characteristics and BP neural network model |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113128404A (en) * | 2021-04-20 | 2021-07-16 | 中国地质科学院 | Intelligent mineral identification method and system |
CN113935966B (en) * | 2021-10-13 | 2023-05-26 | 东风本田发动机有限公司 | Slag point detection method, device and equipment for metal material and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1349929A (en) * | 2001-04-02 | 2002-05-22 | 吉林大学 | Mesoporous molecular sieve material with strong acidity and high hydrothermal stability and its prepn |
US20170011253A1 (en) * | 2011-12-30 | 2017-01-12 | Abbott Point Of Care, Inc. | Method and apparatus for automated platelet identification within a whole blood sample from microscopy images |
CN108573205A (en) * | 2017-09-26 | 2018-09-25 | 中科智文(北京)科技有限公司 | A kind of Khotan jade seed material micro-image intelligent identifying system |
CN110073301A (en) * | 2017-08-02 | 2019-07-30 | 强力物联网投资组合2016有限公司 | The detection method and system under data collection environment in industrial Internet of Things with large data sets |
CN110516954A (en) * | 2019-08-23 | 2019-11-29 | 昆明理工大学 | One kind referring to calibration method based on GA-BP neural network algorithm optimization mineral processing production |
-
2020
- 2020-03-15 CN CN202010216536.2A patent/CN111460947B/en active Active
- 2020-11-05 AU AU2020103251A patent/AU2020103251A4/en not_active Ceased
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1349929A (en) * | 2001-04-02 | 2002-05-22 | 吉林大学 | Mesoporous molecular sieve material with strong acidity and high hydrothermal stability and its prepn |
US20170011253A1 (en) * | 2011-12-30 | 2017-01-12 | Abbott Point Of Care, Inc. | Method and apparatus for automated platelet identification within a whole blood sample from microscopy images |
CN110073301A (en) * | 2017-08-02 | 2019-07-30 | 强力物联网投资组合2016有限公司 | The detection method and system under data collection environment in industrial Internet of Things with large data sets |
CN108573205A (en) * | 2017-09-26 | 2018-09-25 | 中科智文(北京)科技有限公司 | A kind of Khotan jade seed material micro-image intelligent identifying system |
CN110516954A (en) * | 2019-08-23 | 2019-11-29 | 昆明理工大学 | One kind referring to calibration method based on GA-BP neural network algorithm optimization mineral processing production |
Non-Patent Citations (6)
Title |
---|
CHUNYAN DENG等: "《A Panoramic Geology Field Trip System Using Image-Based Rendering》", 《2016 IEEE 40TH ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC)》 * |
JINXIN HE等: "《Design and implementation of data management subsystem in Environmental Sensor Networks》", 《2012 INTERNATIONAL SYMPOSIUM ON GEOMATICS FOR INTEGRATED WATER RESOURCE MANAGEMENT》 * |
LEI BI等: "《Dermoscopic Image Segmentation via Multistage Fully Convolutional Networks》", 《IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING》 * |
张亮等: "《基于色度学特征的病理性核分裂像识别》", 《航天医学与医学工程》 * |
李文庆等: "《基于Google Earth的ETM~+遥感图像自动分类方法》", 《江西农业学报》 * |
贺金鑫等: "《一种基于朴素贝叶斯分类模型的高光谱矿物精确识别方法》", 《光谱学与光谱分析》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950427A (en) * | 2020-08-06 | 2020-11-17 | 中国地质科学院矿产资源研究所 | Garnet subclass identification method based on thermal infrared spectrum characteristics and BP neural network model |
Also Published As
Publication number | Publication date |
---|---|
AU2020103251A4 (en) | 2021-01-14 |
CN111460947B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109584248B (en) | Infrared target instance segmentation method based on feature fusion and dense connection network | |
CN112085735B (en) | Aluminum material image defect detection method based on self-adaptive anchor frame | |
CN111460947B (en) | BP neural network-based method and system for identifying metal minerals under microscope | |
CN105825511B (en) | A kind of picture background clarity detection method based on deep learning | |
CN108520504B (en) | End-to-end blurred image blind restoration method based on generation countermeasure network | |
CN106910192B (en) | Image fusion effect evaluation method based on convolutional neural network | |
CN106504248B (en) | Vehicle damage judging method based on computer vision | |
CN106295714B (en) | Multi-source remote sensing image fusion method based on deep learning | |
von Hippel et al. | Automated classification of stellar spectra–I. Initial results with artificial neural networks | |
CN108537788B (en) | Camouflage effect evaluation method and device, computer equipment and storage medium | |
CN108510194A (en) | Air control model training method, Risk Identification Method, device, equipment and medium | |
CN111160249A (en) | Multi-class target detection method of optical remote sensing image based on cross-scale feature fusion | |
CN111727412A (en) | Method, apparatus, system, and program for setting lighting condition, and storage medium | |
MSB et al. | Non-destructive watermelon ripeness determination using image processing and artificial neural network (ANN) | |
CN112507853A (en) | Cross-mode pedestrian re-identification method based on mutual attention mechanism | |
CN109961102A (en) | Image processing method, device, electronic equipment and storage medium | |
Jenifa et al. | Classification of cotton leaf disease using multi-support vector machine | |
CN111340116A (en) | Converter flame identification method and system, electronic equipment and medium | |
CN115131503A (en) | Health monitoring method and system for iris three-dimensional recognition | |
CN114021704A (en) | AI neural network model training method and related device | |
Ahmed et al. | Design and implementation of a neural network for real-time object tracking | |
Metzner et al. | Automated optical inspection of soldering connections in power electronics production using convolutional neural networks | |
CN116994295A (en) | Wild animal category identification method based on gray sample self-adaptive selection gate | |
CN111275137B (en) | Tea verification method based on exclusive twin network model | |
CN115346091B (en) | Method and device for generating Mura defect image data set |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |