Next Article in Journal
Intelligent Classifier for Identifying and Managing Sheep and Goat Faces Using Deep Learning
Previous Article in Journal
Balancing Efficiency and Quality: Effects of Gradual Temperature Increase on Extra Virgin Olive Oil Extraction
Previous Article in Special Issue
Influence of Preprocessing Methods of Automated Milking Systems Data on Prediction of Mastitis with Machine Learning Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enabling Intelligence on the Edge: Leveraging Edge Impulse to Deploy Multiple Deep Learning Models on Edge Devices for Tomato Leaf Disease Detection

by
Dennis Agyemanh Nana Gookyi
1,*,
Fortunatus Aabangbio Wulnye
2,
Michael Wilson
1,
Paul Danquah
1,
Samuel Akwasi Danso
3 and
Awudu Amadu Gariba
4
1
Electronics Division, Institute for Scientific and Technological Information, Council for Scientific and Industrial Research, Accra CT-2211, Ghana
2
Department of Telecommunication Engineering, Kwame Nkrumah University of Science and Technology, Kumasi AK-509-4752, Ghana
3
Department of Computer Engineering, Ghana Communication Technology University, Accra PMB-100, Ghana
4
Plant Protection and Regulatory Services Directorate, The Ministry of Food and Agriculture, Accra M-37, Ghana
*
Author to whom correspondence should be addressed.
AgriEngineering 2024, 6(4), 3563-3585; https://doi.org/10.3390/agriengineering6040203
Submission received: 17 August 2024 / Revised: 17 September 2024 / Accepted: 23 September 2024 / Published: 29 September 2024
(This article belongs to the Special Issue Implementation of Artificial Intelligence in Agriculture)

Abstract

:
Tomato diseases, including Leaf blight, Leaf curl, Septoria leaf spot, and Verticillium wilt, are responsible for up to 50% of annual yield loss, significantly impacting global tomato production, valued at approximately USD 87 billion. In Ghana, there is a yield gap of about 50% in tomato production, which requires drastic measures to increase the yield of tomatoes. Conventional diagnostic methods are labor-intensive and impractical for real-time application, highlighting the need for innovative solutions. This study addresses these issues in Ghana by utilizing Edge Impulse to deploy multiple deep-learning models on a single mobile device, facilitating the rapid and precise detection of tomato leaf diseases in the field. This work compiled and rigorously prepared a comprehensive Ghanaian dataset of tomato leaf images, applying advanced preprocessing and augmentation techniques to enhance robustness. Using TensorFlow, we designed and optimized efficient convolutional neural network (CNN) architectures, including MobileNet, Inception, ShuffleNet, Squeezenet, EfficientNet, and a custom Deep Neural Network (DNN). The models were converted to TensorFlow Lite format and quantized to int8, substantially reducing the model size and improving inference speed. Deployment files were generated, and the Edge Impulse platform was configured to enable multiple model deployments on a mobile device. Performance evaluations across edge hardware provided metrics such as inference speed, accuracy, and resource utilization, demonstrating reliable real-time detection. EfficientNet achieved a high training accuracy of 97.12% with a compact 4.60 MB model size, proving its efficacy for mobile device deployment. In contrast, the custom DNN model is optimized for microcontroller unit (MCU) deployment. This edge artificial intelligence (AI) technology integration into agricultural practices offers scalable, cost-effective, and accessible solutions for disease classification, enhancing crop management, and supporting sustainable farming practices.

1. Introduction

The agricultural sector is crucial in ensuring global food security and economic stability. Among the myriads of crops grown worldwide, tomatoes hold significant importance due to their high nutritional value and widespread use in culinary practices. However, tomato cultivation faces numerous challenges, notably from various diseases that severely impact yield and quality. Common diseases such as Leaf blight, Leaf curl, Septoria leaf spot, and Verticillium wilt can lead to significant crop losses and deteriorate the biochemical quality of tomatoes, further compounding the challenges in meeting consumer demands. With the global population projected to reach 9.7 billion by 2050, the demand for tomatoes is expected to rise significantly, prioritizing effective disease management for sustaining production and meeting food supply needs [1]. Traditional disease detection methods rely heavily on manual inspection and expert knowledge and have several inherent limitations. These methods are often time-consuming, labor-intensive, and prone to human error. Moreover, they do not scale well, making it difficult to address the rising global demand for efficient and accurate tomato disease detection. Given the potential for severe economic losses in the agricultural sector, a more scalable and correct solution is required. Recent advancements in machine learning (ML) and artificial intelligence (AI) offer promising avenues to address these challenges. In particular, convolutional neural networks (CNNs) have shown exceptional capabilities in image recognition tasks, including plant disease detection [2]. However, the practical deployment of these models in agricultural settings is often hindered by the limited computational resources of edge devices used in the field. Edge AI emerges as a viable solution to this challenge by processing data locally on devices deployed in the field rather than relying on cloud-based services. This approach reduces latency and bandwidth consumption, enhances data privacy, and enables real-time decision-making. These aspects are crucial for timely disease management, where delays can result in widespread crop damage. Additionally, edge AI presents a cost-effective alternative, particularly for farmers in regions with limited internet connectivity, thus extending the potential reach of precision agriculture technologies.
In the rapidly advancing field of precision agriculture, accurately detecting crop diseases is pivotal for optimizing yield and quality, particularly for high-value crops such as tomatoes. Tomato plants are susceptible to various leaf diseases, including early blight, late blight, and leaf mold, drastically affecting productivity and economic viability [3]. Traditional disease detection methods, often reliant on manual inspection or laboratory testing, are labor-intensive and time-consuming. This paper addresses these limitations by leveraging Edge Impulse to deploy multiple deep learning models on a single edge device, creating a solution that integrates seamlessly into practical agricultural settings [4]. Our study begins with assembling an extensive dataset comprising thousands of tomato leaf images, categorized into distinct classes representing healthy leaves and those afflicted by specific diseases. This dataset is meticulously curated and enhanced through preprocessing techniques such as resizing, normalization, and augmentation (including rotation, flipping, and color adjustments) to ensure a comprehensive and robust resource for a model train.
We then focus on designing and training convolutional neural network (CNN) architectures using TensorFlow, aiming for high disease detection accuracy while optimizing the edge deployment models. Various CNN architectures, including MobileNet, Inception, ShuffleNet, Squeezenet, EfficientNet, and a custom Deep Neural Network (DNN), are explored and fine-tuned to balance predictive performance and computational efficiency. To ensure compatibility with edge devices, the trained models are converted to TensorFlow Lite format and subjected to int8 quantization, significantly reducing their size and enhancing inference speed. This step is crucial for deploying models on resource-constrained edge hardware with limited processing power and memory. The deployment phase involves generating the necessary files and configuring the Edge Impulse platform to enable the simultaneous operation of multiple models on a single device. This setup not only facilitates versatile disease detection but also demonstrates the potential of edge AI in practical agricultural applications.
Performance evaluations on edge hardware platforms, such as mobile phones and microcontroller units, provide insights into the models’ operational efficacy in real-world conditions. Key metrics such as inference speed, accuracy, and resource utilization are analyzed to validate the models’ reliability and efficiency [5].
The contributions of this paper include the following:
  • Curated and categorized a comprehensive dataset of tomato leaf images, capturing various disease types, to support advanced model training.
  • Engineered and trained various convolutional neural network (CNN) models using TensorFlow for tomato leaf disease identification.
  • Optimized CNN models for efficient edge deployment by converting them to TensorFlow Lite and implementing int8 quantization, significantly enhancing their suitability for resource-constrained environments.
  • Successfully deployed multiple deep learning models on a single edge device utilizing the Edge Impulse platform, demonstrating the feasibility of real-time, on-device disease detection.
  • Conducted rigorous performance evaluations of the deployed models on edge hardware, analyzing key metrics such as inference speed, accuracy, and resource utilization to validate their operational effectiveness in practical agricultural scenarios.
