Accelerating Image Classification using Feature Map Similarity in Convolutional Neural Networks
Abstract
:1. Introduction
2. Cached CNN Structure
- The input image is classified into its class by the pretrained CNN.
- Feature vectors are extracted from the feature maps generated at each convolution layer, and they are written into the cache with a class label.
- A new image is input for classification, and the CNN operation is begun. After the convolution layer operation is completed, a feature vector is extracted from the feature maps and compared to the feature vectors of the cached feature maps.
- The class label of the most similar feature vector is output, and the remaining convolution layer operation is terminated.
3. Feature Map Caching Method
3.1. Feature Vector Extraction
3.2. Similarity Measurement
4. Experimental Results and Analysis
4.1. Feature Vector Similarity
4.2. Cached CNN Hit Rate
4.3. Classification Time
4.4. Result Based on Cache Location
5. Conclusion and Future Work
Author Contributions
Acknowledgments
Conflicts of Interest
References
- 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]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 26 June–1 July 2016; pp. 770–778. [Google Scholar]
- Chetlur, S.; Woolley, C.; Vandermersch, P.; Cohen, J.; Tran, J.; Catanzaro, B.; Shelhamer, E. cuDNN: Efficient Primitives for Deep Learning. arXiv, 2014; arXiv:1410.0759v3. [Google Scholar]
- Canziani, A.; Culurciello, E.; Paszke, A. An Analysis of Deep Neural Network Models for Practical Applications. arXiv, 2016; arXiv:1605.07678v4. [Google Scholar]
- Kang, Y.; Hauswald, J.; Gao, C.; Rovinski, A.; Mudge, T.; Mars, J.; Tang, L. Neurosurgeon: Collaborative Intelligence Between the Cloud and Mobile Edge. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, Xi’an, China, 8–12 April 2017; pp. 615–629. [Google Scholar]
- Teerapittayanon, S.; McDanel, B.; Kung, H.T. Branchynet: Fast Inference Via Early Exiting from Deep Neural Networks. In Proceedings of the 23rd International Conference on Pattern Recognition, Cancun, Mexico, 4–8 December 2016; pp. 2464–2469. [Google Scholar]
- Blundell, C.; Cornebise, J.; Kavukcuoglu, K.; Wierstra, D. Weight Uncertainty in Neural Networks. In Proceedings of the 32nd International Conference on Machine Learning, Lille, France, 6–11 July 2015; pp. 1613–1622. [Google Scholar]
- Collin, M.D.; Kohli, P. Memory Bounded Deep Convolution Networks. arXiv, 2014; arXiv:1412.1442v1. [Google Scholar]
- Han, S.; Pool, J.; Tran, J.; Dally, W.J. Learning both Weights and Connections for Efficient Neural Network. In Proceedings of the 28th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 7–12 December 2015; pp. 1135–1143. [Google Scholar]
- Liu, B.; Wang, M.; Foroosh, H.; Tappen, M.; Penksy, M. Sparse Convolutional Neural Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 806–814. [Google Scholar]
- Xu, M.; Zhu, M.; Liu, Y.; Lin, F.X.; Liu, X. DeepCache: Principled Cache for Mobile Deep Vision. In Proceedings of the 24th International Conference on Mobile Computing and Networking, New Delhi, India, 29 October–2 November 2018; pp. 129–144. [Google Scholar]
- Luan, S.; Chen, C.; Zhang, B.; Han, J.; Liu, J.I. Gabor Convolutional Networks. IEEE Trans. Image Process. 2018, 27, 4357–4366. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Sundaram, A.; Ganesan, L.; Priyal, S.P. Texture Classification using Gabor wavelets based rotation invariant features. Pattern Recogn. Lett. 2006, 27, 1976–1982. [Google Scholar] [CrossRef]
- Zhang, D.; Wong, A.; Indrawan, M.; Lu, G. Content-based Image Retrieval Using Gabor Texture Features. In Proceedings of the 1st IEEE Pacific-Rim Conference on Multimedia, Sydney, Australia, 13–15 December 2000; pp. 392–395. [Google Scholar]
- Han, J.; Ma, K.-K. Rotation-invariant and Scale-invariant Gabor Features for Texture Image Retrieval. Image Vis. Comput. 2007, 25, 1474–1481. [Google Scholar] [CrossRef]
- Sarwar, S.S.; Panda, P.; Roy, K. Gabor Filter Assisted Energy Efficient Fast Learning Convolutional Neural Networks. In Proceedings of the IEEE/ACM International Symposium on Low Power Electronics and Design, Taipei, Taiwan, 24–26 July 2017; pp. 1–6. [Google Scholar]
- Kinnikar, A.; Husain, M.; Meena, S.M. Face Recognition Using Gabor Filter and Convolutional Neural Network. In Proceedings of the International Conference on Informatics and Analysis, Pondicherry, India, 25–26 August 2016; pp. 1–4. [Google Scholar]
- Budhi, G.S.; Adipranat, R.; Hartono, F.J. The Use of Gabor Filter And Back-Propagation Neural Network for the Automobile Types Recognition. In Proceedings of the 2nd International Conference on Soft Computing, Intelligent System and Information Technology, Bali, Indonesia, 1–2 July 2010. [Google Scholar]
- Kwolek, B. Face Detection Using Convolutional Neural Networks and Gabor Filters. In Proceedings of the 15th International Conference on Artificial Neural Networks, Warsaw, Poland, 11–15 September 2005; pp. 551–556. [Google Scholar]
- Jia, Y.; Shelhamer, E.; Donahue, J.; Karayev, S.; Ong, J.; Girshick, R.; Guadarrama, S.; Darrell, T. Caffe: Convolutional Architecture for Fast Feature Embedding. In Proceedings of the 22nd ACM International Conference on Multimedia, Orlando, FL, USA, 3–7 November 2014; pp. 675–678. [Google Scholar]
- Griffin, G.; Holub, A.; Perona, P. Caltech-256 Object Category Dataset; California Institute of Technology: Pasadena, CA, USA, 2007. [Google Scholar]
- Lin, T.-Y.; Maire, M.; Belongie, S.; Bourdev, L.; Girshick, R.; Hays, J.; Perona, P.; Ramana, D.; Zitnick, C.L.; Dollar, P. Microsoft COCO: Common Object in Context. In Proceedings of the 13th European Conference on Computer Vision, Zurich, Switzerland, 6–12 September 2014; pp. 740–755. [Google Scholar]
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv, 2014; arXiv:1409.1556v6. [Google Scholar]
- Odroid-xu4:odroid-xu4. Available online: https://wiki.odroid.com/odroid-xu4/odroid-xu4 (accessed on 17 June 2018).
- LattePanda 4 G/64 GB—LattePanda. Available online: https://www.lattepanda.com/products/3.html (accessed on 17 June 2018).
Models | Decreased Amounts (percentage points) |
---|---|
AlexNet | 9.4 21.9 33.7 33.2 36.0 17.3 19.4 21.7 21.2 19.2 |
GoogLeNet (v1) | 10.8 12.8 29.4 38.7 53.3 50.0 47.7 62.5 64.3 64.9 70.8 18.1 19.6 20.9 19.3 12.6 13.2 13.4 5.9 4.7 3.5 0.8 |
VGG-16 | 6.9 9.5 10.4 17.7 19.5 22.4 26.7 28.7 29.1 33.9 42.4 43.7 48.2 17.0 15.3 17.1 20.4 20.9 22.3 20.5 20.6 20.2 17.1 15.5 15.1 10.5 |
VGG-19 | 6.2 11.0 10.8 17.1 19.6 25.1 29.1 26.5 29.0 32.2 29.2 32.1 40.6 41.6 46.6 49.5 16.6 15.3 16.1 20.8 20.6 19.6 19.5 19.9 19.3 18.1 19.3 18.4 15.7 15.6 12.2 9.4 |
ResNet-50 | 9.7 16.6 20.0 22.4 25.9 25.7 22.7 33.6 38.1 40.3 46.8 40.2 44.5 50.5 60.6 68.2 71.5 20.9 21.1 20.2 21.1 22.2 22.5 22.6 20.4 20.2 19.5 17.7 18.7 16.0 15.7 8.8 4.5 2.2 |
ResNet-101 (1–17) | 11.3 19.3 22.0 25.1 29.7 31.6 33.8 36.8 38.0 35.2 35.0 33.5 36.6 38.5 37.8 37.4 40.1 24.2 27.0 26.0 25.6 25.8 25.6 25.0 23.9 23.9 25.9 24.0 25.8 24.6 24.4 24.5 25.2 24.6 |
ResNet-101 (18–34) | 38.8 40.2 42.4 42.5 45.2 44.8 44.2 47.9 51.9 54.6 53.8 55.6 58.6 60.6 71.9 78.3 77.4 25.4 24.9 23.1 23.6 22.3 21.8 21.6 20.2 18.5 16.4 16.0 15.3 13.5 11.5 6.0 1.9 1.0 |
Models | Hit Rate (%) |
---|---|
AlexNet | 73.3 58.7 44.5 45.6 44.9 |
GoogLeNet (v1) | 71.1 67.6 49.8 42.0 34.1 36.8 39.0 31.6 31.0 31.6 28.4 |
VGG-16 | 76.2 75.3 72.5 61.9 59.6 55.3 52.9 50.8 50.8 49.1 42.1 41.2 41.3 |
VGG-19 | 77.3 73.7 73.1 62.1 59.8 55.4 51.4 53.7 51.7 49.7 51.5 49.6 43.8 42.9 41.3 41.1 |
ResNet-50 | 69.4 62.3 59.8 56.5 51.9 51.8 54.7 45.9 41.7 40.2 35.5 41.2 39.5 33.8 30.6 27.2 26.3 |
ResNet-101 (1–17) | 64.5 53.7 52.0 49.3 44.6 42.8 41.3 39.3 38.1 39.0 41.0 40.8 38.9 37.2 37.7 37.5 35.4 |
ResNet-101 (18–34) | 35.9 34.9 34.5 33.9 32.5 33.4 34.2 32.0 29.6 29.0 30.2 29.1 28.0 28.0 22.2 19.8 21.6 |
Models | Precision (0 to 1) |
---|---|
AlexNet | 0.39 0.57 0.67 0.66 0.71 0.41 0.59 0.73 0.73 0.78 |
GoogLeNet (v1) | 0.40 0.43 0.63 0.72 0.84 0.83 0.82 0.94 0.95 0.96 0.99 0.41 0.44 0.67 0.79 0.91 0.89 0.89 0.99 0.99 1.00 1.00 |
VGG-16 | 0.30 0.37 0.40 0.49 0.51 0.54 0.61 0.62 0.63 0.70 0.77 0.78 0.85 0.30 0.36 0.40 0.50 0.53 0.57 0.64 0.65 0.67 0.74 0.79 0.82 0.88 |
VGG-19 | 0.29 0.37 0.41 0.49 0.52 0.59 0.64 0.64 0.65 0.68 0.65 0.67 0.76 0.78 0.82 0.86 0.29 0.35 0.41 0.51 0.54 0.61 0.67 0.69 0.69 0.72 0.68 0.70 0.80 0.83 0.86 0.88 |
ResNet-50 | 0.34 0.47 0.51 0.53 0.58 0.57 0.56 0.66 0.69 0.71 0.75 0.71 0.77 0.80 0.89 0.95 0.98 0.36 0.49 0.51 0.54 0.61 0.60 0.61 0.69 0.73 0.77 0.81 0.76 0.84 0.87 0.91 0.99 1.00 |
ResNet-101 (1–17) | 0.32 0.43 0.47 0.50 0.57 0.57 0.59 0.62 0.64 0.61 0.61 0.58 0.62 0.63 0.63 0.62 0.64 0.34 0.45 0.48 0.50 0.61 0.59 0.61 0.64 0.68 0.65 0.62 0.60 0.65 0.65 0.65 0.64 0.67 |
ResNet-101 (18–34) | 0.63 0.64 0.67 0.67 0.68 0.69 0.69 0.72 0.75 0.78 0.79 0.80 0.83 0.86 0.93 0.98 0.99 0.67 0.68 0.71 0.71 0.71 0.71 0.73 0.75 0.76 0.79 0.81 0.82 0.87 0.91 0.94 1.00 1.00 |
Models | Processor | Memory | Storage | Power |
---|---|---|---|---|
ODROID-XU4 | Samsung Exynos5 Octa ARM Cortex-A15 Quad 2 GHz and Cortex-A7 Quad 1.3 GHz | 2-GB DDR3 | 32GB MicroSD | 5V/4A |
LattePanda 4G/64GB | Intel Cherry Trail Z8350 Quad 1.8 GHz | 4-GB DDR3 | 64GB eMMC | 5V/2A |
Models | Search Time (ms) |
---|---|
AlexNet | 22.8 49.9 63.9 63.9 43.2 35.5 81.8 115.0 115.0 79.8 |
GoogLeNet (v1) | 25.3 46.0 50.2 93.7 84.9 85.1 85.4 87.5 137.0 135.0 167.0 27.8 65.3 82.4 153.0 152.0 152.0 152.0 157.0 245.0 245.0 304.0 |
VGG-16 | 62.6 62.3 48.3 48.3 60.1 59.5 59.9 97.9 97.4 97.9 83.4 83.4 83.1 52.1 51.5 53.0 52.9 87.3 86.9 87.0 164.0 165.0 164.0 153.0 153.0 153.0 |
VGG-19 | 62.4 62.5 48.7 48.8 60.9 60.8 60.8 60.8 99.9 99.7 99.9 99.5 85.9 85.4 85.7 85.5 52.0 53.6 52.8 53.0 86.4 88.3 86.3 86.4 163.0 166.0 162.0 166.0 153.0 153.0 153.0 153.0 |
ResNet-50 | 24.9 59.8 59.6 59.9 97.4 97.6 97.3 97.0 164.0 164.0 164.0 164.0 164.0 164.0 321.0 323.0 322.0 27.9 86.2 86.1 86.7 164.0 171.0 161.0 162.0 302.0 304.0 302.0 300.0 302.0 300.0 596.0 598.0 598.0 |
ResNet-101 (1–17) | 25.0 60.2 60.1 60.0 98.3 98.8 98.4 97.9 166.0 166.0 166.0 166.0 166.0 166.0 166.0 166.0 165.0 27.7 85.9 85.8 86.0 160.0 160.0 160.0 160.0 300.0 299.0 299.0 299.0 299.0 298.0 299.0 301.0 299.0 |
ResNet-101 (18–34) | 166.0 166.0 166.0 166.0 166.0 165.0 166.0 166.0 166.0 166.0 166.0 166.0 166.0 166.0 325.0 326.0 326.0 299.0 298.0 297.0 298.0 297.0 297.0 297.0 297.0 297.0 299.0 298.0 299.0 297.0 297.0 590.0 597.0 597.0 |
© 2018 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
Park, K.; Kim, D.-H. Accelerating Image Classification using Feature Map Similarity in Convolutional Neural Networks. Appl. Sci. 2019, 9, 108. https://doi.org/10.3390/app9010108
Park K, Kim D-H. Accelerating Image Classification using Feature Map Similarity in Convolutional Neural Networks. Applied Sciences. 2019; 9(1):108. https://doi.org/10.3390/app9010108
Chicago/Turabian StylePark, Keunyoung, and Doo-Hyun Kim. 2019. "Accelerating Image Classification using Feature Map Similarity in Convolutional Neural Networks" Applied Sciences 9, no. 1: 108. https://doi.org/10.3390/app9010108
APA StylePark, K., & Kim, D. -H. (2019). Accelerating Image Classification using Feature Map Similarity in Convolutional Neural Networks. Applied Sciences, 9(1), 108. https://doi.org/10.3390/app9010108