Load Classification: A Case Study for Applying Neural Networks in Hyper-Constrained Embedded Devices
Abstract
:1. Introduction
- (i)
- we present a realistic case study for embedding AI techniques into constrained devices;
- (ii)
- we apply such case study over hyper-constrained devices, analysing how available state-of-the-art techniques can be leveraged on such devices.
2. Case Study
2.1. Hardware
2.2. Load Classification
3. Experiments and Results
3.1. State-of-the-Art Models
- MobileNet-V2—as one of the most light-weight NN architecture available, it was picked as the simplest baseline
- ResNet-50—being one of the most representative NN architecture, it was selected to show possible run-time issues
- VGG-16—since it represents one of the heaviest NN architecture, it was chosen so as to stress issues with embedded devices
3.2. SOTA-Based Models
3.3. Custom Models
3.3.1. SimpleNet
3.3.2. XSimpleNet
3.3.3. Light-XSimpleNet
3.4. Generalisation Testing
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Conflicts of Interest
References
- Liu, L.; Ouyang, W.; Wang, X.; Fieguth, P.W.; Chen, J.; Liu, X.; Pietikäinen, M. Deep Learning for Generic Object Detection: A Survey. Int. J. Comput. Vis. 2020, 128, 261–318. [Google Scholar] [CrossRef] [Green Version]
- Otter, D.W.; Medina, J.R.; Kalita, J.K. A Survey of the Usages of Deep Learning for Natural Language Processing. IEEE Trans. Neural Netw. Learn. Syst. 2021, 32, 604–624. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Malik, M.; Malik, M.K.; Mehmood, K.; Makhdoom, I. Automatic Speech Recognition: A Survey. Multimed. Tools Appl. 2021, 80, 9411–9457. [Google Scholar] [CrossRef]
- Al-Fuqaha, A.I.; Guizani, M.; Mohammadi, M.; Aledhari, M.; Ayyash, M. Internet of Things: A Survey on Enabling Technologies, Protocols, and Applications. IEEE Commun. Surv. Tutorials 2015, 17, 2347–2376. [Google Scholar] [CrossRef]
- Agiollo, A.; Conti, M.; Kaliyar, P.; Lin, T.; Pajola, L. DETONAR: Detection of Routing Attacks in RPL-Based IoT. IEEE Trans. Netw. Serv. Manag. 2021, 18, 1178–1190. [Google Scholar] [CrossRef]
- Pajouh, H.H.; Dehghantanha, A.; Khayami, R.; Choo, K.R. A Deep Recurrent Neural Network based Approach for Internet of Things Malware Threat Hunting. Future Gener. Comput. Syst. 2018, 85, 88–96. [Google Scholar] [CrossRef]
- Chamikara, M.A.P.; Bertók, P.; Khalil, I.; Liu, D.; Camtepe, S. Privacy Preserving Distributed Machine Learning with Federated Learning. Comput. Commun. 2021, 171, 112–125. [Google Scholar] [CrossRef]
- Fang, W.; Wang, L.; Ren, P. Tinier-YOLO: A Real-Time Object Detection Method for Constrained Environments. IEEE Access 2020, 8, 1935–1944. [Google Scholar] [CrossRef]
- Roth, W.; Schindler, G.; Zöhrer, M.; Pfeifenberger, L.; Peharz, R.; Tschiatschek, S.; Fröning, H.; Pernkopf, F.; Ghahramani, Z. Resource-Efficient Neural Networks for Embedded Systems. arXiv 2020, arXiv:2001.03048. [Google Scholar]
- Alippi, C.; Disabato, S.; Roveri, M. Moving Convolutional Neural Networks to Embedded Systems: The AlexNet and VGG-16 Case. In Proceedings of the 17th ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN) 2018, Porto, Portugal, 11–13 April 2018; Mottola, L., Gao, J., Zhang, P., Eds.; IEEE: Piscataway, NJ, USA, 2018; pp. 212–223. [Google Scholar] [CrossRef]
- Jiang, S.; Lin, Z.; Li, Y.; Shu, Y.; Liu, Y. Flexible High-Resolution Object Detection on Edge Devices with Tunable Latency. In Proceedings of the 27th Annual International Conference on Mobile Computing and Networking (MobiCom), New Orleans, LA, USA, 25–29 October 2021; Association for Computing Machinery (ACM): New York, NY, USA, 2021; pp. 559–572. [Google Scholar] [CrossRef]
- Zhao, R.; Hu, Y.; Dotzel, J.; De Sa, C.; Zhang, Z. Improving Neural Network Quantization without Retraining using Outlier Channel Splitting. In Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA, 9–15 June 2019; Volume 97, pp. 7543–7552. Available online: https://proceedings.mlr.press/v97/zhao19c.html (accessed on 14 November 2021).
- Süzen, A.A.; Duman, B.; Şen, B. Benchmark Analysis of Jetson TX2, Jetson Nano and Raspberry Pi using Deep-CNN. In Proceedings of the 2nd International Congress on Human-Computer Interaction, Optimization and Robotic Applications (HORA), Ankara, Turkey, 26–27 June 2020; pp. 1–5. [Google Scholar] [CrossRef]
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017, arXiv:1704.04861. [Google Scholar]
- Tan, M.; Le, Q. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA, 9–15 June 2019; Volume 97, pp. 6105–6114. Available online: https://proceedings.mlr.press/v97/tan19a.html (accessed on 14 November 2021).
- Huang, G.; Liu, Z.; van der Maaten, L.; Weinberger, K.Q. Densely Connected Convolutional Networks. In Proceedings of the 30th IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; IEEE Computer Society: Washington, DC, USA, 2017; pp. 2261–2269. [Google Scholar] [CrossRef] [Green Version]
- Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the Inception Architecture for Computer Vision. In Proceedings of the 29th IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; IEEE Computer Society: Washington, DC, USA, 2016; pp. 2818–2826. [Google Scholar] [CrossRef] [Green Version]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 29th IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; IEEE Computer Society: Washington, DC, USA, 2016; pp. 770–778. [Google Scholar] [CrossRef] [Green Version]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.E.; Fu, C.; Berg, A.C. SSD: Single Shot MultiBox Detector. In Proceedings of the Computer Vision—ECCV 2016—14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part I; Lecture Notes in Computer Science. Leibe, B., Matas, J., Sebe, N., Welling, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9905, pp. 21–37. [Google Scholar] [CrossRef] [Green Version]
- Tan, M.; Pang, R.; Le, Q.V. EfficientDet: Scalable and Efficient Object Detection. In Proceedings of the 33rd IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2020; Computer Vision Foundation/IEEE: Piscataway, NJ, USA, 2020; pp. 10778–10787. [Google Scholar] [CrossRef]
- Ren, S.; He, K.; Girshick, R.B.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. In Proceedings of the Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems (NeurIPS), Montreal, QC, Canada, 7–12 December 2015; pp. 91–99. Available online: https://proceedings.neurips.cc/paper/2015/file/14bfa6bb14875e45bba028a21ed38046-Paper.pdf (accessed on 14 November 2021).
- Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Sajjad, M.; Nasir, M.; Muhammad, K.; Khan, S.; Jan, Z.; Sangaiah, A.K.; Elhoseny, M.; Baik, S.W. Raspberry Pi Assisted Face Recognition Framework for Enhanced Law-Enforcement Services in Smart Cities. Future Gener. Comput. Syst. 2020, 108, 995–1007. [Google Scholar] [CrossRef]
- Curtin, B.H.; Matthews, S.J. Deep Learning for Inexpensive Image Classification of Wildlife on the Raspberry Pi. In Proceedings of the 10th IEEE Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON), New York, NY, USA, 10–12 October 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 82–87. [Google Scholar] [CrossRef]
- Hossain, S.; Lee, D. Deep Learning-Based Real-Time Multiple-Object Detection and Tracking from Aerial Imagery via a Flying Robot with GPU-Based Embedded Devices. Sensors 2019, 19, 3371. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ullah, S.; Kim, D. Benchmarking Jetson Platform for 3D Point-Cloud and Hyper-Spectral Image Classification. In Proceedings of the IEEE International Conference on Big Data and Smart Computing (BigComp), Busan, South Korea, 19–22 February 2020; Lee, W., Chen, L., Moon, Y., Bourgeois, J., Bennis, M., Li, Y., Ha, Y., Kwon, H., Cuzzocrea, A., Eds.; IEEE: Piscataway, NJ, USA, 2020; pp. 477–482. [Google Scholar] [CrossRef]
- Stamoulis, D.; Chin, T.R.; Prakash, A.K.; Fang, H.; Sajja, S.; Bognar, M.; Marculescu, D. Designing Adaptive Neural Networks for Energy-Constrained Image Classification. In Proceedings of the 37th International Conference on Computer-Aided Design (ICCAD), San Diego, CA, USA, 5–8 November 2018; Bahar, I., Ed.; Association for Computing Machinery (ACM): New York, NY, USA, 2018; pp. 1–8. [Google Scholar] [CrossRef] [Green Version]
- Deng, J.; Dong, W.; Socher, R.; Li, L.; Li, K.; Fei-Fei, L. ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of the 22nd IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), Miami, FL, USA, 20–25 June 2009; IEEE Computer Society: Washington, DC, USA, 2009; pp. 248–255. [Google Scholar] [CrossRef] [Green Version]
- Krizhevsky, A.; Hinton, G. Learning Multiple Layers of Features from Tiny Images; Technical Report; Department of Computer Science–University of Toronto: Toronto, ON, Canada, 2009; Available online: https://www.cs.toronto.edu/~kriz/learningfeatures-2009-TR.pdf (accessed on 14 November 2021).
- Lin, T.; Maire, M.; Belongie, S.J.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft COCO: Common Objects in Context. In Proceedings of the Computer Vision—ECCV 2014—13th European Conference, Zurich, Switzerland, 6–12 September 2014; Proceedings, Part V; Lecture Notes in Computer Science. Fleet, D.J., Pajdla, T., Schiele, B., Tuytelaars, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8693, pp. 740–755. [Google Scholar] [CrossRef] [Green Version]
- Everingham, M.; Gool, L.V.; Williams, C.K.I.; Winn, J.M.; Zisserman, A. The Pascal Visual Object Classes (VOC) Challenge. Int. J. Comput. Vis. 2010, 88, 303–338. [Google Scholar] [CrossRef] [Green Version]
- LeCun, Y.; Cortes, C.; Burges, C. MNIST Handwritten Digit Database. 2010. Available online: http://yann.lecun.com/exdb/mnist/ (accessed on 14 November 2021).
- Xiao, H.; Rasul, K.; Vollgraf, R. Fashion-MNIST: A Novel Image Dataset for Benchmarking Machine Learning Algorithms. arXiv 2017, arXiv:1708.07747. [Google Scholar]
- Cohen, G.; Afshar, S.; Tapson, J.; van Schaik, A. EMNIST: Extending MNIST to handwritten letters. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 2921–2926. [Google Scholar] [CrossRef]
- Fei-Fei, L.; Fergus, R.; Perona, P. Learning Generative Visual Models From Few Training Examples: An Incremental Bayesian Approach Tested on 101 Object Categories. Comput. Vis. Image Underst. 2007, 106, 59–70. [Google Scholar] [CrossRef]
- Khosla, A.; Jayadevaprakash, N.; Yao, B.; Li, F.F. Novel Dataset for Fine-Grained Image Categorization. In Proceedings of the 1st Workshop on Fine-Grained Visual Categorization (FGVC), IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Colorado Springs, CO, USA, 25 June 2011; Citeseer: Princeton, NJ, USA, 2011. Available online: https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.255.6394 (accessed on 14 November 2021).
- Bossard, L.; Guillaumin, M.; Gool, L.V. Food-101—Mining Discriminative Components with Random Forests. In Proceedings of the Computer Vision—ECCV 2014—13th European Conference, Zurich, Switzerland, 6–12 September 2014; Proceedings, Part VI; Lecture Notes in Computer Science. Fleet, D.J., Pajdla, T., Schiele, B., Tuytelaars, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8694, pp. 446–461. [Google Scholar] [CrossRef]
- Chollet, F. Xception: Deep Learning with Depthwise Separable Convolutions. In Proceedings of the 30th IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; IEEE Computer Society: Washington, DC, USA, 2017; pp. 1800–1807. [Google Scholar] [CrossRef] [Green Version]
Model | #Parameters (M) | Footprint (MB) | #FLOPs (B) |
---|---|---|---|
1.0 MobileNet-224 [14] | 3.3 | 13.2 | 0.28 |
EfficientNet-B0 [15] | 5.3 | 21.2 | 0.39 |
DenseNet-169 [16] | 14 | 56 | 3.5 |
Inception-v3 [17] | 24 | 96 | 5.7 |
ResNet-50 [18] | 26 | 104 | 4.1 |
VGG-16 [19] | 138 | 552 | 16 |
SSD300-MobileNet [20] | 6.8 | 27.2 | 1.2 |
EfficientDet-D0 [21] | 3.9 | 15.6 | 2.5 |
FasterRCNN-MobileNet [22] | 6.1 | 24.4 | 25.2 |
SSD300-Deeplab [20] | 33.1 | 132.4 | 34.9 |
FasterRCNN-VGG [22] | 138.5 | 554 | 64.3 |
YOLOv3 [23] | 40.5 | 122 | 71 |
Device Name | RAM | Cores | Work Frequency | #FLOPS | GPU Availability |
---|---|---|---|---|---|
ARM Cortex M7 (ours) | 32 MB | 1 | 480 MHz | ✗ | |
Raspberry Pi-3B+ [24,25] | 1 GB | 4 | 1400 MHz | Broadcom VideoCore IV | |
Odroid Xu-4 [26] | 2 GB | 8 | 2000 MHz | Mali-T628 MP6 | |
Latte Panda [26] | 4 GB | 4 | 1440 MHz | Intel HD Graphics | |
Raspberry Pi-4 [13] | 8 GB | 4 | 1500 MHz | Broadcom VideoCore VI | |
Nvidia Jetson-Nano [13,27] | 4 GB | 4 | 1400 MHz | 128-Core NVIDIA Maxwell | |
Nvidia Jetson-TX1 [8,27,28] | 4 GB | 4 | 1700 MHz | 256-Core NVIDIA Maxwell | |
Nvidia Jetson-TX2 [13] | 8 GB | 6 | 2000 MHz | 256-Core NVIDIA Pascal | |
Nvidia Jetson-AGX Xavier [11,26,27] | 16 GB | 8 | 1900 MHz | 512-Core NVIDIA Volta |
Dataset Name | Image Content | # Classes | # Images | Image Resolution | Dimensions |
---|---|---|---|---|---|
Ours | Dishwasher Loads | 4 | 4K | 256 × 256 | 51 MB |
MNIST [33] | Handwritten Digits | 10 | 70K | 28 × 28 | 21 MB |
Fashion-MNIST [34] | Clothes | 10 | 70K | 28 × 28 | 36 MB |
CIFAR-10 [30] | General | 10 | 60K | 32 × 32 | 162 MB |
CIFAR-100 [30] | General | 10 | 60K | 32 × 32 | 161 MB |
EMNIST [35] | Handwritten Characters | 62 | 814K | 28 × 28 | 535 MB |
Caltech-101 [36] | General | 101 | 9K | variable | 132 MB |
TF-Flowers 1 | Flowers | 5 | 4K | variable | 221 MB |
Stanford-Dogs [37] | Dogs | 120 | 20K | variable | 778 MB |
Food-101 [38] | Food | 101 | 101K | variable | 4.65 GB |
ImageNet [29] | General | 20,000 | 14M | variable | 155.8 GB |
Model | Memory Footprint | Accuracy | Inference Time |
---|---|---|---|
MobileNet-V2 | 8.6 MB | 29.40% | 12.35 s |
ResNet-50 | 37.1 MB | 30.66% | ✗ |
VGG-16 | 115.3 MB | 28.55% | ✗ |
Model | Memory Footprint | Accuracy | Inference Time |
---|---|---|---|
MobileNet4 | 0.73 MB | 98.72% | 5.40 s |
MobileNet4 | 0.73 MB | 98.72% | 1.37 s |
ResNet3 | 1.70 MB | 96.64% | 41.30 s |
ResNet3 | 1.70 MB | 95.03% | 10.35 s |
VGG2 | 1.70 MB | 98.15% | ✗ |
VGG2 | 1.70 MB | 97.80% | 47.11 s |
Model | Memory Footprint | Accuracy | Inference Time |
---|---|---|---|
SimpleNet | 1.54 MB | 97.57% | 6.02 s |
SimpleNet | 0.56 MB | 95.49% | 0.99 s |
XSimpleNet | 0.38 MB | 92.60% | 1.84 s |
XSimpleNet | 0.10 MB | 92.25% | 0.33 s |
Light-XSimpleNet | 0.06 MB | 92.60% | 0.33 s |
Light-XSimpleNet | 0.02 MB | 89.36% | 0.078 s |
Model | Accuracy | Average Accuracy | |
---|---|---|---|
SOTA-based | MobileNet4 | 83% | 79.75% |
MobileNet4 | 76% | ||
ResNet3 | 74% | ||
ResNet3 | 86% | ||
Custom | SimpleNet | 75% | 66.5% |
XSimpleNet | 67% | ||
XSimpleNet | 73% | ||
Light-XSimpleNet | 50% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Agiollo, A.; Omicini, A. Load Classification: A Case Study for Applying Neural Networks in Hyper-Constrained Embedded Devices. Appl. Sci. 2021, 11, 11957. https://doi.org/10.3390/app112411957
Agiollo A, Omicini A. Load Classification: A Case Study for Applying Neural Networks in Hyper-Constrained Embedded Devices. Applied Sciences. 2021; 11(24):11957. https://doi.org/10.3390/app112411957
Chicago/Turabian StyleAgiollo, Andrea, and Andrea Omicini. 2021. "Load Classification: A Case Study for Applying Neural Networks in Hyper-Constrained Embedded Devices" Applied Sciences 11, no. 24: 11957. https://doi.org/10.3390/app112411957
APA StyleAgiollo, A., & Omicini, A. (2021). Load Classification: A Case Study for Applying Neural Networks in Hyper-Constrained Embedded Devices. Applied Sciences, 11(24), 11957. https://doi.org/10.3390/app112411957