Back to search

Nanyang Technological University

Lightweight CNN-based OCT image classification and TinyML deployment on ESP32

Abstract

dc:description.abstract

With the rapid development of edge computing and TinyML, efficient deployment of deep learning models on resource-constrained embedded devices has become an important research direction. Based on the eight-classification task of retinal OCT images, this dissertation selects five lightweight convolutional neural network models CNN, MobileNetV1-0.1, MobileNetV1-0.25, MobileNetV1-0.5 and SqueezeNet for training and evaluation, and attempts to deploy them on the ESP32 microcontroller. After training each model in the GPU environment, the accuracy and generalization ability were evaluated through the training set, the validation set and test sets. The experimental results show that SqueezeNet achieved the highest accuracy of 0.8600 and F1-score of 0.8603 on the test set, and performed best in classification performance; MobileNetV1-0.25 maintained a high accuracy of 0.8129 while also showing good generalization ability and model compactness; while the custom CNN had a highest training accuracy of 0.9769, but performed poorly in the validation and test stages and had overfitting problems. In terms of deployment, MobileNetV1-0.5 failed to be successfully deployed on ESP32 due to its large model size, and the remaining models were successfully loaded through TFLite conversion. After deployment, the model performance was evaluated from four dimensions: accuracy, inference time, peak RAM occupancy, and Flash occupancy. The results show that MobileNetV1-0.1 has the best performance in terms of speed with an inference time of 131.83ms and an accuracy of 0.8000 after deployment; MobileNetV1-0.25 has good model performance while maintaining a relatively high deployment accuracy of 0.8125; the custom CNN deployment accuracy dropped to 0.4063, and the performance dropped significantly; and SqueezeNet can still achieve an accuracy of 0.7375 while maintaining the lowest Flash occupancy of 671.70KB and a low RAM occupancy of 71.84KB, demonstrating strong deployment adaptability and efficiency. In summary, MobileNetV1-0.1 is suitable for tasks that pursue speed and resource optimization, while SqueezeNet has more advantages in overall performance and resource balance, and is a strong candidate for resource-constrained platforms. The research results of this dissertation provide empirical reference and model selection basis for the subsequent deployment of image recognition tasks in low-power devices.

Degree

thesis:*
College dc:contributor.school
School of Electrical and Electronic Engineering
Grantor dc:publisher
Nanyang Technological University
Year dc:date.issued
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Lin, Jinyu
Advisor dc:contributor.supervisor
  • Soong Boon Hee

Subjects

dc:subject × 2

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10356/202012

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

Lin, Jinyu. Lightweight CNN-based OCT image classification and TinyML deployment on ESP32. Nanyang Technological University, 2025. https://hdl.handle.net/10356/202012