# Image Recognition of Coal and Coal Gangue Using a Convolutional Neural Network and Transfer Learning

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Operating Principle of CNN for Image Recognition

_{h}× f

_{w}× d. Generally, f

_{h}and f

_{w}are much smaller than h and w, while the depth of input image matrix and filter matrix should be the same. When an input image passes through a convolutional layer, it is convolved by each filter in this convolutional layer to yield a relatively small size output matrix called “feature map.” After all filters have finished the convolutions, the input image is converted into a relatively small matrix with a larger depth. The depth is equal to the number of filters in the convolutional layer, which should be determined by the user before image feeding. Figure 2 is a sketch map of the convolution operation of the image matrix with a single filter, wherein the stride (the number of pixel shifts operated by the filter over the image matrix) is equal to one. After convolution, the obtained feature map undergoes a non-linear operation by a non-linear function. Generally, the rectified linear unit (ReLU) is adopted in CNN for non-linear mapping [12] because of its faster computation and no requirement for unsupervised pre-training [13]. The ReLU function is expressed by Equation (1):

**X**

^{(i)}represents the input features of an image, which is a vector resulting from processing by the flattening layer, and ${y}^{(i)}\in \{1,2,3,\dots ,k\}$ reflects the class label. In coal/gangue recognition, k = 2. The fundamental concept of a SoftMax regression is to estimate the probability of each class label for k categories, which means we have to compute the conditional probability $p(y=j|\mathit{X})$ for each $j\in (1,2,3,\dots ,k)$, given an input

**X**. Hence, the SoftMax model is expected to output a k dimensional vector whose entries are k estimated probabilities. Generally, these k probabilities sum to one after normalization. The concrete form of this vector is as follows (denoted by h

_{θ}(

**X**)), wherein $1/{\displaystyle \sum _{j=1}^{k}{e}^{{\theta}_{j}^{T}{\mathit{X}}^{(i)}}}$ is the normalization term, and $({\theta}_{1},{\theta}_{2},\dots ,{\theta}_{k})$ are model parameters which need to be optimized in the training process. For convenience, we stacked up $({\theta}_{1},{\theta}_{2},\dots ,{\theta}_{k})$ as

**θ**:

## 3. Model Construction for Coal/Gangue Recognition

^{2}× 3 + 1), 32 × (3

^{2}× 32 + 1), 32 × (3

^{2}× 32 + 1), 32 × (3

^{2}× 32 + 1), and 32 × (3

^{2}× 32 + 1), which is 37,888 in total. In practice, an industrial-strength CNN has much more parameters than this toy CNN. For example, the ImageNet [11] developed for image classification has 60 million parameters and employs 1.2 million images as input data to guarantee a valid learning of the parameters. Moreover, an industrial-strength CNN requires a super-strong computer to conduct training, which could never be accomplished by a PC. The ImageNet was trained on a strong GPU-based computer for eight weeks.

## 4. Model Performance and Results Discussion