The rest of this paper is organized as follows: The article presents a comprehensive approach to tackling tomato leaf diseases, which contribute to significant global yield losses in Section 2. Section 3 details the curation of an extensive dataset of tomato leaf images, the application of advanced preprocessing and augmentation techniques, and the design of efficient CNNs using TensorFlow and Edge Impulse. Section 4 describes the deployment process involving generating files via Edge Impulse and configuring the platform for simultaneous model operation on a single device. Section 5 explores the practical integration of edge AI in agriculture, including a specific case study in Ghana. Section 6 presents the paper conclusion by summarizing the findings and emphasizing the potential impact of this technology on crop management and sustainable farming practices.

2. Review of Literature

Tomato leaf diseases significantly threaten agricultural productivity, impacting both the yield and quality of tomato crops. Effective disease management hinges on early detection and accurate diagnosis, crucial for minimizing losses and optimizing crop health. Recent advancements in computer vision and deep learning have facilitated the development of automated systems capable of detecting plant diseases from leaf images with high precision. Convolutional neural networks (CNNs), in particular, have emerged as a powerful tool in this domain, enabling the accurate classification of disease types based on visual data. However, the practical deployment of these models in real-world agricultural settings faces computational efficiency and resource constraint challenges, especially for edge devices used in the field. With the growing need for real-time disease detection, edge computing has become an essential component of these systems. Platforms like Edge Impulse allow for deploying multiple deep learning models on a single edge device, significantly enhancing the ability to perform real-time analysis in the field. This review synthesizes current tomato leaf disease detection methodologies and highlights existing approaches’ limitations.
Recent studies have explored various CNN architectures and their deployment on edge devices to improve detection accuracy and operational efficiency. For instance, Jayanthi G. et al. implemented a Raspberry Pi-based system for real-time detection, achieving a training accuracy of 98% with the PlantVillage dataset [6]. Despite these promising results, their approach was limited by a single-CNN architecture and potential overfitting issues, with a testing accuracy of 88.17%. Our study contrasts this by exploring multiple CNN architectures to enhance model generalization and evaluate performance across edge devices to ensure broader applicability. Additionally, our approach includes rigorous testing and validation processes to mitigate overfitting and ensure that the models perform well on unseen data. This comprehensive evaluation helps select the best-performing and most efficient architectures for practical use.
Brindha R. et al. conducted a comparative analysis of transfer learning models, including VGG16 and MobileNet, for disease detection [7]. Although transfer learning improved classification accuracy, the computational demands of some models posed challenges for edge deployment. We address this by employing a systematic approach to model selection, focusing on accuracy and computational efficiency. By converting models to TensorFlow Lite and applying quantization, our research makes computationally intensive models feasible for edge deployment in resource-constrained environments. This enhances the model’s applicability and ensures that the system remains cost-effective and accessible to farmers and agricultural workers in developing regions.
Dataset quality and diversity are pivotal for training effective detection models, as highlighted by another study that achieved high accuracy with a limited dataset. Our research expands on this by preparing a comprehensive dataset with diverse disease representations. We emphasize model size optimization and inference speed, facilitating seamless deployment on edge devices while maintaining high accuracy. In their study on model interpretability, Tanjim Mahmud et al. employed CNNs and pre-trained models like EfficientNetB3, Xception, and MobileNetV2 for tomato leaf disease recognition, achieving an accuracy of 0.993 with EfficientNetB3 [8]—their research combined machine learning techniques with image processing methods to enable prompt disease diagnosis. However, the system was not fully ready for real-world agricultural deployment, as further work was needed to improve its trustworthiness. Our approach integrates comprehensive testing and validation phases to ensure our models are reliable and effective in real-world conditions.
A recent research paper used deep learning to detect diseases on tomato plant leaves and aimed to run the algorithm in real time on a robot in the field [9]. They tested AlexNet and SqueezeNet architectures on an Nvidia Jetson TX1 and used the PlantVillage dataset. The study was limited by the number of architectures tested and the dataset’s diversity, highlighting the need for broader evaluation. Our research builds on this by testing a more comprehensive range of CNN architectures and utilizing more diverse datasets to ensure the models are robust and generalizable across different scenarios. This broader evaluation is crucial for developing systems that can be effectively used in varied agricultural environments. M. S. Alzahrani et al. evaluated three deep learning models—DenseNet121, ResNet50V2, and ViT—for early detection and recognition of tomato leaf diseases using a dataset from Kaggle [10]. Their study’s limitations included the dataset size and the need for further testing on diverse datasets to ensure model generalizability. Our research addresses these limitations by expanding the dataset and conducting extensive tests to validate the model’s performance across different data samples. By focusing on early detection and recognition, we aim to develop models to identify diseases at their initial stages, allowing for timely interventions and reducing crop losses.
V. Gonzalez-Huitron et al. trained and evaluated lightweight CNN models for tomato leaf disease detection on a Raspberry Pi 4 [11]. They used a subset of the PlantVillage dataset and employed depthwise separable convolution architectures suitable for low-power devices. The study’s limitations included focusing on low-cost devices rather than novel techniques and using a subset of an existing dataset. Our research incorporates novel techniques and a more comprehensive dataset to improve detection accuracy and efficiency. By optimizing the models for low-power devices, we ensure that the system remains accessible and practical for widespread use, particularly in resource-limited settings.
P. Anh et al. benchmarked deep learning models for multi-leaf disease detection on edge devices, identifying MobileNet V3 as the most suitable model for deployment on a Raspberry Pi 3 [12]. Their study highlighted the challenges of deploying models on resource-constrained devices and emphasized the need for balancing accuracy, inference time, and memory usage. Our research takes this further by benchmarking multiple models and optimizing them for various edge devices to ensure they can operate efficiently within the constraints of limited computational resources. This balance between accuracy and resource efficiency is crucial for developing practical solutions for real-time disease detection in the field. Paarth Bir et al. used transfer learning with pre-trained models like EfficientNetB0, MobileNetV2, and VGG19 for tomato leaf disease detection on mobile devices [13]. Their study noted the computational and memory requirements of these models, which may limit their use on mobile devices, and their relatively small dataset size as limitations. Our research overcomes these limitations by using a larger, more diverse dataset and optimizing the models for mobile deployment. By reducing the computational and memory footprint of the models, we ensure they can be effectively used on mobile devices, making them more accessible to farmers and agricultural workers.
H. N. N. Kumar et al. integrated machine learning and the IoT for real-time tomato leaf disease detection, using a three-stage Stacked Deep Convolutional Autoencoder to optimize CNN performance [14]. Their study was not an actual real-time system and required further research for real-world deployment. Our research builds on this by developing an accurate real-time system operating efficiently in real-world conditions. By integrating the IoT and advanced machine learning techniques, we create a system that can provide timely and accurate disease detection, enabling prompt interventions and reducing crop losses. Rajeev Karothia et al. proposed CNN models for identifying nine common tomato leaf diseases, with InceptionV3 achieving the highest accuracy of 99.64% [15]. Their study planned to expand to other crops but was limited by the dataset’s diversity and the performance of different models. Our research addresses these limitations by using a more diverse dataset and exploring multiple CNN architectures to identify the most effective models for disease detection. By expanding the scope to include other crops, we aim to develop a versatile system that can be used for disease detection across different agricultural settings.
M. Afify et al. developed a deep learning system for detecting nine tomato crop diseases, deploying the final model on a smartphone for real-time classification [16]. Their study faced limitations with the dataset, generalization issues, and a significant drop in performance on new, unseen images. Our research addresses these issues using a larger, more diverse dataset and implementing techniques to improve model generalization. By ensuring that the models perform well on new, unseen data, we create a robust system that can be effectively used for real-time disease detection on smartphones and other mobile devices.
This comprehensive review of the existing literature identifies key advancements and limitations in tomato leaf disease detection. While significant progress has been made, the need for improved CNN architectures, diverse datasets, and optimized deployment strategies on edge devices remains. Our research addresses these challenges by enhancing model performance, ensuring practical applicability in real-world agricultural settings, and pushing the boundaries of current methodologies to deliver more robust, efficient, and accessible solutions for tomato leaf disease detection. Table 1 provides a summary of the key findings from the literature.

