A Comparative Analysis for Optimizing Machine Learning Model Deployment in IoT Devices
Source abstract
Abstract
In the intersection of the Internet of Things (IoT) and Machine Learning (ML), the choice between high-level and low-level programming libraries presents a significant dilemma for developers, impacting not only the efficiency and effectiveness of ML models but also their environmental footprint. We have proposed a comprehensive framework to aid in this decision-making process, underpinned by a detailed comparative analysis of both types of libraries on one of the key IoT ML tasks: image classification. We have introduced a novel algorithm designed to calculate the green footprint of ML model training, factoring in execution time, memory utilization, power consumption, and CPU temperature, addressing the urgent need for sustainable ML practices. Through an empirical evaluation of popular libraries such as PyTorch for high-level and Libtorch for low-level development, we have assessed their performance, development efficiency, and hardware compatibility. The culmination of our research is a decision support system that synthesizes the experimental findings to guide developers toward choices that harmonize model performance with environmental sustainability.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: IoT and Edge/Fog Computing · Green IT and Sustainability · Cloud Computing and Resource Management
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Computer Science and Engineering, United International University, Dhaka 1212, Bangladesh
Funding
United International University
References (31)
Show source-provided references
1. Fanariotis, A., Orphanoudakis, T., Kotrotsios, K., Fotopoulos, V., Keramidas, G., and Karkazis, P. (2023). Power efficient machine learning models deployment on edge IoT devices. Sensors, 23.10.3390/s23031595 ↗
2. Comparative analysis of code execution time by C and Python based on selected algorithms10.35784/jcsi.3109 ↗
3. Salihu, B., and Tafa, Z. (2020, January 8–11). On Computational Performances of the Actual Image Classification Methods in C# and Python. Proceedings of the 2020 9th Mediterranean Conference on Embedded Computing (MECO), Budva, Montenegro.10.1109/MECO49872.2020.9134248 ↗
4. de la Fraga, L.G., Tlelo-Cuautle, E., and Azucena, A.D.P. (2017, January 25–27). On the execution time of a computational intensive application in scripting languages. Proceedings of the 2017 5th International Conference in Software Engineering Research and Innovation (CONISOFT), Merida, Mexico.10.1109/CONISOFT.2017.00025 ↗
5. Zehra, F., Javed, M., Khan, D., and Pasha, M. (2020). Comparative Analysis of C++ and Python in Terms of Memory and Time. Preprints.10.20944/preprints202012.0516.v1 ↗
6. An empirical comparison of c, c++, java, perl, python, rexx and tcl10.1109/2.876288 ↗
7. Georgiou, S., Kechagia, M., and Spinellis, D. (2017, January 28–30). Analyzing programming languages’ energy consumption: An empirical study. Proceedings of the 21st Pan-Hellenic Conference on Informatics, Larissa, Greece.10.1145/3139367.3139418 ↗
8. Comparative Analysis on the Evaluation of the Complexity of C, C++, Java, PHP and Python Programming Languages based on Halstead Software Science
9. Mengistu, D., and Frisk, F. (August, January 28). Edge machine learning for energy efficiency of resource constrained IoT devices. Proceedings of the SPWID 2019: The Fifth International Conference on Smart Portable, Wearable, Implantable and Disabilityoriented Devices and Systems, Nice, France.
10. Enhancing the energy efficiency and robustness of TinyML computer vision using coarsely-quantized log-gradient input images10.1145/3591466 ↗
11. Blum, R., and Bresnahan, C. (2013). Python Programming for Raspberry Pi, Pearson Education.
12. Kesrouani, K., Kanso, H., and Noureddine, A. (2020, January 10–13). A preliminary study of the energy impact of software in raspberry pi devices. Proceedings of the 2020 IEEE 29th International Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE), Online.10.1109/WETICE49692.2020.00052 ↗
13. A review paper on raspberry pi and its applications
14. Corral-García, J., González-Sánchez, J.L., and Pérez-Toledano, M.Á. (2018). Evaluation of strategies for the development of efficient code for Raspberry Pi devices. Sensors, 18.10.3390/s18114066 ↗
15. Evaluating python, c++, javascript and java programming languages based on software complexity calculator (halstead metrics)10.1088/1757-899X/1076/1/012046 ↗
16. Plauska, I., Liutkevičius, A., and Janavičiūtė, A. (2022). Performance evaluation of c/c++, micropython, rust and tinygo programming languages on esp32 microcontroller. Electronics, 12.10.3390/electronics12010143 ↗
17. Using distributed raspberry PIs to enable low-cost energy-efficient machine learning algorithms for scientific articles recommendation10.1016/j.micpro.2020.103252 ↗
18. A review of the applications of artificial intelligence and big data to buildings for energy-efficiency and a comfortable indoor living environment10.1016/j.enbuild.2019.109383 ↗
19. Green algorithms: Quantifying the carbon footprint of computation10.1002/advs.202100707 ↗
20. Herelius, S. (2022). Green Coding: Can We Make Our Carbon Footprint Smaller through Coding?. [Bachelor’s Thesis, Blekinge Institute of Technology].
21. Carbon footprint: Current methods of estimation10.1007/s10661-010-1678-y ↗
22. Vieira, G., Barbosa, J., Leitão, P., and Sakurada, L. (2020, January 26–28). Low-cost industrial controller based on the raspberry pi platform. Proceedings of the 2020 IEEE International Conference on Industrial Technology (ICIT), Buenos Aires, Argentina.10.1109/ICIT45562.2020.9067148 ↗
23. Abdulsalam, S., Lakomski, D., Gu, Q., Jin, T., and Zong, Z. (2014, January 3–5). Program energy efficiency: The impact of language, compiler and implementation choices. Proceedings of the International Green Computing Conference, Dallas, TX, USA.10.1109/IGCC.2014.7039169 ↗
24. Shoaib, M., Venkataramani, S., Hua, X.S., Liu, J., and Li, J. (2015). Exploiting on-device image classification for energy efficiency in ambient-aware systems. Mobile Cloud Visual Media Computing: From Interaction to Service, Springer.10.1007/978-3-319-24702-1_7 ↗
25. Benavente-Peces, C., and Ibadah, N. (2020). Buildings energy efficiency analysis and classification using various machine learning technique classifiers. Energies, 13.10.3390/en13133497 ↗
26. Stančin, I., and Jović, A. (2019, January 20–24). An overview and comparison of free Python libraries for data mining and big data analysis. Proceedings of the 2019 42nd International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia.10.23919/MIPRO.2019.8757088 ↗
27. Zhang, X., Wang, Y., and Shi, W. (2018, January 11–13). {pCAMP}: Performance Comparison of Machine Learning Packages on the Edges. Proceedings of the USENIX Eorkshop on Hot Topics in Edge Computing (HotEdge 18), Boston, MA, USA.
28. Oliveira, L.P., Santos, J.H.d.S., de Almeida, E.L., Barbosa, J.R., da Silva, A.W., de Azevedo, L.P., and da Silva, M.V. (2021). Deep learning library performance analysis on raspberry (IoT device). Proceedings of the International Conference on Advanced Information Networking and Applications, Springer.10.1007/978-3-030-75100-5_33 ↗
29. Green Software Foundation (2021). Software Carbon Intensity Standard, Green Software Foundation.
30. Climate Transparency (2024, May 15). Climate Transparency Report 2022. Available online: https://www.climate-transparency.org/g20-climate-performance/g20report2022.
31. Dodge, J., Prewitt, T., Tachet des Combes, R., Odmark, E., Schwartz, R., Strubell, E., Luccioni, A.S., Smith, N.A., DeCario, N., and Buchanan, W. (2022, January 21–24). Measuring the carbon intensity of ai in cloud instances. Proceedings of the 2022 ACM Conference on Fairness, Accountability, and Transparency, Seoul, Republic of Korea.10.1145/3531146.3533234 ↗