TY - JOUR
T1 - Tiny deep learning model for insect segmentation and counting on resource-constrained devices
AU - Kargar, Amin
AU - Zorbas, Dimitrios
AU - Gaffney, Michael
AU - O'Flynn, Brendan
AU - Tedesco, Salvatore
N1 - Publisher Copyright:
© 2025 The Authors
PY - 2025/9
Y1 - 2025/9
N2 - Automated insect monitoring is essential for early detection of insect pest infestations in orchards. It helps growers make an informed decision to control the insect pest population in their fields to avoid crop losses and improve crop quality. This study proposed a tiny deep-learning model for insect segmentation and counting suitable for battery-powered microcontroller (MCU)-based edge devices. For this aim, the critical layers in terms of peak memory usage in a U-Net-inspired model were recognized and then optimized to meet resources constraints on an MCU with 1 MB of RAM and 2 MB of flash storage. We then introduced an image dataset for the insect of interest, Halyomorpha halys, and the dataset-splitting strategy for the model training. The proposed model was investigated from different aspects to evaluate its performance and the feasibility of its implementation on battery-powered MCU-based edge devices. The proposed deep learning model only needs approximately 900 KB of RAM and 964 KB of storage to perform its computations and store its parameters, respectively, making it useful on edge, resource constrained systems. Moreover, each inference on an MCU-based board requires 2.6 s and consumes 4.9 J. In terms of segmentation, it achieved a Dice Similarity Coefficient (DSC) of 85% and an Intersection over Union (IoU) of 73% with a precision and recall of 83% and 86%, respectively. In terms of counting, it achieved a Mean Square Error (MSE) of 1.32, Mean Absolute Error (MAE) of 0.78 and R2 of 0.97.
AB - Automated insect monitoring is essential for early detection of insect pest infestations in orchards. It helps growers make an informed decision to control the insect pest population in their fields to avoid crop losses and improve crop quality. This study proposed a tiny deep-learning model for insect segmentation and counting suitable for battery-powered microcontroller (MCU)-based edge devices. For this aim, the critical layers in terms of peak memory usage in a U-Net-inspired model were recognized and then optimized to meet resources constraints on an MCU with 1 MB of RAM and 2 MB of flash storage. We then introduced an image dataset for the insect of interest, Halyomorpha halys, and the dataset-splitting strategy for the model training. The proposed model was investigated from different aspects to evaluate its performance and the feasibility of its implementation on battery-powered MCU-based edge devices. The proposed deep learning model only needs approximately 900 KB of RAM and 964 KB of storage to perform its computations and store its parameters, respectively, making it useful on edge, resource constrained systems. Moreover, each inference on an MCU-based board requires 2.6 s and consumes 4.9 J. In terms of segmentation, it achieved a Dice Similarity Coefficient (DSC) of 85% and an Intersection over Union (IoU) of 73% with a precision and recall of 83% and 86%, respectively. In terms of counting, it achieved a Mean Square Error (MSE) of 1.32, Mean Absolute Error (MAE) of 0.78 and R2 of 0.97.
KW - Edge computing
KW - Halyomorpha halys
KW - Image segmentation
KW - Insect monitoring
KW - Microcontrollers
KW - On-device deep learning
KW - Tiny deep learning
UR - http://www.scopus.com/inward/record.url?scp=105003084560&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=105003084560&partnerID=8YFLogxK
U2 - 10.1016/j.compag.2025.110378
DO - 10.1016/j.compag.2025.110378
M3 - Article
AN - SCOPUS:105003084560
SN - 0168-1699
VL - 236
JO - Computers and Electronics in Agriculture
JF - Computers and Electronics in Agriculture
M1 - 110378
ER -