3. Methodology

To address the challenges of real-time tomato leaf disease detection in agricultural settings, we developed a comprehensive and well-structured methodology that integrates deep learning techniques with edge computing capabilities. Our approach ensures high model accuracy and guarantees efficient real-time performance in resource-constrained environments, such as the fields where these systems will be deployed. By leveraging TensorFlow for model training and Edge Impulse for streamlined deployment (Figure 1), the methodology is designed to enable models to perform real-time inference on edge devices without relying heavily on cloud infrastructure.
Our methodology is divided into two primary segments: TensorFlow and Edge Impulse. The TensorFlow segment begins with the critical step of dataset preparation. A diverse and extensive dataset of tomato leaf images is curated, representing healthy leaves and those affected by various diseases. We further employ data augmentation techniques such as image rotation, flipping, and brightness adjustments to enhance the model’s generalizability to unseen conditions. These techniques ensure that the model can handle various lighting and environmental conditions, improving its robustness in real-world scenarios. Following this, we design and train various convolutional neural network (CNN) architectures tailored to tomato leaf disease detection. During training, hyperparameters such as learning rates, batch sizes, and network depths are meticulously tuned to achieve optimal performance. Once trained, the models are converted to TensorFlow Lite (TFLite) format and undergo 8-bit quantization. This step is crucial for reducing the model size and computational demands, making them suitable for real-time inference on low-powered edge devices.
In the Edge Impulse segment, we focus on deploying the trained models onto edge devices, ensuring they maintain high accuracy and efficiency when used in agricultural fields. The deployment involves generating the necessary deployment files and configuring Edge Impulse to handle multiple models on a single edge device. By integrating the models with edge devices like Raspberry Pi or microcontrollers, we enable real-time, on-device disease detection without cloud processing, reducing latency and bandwidth usage. In this phase, the models undergo rigorous testing in real-world agricultural environments, where we evaluate vital metrics such as accuracy, inference speed, and power consumption to ensure their practicality for field use. The individual steps involved in the methodology are illustrated in Figure 2.

3.1. TensorFlow

3.1.1. Dataset Acquisition and Augmentation

The dataset for training the deep learning models was a comprehensive collection of tomato leaf images meticulously curated by P. K. Mensah et al. [17]. Originally collected from local farms in Ghana, this dataset represented various tomato leaf disease states and healthy conditions. The varieties of tomatoes used included Cherry, Techiman, Petomech, Power Rano, and Jaguar F1 tomatoes. We focused exclusively on the tomato portion of the dataset, which comprised a total of 5435 raw images, further augmented to create 27,178 images categorized into multiple disease classes. Sample images of the dataset can be seen in Figure 3. For this study, we selected a subset of 16,947 images categorized into five specific classes: Healthy (2500 images), Leaf Blight (3645 images), Leaf Curl (2582 images), Septoria Leaf Spot (4356 images), and Verticillium Wilt (3864 images). Figure 4 shows the distribution of the images in the dataset.
This selection ensured a balanced representation across different disease states, which is essential for training robust deep-learning models. To further enhance the robustness of our models, we employed a series of data augmentation techniques, including rotation, flipping, scaling, and color jittering. These techniques artificially expanded the dataset’s size and variability, simulating the variations likely encountered in real-world agricultural settings. This augmentation process was crucial in improving the models’ generalization capabilities, enabling them to classify new, unseen data accurately during real-time inference. The dataset was divided into training and validation subsets, usually with an 80/20 split ratio. The training subset was utilized to train the model, while the validation subset was leveraged to assess the model’s performance during training and fine-tune hyperparameters.

3.1.2. Models Design and Training

In the model design phase, we explored several state-of-the-art CNN architectures, each selected for its balance of accuracy, computational efficiency, and suitability for deployment on resource-constrained edge devices. The architectures included MobileNet, Inception, ShuffleNet, SqueezeNet, EfficientNet, and a custom DNN explicitly designed for this task.
  • MobileNet: We utilized MobileNet, a lightweight neural network designed for mobile and embedded devices featuring depthwise separable convolutions to reduce computational complexity. The architecture illustrated in Figure 5 includes depthwise and pointwise convolution layers, batch normalization, ReLU activations, global average pooling, and dropout regularization. MobileNet’s efficiency makes it ideal for resource-constrained applications like maize crop disease identification [18].
  • Inception: The Inception architecture, introduced in the GoogLeNet model, revolutionized deep learning by using Inception modules that apply multiple convolutional filters simultaneously, capturing features at different scales. This multi-path approach allows the network to learn richer, more complex representations while maintaining computational efficiency. Figure 6 illustrates the architecture of the Inception model. Inception was pivotal in achieving high accuracy in image classification tasks, particularly in the ImageNet challenge [19].
  • ShuffleNet: ShuffleNet is a lightweight convolutional neural network designed for mobile devices. It employs pointwise group convolutions and channel shuffling to reduce computational complexity while maintaining accuracy [20]. The channel shuffle operation ensures efficient feature learning across groups, making ShuffleNet highly suitable for resource-constrained environments without sacrificing performance on tasks like image classification. Figure 7 shows the architecture of the ShuffleNet model.
  • SqueezeNet: SqueezeNet is a compact neural network architecture that achieves AlexNet-level accuracy with significantly fewer parameters. It uses “squeeze” and “expand” layers to reduce the number of parameters, optimizing efficiency [21]. This design allows SqueezeNet to deliver high performance in image classification tasks while being highly suitable for deployment on devices with limited memory and computational power. Figure 8 shows the architecture of SqueezeNet.
  • EfficientNet: EfficientNet, a deep-learning architecture, optimizes network depth, width, and resolution using Neural Architecture Search (NAS) and model scaling. Scaling uniformly improves performance across tasks like ImageNet classification, object detection, and semantic segmentation [22]. A dropout layer was added to check the model’s overfitting. Figure 9 illustrates the architecture of EfficientNet.
  • Custom DNN: The model architecture comprises a series of convolutional (Conv2D) and max-pooling (MaxPooling2D) layers, followed by a flattened layer to transition from convolutional to fully connected layers. The convolutional layers employ varying filter sizes and numbers to extract hierarchical features from the input data, and are then down-sampled using max-pooling operations to reduce spatial dimensions while preserving important features. The flattened layer reshapes the output from the convolutional layers into a vector suitable for input into the subsequent fully connected layers [23,24]. This architecture is designed for classification tasks, particularly for tomato crop disease identification, where the model learns to classify images into one of five classes based on the features extracted from the input images. Figure 10 shows the architecture of the model.