^{5}weights around the value of −0.01. In layer 1, the weights followed a plateaued normal distribution, where most weights were concentrated in the range [−0.02–0.02]. Layer 1 biases exhibited an obvious bimodal distribution, with the lower peak located near 0.0001, and the higher peak located near −0.0007. In layer 2, we still observed a normal distribution for weights, but with a wider plateau. The bias distribution changed from the bimodal distribution in layer 1 to the unimodal distribution, with a spike around 0.0001. For the SoftMax layer, the weights did not follow the normal distribution, but a distribution more analogous to a multimodal one. Biases in this layer exhibited two isolated mountain-like shapes in each epoch, since there were only two weights in the SoftMax layer. We can directly observe the values of two biases in Figure 6f.

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Bugge, J.; Kjær, S.; Blum, R. High-efficiency coal-fired power plants development and perspectives. Energy
**2006**, 31, 1437–1445. [Google Scholar] [CrossRef] - Hobson, D.M.; Carter, R.M.; Yan, Y.; Lv, Z. Differentiation between coal and stone through image analysis of texture features. In Proceedings of the 2007 IEEE International Workshop on Imaging Systems and Techniques, Krakow, Poland, 5 May 2007. [Google Scholar]
- Luo, Z.; Fan, M.; Zhao, Y.; Tao, X.; Chen, Q.; Chen, Z. Density-dependent separation of dry fine coal in a vibrated fluidized bed. Powder Technol.
**2008**, 187, 119–123. [Google Scholar] [CrossRef] - Woodburn, E.T. (Ed.) Frothing in Flotation II: Recent Advances in Coal Processing (Vol. 2); CRC Press: Routledge, UK, 2018. [Google Scholar]
- Gao, K.; Du, C.; Wang, H.; Zhang, S. An efficient of coal and gangue recognition algorithm. Int. J. Signal Process. Image Process. Pattern Recognit.
**2013**, 6, 345–354. [Google Scholar] - Yu, L.; Zheng, L.; Du, Y.; Huang, X. Image Recognition Method of Coal and Coal Gangue Based on Partial Grayscale Compression Extended Coexistence Matrix. J. Huaqiao Univ.
**2018**, 39, 906–912. (In Chinese) [Google Scholar] [CrossRef] - Li, W.; Wang, Y.; Fu, B.; Lin, Y. Coal and coal gangue separation based on computer vision. In Proceedings of the 2010 Fifth International Conference on Frontier of Computer Science and Technology (FCST), Changchun, China, 18–22 August 2010; pp. 467–472. [Google Scholar]
- Bianco, S.; Buzzelli, M.; Mazzini, D.; Schettini, R. Deep learning for logo recognition. Neurocomputing
**2017**, 245, 23–30. [Google Scholar] [CrossRef] [Green Version] - Schmidhuber, J. Deep learning in neural networks: An overview. Neural Netw.
**2015**, 61, 85–117. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Cireşan, D.; Meier, U.; Schmidhuber, J. Multi-column deep neural networks for image classification. arXiv
**2012**, arXiv:1202.2745. [Google Scholar] - Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. In Proceedings of the 25th International Conference on Neural Information Processing Systems, Lake Tahoe, NV, USA, 3–6 December 2012; pp. 1097–1105. [Google Scholar]
- Bradski, G.; Kaehler, A. Learning OpenCV: Computer Vision with the OpenCV Library; O’Reilly Media, Inc.: Champaign, IL, USA, 2008. [Google Scholar]
- Glorot, X.; Bordes, A.; Bengio, Y. Deep sparse rectifier neural networks. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, Ft. Lauderdale, FL, USA, 11–13 April 2011; pp. 315–323. [Google Scholar]
- Szeliski, R. Computer Vision: Algorithms and Applications; Springer Science & Business Media: Berlin, Germany, 2010. [Google Scholar]
- Witten, I.H.; Frank, E.; Hall, M.A.; Pal, C.J. Data Mining: Practical Machine Learning Tools and Techniques; Morgan Kaufmann: Burlington, MA, USA, 2016. [Google Scholar]
- Thrun, S.; Pratt, L. Learning to Learn; Springer Science & Business Media: Berlin, Germany, 2012. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv
**2014**, arXiv:1409.1556. [Google Scholar] - van Merriënboer, B.; Bahdanau, D.; Dumoulin, V.; Serdyuk, D.; Warde-Farley, D.; Chorowski, J.; Bengio, Y. Blocks and fuel: Frameworks for deep learning. arXiv
**2015**, arXiv:1506.00619. [Google Scholar] - LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature
**2015**, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Pu, Y.; Apel, D.B.; Szmigiel, A.; Chen, J.
Image Recognition of Coal and Coal Gangue Using a Convolutional Neural Network and Transfer Learning. *Energies* **2019**, *12*, 1735.
https://doi.org/10.3390/en12091735

**AMA Style**

Pu Y, Apel DB, Szmigiel A, Chen J.
Image Recognition of Coal and Coal Gangue Using a Convolutional Neural Network and Transfer Learning. *Energies*. 2019; 12(9):1735.
https://doi.org/10.3390/en12091735

**Chicago/Turabian Style**

Pu, Yuanyuan, Derek B. Apel, Alicja Szmigiel, and Jie Chen.
2019. "Image Recognition of Coal and Coal Gangue Using a Convolutional Neural Network and Transfer Learning" *Energies* 12, no. 9: 1735.
https://doi.org/10.3390/en12091735