CN111460947B - BP neural network-based method and system for identifying metal minerals under microscope - Google Patents
BP neural network-based method and system for identifying metal minerals under microscope Download PDFInfo
- Publication number
- CN111460947B CN111460947B CN202010216536.2A CN202010216536A CN111460947B CN 111460947 B CN111460947 B CN 111460947B CN 202010216536 A CN202010216536 A CN 202010216536A CN 111460947 B CN111460947 B CN 111460947B
- Authority
- CN
- China
- Prior art keywords
- metal mineral
- neural network
- unknown
- image
- characteristic data
- 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.)
- Active
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 neural network, which relate to the technical field of metal mineral identification and mainly comprise the steps of acquiring an unknown metal mineral image shot by a reflection polarization microscope; processing the unknown metal mineral image by using MATLAB software to obtain primary characteristic data of the unknown metal mineral image; determining the difference characteristics of the environment; calculating final characteristic data of the unknown metal mineral image according to the primary characteristic data and the environment difference characteristic of the unknown metal mineral image; and 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 invention automatically identifies the image through computer software and a reflection polarization microscope, eliminates the interference of personal factors and environmental factors on the basis of ensuring the low identification cost of the metal minerals, and improves the identification accuracy.
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 MATLAB software to obtain 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 the unknown metal mineral image by using MATLAB software to obtain the preliminary characteristic data of the unknown metal mineral image specifically includes:
reading the unknown metal mineral image into MATLAB software by adopting an imread function; the storage form of the unknown metal mineral image in MATLAB software is a three-dimensional array form; the three-dimensional array form comprises RGB color information of unknown metal mineral images;
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 MATLAB 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;
adopting the data in the test set to test the preliminary BP neural network model, 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 MATLAB software to obtain unknown metal mineral image preliminary characteristic data;
the environment difference characteristic determining module is used for determining environment difference characteristics; the environment difference characteristic is a difference value of 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 MATLAB software by adopting an imread function; the storage form of the unknown metal mineral image in MATLAB software is a three-dimensional array form; the three-dimensional array form comprises RGB color information of unknown metal mineral images;
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 MATLAB 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 required 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 that other drawings can be obtained according to these drawings without creative efforts.
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.
Step 102: and processing the unknown metal mineral image by using MATLAB software to obtain the initial characteristic data of the unknown metal mineral image.
Step 103: determining the difference characteristics of the environment; the environment difference characteristic is a difference value of 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:
reading the unknown metal mineral image into MATLAB software by adopting an imread function; the storage form of the unknown metal mineral image in MATLAB software is a three-dimensional array form; the three-dimensional array form comprises RGB color information of unknown metal mineral images.
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 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 overlapping the environmental difference characteristics to the primary characteristic data of the unknown metal mineral image to obtain 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 the historical metal mineral images were processed using MATLAB 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 MATLAB software 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 module 202 for calculating the preliminary characteristic data of the unknown metal mineral image specifically comprises:
the reading unit is used for reading the unknown metal mineral image into MATLAB software by adopting an imread function; the storage form of the unknown metal mineral image in MATLAB software is a three-dimensional array form; the three-dimensional array form comprises RGB color information of unknown metal mineral images.
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 MATLAB 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 condition is a trained BP neural network model.
EXAMPLE III
Introduction to recognition principles
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.
Typically, RGB each has 256 levels of luminance, represented numerically from 0, 1, 2, up to 255, where 0 represents darkest and 255 represents brightest, and the magnitude of the value varies with luminance, and the variation is linear. A total of about 1678 ten thousand colors can be combined by 256 levels of RGB colors, i.e., 256 × 256 ═ 16777216. Because the metal minerals with the same color brightness do not exist, under the condition that all image information can be recorded during shooting, 1678 thousands of metal mineral color brightness information can exist, and the basis for taking RGB color components as identification features is laid. In the computer MATALB software, RGB color components are stored in a three-dimensional matrix form, and each dimension stores one color component.
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. BP networks 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.
The method specifically comprises the following steps: using an OLYMPUS-BX51M reflective polarizing microscope, an exposure time of 750. mu.S, a sensitivity (ISO) of 200, and a resolution of 1600X 1200 were set. The method comprises the steps of respectively collecting galena, sphalerite, ludwigite and other minerals by using a digital camera carried by a reflection polarization microscope. About 20 photographs of each mineral are shown in fig. 3, 5 and 6.
Step two: and (4) image processing and feature extraction.
And (4) putting the image under a root path specified by MATLAB software, and importing the image by using a function carried by the image. The images are then stored in MATLAB software in the form of a three-dimensional digital group. The three-dimensional digital group is the RGB color information of the image.
The image processing specifically includes:
1. digitalizing; the image is read into MATLAB software using an immead function, and the image becomes a three-dimensional matrix, with each element in the matrix having a size between 0 and 256.
2. Filtering the mean value; the image is filtered using the fspecial ('average') function in MATLAB software. The mean filtering is also called linear filtering, and 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. The mean value of the neighborhood may be substituted for each pixel value in the original image. This process is mainly for noise cancellation.
3. Normalization; normalization was performed using the premmx (P, T) function in MATLAB software, where P, T are the raw input and output data, respectively. Normalization is to change the number to a fraction 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 error between the output value of a mineral and the mineral mark 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, and x3, are feature values that are manually input, and are represented on the MATLAB software function as net newff (P.,), where P is a matrix of input feature values x1, x2, and x 3. Then, the data is propagated backward from the input layer, specifically, backward or forward from the hidden layer, where values of two nodes of the hidden layer need to be calculated, the value of each input layer is multiplied by the weight of the corresponding node, then summed, and then biased to obtain a value, which is then substituted into the conversion function sigmoid (f (x) ═ 1/1+ e-x). For example, node No. 4 has a value of f (x) 1/1+ e-x, where x is x1 × 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 values of galena 190, 195, 205 are input and the galena is marked with 1, the error between the value of the output layer and the corresponding mark is calculated, and the corresponding calculation is then calculatedHas the formula Errj=Oj(1-Oj)(Tj-Oj)。
Wherein, TjIs the corresponding label, OiIf the error is small enough, the training is stopped, and the weight and the bias of the existing neural network are saved. 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 variance 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 general default value and is not set by itself), and then the original weight is addedThe weight is the new weight. The weights of all nodes can be calculated by the formula.
6. And updating the bias.
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-mentioned process is a complete training process, after the weight and bias are updated, a group of characteristic values are changed and inputted into the neural network, and the above-mentioned process can be continuously repeated.
Conditions under which the training process was 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 (6)
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 MATLAB software to obtain 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 final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of a metal mineral;
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 features, wherein the calculating comprises the following steps:
superposing the environmental difference characteristics to the primary characteristic data of the unknown metal mineral image to obtain final characteristic data of the unknown metal mineral image;
the step of training the BP neural network model comprises the following steps:
acquiring historical metal mineral images of different types under the same illumination intensity;
processing all the historical metal mineral images by using MATLAB 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.
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 using MATLAB software to obtain the preliminary feature data of the unknown metal mineral image specifically comprises:
reading the unknown metal mineral image into MATLAB software by adopting an imread function; the storage form of the unknown metal mineral image in MATLAB software is a three-dimensional array form; the three-dimensional array form comprises RGB color information of unknown metal mineral images;
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 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. 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 MATLAB software to obtain unknown metal mineral image preliminary characteristic data;
the environment difference characteristic determining module is used for determining environment difference characteristics; the environment difference characteristic is a difference value of 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 final characteristic data of an unknown metal mineral image, and the output of the trained BP neural network model is the type of a metal mineral;
the unknown metal mineral image final feature data calculation module specifically comprises:
the unknown metal mineral image final characteristic data calculation unit is used for superposing the environmental difference characteristics to the unknown metal mineral image preliminary characteristic data to obtain the unknown metal mineral image final characteristic data;
the recognition system also 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 MATLAB 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.
5. The system for identifying the metal mineral under the microscope based on the BP neural network as claimed in claim 4, 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 MATLAB software by adopting an imread function; the storage form of the unknown metal mineral image in MATLAB software is a three-dimensional array form; the three-dimensional array form comprises RGB color information of unknown metal mineral images;
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.
6. The system for identifying the metal mineral under the microscope based on the BP neural network as claimed in claim 5, wherein the unknown metal mineral image preliminary characteristic data determination 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;
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 characteristic data of the unknown metal mineral image comprises four elements, wherein the first element is the average value of a first one-dimensional array, the second element is the average value of a second one-dimensional array, the third element is the average value of a third one-dimensional array, and the fourth element is the type of the unknown metal mineral.
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 CN111460947A (en) | 2020-07-28 |
CN111460947B true 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) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950427B (en) * | 2020-08-06 | 2022-02-15 | 中国地质科学院矿产资源研究所 | Garnet subclass identification method based on thermal infrared spectrum characteristics and BP neural network model |
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 (4)
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 |
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3002587B1 (en) * | 2011-12-30 | 2017-06-28 | Abbott Point Of Care, Inc. | Method and apparatus for automated platelet identification within a whole blood sample from microscopy images |
-
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 (4)
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 |
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 |
---|
《A Panoramic Geology Field Trip System Using Image-Based Rendering》;Chunyan Deng等;《2016 IEEE 40th Annual Computer Software and Applications Conference (COMPSAC)》;20160825;第264-268页 * |
《Dermoscopic Image Segmentation via Multistage Fully Convolutional Networks》;Lei Bi等;《IEEE Transactions on Biomedical Engineering》;20170930;第64卷(第9期);第2065-2074页 * |
《Design and implementation of data management subsystem in Environmental Sensor Networks》;Jinxin He等;《2012 International Symposium on Geomatics for Integrated Water Resource Management》;20121112;第1-4页 * |
《一种基于朴素贝叶斯分类模型的高光谱矿物精确识别方法》;贺金鑫等;《光谱学与光谱分析》;20140228;第34卷(第2期);第505-509页 * |
《基于Google Earth的ETM~+遥感图像自动分类方法》;李文庆等;《江西农业学报》;20121231;第24卷(第12期);第158-163页 * |
《基于色度学特征的病理性核分裂像识别》;张亮等;《航天医学与医学工程》;20150831;第28卷(第4期);第270-274页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111460947A (en) | 2020-07-28 |
AU2020103251A4 (en) | 2021-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109584248B (en) | Infrared target instance segmentation method based on feature fusion and dense connection network | |
CN111460947B (en) | BP neural network-based method and system for identifying metal minerals under microscope | |
CN111310862B (en) | Image enhancement-based deep neural network license plate positioning method in complex environment | |
CN108520504B (en) | End-to-end blurred image blind restoration method based on generation countermeasure network | |
CN106504248B (en) | Vehicle damage judging method based on computer vision | |
CN110909605B (en) | Cross-modal pedestrian re-identification method based on contrast correlation | |
CN105825511B (en) | A kind of picture background clarity detection method based on deep learning | |
CN106910192B (en) | Image fusion effect evaluation method based on convolutional neural network | |
CN106295714B (en) | Multi-source remote sensing image fusion method based on deep learning | |
CN112085735A (en) | Aluminum image defect detection method based on self-adaptive anchor frame | |
CN106920224B (en) | A method of assessment stitching image clarity | |
CN108537788B (en) | Camouflage effect evaluation method and device, computer equipment and storage medium | |
CN113673590B (en) | Rain removing method, system and medium based on multi-scale hourglass dense connection network | |
CN111160249A (en) | Multi-class target detection method of optical remote sensing image based on cross-scale feature fusion | |
CN112001903A (en) | Defect detection network construction method, abnormality detection method and system, and storage medium | |
CN107273870A (en) | The pedestrian position detection method of integrating context information under a kind of monitoring scene | |
CN113284061B (en) | Underwater image enhancement method based on gradient network | |
MSB et al. | Non-destructive watermelon ripeness determination using image processing and artificial neural network (ANN) | |
CN111340116A (en) | Converter flame identification method and system, electronic equipment and medium | |
CN112507853A (en) | Cross-mode pedestrian re-identification method based on mutual attention mechanism | |
Jenifa et al. | Classification of cotton leaf disease using multi-support vector machine | |
CN114021704B (en) | AI neural network model training method and related device | |
CN115131503A (en) | Health monitoring method and system for iris three-dimensional recognition | |
CN113313188A (en) | Cross-modal fusion target tracking method | |
CN113902710A (en) | Method and system for detecting surface defects of industrial parts based on anomaly detection algorithm |
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 |