3.1.3. Model Training and Performance Evaluation

Each model was trained using the prepared dataset, with hyperparameters meticulously tuned to optimize performance. Training was conducted using techniques, including learning rate annealing, early stopping, and batch normalization, to prevent overfitting and ensure convergence to an optimal solution. The images were resized to 96 × 96 dimensions. The hyperparameters used for training include a learning rate of 0.0005, batch size of 32, and epochs of 20.
Post-training, the performance of each model was evaluated using standard metrics, including accuracy, precision, recall, and F1-score, calculated on a reserved validation set. This evaluation allowed us to identify the most effective models for conversion and deployment. The models were then converted to TensorFlow Lite (TFLite) format, a critical step in ensuring compatibility with edge devices. We also applied 8-bit integer quantization during this conversion process, significantly reducing the model’s size and computational requirements. While reducing model precision, this quantization process is essential for maintaining high inference speeds and low power consumption on edge devices.

3.2. Edge Impulse

Edge Impulse is a powerful platform designed to deploy machine learning models on edge devices. It enables efficient model conversion, optimization, and deployment, making it ideal for real-time applications in resource-constrained environments like agriculture. Figure 11 represents the flow cycle of training and deploying machine learning models on Edge Impulse.

3.2.1. Deployment File Generation

The next phase of our methodology involved preparing the models for deployment using Edge Impulse, a platform designed to facilitate the deployment of machine learning models on edge devices. We used Edge Impulse to generate deployment files after selecting the best-performing models from the TensorFlow segment. This process included converting the models into formats optimized for the specific hardware of our target edge devices, such as microcontrollers or single-board computers, and configuring the deployment platform involved, setting up the edge devices with the necessary software environments, including the deployment of Edge Impulse’s firmware and runtime environment. This configuration ensured the edge devices could run the TFLite models efficiently, with all dependencies correctly managed.

3.2.2. Model Testing and Performance Evaluation

Once the deployment files were generated and the platform was configured, we rigorously tested the models on the target edge devices. This testing phase was crucial to validate the models’ performance in real-world scenarios, where factors such as varying lighting conditions, device power limitations, and processing delays could impact inference accuracy and speed. Performance metrics, including inference time, power consumption, and on-device accuracy, were collected to assess the models’ viability in practical applications. The entire test dataset was also classified using the deployed models to evaluate their real-time performance under typical agricultural conditions.

3.2.3. On-Device Performance Evaluation

The final step in our methodology involved an in-depth evaluation of the models’ behavior directly on the edge devices. This phase included monitoring the models during continuous operation and assessing their stability, responsiveness, and accuracy over extended periods. The models’ behavior was analyzed under various operational conditions, such as fluctuating power supply and environmental noise, to ensure robust performance in real-world settings.
Any anomalies or performance issues detected during the on-device evaluation were addressed by iterating on the model design or adjusting the deployment configuration. The trained models were then uploaded to the Edge Impulse platform for further refinement, if necessary, ensuring that the final deployment was reliable and efficient.
By adhering to this rigorous methodology, we aim to provide a practical solution for tomato leaf disease detection that is accurate and deployable in resource-constrained environments, empowering farmers with the tools to protect their crops and optimize yields.

4. Results

This section presents the experimental results obtained from evaluating various models designed for tomato crop disease identification. The experiments were meticulously conducted, utilizing various evaluation metrics, including accuracy, loss, and training time. Our study aimed to assess each model’s performance and compare their efficacy in accurately classifying tomato crop diseases while differentiating them from healthy plants. Through systematic analysis and comparison of the experimental outcomes, we aimed to identify the strengths and limitations of each model, ultimately seeking to determine the most effective and efficient model for deployment in precision agriculture applications. The experimental results provide valuable insights into the performance of different models, offering guidance for selecting optimal solutions in the context of tomato crop disease identification.

4.1. Model Results

4.1.1. MobileNet

MobileNet demonstrated strong performance during training, achieving a high training accuracy of 96.78% and a low training loss of 0.0969, as shown in Figure 12. However, the validation accuracy significantly dropped to 67.78%, with a corresponding validation loss of 1.4442. The discrepancy between the training and validation performance suggests that MobileNet may be overfitting the training data, as it struggles to generalize to the validation set. Despite its relatively modest 3.40 MB and efficient training time of 11,306.58 s, MobileNet’s generalization capabilities might require further tuning or regularization techniques.
MobileNet demonstrates significant latency on low-end MCUs (125,160 ms) but performs better on high-end MCUs (2562 ms) and AI accelerators (427 ms). It maintains efficiency on microprocessors, with a latency of 33 ms on CPU and 6 ms on GPU, as shown in Table 2 and Table 3.

4.1.2. Inception

Inception achieved a moderate training accuracy of 70.77% with a training loss of 0.7563. The validation accuracy was 61.25%, with a validation loss of 0.9778, indicating a somewhat balanced performance between the training and validation sets, as shown in Figure 13. However, the % test accuracy of 61.28% aligns closely with the validation results, suggesting that Inception is less prone to overfitting than MobileNet, but still falls short in overall accuracy. The large model size of 21.40 MB and longer training time of 9532.55 s reflect the model’s complexity, which may not be ideal for resource-constrained environments.
Inception shows high latency on low-end MCUs (451,659 ms). Still, high-end MCUs and AI accelerators improve performance, reducing latency to 9244 ms and 1541 ms, respectively, as shown in Table 4 and Table 5.

4.1.3. ShuffleNet

ShuffleNet displayed a relatively low training accuracy of 65.80% and a training loss of 0.8132, with its validation accuracy dropping further to 53.22% and a validation loss of 1.2041, as shown in Figure 14. Its corresponding test accuracy of 53.22% indicates that ShuffleNet struggled to learn and generalize from the data effectively, as shown in Figure 14. Despite its compact size of 52.50 KB and fast training time of 3219.74 s, ShuffleNet’s lower performance suggests that it might not be suitable for this specific task, especially in scenarios demanding higher accuracy.
ShuffleNet is highly efficient, with minimal latency (3811 ms) on low-end MCUs and just 13 ms with an AI accelerator. Its compact size makes it ideal for resource-constrained devices, as shown in Table 6 and Table 7.

