Comparison of the Efficiency of a Neural Network for Image Recognition on Microcontrollers
Main Article Content
Abstract
The paper is devoted to comparing two popular models of 32-bit microcontrollers for working with neural networks for object recognition. The target devices were the ESP32 and STM32 microcontrollers, on which an artificial neural network was deployed, written using the Python programming language and the TensorFlow library. Micropython was chosen as the operating system for the microcontrollers. The paper compares the performance of the ESP32 and STM32 microcontrollers for object detection using a neural network and their classification. The image recognition time and the percentage of correctly classified objects were compared depending on the number of neuron layers and the number of training epochs within these networks. The article shows that the number of layers and training epochs directly affects the accuracy of object classification in the image. The obtained results show that increasing the number of layers of the neural network increases the overall accuracy of object recognition using the studied neural network, increasing the number of training epochs logarithmically increases the accuracy of recognition and classification within the neural network, but at the same time, increasing the number of neuron layers leads to an increase in the total recognition time. The difference in the obtained results for the accuracy of image recognition of microcontrollers differs within 5%.
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
References
THE ELEC, "Samsung starts development of ‘Galaxy Ring’," THE ELEC, Korea Electronics Industry Media, 19 07 2023. [Online]. Available: https://www.thelec.net/news/articleView.html?idxno=4595. [Accessed 05 02 2024].
Red Hat, "What is a CI/CD pipeline?," Red Hat, Inc., 11 05 2022. [Online]. Available: https://www.redhat.com/en/topics/devops/what-cicd-pipeline. [Accessed 07 02 2024].
STMicroelectronics, "STMicroelectronics website," STMicroelectronics, [Online]. Available: https://www.st.com/content/st_com/en.html. [Accessed 07 02 2024].
ARM, "Cortex-M33," Arm Limited, [Online]. Available: https://www.arm.com/products/silicon-ip-cpu/cortex-m/cortex-m33. [Accessed 12 02 2024].
STMicroelectronics, "STM32H5 Series," STMicroelectronics, [Online]. Available: https://www.st.com/en/microcontrollers-microprocessors/stm32h5-series.html. [Accessed 07 02 2024].
V. Chandra and A. Hareendran, Artificial Intelligence and Machine Learning, Delhi: PHI Learning, 2014.
Alldatasheet, "Broadcom BCM2711," Alldatasheet, [Online]. Available: https://www.alldatasheet.com/datasheet-pdf/pdf/1283902/ETC1/BCM2711.html. [Accessed 07 02 2024].
Raspberry Pi, "Raspberry Pi website," Raspberry, [Online]. Available: https://www.raspberrypi.com/. [Accessed 07 02 2024].
Raspberry Pi, "Raspberry Pi 4 Model B," Raspberry Pi, [Online]. Available: https://www.raspberrypi.com/products/raspberry-pi-4-model-b/. [Accessed 07 02 2024].
R. Sharuiev and P. Popovich, "Research of the Characteristics of a Convolutional Neural Network on the ESP32-CAM Microcontroller," [Online]. DOI: https://doi.org/10.20535/2523-4455.mea.277487
H. Miao and F. X. Lin, "Towards Out-of-core Neural Networks on Microcontrollers," IEEE , 02 01 2023. [Online]. DOI: https://doi.org/10.1109/SEC54971.2022.00008
T. Garbay, P. Dobias, W. Dron, P. Lusich and I. Khalis, "CNN Inference Costs Estimation on Microcontrollers:," Sorbonne Universite, 17 12 2021. [Online]. DOI: https://doi.org/10.1109/ICECS53924.2021.9665540.
P. Warden and D. Situnayake, TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers, "O'Reilly Media, 2019.
X. Jiang, A. Hadidp, Y. Pang, E. Granger and X. Feng, Deep Learning in Object Detection and Recognition, Texas: Computer Science and Engineering Department, University of Texas at Arlington, 2019. DOI: https://doi.org/10.1007/978-981-10-5152-4
R. O. Duda, P. E. Hart and D. G. Stork, Pattern Classification, Toronto: A Wiley Interscience publication John Wiley & Sons, 1973.
U. Kern, "Convolutional neural network (CNN)," [Online]. Available: https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/. [Accessed 17 04 2023].
A. H. Habibi and H. E. Jahani, Guide to Convolutional Neural Networks, Spain: Springer International Publishing, 2017. DOI: https://doi.org/10.1007/978-3-319-57550-6
Python organization, "Python official webpage," Python.org, [Online]. Available: https://www.python.org/. [Accessed 09 02 2024].
Micropython organization, "Micro Python," [Online]. Available: https://micropython.org/download/esp32/. [Accessed 09 02 2024].
Tensorflow organization, "Tensorflow official webpage," Google incorporated, [Online]. Available: https://www.tensorflow.org/?hl=ru. [Accessed 07 02 2024].
Tensorflow organization, "Tensorflow lite compiler," Google incorporated, [Online]. Available: https://www.tensorflow.org/lite?hl=en. [Accessed 07 02 2024].
Stanford University, "ImageNet website," Stanford Vision Lab, 11 03 2021. [Online]. Available: https://www.image-net.org/. [Accessed 15 02 2024].
AI-Thinker, "ESP-32 CAM datasheet," [Online]. Available: https://docs.ai-thinker.com/_media/esp32/docs/esp32-cam_product_specification_zh.pdf. [Accessed 14 02 2023].
STM32 base org., "STM32 Smart V2.0," [Online]. Available: https://stm32-base.org/boards/STM32F103C8T6-STM32-Smart-V2.0.html. [Accessed 09 02 2024].
B. Dickson, "TinyML is bringing neural networks to microcontrollers," TechTalks, 17 01 2022. [Online]. Available: https://bdtechtalks.com/2022/01/17/mcunetv2-tinyml-deep-learning-microcontrollers/. [Accessed 07 03 2024].