论文信息
论文解读
AI 辅助整理- 方法
- 分布式边缘计算+轻量模型,先二分类再共识多分类。
- 发现
- 两级系统准确率与F1均达95.50%,多分类F1为96.44%。
- 机会点
- 仅在受控实验室验证,可延伸至田间复杂光照与多作物泛化及边缘能耗优化。
论文摘要
人工智能(AI)在农业中的应用已深刻改变了作物管理方式,尤其是在植物病害检测方面。苹果树作为重要的农业经济作物,易受多种病害侵袭,严重影响作物产量。传统的病害检测方法通常依赖人工检查,耗时且易出错。为此,本研究提出了一种新颖的两阶段边缘AI框架,用于苹果叶片病害分类,该框架将RGB图像与分布式边缘计算相结合。第一阶段执行二分类以区分健康叶片与患病叶片,F1分数达到95.50%。该优化通过在边缘设备上采用轻量级模型实现,从而提升了计算效率。第二阶段采用基于共识的多类分类方法,在识别具体病害方面F1分数达到96.44%。该双阶段系统在边缘AI架构的支持下,实现了实时病害检测,同时最大限度地降低了资源消耗,并增强了在大规模农业环境中的可扩展性。完整系统在专用数据集上达到了95.50%的准确率和F1分数。结果表明,该系统在受控实验室条件下具有有效性,为精准、实时的农业监测提供了一种有前景的解决方案。本研究凸显了分布式边缘AI系统在精准农业中实现可扩展且高效病害检测的潜力。
全文
Facta Universitatis Series Automatic Control and RoboticsFACTA UNIVERSITATIS
Series: Automatic Control and Robotics Vol. 25, No 1, 2026, pp. 17 - 30
https://doi.org/10.22190/FUACR260506002G
© 2026 by University of Niš, Serbia | Creative Commons License: CC BY -NC-ND
Regular Paper
A HIERARCHICAL DISTRIBUTED EDGE AI FRAMEWORK
FOR REAL-TIME APPLE LEAF DISEASE CLASSIFICATION
UDC (004.896:633/.635-2)
Milan Grujev1,2, Dragan Stojanović2,
Miloš Ilić3, Aleksandar Milosavljević2
1The Institute for Artificial Intelligence Research and Development of Serbia,
Novi Sad, Serbia
2University of Niš, Faculty of Electronic Engineering,
Department of Computer Science, Serbia
3Toplica Academy of Applied Studies, Department of Business Studies, Blace, Serbia
ORCID iDs: Milan Grujev https://orcid.org/0009-0002-3211-6844
Dragan Stojanović https://orcid.org/0000-0003-4893-3814
Miloš Ilić https://orcid.org/0000-0002-9696-2874
Aleksandar Milosavljević https://orcid.org/0000-0003-3057-7727
Abstract. The application of artificial intelligence (AI) in agriculture has transformed
crop management, particularly in the detection of plant diseases. Apple trees, a key
agricultural commodity, are vulnerable to various diseases, which can severely impact
crop yields. Traditional disease detection methods, often reliant on manual inspections,
are time-consuming and prone to error. In response, this study proposes a novel two -
stage edge AI framework for apple leaf disease classification that integrates R GB
imagery with distributed edge computing. The first stage performs binary classification
to distinguish between healthy and diseased leaves, achieving an F1 score of 95.50%.
This optimization is achieved by utilizing lightweight models on edge devices, t hereby
enhancing computational efficiency. The second stage employs a consensus -based
multiclass classification approach, achieving a 96.44% F1 score in identifying specific
diseases. This dual-stage system, supported by an edge AI architecture, ensures real-time
disease detection while minimizing resource consumption and enhancing scalability in
large-scale agricultural environments. The full system achieved a 95.50% accuracy and
F1 scor e on the special dataset. The results demonstrate the system’s efficacy in
controlled laboratory conditions, offering a promising solution for precise, real -time
agricultural monitoring. This study underscores the potential of distributed edge AI
systems for scalable and efficient disease detection in precision agriculture.
Received May 06, 2026 / Revised June 24, 2026 / Accepted June 29, 2026
Corresponding author: Milan Grujev
The Institute for Artificial Intelligence Research and Development of Serbia, Fruškogorska 1, 21000 Novi Sad,
Republic of Serbia
E-mail: milan.grujev@ivi.ac.rs, milan.grujev@elfak.rs
18 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
Key words: artificial intelligence, edge device, distributed system, image classification,
neural network.
- INTRODUCTION
In recent years, the application of artificial intelligence (AI) in agriculture has
revolutionized various aspects of crop management, with a particular focus on plant disease
detection [1]. Among the many challenges faced by farmers, the timely identification and
management of plant disease are paramount to ensuring healthy crop yields. Apple trees,
being economically significant globally, are highly susceptible to a range of diseases, which
can substantially affect both the quality and quantity of the harvest [2]. Traditional disease
detection methods, which rely on manual inspection, are not only time-consuming but also
prone to human error, making them less viable for large-scale agricultural practices.
The emergence of machine learning, especially convolutional neural networks (CNNs),
has provided a promising solution to this issue, offering automated, real-time, and accurate
disease detection capabilities [3]. Recent studies have demonstrated the efficacy of various
CNN architectures, such as MobileNet [4], [5], [6] , YOLO [7], [8], and EfficientNet [9],
[10], in classifying apple leaf diseases based on visual data. These methodologies, often
integrated with additional technologies such as edge and distributed computing, have
enhanced the accuracy and efficiency of disease detection systems. However, despite these
advancements, challenges remain, particularly in terms of system scalability, real -time
processing, efficient resources consumption, and the generalization of models across
diverse environmental conditions.
This study aims to provide the following research contributions:
▪ Hierarchical edge AI system: Development of a two-stage classification pipeline that
synergizes distributed edge intelligence with RGB imagery, minimizing data
transmission overhead while maintaining high-fidelity, real-time detection.
▪ Edge-level initial screening: Implementation of a binary “pre-screening” mechanism
that filters healthy samples at the source, significantly reducing the downstream
computational load and latency for large-scale agricultural monitoring.
▪ Server-side disease classification: A high-precision multiclass identification module
for subtle morphological variations in apple leaf pathologies, ensuring robust
performance across diverse environmental conditions. - RELATED WORK
Recent advancements in automated apple disease detection have garnered significant
attention, particularly with the application of artificial intelligence. Key methodologies in this
domain often leverage various neural network architectures which have demo nstrated
remarkable performance, especially in methods that combine them with other computer
technologies, such as networking, embedded systems, etc. This section provides a
comprehensive review of the most pertinent works in the field, offering an overview of the
methods, approaches, and findings, while also identifying areas that warrant further exploration
and investigation.
Palei et al. [4] integrated deep learning and blockchain technology to develop a smart,
secure, and decentralized platform for apple leaf disease identification. The authors trained
A Hierarchical Distributed Edge AI Framework for Real-Time Apple Leaf Disease Classification 19
several CNN models, including VGG16, VGG19, ResNet50, ResNet101, and
MobileNetV2, and incorporated the best-performing models, ResNet50 and MobileNetV2,
which achieved an accuracy of 92.48%. The blockchain framework ensures a trustworthy and
decentralized environment for data and model security, while cloud infrastructure facilitates the
storage of large-scale datasets. Khan et al. [5] conducted a comparative analysis of pretrained
CNN architectures for automated classification of apple foliar disease using leaf images. Eight
CNN models, including DenseNet121, DenseNet201, ResNet50V2, InceptionV3,
InceptionResNetV2, MobileNet, MobileNetV2, and Xception, were evaluated on an apple
leaf dataset comprising five different classes. The models were trained using transfe r
learning, with fine -tuning applied to optimize performance through different
hyperparameter configuration s. Experimental res ults demonstrated that the MobileNet
architecture achieved the highest classification accuracy of 97%. Liao et al. [6] utilized a
convolutional neural network and transfer learning with the MobileNetV2 architecture to
detect and classify four common apple diseases. Their study demonstrated that the transfer
learning approach with MobileNetV2 outperformed a classifier -only model in apple
disease classification. Specifically, the MobileNetV2 -based model exhibited superior on -
device performance, reduced inference time, lower memory consumption, and achieved an
accuracy of 96.7%, highlighting its sustainability for real -world applications. Li et al. [7]
proposed Apple-YOLO, a lightweight detection model designed for real -time apple leaf
disease detection on mobile devices. This model incorporates a double-branch Apple-CSP
module to reduce the number of parameters while maintaining effective feature extra ction
capabilities. Additionally, the improved FDSA (Focus Layer with Depthwise Separable
Convolution and Attention Mechanism) module effectively reduces the model’s FLOPs
and enhances the network’s ability to focus on disease spots. Furthermore, the Skip -Spp
(Skip-connection and Spatial Pyramid Pooling) module is introduced to strengthen
detection performance for multi -scale disease spots. Apple -YOLO achieved an accuracy
of 96.7% and a mean Average Precision (mAP) of 95.9%. Liu et al. [8] introduced
YOLOX-ASSANano, a novel deep learning model designed as an improved, lightweight,
real-time network for apple leaf disease detection, based on YOLOX-Nano. The proposed
model enhances the YOLOX -Nano backbone through the integration of an asymmetric
ShuffleBlock, a CSP -SA module, and blueprint -separable convolution (BSConv),
significantly improved feature extraction and detection performance. Experimental results
demonstrated that YOLOX -ASSANano, with only 0.83MB of parameters, achieved a
mean Average Precision (mAP) of 91.08%. Banjar et al. [9] introduced E-AppleNet, an
advanced apple disease classification model based on the EfficientNetV2 architecture. The
proposed model integrates attention mechanisms and additional dense layers at the final
stage to enhance classification performance. To add ress class imbalance and mitigate
overfitting, the authors employed transfer learning and multi-class focal loss. Evaluated on
the PlantVillage dataset, E-AppleNet achieved an exceptional accuracy of 99%. Sheng et
al. [11] presented a disease identification method based on a cascade backbone network
(CBNet) for detecting leaf disease on apple trees. The model replaces conventional
convolutional blocks with MobileViT -based convolutional blocks to enhance feature
extraction. Additionally, a cascaded backbone structure is employ ed to effectively fuse
features through a pyramidal cascaded multiplication operation. The model achieved an
accuracy of 96.76% and an F1 score of 96.71%. Nessa Isty et al. [12] proposed a novel
INAR-SSD (Integrated Neural Architecture for Real -time Single Shot multibox Detector)
model, which integrates SSD architectures with a specialized neural network framework. The
20 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
proposed model leverages multiple functionalities, including GoogLeNet, the Inception
structure, and Rainbow concentration, along with various digital image processing techniques
such as noise removal, overfitting reduction, and feature extraction. Experim ental results
demonstrated that the INAR-SSD model successfully detects diseases in apple leaves, achieving
an accuracy of 97%.
Khan et al. [13] developed a two -stage apple disease detection system utilizing the
Xception architecture and Faster R -CNN. The system operates in two sequential stages:
the first stage employs a lightweight, customized classification model to categorize input
images as d iseased, healthy, or damaged, while the second stage is triggered only if a
disease is detected in the initial stage. The proposed system achieved a classification accuracy
of approximately 88%. Bansal et al. [10] proposed an ensemble model comprising pretrained
DenseNet121, EfficientNetB7, and EfficientNet NoisyStudent, designed for the classification
of apple leaves into five categories. The model was deployed as a web -based application,
providing an accessible a nd user -friendly platform for apple leaf disease identification.
Experimental results demonstrated that the proposed ensemble model achieved an accuracy of
96.25%. Kumar et al. [14] developed a deep learning-based web application for real -time
detection and classification of apple leaf diseases. The application employs a CNN model to
analyze leaf images and classify them into five distinct classes. The system achieved an
accuracy of 74.21% and was designed with a user-friendly interface, allowing users to upload
leaf images for immediate analysis and disease identification. Noor et al. [15] proposed a
framework for apple leaf disease detection utilizing a Wireless Visual Sensor Network
(WVSN) to enable real -time monitoring and automation in apple farms. The WVSN
employs CNN models for cloud-based classification, processing periodically captured images
from apple farms via wireless sensor nodes. These images are transmitted to the cloud
through a gateway, where the classification model performs disease identification.
Experimental results demonstrated that the proposed framework achieved an ac curacy of
96.96% on a developed dataset and 95.1% in real-time testing using images from apple farms.
Silva and Almeida [16] investigated the application of edge computing for real -time
classification of leaf diseases using thermal imaging. The authors introduced a thermal image
dataset for plant disease classification and evaluated deep learning models, including
InceptionV3, MobileNetV1, MobileNetV2, and VGG16, on resource-constrained devices such
as the Raspberry Pi 4B. To enhance model efficiency, optimization techniques such as pruning
and quantization were applied, reducing model size and improving inference speed while
maintaining state-of-the-art classification accuracy.
The current literature illustrates a strategic departure from resource -intensive CNN
architectures, such as ResNet and VGG, toward lightweight, edge -optimized models like
Apple-YOLO and MobileNetV2. While these frameworks achieve a near-perfect accuracy in
controlled environments, an inherent tension remains between the computational depth and the
real-time responsiveness required at the network edge. Although tiered detection systems have
established a functional baseline, a significant opportunity exists to enhance efficiency by
leveraging distributed computing to partition the “healthy-vs-diseased” filtering process. In
contrast to existing research, this study proposes a novel framework where preliminary analysis
of apple disease is performed at the extreme edge, utilizing a distributed binary classification
logic to decouple disease detection from specific disease classification tasks. Overcoming these
limitations in model generalization and decentralized execution is essential for
transitioning from laboratory -constrained diagnostics to autonomous, field -deployable
agricultural monitoring systems.
A Hierarchical Distributed Edge AI Framework for Real-Time Apple Leaf Disease Classification 21
- METHODOLOGY
The methodology of this study evaluates two primary architectural paradigms for plant
leaf disease detection: the traditional server-based approach and the autonomous Edge AI
principle. In a traditional framework, high -resolution imagery is transmitted wirelessly
from the field to a central server for processing. While this allows for the use of high -
performance computing, it inevitabl y results in significant network congestion and
increased latency, hindering real -time response. Conversely, shifting the en tire
computational workload to the network’s edge requires sophisticated, high-powered hardware
at the source. Such resource-intensive edge devices often demand a stable power supply and
higher energy consumption, which frequently necessitates stationary deployment and limits the
system’s mobility and operational autonomy in dynamic orchard environments.
Fig. 1 Framework overview diagram
By synthesizing the low -latency benefits of Edge AI with the high -performance
capabilities of edge server computing, this research introduces a hybrid architecture designed to
mitigate the inherent trade-offs of both paradigms. This study introduces a hierarchical two-
stage framework for apple disease classification that leverages distributed Edge AI and RGB
imagery to maximize operational efficiency. This integrated approach relies on distributed
intelligence to ensure real-time responsiveness while maintaining the computational depth
necessary for complex pathological analysis. As illustrated in Figure 1, the architecture is
partitioned into two distinct synergistic modules: a binary classification stage for rapid disease
screening and a subsequent multiclass identification stage for precise pathological
characterization. By decoupling these tasks, the system effectively gates computational
resources – prioritizing intensive processing only for identified anomalies – thereby
ensuring high-throughput performance in resource-constrained agricultural environments.
3.1. Binary Classification for Initial Screening
In the initial phase of the proposed framework, an edge device equipped with an
optimized deep neural network (DNN) model performs binary classification to determine
whether an apple leaf is healthy or diseased. This stage serves as a preprocessing filter,
substantially reducing computational complexity in subsequent processing steps by
ensuring that only diseased leaves undergo further, more resource-intensive classification.
22 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
The primary objective of this binary classification task is to rapidly identify the
presence of disease in apple leaves. To achieve this, the system employs lightweight,
optimized neural network architectures specifically designed for deployment on resourc e-
constrained edge devices, such as microcontrollers, IoT -enabled agricultural sensors, and
mobile processing units. These models are fine -tuned to maximize classification accuracy
while minimizing computational overhead, enabling real-time inference in field conditions.
Fig. 2 Initial binary screening of apple leaf images
By implementing the neural network directly on edge devices, the framework reduces
reliance on centralized edge-server-based processing, thereby minimizing latency and
bandwidth usage. This edge -based inference paradigm ensures an efficient, scalable, and
responsive initial disease detection, making it well -suited for large -scale agricultural
monitoring applications. Furthermore, the distributed nature of the system enhances its
robustness, allowing for continuous real -time classifi cation even in environmen ts with
limited or intermittent network conditions.
3.2. Multiclass Classification for Disease Identification
Following the initial detection of a diseased leaf, the system proceeds to an advanced
multiclass classification stage, wherein the specific disease affecting the leaf is identified.
This stage is critical for precision agriculture, as accurate disease classification enables the
implementation of targeted treatment strategies tailored to each pathogen.
To achieve this, the captured image is processed through a distributed machine learning
pipeline designed to distinguish among multiple disease categories. The multiclass
classification model integrates state -of-the-art image processing and deep learning
methodologies, utilizing key leaf characteristics, including texture, color variations, lesion
distribution, and morphological distortion, to enhance classification accuracy.
A Hierarchical Distributed Edge AI Framework for Real-Time Apple Leaf Disease Classification 23
Fig. 3 Multiclass classification for specific apple leaf disease
Unlike the binary classification stage, this phase necessitates high -performance
computational resources due to the complexity of feature extraction and deep learning
network inference. Consequently, the multiclass classification process is executed on more
advanced hardware platforms, such as remote centralized servers , where greater
computational resources are available . The distributed nature of the framework ensures
efficient resource management, dynamically allocating computational workloads based on
system availability and processing requirements, thereby optimizing performance and
scalability.
3.3. Implementation Details
The practical implementation of the proposed framework involves multiple interconnected
devices, each playing a specific role in the classification process. Effective communication
between these devices is essential for ensuring seamless operation and efficient data
processing.
For the first stage, edge devices are utilized to perform initial disease classification. These
devices can include microcontrollers, such as Arduino-based systems, which are well-suited
for low-power, resource-constrained environments. In our experimental setup, we employed
an Arduino Nano ESP32 microcontroller board, which features 8MB of RAM and 16MB of
flash memory. This microcontroller is equipped with an OmniVision OV2640 image sensor
as its camera module, enabling real -time image acquisition for dise ase detection.
Additionally, the built-in Wi-Fi and Bluetooth connectivity options facilitate seamless data
transmission between edge devices and server-based or higher -computational processing
units, ensuring efficient integration within the distributed computing framework.
For the second stage, an edge server is utilized as a more advanced computational unit
to execute the multiclass classification task. This server operates on a Raspberry Pi 4 single-
board computer equipped with 4GB of RAM. The server’s primary function is to handle the
computationally intensive processing required for multiclass classification, employing a
complex deep neural network to accurately identify specific apple leaf diseases.
24 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
The communication channel between the edge device and the edge server represents a very
important component of the proposed system, as its performance directly impacts data
transmission efficiency and overall system responsiveness. In our experimental setup, device
communication was established using Wi-Fi technology, leveraging the built-in Wi-Fi module
of the selected edge device. This approach ensures reliable and efficient data transfer between
the edge device and the remote server. Alternative communication methods may be employed
depending on hardware capabilities, deployment environment, and operational constraints.
Potential options include LoRa (Long Range) communication, RF (Radio Frequency) wireless
transmission, and cellular networks (e.g., 4G, 5G). Each of these techniques presents distinct
advantages and limitations in terms of range, power consumption, data rate, and infrastructure
requirements. However, the choice of communication channel is influenced by environmental
conditions, network availability, and specific application requirements.
To address the initial binary classification task, we employed the MobileNetV2
architecture enhanced with quantization and hyperparameter tuning. To ensure suitability for
edge-device deployment, the model was optimized to be lightweight, reducing memory usage
and energy consumption while maintaining high classification a ccuracy on resource -
constrained hardware. The model retains the standard input size of 224x224 but utilizes a
reduced width multiplier of 0.75 instead of the default 1.0 to further decrease computational
complexity. Additionally, post-training integer quantization was applied using the TensorFlow
Lite framework, converting the model to INT8 precision for improved efficiency.
For multiclass classification on the remote edge server, we adopted a consensus -based
approach by selecting three representative image classification models from MobileNet,
DenseNet, and ResNet families. These architectures were chosen based on their prove n
effectiveness and robustness in handling complex categorical classification tasks, as
highlighted in the literature. Specifically, we utilized MobileNetV2 with a default width
multiplier of 1.0 from the MobileNet family, DenseNet121 from the DenseNet family, and
ResNet50V2 from the ResNet family. All specified models have the same input size of
224x224 pixels. To combine the strengths of these model s, we implemented and evaluated
multiple aggregation strategies. The majority voting scheme determines the final prediction
based on the class most frequently predicted across all models, treating each model equally. In
contrast, the soft voting approach averages the predicted class probabilities from each model
and selects the class with the highest mean confidence. The max-confidence strategy, on the
other hand, identifies the prediction with the highest confidence score from any single model
and uses it as the final output.
This study used two datasets: the Plant Pathology 2020 Challenge dataset [17] for full-
system evaluation and the Plant Pathology 2021 Challenge dataset [18] for model training,
model evaluation, and classifier evaluation as a separate component.
The Plant Pathology 2020 Challenge dataset serves as a pilot dataset targeting the most
common types of apple leaf diseases and contains 3,651 RGB images of apple leaves
categorized into four classes: healthy, scab, rust, and complex disease. For evaluation of the
complete system – comprising the binary classifier on the edge device and multiclass classifier
on the edge server – a subset of 1,000 images was selected. This perfectly balanced subset, with
250 samples randomly selected per class , with raw imag es without any augmentation
techniques and with lower image quality targeting real-world conditions and constraints of edge
sensor data.
The Plant Pathology 2021 Challenge dataset is an expanded collection with improved
image quality, containing approximately 23,000 high-quality RGB images of apple leaves
A Hierarchical Distributed Edge AI Framework for Real-Time Apple Leaf Disease Classification 25
exhibiting various diseases. From this dataset, a subset of 13,977 images corresponding to
the same four classes (healthy, scab, rust, and complex disease) was used. For the binary
classification task, class imbalance within this subset (5,140 healthy vs. 8,837 unhealthy
images) was addressed through downsampling of the majority class, resulting in a balanced
dataset of 10,280 images for training and evaluation. For the multiclass classification task,
the 8,837 symptomatic (unhealthy) images were used to tr ain and evaluate individual
models, as well as the consensus-based classifier.
Data partitioning followed a 70/20/10 split for training, validation, and testing across
all experimental setups and both datasets. Image processing techniques, such as image
shifting, shearing, rotation, zooming, flipping, and brightness adjustment, with nearest fill
mode applied to handle empty regions, are used during the data augmentation process on
the Plant Pathology 2021 dataset. The training processes were conducted using the Adam
optimizer with a default learning rate of 0.001, a batch size of 16, and 500 training epochs.
Binary cross-entropy and categorical cross-entropy loss functions were used for the binary and
multiclass classification tasks, respectively.
4. RESULTS
To evaluate the performance of the proposed approach, we assess the performance of
both individual components: the lightweight neural network deployed on an edge device
and the complex consensus -based model hosted on a remote server. For evaluation, we
utilize accuracy, precision, recall and, F1 score, which are standard metrics for classification
tasks, ensuring a rigorous and consistent assessment of performance. The multiclass models are
evaluated using micro-average metrics to assess their overall performance. In addition to
classification metrics, the evaluation of both models includes model size as an indicator of
computational complexity, facilitating a comparison between the two tasks and deployment
environments.
4.1. Comparison of individual models
Table 1 presents a comparative analysis of the developed models based on their
independent evaluation against the test set. In addition to standard classification metrics,
the table details model size and number of model parameters to illustrate the relationship
between architectural complexity, model performances, and efficiency gains provided by
quantization, particularly for edge device deployments. The results demonstrate that
quantizing the lightweight MobileNetV2 architecture reduces the model size by
approximately 70%, shrinking from 8.63MB to 2.7MB, while maintaining high
performance levels. Regarding multiclass classification, MobileNetV2, DenseNet121, and
ResNet50V2 all achieved strong results. As anticipated, the more complex ResNet50V2
with 23.57 million parameters emerged as the top -performing model, slightly
outperforming both MobileNetV2 with 2.26 million and DenseNet121 with 7.04 million
parameters.
26 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
Table 1 Comparison of individual models based on model size and classification metrics
Task Model Size [MB] Model
Parameters
Accuracy
[%]
Precision
[%]
Recall
[%]
F1score
[%]
Binary MobileNetV2 2.70 1.69M 93.78 93.74 97.33 95.50
Multiclass MobileNetV2 8.63 2.26M 95.25 93.30 93.49 93.40
Multiclass DenseNet121 26.86 7.04M 95.25 93.66 94.93 94.12
Multiclass ResNet50V2 89.92 23.57M 96.49 95.97 94.86 95.36
To highlight differences in execution time across models and hardware platforms, Table
2 presents the average execution time per inference cycle for each evaluated model. These
measurements reflect the distinct roles of the models within the proposed hierarchical system.
The results clearly demonstrate how the computational workload is strategically distributed
between the edge devices and the edge server to balance responsiveness and classification
accuracy.
Table 2 Comparison of execution time for developed models on a specific hardware platform
Task Model Hardware platform Execution time [ms]
Binary MobileNetV2 Arduino Nano ESP32 371.4
Multiclass MobileNetV2 Raspberry Pi 4 75.8
Multiclass DenseNet121 Raspberry Pi 4 402.1
Multiclass ResNet50V2 Raspberry Pi 4 771.8
The quantized binary MobileNetV2 model, deployed on the Arduino Nano ESP 32,
achieves acceptable latency despite the hardware constraints, making it suitable for initial
screening tasks. In contrast, the multiclass models executed on the Raspberry Pi 4 exhibit
execution times that scale with their architectural complexity. The lightweight MobileNetV2
model provides the fastest inference, while DenseNet121 introduces moderate latency due to
its increased depth and connectivity. The most complex model, ResNet50V2, results in the
highest execution time but delivers the best classification accuracy.
4.2. Comparison of consensus voting policies
Table 3 presents the performance results of three distinct voting policies applied using
all three multiclass classification models. Because the consensus -based model is designed
for high-performance server environments, the algorithmic complexity of the vote pol icy
was not considered a limiting factor; instead, the evaluation focused strictly on classification
metrics. The results indicate a high level of consistency across all three algorithms, with each
achieving approximately 97% accuracy. However, the majority vote and soft vote policies
demonstrated a slight performance advantage. Specifically, both policies achieved an accuracy
of 97.40%, while the soft vote policy attained a marginally higher F1 score of 96.44%, making
it the nominally optimal choice for this application. Nevertheless, given the relatively small test
set (884 samples), this difference in F1 score may not be statistically significant, and further
validation on a larger dataset would be required to draw more definitive conclusions.
A Hierarchical Distributed Edge AI Framework for Real-Time Apple Leaf Disease Classification 27
Table 3 Comparison of different voting policies based on classification metrics
Vote policy Accuracy [%] Precision [%] Recall [%] F1score [%]
Majority 97.40 96.62 96.23 96.40
Soft 97.40 96.79 96.12 96.44
Max confidence 97.29 96.50 96.06 96.27
The confusion matrix presented in Figure 4 illustrates the performance of multiclass
classification with soft vote policy for the three target diseases. Overall, the model achieved
a high accuracy of 97.40%, correctly classifying 861 out of 884 samples in the test set. The
scab category demonstrated the highest precision, with a value of 99.80%, indicating that
nearly all samples predicted as scab were corrected classified; only a single instance was
misclassified as complex. In contrast, the rust and compl ex categories exhibited a slight
degree of mutual inference , with 11 instances of rust being misclassified as complex.
Specifically, the model’s sensitivity for the complex class was the lowest among the groups at
93.97%, primarily due to these misclassifications with rust and scab. Despite these minor
discrepancies, the consistently high percentage across the diagonal indicate that the consensus-
based model with soft vote policy is highly robust and effective at distinguishing between these
specific apple diseases.
Fig. 4 Confusion matrix for consensus model with soft vote policy
4.3. Evaluation of full classification system
The full classification system demonstrates a strong overall performance on a randomly
selected, almost balanced set of 1,000 test images from the Plant Pathology 2020 dataset [17].
The full classification system achieved a total accuracy of 95.50% and an F1 score of 95.50%.
The confusion matrix for the full classification system is illustrated in Figure 5.
28 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
Fig. 5 Confusion matrix for the full classification system
The complex and rust categories performed exceptionally well, with recall rates 97.22%
and 98.37%, respectively, indicating high reliability in identifying these specific
conditions. However, a notable point of confusion exists between the healthy and scab
classes. Specifically, the model misidentified 25 healthy samples as scab, which represent
“false alarms” that might lead to unnecessary inspection, and they pose significantly less
risk than the inverse. More critical are the 6 scab samples incorrectly classified as healthy,
because these false negatives represent overlooked infections that could potentially
compromise crop health if left untreated. This overlap resulted in the scab category having
the lowest precision (90.33%) and the healthy category having the lowest recall (90.00%).
Despite these localized errors, the model maintained a low false -negative rate for disease,
which is critical for early intervention in agriculture. Overall, the high concentration of values
along the diagonal confirms that the system effectively distinguishes between healthy leaves
and various disease manifestations. In terms of execution time, the full classification system
can provide significant resources and time savings. Since the communication channel
conditions in laboratory experiments are ideal, real savings can be estimated based on execution
time alone. The initial screening performed on the edge device takes approximately half the
time required by the most complex model used in the consensus-based classifier. Assuming that
a smaller proportion of scanned images are unhealthy in real-world scenarios, most samples can
be filtered early, thereby avoiding the need to run the more computationally expensive
consensus-based classifier, preventing unnecessary data transfer and network load, and leading
to substantial overall efficiency gains.
A Hierarchical Distributed Edge AI Framework for Real-Time Apple Leaf Disease Classification 29
- CONCLUSION
In conclusion, the findings of this study validate the hypothesis that distributed edge
computing offers substantial potential for precision agriculture, specifically within apple disease
classification and monitoring. The proposed two-stage classification algorithm proved highly
effective, enhancing system robustness while minimizing resource consumption. A critical
advantage of this architecture is its inherent scalability; by distributing workloads across edge
nodes, the system can seamlessly expand to c over larger orchards without overloading
centralized resources – a vital feature for commercial-scale agricultural operations.
However, as this study was conducted in a controlled laboratory environment with stable
communication channels and almost perfect conditions, the findings may not fully account for
the connectivity fluctuations common in remote field scenarios. Therefore, future research
should focus on several key directions. First ly, further optimization techniques – such as
knowledge distillation and hardware-aware pruning - should be explored to reduce the latency
on ultra -low-power edge devices. Second ly, improving inf rastructure resilience will be
important, particularly by developing asynchronous communication protocols and mesh
networking capabilities to maintain functionality during intermittent network outages. Finally,
the framework should be expanded to support a wider range of tree species a nd additional
monitoring tasks, including applications such as yield estimation and irrigation management.
Ultimately, this study underscores the promise of distributed edge AI as a powerful,
scalable approach for disease detection, offering a blueprint for addressing real -world
agricultural challenges through resilient and decentralized intelligence.
Acknowledgement: This work has been supported by the Ministry of Science, Technological Development
and Innovation of the Republic of Serbia [Grant Number: 451-03-34/2026-03/ 200102].
REFERENCES
[1] A. Jafar, N. Bibi, R. A. Naqvi, A. Sadeghi -Niaraki, and D. Jeong, “Revolutionizing agriculture with
artificial intelligence: plant disease detection methods, applications, and their limitations,” Front. Plant
Sci., vol. 15, Mar. 2024, doi: 10.3389/fpls.2024.1356260.
[2] S. Musacchi and S. Serra, “Apple fruit quality: Overview on pre-harvest factors,” Scientia Horticulturae,
vol. 234, pp. 409–430, Apr. 2018, doi: 10.1016/j.scienta.2017.12.057.
[3] M. Fraiwan, E. Faouri, and N. Khasawneh, “On Using Deep Artificial Intelligence to Automatically Detect
Apple Diseases from Leaf Images,” Sustainability, vol. 14, no. 16, p. 10322, Jan. 2022, doi:
10.3390/su141610322.
[4] S. Palei et al., “Secure and Decentralized Apple Leaf Disease Identification Using DL Integration Models,”
in 2024 International Conference on Emerging Systems and Intelligent Computing (ESIC), Feb. 2024, pp.
68–73. doi: 10.1109/ESIC60604.2024.10481567.
[5] A.Khan, S. D. Samantaray, "Comparative Analysis of Pre -Trained CNN Architectures for Apple Foliar
Disease Classification,” International Journal of Scientific Research in Engineering and Management
(IJSREM), vol. 7, Oct. 2023, doi: 10.55041/IJSREM25943.
[6] Y. Liao, “Advancements in precision agriculture: Edge Impulse-based convolutional neural networks for
robust apple disease diagnosis,” Applied and Computational Engineering, vol. 18, pp. 157-164, Oct. 2023,
doi: 10.54254/2755-2721/18/20230983
[7] J. Li, X. Zhu, R. Jia, B. Liu, and C. Yu, “Apple -YOLO: A Novel Mobile Terminal Detector Based on
YOLOv5 for Early Apple Leaf Diseases,” in 2022 IEEE 46th Annual Computers, Software, and Applications
Conference (COMPSAC), Jun. 2022, pp. 352–361. doi: 10.1109/COMPSAC54236.2022.00056.
[8] S. Liu, Y. Qiao, J. Li, H. Zhang, M. Zhang, and M. Wang, “An Improved Lightweight Network for Real-
Time Detection of Apple Leaf Diseases in Natural Scenes,” Agronomy, vol. 12, no. 10, p. 2363, Oct. 2022,
doi: 10.3390/agronomy12102363.
30 M. GRUJEV, D.STOJANOVIĆ, M.ILIĆ, A.MILOSAVLJEVIĆ
[9] A. Banjar, A. Javed, M. Nawaz, and H. Dawood, “E -AppleNet: An Enhanced Deep Learning Approach
for Apple Fruit Leaf Disease Classification,” Applied Fruit Science, vol. 67, no. 1, p. 18, Feb. 2025, doi:
10.1007/s10341-024-01239-w.
[10] P. Bansal, R. Kumar, and S. Kumar, “Disease Detection in Apple Leaves Using Deep Convolutional
Neural Network,” Agriculture, vol. 11, no. 7, p. 617, Jul. 2021, doi: 10.3390/agriculture11070617.
[11] X. Sheng et al., “Disease diagnostic method based on cascade backbone network for apple leaf disease
classification,” Front. Plant Sci., vol. 13, Sep. 2022, doi: 10.3389/fpls.2022.994227.
[12] M. N. Isty et al., “Deep Learning for Real-Time Leaf Disease Detection: Revolutionizing Apple Orchard
Health,” in 2023 4th International Conference on Big Data Analytics and Practices (IBDAP), Aug. 2023,
pp. 1–6. doi: 10.1109/IBDAP58581.2023.10271987.
[13] A. I. Khan, S. M. K. Quadri, S. Banday, and J. L. Shah, “Deep Diagnosis: A Real-Time Apple Leaf Disease
Detection System Based on Deep Learning,” SSRN Journal, 2022, doi: 10.2139/ssrn.4019467.
[14] S. Kumar, R. Kumar, M. Gupta, and A. J. Obaid, “Deep Learning-Based Web Application for Real-Time
Apple Leaf Disease Detection and Classification,” in 2024 International Conference on Advancements in
Smart, Secure and Intelligent Computing (ASSIC), Jan. 2024, pp. 1–6. doi: 10.1109/ASSIC60049.2024.10508012.
[15] M. Noor, N. Abbas, M. Wasim, A. Alghanim, N. ElHakim, and A. R. Khan, “Deep Image Processing
Based Periodically Leaves Diseases Detection and Classification through Wireless Visual Sensors
Network (WVSN),” JAIT, vol. 15, no. 7, pp. 862–872, 2024, doi: 10.12720/jait.15.7.862-872.
[16] P. E. C. da Silva and J. Almeida, “An Edge Computing -Based Solution for Real -Time Leaf Disease
Classification using Thermal Imaging,” IEEE Geosci. Remote Sensing Lett., vol. 22, pp. 1 –5, 2025, doi:
10.1109/LGRS.2024.3456637.
[17] R. Thapa, K. Zhang, N. Snavely, S. Belongie, and A. Khan, “The Plant Pathology Challenge 2020 data set
to classify foliar disease of apples,” Appl Plant Sci , vol. 8, no. 9, p. e11390, Sep. 2020, doi:
10.1002/aps3.11390.
[18] Ranjita Thapa, Kai Zhang, NoahSnavely, Serge Belongie, and Awais Khan, “Plant Pathology 2021 -
FGVC8.” Accessed: Apr. 19, 2026. [Online]. Available: https://kaggle.com/plant-pathology-2021-fgvc8
论文原文与出版信息
Facta Universitatis Series Automatic Control and Robotics