4.1.4. SqueezeNet

SqueezeNet achieved a training accuracy of 73.76% with a training loss of 0.6613 and a validation accuracy of 59.70% with a validation loss of 1.0493, as shown in Figure 15. The test accuracy mirrors the validation results at 59.76%, indicating a consistent performance across datasets. SqueezeNet’s small model size of 166.40 KB and moderate training time of 4862.94 s make it a good candidate for deployment in resource-constrained environments. However, its overall accuracy is lower than other models, suggesting that while it is efficient, it may require further optimization or be better suited for less-demanding tasks.
SqueezeNet, while optimized for size, experiences significant latency on low-end MCUs (71,182 ms). Its performance improves with high-end MCUs (1458 ms) and AI accelerators (243 ms), as shown in Table 8 and Table 9.

4.1.5. EfficientNet

EfficientNet stood out with a high training accuracy of 97.12% and a low training loss of 0.0863, as shown in Figure 16, indicating strong performance during training. However, its validation accuracy dropped drastically to 11.09%, with a high validation loss of 2.6296. The test accuracy mirrored the validation at 11.09%, indicating significant overfitting. The large model size of 4.60 MB and the longest training time of 53,194.23 s suggest that EfficientNet, while powerful, overfits and does not generalize well. This model might require more data or regularization to improve its validation and test performance.
EfficientNet delivers state-of-the-art accuracy but incurs high latency on low-end MCUs (70,750 ms). Its latency drops to 1448 ms with high-end MCUs and 242 ms with AI accelerators, as shown in Table 10 and Table 11.

4.1.6. Custom DNN

The custom DNN model demonstrated a good balance between training and validation performance, with a training accuracy of 87.28% and a validation accuracy of 61.85%, as shown in Figure 17. The training loss was 0.3237, while the validation loss was 1.3543, showing some overfitting, but not as severe as in other models. The test accuracy of 61.81% is consistent with the validation results, indicating that the model generalizes pretty well. With a model size of 338.80 KB and a training time of 6731.61 s, the custom DNN balances efficiency and performance, making it a potentially viable option for deployment after further tuning.
The custom DNN model offers moderate latency on low-end MCUs (43,664 ms) and improved performance on high-end MCUs (894 ms) and AI accelerators (149 ms), as shown in Table 12 and Table 13 with a summary of all the key metrics for each model shown in Table 14.

4.2. Model Deployment

The trained model was effectively deployed using the Edge Impulse platform during the model deployment process. As shown in Figure 18, the platform generated a QR code that, when scanned by a mobile device, facilitated the seamless transfer and deployment of the model onto the device. This streamlined approach ensured efficient deployment, enabling direct utilization of the model on the mobile platform without requiring additional complex procedures.
As illustrated in Figure 19, the deployed model on a mobile telephone accurately identifies and classifies the various tomato leaf diseases. This successful prediction highlights the model’s capability to distinguish between different health conditions of tomato leaves.

5. Discussion

The experimental evaluation of various deep learning models for tomato leaf disease detection, deployed using the Edge Impulse platform, provides valuable insights into their on-device performance and practical applicability.
MobileNet demonstrated robust training accuracy (96.78%) with a low loss (0.0969). However, the substantial drop in validation accuracy to 67.78% suggests overfitting, limiting its generalization ability. Despite a compact model size (3.40 MB) and efficient training time (11,306.58 s), MobileNet’s latency on low-end MCUs (125,160 ms) highlights challenges in real-time deployment. High-end MCUs (2562 ms) and AI accelerators (427 ms) improved performance, indicating their potential for use on more capable devices. Inception achieved a training accuracy of 70.77% and a validation accuracy of 61.25%, reflecting balanced performance. However, its large model size (21.40 MB) and high latency on low-end MCUs (451,659 ms) suggest limited suitability for resource-constrained environments. Its improved performance on high-end MCUs (9244 ms) and AI accelerators (1541 ms) makes Inception more viable where computational resources are less restricted. ShuffleNet displayed lower accuracy (65.80% training, 53.22% validation) but excelled in efficiency with a small model size (52.50 KB) and minimal latency (3811 ms on low-end MCUs, 13 ms with AI accelerators). Its compact design positions ShuffleNet as a suitable candidate for edge deployment in constrained environments. SqueezeNet offered a training accuracy of 73.76% and a validation accuracy of 59.70%. Its small model size (166.40 KB) and moderate latency on high-end MCUs (1458 ms) and AI accelerators (243 ms) make it a viable option for deployment in resource-constrained settings. However, its accuracy is lower compared to other models. EfficientNet exhibited high training accuracy (97.12%) but suffered from significant overfitting, with its validation accuracy dropping to 11.09%. The model’s large size (4.60 MB) and extended training time (53,194.23 s) pose challenges for practical deployment. While latency is reduced on high-end MCUs (1448 ms) and AI accelerators (242 ms), further optimization is needed to address generalization issues. The custom DNN balanced training (87.28%) and validation (61.85%) accuracy with moderate overfitting. Its model size (338.80 KB) and latency on low-end MCUs (43,664 ms) and AI accelerators (149 ms) suggest it is a promising option for edge deployment, combining efficiency with reasonable performance.

Use Case

Ghanaian farmers, particularly rural farmers, face significant challenges in accurately identifying pests and diseases affecting their crops. This often leads to delayed and ineffective responses to outbreaks. To address this issue, an AI-powered mobile application integrated with the AGHUB EXTENSION PORTAL [23] is currently in its developmental stages to assist farmers in the early detection of these threats.
This mobile application will allow farmers to capture images of affected crops using mobile phones. These images are then uploaded to the AGHUB EXTENSION PORTAL, where an advanced AI system analyzes them to identify potential pests or diseases. Once the AI has processed the image, it provides the farmer with a preliminary diagnosis, including the suspected pest or disease and its characteristic features.
The image data and AI-generated diagnosis are transmitted to the Ghana Plant Protection and Regulatory Services Directorate (PPRSD) through the AGHUB EXTENSION PORTAL to enhance accuracy and inform appropriate response strategies. PPRSD experts carefully examine the information, validating the AI’s findings and conducting further investigations as needed. Based on the confirmed pest or disease, PPRSD assesses the outbreak’s potential impact and risk level.
In collaboration with other relevant government agencies, PPRSD develops comprehensive response strategies. These strategies include recommendations and mitigation measures, which are then communicated to farmers and other stakeholders through the AGHUB EXTENSION PORTAL and other available channels. The various steps involved in an emergency response scenario are illustrated in Figure 20.
By empowering farmers with AI-driven tools and facilitating rapid response through the AGHUB EXTENSION PORTAL, this system aims to improve the overall management of pests and diseases in Ghana’s agricultural sector, leading to increased crop yields and enhanced food security.

6. Conclusions

