Enhanced hybrid attention deep learning for avocado ripeness classification on resource constrained devices

Attention mechanisms such as the Convolutional Block Attention Module (CBAM) can help emphasize and refine the most relevant feature maps such as color, texture, spots, and wrinkle variations for the avocado ripeness classification. However, the CBAM lacks global context awareness, which may prevent it from capturing long-range dependencies or global patterns such as relationships between distant regions in the image. Further, more complex neural networks can improve model performance but at the cost of increasing the number of layers and train parameters, which may not be suitable for resource constrained devices. This paper presents the Hybrid Attention Convolutional Neural Network (HACNN) model for classifying avocado ripeness on resource constrained devices. It aims to perform local feature enhancement and capture global relationships, leading to a more comprehensive feature extraction by combining attention modules for the Convolutional Neural Network models. The proposed HACNN model combines transfer learning in the Convolutional Neural Network with hybrid attention mechanisms, including Spatial, Channel, and Self-Attention Modules, to effectively capture the intricate features of avocado ripeness from fourteen thousand images. Extensive experiments demonstrate that the transfer learning HACNN with the EfficienctNet-B3 model significantly outperforms conventional models regarding the performance and accuracy of 96.18%, 92.64%, and 91.25% for train, validation, and test models, respectively. In addition, this model consumed 59.81 MB of memory and an average inference time of 280.67 ms with TensorFlow Lite on a smartphone. Although the transfer learning HACNN with the ShuffleNetV1 (1.0x) model consumes the least resources, its testing accuracy is only 82.89%, which is insufficient for practical applications. Thus, the transfer learning HACNN with the MobileNetV3 Large model is an exciting option for resource constrained devices. It has a test accuracy of 91.04%, an average memory usage of 26.52 MB, and an average inference time of 86.94 ms on the smartphone. These findings indicated that the proposed method enhances avocado ripeness classification accuracy and ensures feasibility for practical implementation in low-resource environments.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2025-01-29
DOI
https://doi.org/10.1038/s41598-025-87173-7
Citations
15
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
26.25

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhanced hybrid attention deep learning for avocado ripeness classification on resource constrained devices

Sumitra Nuanmeesri
15 citations
Scientific Reports
Smart Agriculture and AI
26.25
article

Enhanced hybrid attention deep learning for avocado ripeness classification on resource constrained devices

Sumitra Nuanmeesri
article en
15 citations

Abstract

Attention mechanisms such as the Convolutional Block Attention Module (CBAM) can help emphasize and refine the most relevant feature maps such as color, texture, spots, and wrinkle variations for the avocado ripeness classification. However, the CBAM lacks global context awareness, which may prevent it from capturing long-range dependencies or global patterns such as relationships between distant regions in the image. Further, more complex neural networks can improve model performance but at the cost of increasing the number of layers and train parameters, which may not be suitable for resource constrained devices. This paper presents the Hybrid Attention Convolutional Neural Network (HACNN) model for classifying avocado ripeness on resource constrained devices. It aims to perform local feature enhancement and capture global relationships, leading to a more comprehensive feature extraction by combining attention modules for the Convolutional Neural Network models. The proposed HACNN model combines transfer learning in the Convolutional Neural Network with hybrid attention mechanisms, including Spatial, Channel, and Self-Attention Modules, to effectively capture the intricate features of avocado ripeness from fourteen thousand images. Extensive experiments demonstrate that the transfer learning HACNN with the EfficienctNet-B3 model significantly outperforms conventional models regarding the performance and accuracy of 96.18%, 92.64%, and 91.25% for train, validation, and test models, respectively. In addition, this model consumed 59.81 MB of memory and an average inference time of 280.67 ms with TensorFlow Lite on a smartphone. Although the transfer learning HACNN with the ShuffleNetV1 (1.0x) model consumes the least resources, its testing accuracy is only 82.89%, which is insufficient for practical applications. Thus, the transfer learning HACNN with the MobileNetV3 Large model is an exciting option for resource constrained devices. It has a test accuracy of 91.04%, an average memory usage of 26.52 MB, and an average inference time of 86.94 ms on the smartphone. These findings indicated that the proposed method enhances avocado ripeness classification accuracy and ensures feasibility for practical implementation in low-resource environments.

Scientific ReportsVol. 15(1)
Suan Sunandha Rajabhat University (TH)
Suan Sunandha Rajabhat University
Openalex Percentile: Top 0%
Smart Agriculture and AI
26.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.