Rock Granularity Analysis by Deep Belief Network

. Granularity analysis is one of the most essential issues in authenticate. To improve the identification accuracy, a Deep Belief Network (DBN) based method is proposed in this paper. DBN can extract features from image samples automatically.4800 rock images from Ordos Basin are used in this paper, 1200 of them are used to test the model accuracy and the result achieves 94.75%. According to theoretical and actual data test, the method proposed in this paper is efficiency and accuracy.


Introduction
There are many problems in the traditional methods for granularity analysis, such as time-consuming and low accuracy.With the development of computer and digital image processing technology, many researchers have done researches in the analysis of rock images, such as, Song Xiangfa and Li Jiaocheng proposed multiinstance image classification based on sparse representation [1].Amir Mollajan et.improved porosity identification of rock thin images by the integration of multi-kNN, RBF and SVM [2].The methods above all improved the accuracy of rock image classification, but there still are many problems.Firstly, to extract image features is a manual work, it means that which features will be taken to be the accordance for the classification is depended on the researcher.So the essential features may not be extracted because of the complex of rock image.Secondly, the classification accuracy still limits researches on authenticate.
In view of the above deficiencies, a new method based on Deep Belief Network (DBN) proposed in this paper to improve the accuracy and efficiency of rock granularity analysis.DBN is a representative algorithm in deep learning.It can extract features automatically for classification and has be successfully applied into all walks of life.Many home and abroad researcher have done researches on it, such as, Shi Xin and Zhu Yongli proposed DBN based transformer fault classification method by the analysis of dissolved gas in power transformer oil using DBN [3].Tang Xielun and Zhou Jialin proposed a EEG signal identification method using DBN [4].Shi Xugan and Zhang Shiqing proposed a DBN based new method for face expression identification by the combination of DBN and KNN [5].Mohamed Elleuch, Olivier Pauplin use DBN to identify Handwritten Arabic [6,7] and so on.In view of the advantages of DBN in pattern recognition, this paper applies it to the rock granularity analysis to improve the identification accuracy by extracting features automatically.

ROCK IMAGES
It is usually determined by the professional for type and structural parameters of rock after identification under polarized light microscopy.The rock images used in this paper are all feldspar sandstones collected from an oil field in Ordos, they are divided into three types: 1) Coarse feldspar sandstones, as is shown in figure 1 2 should be used.

Restrict Boltzmann Machine
MATEC Web of Conferences 139, 00154 (2017) Restrict Boltzmann Machine (RBM) can extract image features.A network consists of multilayer RBM has a strong ability to extract features.RBM can be seen as a simple neural network that consists of visual layers and hidden layers, and its node value is 0 or 1.The structure of RBM is shown as figure 2, where v and h respectively represent visual layer and hidden layer, w represents connection weight, b and c respectively represent bias of visual layer and hidden layer.RBM structure Usually, describing a system by an energy function.The smaller the system energy, the more ordered the system or the more concentrated probability distribution.On the contrary, it means the more disorderly or the probability distribution of the system becomes more uniform.For a RBM, its energy function is shown as formula 1.

 
According to formula 1, the probability of visual layers and hidden layers is deduced as formula 2.
So, the joint probability between visual layer and hidden layer can be deduced as formula 3, Where represents the target parameter , is the normalization factor.According to formula 1, formula 3 can be deduced as formula 4.
The target of training RBM is to minimize formula 4.
Gibbs is the best way to train RBM, but it needs to sample many more times.Contrast divergence algorithm is usually used that is an optimization of Gibbs.