This work addresses the challenge of crop disease detection by utilizing Edge Impulse to deploy multiple deep-learning models, including MobileNet, Inception, ShuffleNet, Squeezenet, EfficientNet, and a custom Deep Neural Network (DNN) on a mobile device, facilitating the rapid and precise detection of tomato leaf diseases (Leaf blight, Leaf curl, Septoria leaf spot, and Verticillium wilt) in the field.
The results demonstrate that deploying multiple deep learning models on a single edge device for tomato leaf disease detection is feasible, with models like MobileNet and ShuffleNet showing strong potential due to their efficiency and performance. However, models such as Inception and EfficientNet require further optimization to address issues of accuracy and latency. At the same time, the custom DNN provides a favorable balance of performance and efficiency for practical deployment. Future work should optimize these models through techniques like pruning and quantization to enhance their real-time performance and reduce latency. Improving dataset quality by expanding and diversifying training data to cover different geographic regions and conditions will bolster model robustness and generalizability. Also, we plan to collaborate with the Ghana Ministry of Food and Agriculture to deploy the system on large farms and measure the model’s accuracy, power consumption, and performance in varying environmental conditions, which will reveal some practical challenges in its deployment. Exploring real-time adaptation mechanisms and integrating models with edge devices will ensure better applicability and performance. Moreover, developing user-friendly interfaces for end-users can facilitate practical deployment, offering real-time feedback and actionable insights to enhance disease management in agricultural settings.

Author Contributions

Conceptualization, D.A.N.G. and F.A.W.; methodology, D.A.N.G. and F.A.W.; software, D.A.N.G., F.A.W., M.W., P.D., S.A.D. and A.A.G.; validation, D.A.N.G., F.A.W., M.W., P.D., S.A.D. and A.A.G.; formal analysis, D.A.N.G., F.A.W., M.W., P.D., S.A.D. and A.A.G.; investigation, D.A.N.G., F.A.W., M.W., P.D., S.A.D. and A.A.G.; resources, D.A.N.G.; data curation, D.A.N.G. and F.A.W.; writing—original draft preparation, D.A.N.G. and F.A.W.; writing—review and editing, D.A.N.G., F.A.W., M.W., P.D., S.A.D. and A.A.G.; visualization, D.A.N.G., F.A.W., M.W., P.D., S.A.D. and A.A.G.; supervision, D.A.N.G., M.W., P.D., S.A.D. and A.A.G.; project administration, D.A.N.G.; funding acquisition, D.A.N.G. All authors have read and agreed to the published version of the manuscript.

Funding

This work was carried out with the aid of a grant in the UNESCO-TWAS program “Seed Grant for African Principal Investigators” financed by the German Federal Ministry of Education and Research (BMBF) (TWAS-SG-NAPI-4500474961).

Data Availability Statement

The dataset used in this study will be made available upon request to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Farooq, H.; Amjad Bashir, M.; Khalofah, A.; Khan, K.A.; Ramzan, M.; Hussain, A.; Wu, L.; Simunek, J.; Aziz, I.; Samdani, M.S.; et al. Interactive Effects of Saline Water Irrigation and Nitrogen Fertilization On Tomato Growth and Yield. Fresenius Environ. Bull. 2021, 30, 3557–3564. [Google Scholar]
  2. Akbar, J.U.M.; Kamarulzaman, S.F.; Muzahid, A.J.M.; Rahman, A.; Uddin, M. A Comprehensive Review on Deep Learning Assisted Computer Vision Techniques for Smart Greenhouse Agriculture. IEEE Access 2024, 12, 4485–4522. [Google Scholar] [CrossRef]
  3. Garmonyou Aloysius Sam Hon, B. Evaluation of Insecticides and Fungicides for The Management of Insect Pests and Diseases of Tomato (Solanum Ly-copersicum L.). Master’s Thesis, School of Graduate Studies, Kwame Nkrumah University of Science and Technology, Kumasi, Ghana, 2013. [Google Scholar]
  4. Wulnye, F.A.; Arthur, E.A.E.; Gookyi, D.A.N.; Asiedu, D.K.P.; Wilson, M.; Agyemang, J.O. TinyML Implementation on Microcontrollers: The Case of Maize Leaf Disease Identification. In Proceedings of the 2024 Conference on Information Communications Technology and Society (ICTAS), Durban, South Africa, 7–8 March 2024; pp. 180–185. [Google Scholar]
  5. Gookyi, D.A.N.; Wulnye, F.A.; Arthur, E.A.E.; Ahiadormey, R.K.; Agyemang, J.O.; Agyekum, K.O.-B.O.; Gyaang, R. TinyML for smart agriculture: Comparative analysis of TinyML platforms and practical deployment for maize leaf disease identification. Smart Agric. Technol. 2024, 8, 100490. [Google Scholar] [CrossRef]
  6. Jayanthi, G.; Brindha, S.; Vijayalakshmi, S.; Dharshini, V.; Freeda, J.A.; Sahana, S. Tomato Leaf Disease Detection Using Machine Learning. In Proceedings of the 2024 International Conference on Communication, Computing and Internet of Things (IC3IoT), Chennai, India, 17–18 April 2024; pp. 1–6. [Google Scholar]
  7. Brindha, R.; Lakkshmanan, A.; Renukadevi, P.; Jeyakumar, D. Detection of Retinopathy of Prematurity using ResNet Based Deep Features and Support Vector Machine Classifier. In Proceedings of the 2023 Second International Conference on Augmented Intelligence and Sustainable Systems (ICAISS), Trichy, India, 23–25 August 2023; pp. 1020–1027. [Google Scholar]
  8. Mahmud, T.; Barua, K.; Barua, A.; Basnin, N.; Das, S.; Hossain, M.S.; Andersson, K. Explainable AI for Tomato Leaf Disease Detection: Insights into Model Interpretability. In Proceedings of the 2023 26th International Conference on Computer and Information Technology (ICCIT), Cox’s Bazar, Bangladesh, 13–15 December 2023; pp. 1–6. [Google Scholar]
  9. Durmu, H.; Güne, O.; Krc, M. Disease Detection on the Leaves of the Tomato Plants by Using Deep Learning. In Proceedings of the 2017 6th International Conference on Agro-Geoinformatics, Fairfax, VA, USA, 7–10 August 2017. [Google Scholar]
  10. Alzahrani, M.S.; Alsaade, F.W. Transform and Deep Learning Algorithms for the Early Detection and Recognition of Tomato Leaf Disease. Agronomy 2023, 13, 1184. [Google Scholar] [CrossRef]
  11. Gonzalez-Huitron, V.; León-Borges, J.A.; Rodriguez-Mata, A.; Amabilis-Sosa, L.E.; Ramírez-Pereda, B.; Rodriguez, H. Disease detection in tomato leaves via CNN with lightweight architectures implemented in Raspberry Pi 4. Comput. Electron. Agric. 2021, 181, 105951. [Google Scholar] [CrossRef]
  12. Anh, P.T.; Duc, H.T.M. A Benchmark of Deep Learning Models for Multi-leaf Diseases for Edge Devices. In Proceedings of the 2021 International Conference on Advanced Technologies for Communications (ATC), Ho Chi Minh City, Vietnam, 14–16 October 2021; pp. 318–323. [Google Scholar]
  13. Bir, P.; Kumar, R.; Singh, G. Transfer Learning based Tomato Leaf Disease Detection for mobile applications. In Proceedings of the 2020 IEEE International Conference on Computing, Power and Communication Technologies (GUCON), Greater Noida, India, 2–4 October 2020; pp. 34–39. [Google Scholar]
  14. Kumar, H.N.N.; Prasad, M.S.G.; Gujjar, J.P.; Sharath, K.R.; Gadiyar, H.M.T.; Dubey, A.K. The integration of machine learning and IoT for the early detection of tomato leaf disease in real-time. J. Inf. Optim. Sci. 2024, 45, 305–314. [Google Scholar] [CrossRef]
  15. Karothia, R.; Chattopadhyay Mieee, M.K. Vigorous Deep Learning Models for Identifying Tomato Leaf Diseases. In Proceedings of International Conference on Data Science and Applications: ICDSA 2021; Springer: Singapore, 2022; Volume 1, pp. 131–152. [Google Scholar]
  16. Afify, M.; Loey, M.; Elsawy, A. A Robust Intelligent System for Detecting Tomato Crop Diseases Using Deep Learning. Int. J. Softw. Sci. Comput. Intell. 2022, 14, 1–21. [Google Scholar] [CrossRef]
  17. Mensah, P.K.; Akoto-Adjepong, V.; Adu, K.; Ayidzoe, M.A.; Bediako, E.A.; Nyarko-Boateng, O.; Boateng, S.; Donkor, E.F.; Bawah, F.U.; Awarayi, N.S.; et al. CCMT: Dataset for crop pest and disease detection. Data Brief 2023, 49, 109306. [Google Scholar] [CrossRef] [PubMed]
  18. Andrew, H.; Menglong, Z.; Bo, C.; Dmitry, K.; Weijun, W.; Tobias, W.; Marco, A.; Hartwig, A. ShuffleNet: Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv 2017, arXiv:1704.04861. [Google Scholar]
  19. Aggarwal, S.; Sahoo, A.K.; Bansal, C.; Sarangi, P.K. Image Classification using Deep Learning: A Comparative Study of VGG-16, InceptionV3 and EfficientNet B7 Models. In Proceedings of the 2023 3rd International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE), Greater Noida, India, 12–13 May 2023; pp. 1728–1732. [Google Scholar]
  20. Zhang, X.; Zhou, X.; Lin, M.; Sun, J. ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices. arXiv 2017, arXiv:1707.01083. [Google Scholar]
  21. Iandola, F.N.; Han, S.; Moskewicz, M.W.; Ashraf, K.; Dally, W.J.; Keutzer, K. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size. arXiv 2016, arXiv:1602.07360. [Google Scholar]
  22. Yi, M.; Zhao, C.; Liao, F.; Yao, W. Classification of Blueberry Varieties Based on Improved EfficientNet. In Proceedings of the 2022 4th International Academic Exchange Conference on Science and Technology Innovation (IAECST), Guangzhou, China, 9–11 December 2022; pp. 411–415. [Google Scholar]
  23. Maheswaran, S.; Indhumathi, N.; Dhanalakshmi, S.; Nandita, S.; Mohammed Shafiq, I.; Rithka, P. Identification and Classification of Groundnut Leaf Disease Using Convolutional Neural Network. In Computational Intelligence in Data Science; Kalinathan, L.R.P., Kanmani, M.S.M., Eds.; Springer International Publishing: Cham, Switzerland, 2022; pp. 251–270. [Google Scholar]
  24. Maheswaran Maheswaran, S.; Sathesh, S.; Rithika, P.; Shafiq, I.M.; Nandita, S.; Gomathi, R.D. Detection and Classification of Paddy Leaf Diseases Using Deep Learning (CNN). In Computer, Communication, and Signal Processing; Neuhold, E.J., Fernando, X., Lu, J., Piramuthu, S., Chandrabose, A., Eds.; Springer International Publishing: Cham, Switzerland, 2022; pp. 60–74. [Google Scholar]
