TinyML Olive Fruit Variety Classification by Means of Convolutional Neural Networks on IoT Edge Devices
Open Access
- 1 December 2023
- journal article
- research article
- Published by MDPI AG in Agriengineering
- Vol. 5 (4) , 2266-2283
Abstract
Machine learning (ML) within the edge internet of things (IoT) is instrumental in making significant shifts in various industrial domains, including smart farming. To increase the efficiency of farming operations and ensure ML accessibility for both small and large-scale farming, the need for a low-cost ML-enabled framework is more pressing. In this paper, we present an end-to-end solution that utilizes tiny ML (TinyML) for the low-cost adoption of ML in classification tasks with a focus on the post-harvest process of olive fruits. We performed dataset collection to build a dataset that consists of several varieties of olive fruits, with the aim of automating the classification and sorting of these fruits. We employed simple image segmentation techniques by means of morphological segmentation to create a dataset that consists of more than 16,500 individually labeled fruits. Then, a convolutional neural network (CNN) was trained on this dataset to classify the quality and category of the fruits, thereby enhancing the efficiency of the olive post-harvesting process. The goal of this study is to show the feasibility of compressing ML models into low-cost edge devices with computationally constrained settings for tasks like olive fruit classification. The trained CNN was efficiently compressed to fit into a low-cost edge controller, maintaining a small model size suitable for edge computing. The performance of this CNN model on the edge device, focusing on metrics like inference time and memory requirements, demonstrated its feasibility with an accuracy of classification of more than and minimal edge inference delays ranging from 6 to 55 inferences per second. In summary, the results of this study present a framework that is feasible and efficient for compressing CNN models on edge devices, which can be utilized and expanded in many agricultural applications and also show the practical insights for implementing the used CNN architectures into edge IoT devices and show the trade-offs for employing them using TinyML.
Keywords
Funding Information
- Royal Academy, UK through the Distinguished International Associates (DIA-2021-18)
This publication has 44 references indexed in Scilit:
- CropDeep: The Crop Vision Dataset for Deep-Learning-Based Classification and Detection in Precision AgricultureSensors, 2019
- Industrial Artificial Intelligence for industry 4.0-based manufacturing systemsManufacturing Letters, 2018
- Machine learning approaches for crop yield prediction and nitrogen status estimation in precision agriculture: A reviewComputers and Electronics in Agriculture, 2018
- Detection and classification of citrus diseases in agriculture based on optimized weighted segmentation and feature selectionComputers and Electronics in Agriculture, 2018
- A review of the use of convolutional neural networks in agricultureThe Journal of Agricultural Science, 2018
- A robust human activity recognition system using smartphone sensors and deep learningFuture Generation Computer Systems, 2018
- Automatic segmentation and classification of olive fruits batches based on discrete wavelet transform and visual perceptual texture featuresInternational Journal of Wavelets, Multiresolution and Information Processing, 2018
- Mask R-CNN2017
- Pyramid Scene Parsing Network2017
- DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFsIEEE Transactions on Pattern Analysis and Machine Intelligence, 2017