DBN
DBN can be seen as multilayer RBM.If a DBN consists of two layers of RBM (RBM1 and RBM2) and a classifier, the hidden layer of RBM1 can be seen as the visual layer of RBM2 and the output of RBM1 is the input of RBM2.Steps of training a DBN is shown as follows: Step 1. Start from the input layer, train RBM1 using the input data and fix the parameters.
Step 2. Train RBM2 taking the output of RBM1 as its input and fix its parameters.
Step 3. Train the remaining layers as the way of training RBM2 until RBMn has be trained(n represents number of RBM in DBN that is training).
Step 4. Classify the original image by a classifier with the input of the combination of the sample labels and the output of RBMn.
Step 5. Fine-tuning the whole network by back propagation algorithm.

Data set
In this paper, 4800 rock images in RGB colour space are selected as experimental samples, normalize the size of them to 224*224.There are 1600 coarse-grained rock images, 1600 medium-grained rock images and 1600 fine-grained rock images.And 1200 rock images of each type are used as the training set, the remaining 400 are used as the test set.

DBN structure
The DBN structure designed in this paper is shown as figure 3 which is a 5-layer network.The activation function of the first four layers is sigmoid, the last layer uses softmax as a classifier.Training it as steps in 2.2 can achieve images classification.4 that the network designed in this paper is over-fitting when setting its hidden layers number to 5. When its hidden layers number is respectively 2, 3 or 4, the loss functions all can converge and the epoch times are roughly the same.But it is obviously that when the number is 4, the loss function and error rate are all high while they are all the lowest when the hidden layers number is 3. Therefore, the hidden layers number of DBN designed in this paper is set to 3.

Classifier
The choice of classifier determines the accuracy of the final classification of the network to a large extent.In this paper, a DBN structure with 3 hidden layers whose hidden nodes assigned to 2048-1024-1024 is studied with Logistic classifier, Linear classifier and Softmax classifier respectively.The error rates are shown in table 2. It can be seen in table 2 that the error rate is the highest when using Linear classifier and it is the smallest when using Softmax classifier.So, the network designed in this paper using Softmax as its classifier.

Dropout
To prevent the network from over-fitting, the dropout algorithm is added and its influence is studied in this paper.The thought of it is abandoning some nodes for a certain percentage which is set as 50. Figure 5 is the error rate of the network designed in this paper with or without the dropout algorithm.It can been seen clearly that the error rate curve is lower and becomes stable earlier when dropout algorithm is added.

The results
The experiment results in this paper are shown in figure 6 ,figure 7 and table 3.

Conclusion
The experiment results in this paper prove that using DBN to classify rock images greatly improve its accuracy and effectiveness and can provide references in authenticate.However, the experimental results still have deviation which may be caused by the complex of rock images and the use of single polarized images.The next research can be start on the two aspects to improve classification accuracy.Firstly, the multi-polarized light can be used in the rock image.Secondly, comparing the classification accuracy of rock granularity under multiple colour spaces and select the one with the highest classification accuracy.
(a) Coarse feldspar sandstone (b) Medium granular feldspar sandstone (c) Fine feldspar sandstone Figure.1.Example of three types of rock images 3 Deep Belirf Network Deep belief network (DBN) is a deep learning algorithm proposed by G.hinton in 2006[8].It can identify patterns fast and accurately by extracting features automatically.The use of sections to divide the text of the paper is optional and left as a decision for the author.Where the author wishes to divide the paper into sections the formatting shown in Table

Fig 2 .
Fig 2. RBM structureUsually, describing a system by an energy function.The smaller the system energy, the more ordered the system or the more concentrated probability distribution.On the contrary, it means the more disorderly or the probability distribution of the system becomes more uniform.For a RBM, its energy function is shown as formula 1.

Fig 5 .
Fig 5. Network error rate for the network with or without dropout

Figure 6
is the loss function curves and figure7is the error rate curves.It is clearly that either loss function curve or error rate curve is similarly on the test dataset and the training dataset.And they are going to convergence when Iterates about 90 times, it means that the network does not over-fitting, and it is obvious that the error rate is low.

Table 1 .
Error rate of different number of hidden layers

Table 2 .
Error rate of different classifiers

Table 3 .
Classification results