Figure 1. TensorFlow and Edge Impulse integration model.
Figure 1. TensorFlow and Edge Impulse integration model.
Agriengineering 06 00203 g001
Figure 2. Stages of the proposed method.
Figure 2. Stages of the proposed method.
Agriengineering 06 00203 g002
Figure 3. Samples of the dataset images.
Figure 3. Samples of the dataset images.
Agriengineering 06 00203 g003
Figure 4. Distribution of tomato leaf disease classes.
Figure 4. Distribution of tomato leaf disease classes.
Agriengineering 06 00203 g004
Figure 5. MobileNet architecture.
Figure 5. MobileNet architecture.
Agriengineering 06 00203 g005
Figure 6. Inception architecture.
Figure 6. Inception architecture.
Agriengineering 06 00203 g006
Figure 7. ShuffleNet architecture.
Figure 7. ShuffleNet architecture.
Agriengineering 06 00203 g007
Figure 8. SqueezeNet architecture.
Figure 8. SqueezeNet architecture.
Agriengineering 06 00203 g008
Figure 9. EfficientNet architecture.
Figure 9. EfficientNet architecture.
Agriengineering 06 00203 g009
Figure 10. Custom DNN architecture.
Figure 10. Custom DNN architecture.
Agriengineering 06 00203 g010
Figure 11. Edge impulse platform flowchart.
Figure 11. Edge impulse platform flowchart.
Agriengineering 06 00203 g011
Figure 12. MobileNet training accuracy and training loss.
Figure 12. MobileNet training accuracy and training loss.
Agriengineering 06 00203 g012
Figure 13. Inception training accuracy and training loss.
Figure 13. Inception training accuracy and training loss.
Agriengineering 06 00203 g013
Figure 14. ShuffleNet training accuracy and training loss.
Figure 14. ShuffleNet training accuracy and training loss.
Agriengineering 06 00203 g014
Figure 15. SqueezeNet training accuracy and training loss.
Figure 15. SqueezeNet training accuracy and training loss.
Agriengineering 06 00203 g015
Figure 16. EfficientNet training accuracy and training loss.
Figure 16. EfficientNet training accuracy and training loss.
Agriengineering 06 00203 g016
Figure 17. Custom DNN training accuracy and training loss.
Figure 17. Custom DNN training accuracy and training loss.
Agriengineering 06 00203 g017
Figure 18. Model deployment to mobile phone using QR code.
Figure 18. Model deployment to mobile phone using QR code.
Agriengineering 06 00203 g018
Figure 19. Tomato leaf disease detection inference on a mobile phone.
Figure 19. Tomato leaf disease detection inference on a mobile phone.
Agriengineering 06 00203 g019
Figure 20. Use case flow chart.
Figure 20. Use case flow chart.
Agriengineering 06 00203 g020
Table 1. Summary of literature review.
Table 1. Summary of literature review.
PaperModel(s)Dataset(s)MethodologyResultsLimitation
[6]CNNPlantVillageRaspberry Pi-based real-time detection systemTraining accuracy of 98%; testing accuracy of 88.17%Single-CNN architecture; potential overfitting
[7]VGG16, MobileNetPlantVillageComparative analysis of transfer learning modelsImproved classification accuracyComputational demands for edge deployment
[8]EfficientNetB3, Xception, MobileNetV2Custom DatasetCNNs and pre-trained models combined with image processing for tomato leaf disease recognitionAccuracy of 0.993 with EfficientNetB3Not fully ready for real-world deployment
[9]AlexNet, SqueezeNetPlantVillageDeep learning models tested on Nvidia Jetson TX1Real-time disease detection in the fieldA limited number of architectures were tested; dataset diversity
[10]DenseNet121, ResNet50V2, ViTKaggleEvaluation of deep learning models for early detection and recognitionHigh accuracyDataset size: need for further testing on diverse datasets
[11]Lightweight CNNsPlantVillage (subset)Depthwise separable convolution architectures for low-power devicesEffective detection on Raspberry Pi 4Focus on low-cost devices, a subset of an existing dataset
[12]MobileNet V3Not specifiedBenchmarking models for multi-leaf disease detection on edge devicesSuitable for deployment on Raspberry Pi 3Challenges of deploying on resource-constrained devices; balancing accuracy, inference time, and memory usage
[14]InceptionV3Not specifiedCNN models for identifying tomato leaf diseasesHighest accuracy of 99.64% with InceptionV3Dataset diversity; expansion needed for other crops
Table 2. MobileNet MCU performance metrics.
Table 2. MobileNet MCU performance metrics.
DeviceLatencyEON Compiler RAMEON Compiler ROMTFLite RAMTFLite ROM
Low-end MCU125,160 ms390.5 K3.4 M468.1 K3.5 M
High-end MCU2562 ms407.9 K3.4 M468.4 K3.5 M
+AI accelerator427 ms407.9 K3.4 M468.4 K3.5 M
Table 3. MobileNet microprocessor performance.
Table 3. MobileNet microprocessor performance.
DeviceLatencyModel Size
CPU33 ms3.5 M
GPU or accelerator6 ms3.5 M
Table 4. Inception MCU performance metrics.
Table 4. Inception MCU performance metrics.
DeviceLatencyEON Compiler RAMEON Compiler ROMTFLite RAMTFLite ROM
Low-end MCU451,659 ms354.1 K21.4 M428.0 K21.6 M
High-end MCU9244 ms620.4 K21.4 M430.3 K21.6 M
+AI accelerator1541 ms620.4 K21.4 M430.3 K21.6 M
Table 5. Inception microprocessor performance.
Table 5. Inception microprocessor performance.
DeviceLatencyModel Size
CPU114 ms21.5 M
GPU or accelerator19 ms21.5 M
Table 6. ShuffleNet MCU performance metrics.
Table 6. ShuffleNet MCU performance metrics.
DeviceLatencyEON Compiler
RAM
EON Compiler
ROM
TFLite RAMTFLite ROM
Low-end MCU3811 ms76.3 K52.4 K104.3 K74.0 K
High-end MCU78 ms76.3 K66.8 K104.6 K91.0 K
+AI accelerator13 ms76.3 K66.8 K104.6 K91.0 K
Table 7. ShuffleNet microprocessor performance.
Table 7. ShuffleNet microprocessor performance.
DeviceLatencyModel Size
CPU2 ms33.2 K
GPU or accelerator1 ms33.2 K
Table 8. SqueezeNet MCU performance metrics.
Table 8. SqueezeNet MCU performance metrics.
DeviceLatencyEON Compiler RAMEON Compiler ROMTFLite RAMTFLite ROM
Low-end MCU71,182 ms597.6 K166.4 K881.9 K195.2 K
High-end MCU1458 ms597.6 K174.3 K882.1 K204.5 K
+AI accelerator243 ms597.6 K174.3 K882.1 K204.5 K
Table 9. SqueezeNet microprocessor performance.
Table 9. SqueezeNet microprocessor performance.
DeviceLatencyModel Size
CPU21 ms154.6 K
GPU or accelerator4 ms154.6 K
Table 10. EfficientNet MCU performance metrics.
Table 10. EfficientNet MCU performance metrics.
DeviceLatencyEON Compiler RAMEON Compiler ROMTFLite RAMTFLite ROM
Low-end MCU70,750 ms972.0 K4.6 M1.1 M4.9 M
High-end MCU1448 ms1.3 M4.6 M1.1 M4.9 M
+AI accelerator242 ms1.3 M4.6 M1.1 M4.9 M
Table 11. EfficientNet microprocessor performance.
Table 11. EfficientNet microprocessor performance.
DeviceLatencyModel Size
CPU26 ms4.8 M
GPU or accelerator5 ms4.8 M
Table 12. Custom DNN MCU performance metrics.
Table 12. Custom DNN MCU performance metrics.
DeviceLatencyEON Compiler RAMEON Compiler ROMTFLite RAMTFLite ROM
Low-end MCU43,664 ms453.6 K338.8 K869.9 K357.7 K
High-end MCU894 ms453.6 K347.8 K870.1 K369.4 K
+ AI accelerator149 ms453.6 K347.8 K870.1 K369.4 K
Table 13. Custom DNN microprocessor performance.
Table 13. Custom DNN microprocessor performance.
DeviceLatencyModel Size
CPU17 ms321.3 K
GPU or accelerator3 ms321.3 K
Table 14. Summary of key metrics for each model.
Table 14. Summary of key metrics for each model.
ModelTrain AccTrain LossVal AccVal LossTest LossTest AccTrain Time(s)Train ParamsNon-Trainable ParamsModel Size
ShuffleNet0.65800.81320.53221.20411.20450.53223219.74320,565052.50 KB
EfficientNet0.97120.08630.11092.62962.62840.110953,194.234172,16142,0234.60 MB
MobileNet0.96780.09690.67781.44421.44550.677911,306.583338,82121,8883.40 MB
Inception0.70770.75630.61250.97780.97730.61289532.5522,031,26934,43221.40 MB
SqueezeNet0.73760.66130.59701.04931.04870.59764862.94121,7010166.40 KB
Custom 0.87280.32370.61851.35430.61811.35366731.61320,5650338.80 KB
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Gookyi, D.A.N.; Wulnye, F.A.; Wilson, M.; Danquah, P.; Danso, S.A.; Gariba, A.A. Enabling Intelligence on the Edge: Leveraging Edge Impulse to Deploy Multiple Deep Learning Models on Edge Devices for Tomato Leaf Disease Detection. AgriEngineering 2024, 6, 3563-3585. https://doi.org/10.3390/agriengineering6040203

AMA Style

Gookyi DAN, Wulnye FA, Wilson M, Danquah P, Danso SA, Gariba AA. Enabling Intelligence on the Edge: Leveraging Edge Impulse to Deploy Multiple Deep Learning Models on Edge Devices for Tomato Leaf Disease Detection. AgriEngineering. 2024; 6(4):3563-3585. https://doi.org/10.3390/agriengineering6040203

Chicago/Turabian Style

Gookyi, Dennis Agyemanh Nana, Fortunatus Aabangbio Wulnye, Michael Wilson, Paul Danquah, Samuel Akwasi Danso, and Awudu Amadu Gariba. 2024. "Enabling Intelligence on the Edge: Leveraging Edge Impulse to Deploy Multiple Deep Learning Models on Edge Devices for Tomato Leaf Disease Detection" AgriEngineering 6, no. 4: 3563-3585. https://doi.org/10.3390/agriengineering6040203

Article Metrics

Back to TopTop