Development of a Real-Time Maize Leaf Disease Classification System Deployed on Web and Mobile-Based Applications

Автор: Kennedy O. Okokpujie, Osondu C. Ronald, Joshua S. Mommoh, Mary O. Ogundele, OluwadamiI Oguntuyo

Журнал: International Journal of Engineering and Manufacturing @ijem

Статья в выпуске: 4 vol.16, 2026 года.

Бесплатный доступ

Agriculture remains at the core of human life, providing staple food and livelihood for millions worldwide. Among its different domains, food crops directly enter the human system, while cash crops are grown primarily for monetary gains. Maize, as one of the most extensively grown and consumed food crops, is of gigantic economic and nutritional value, particularly in West Africa. Unfortunately, maize plant diseases have adversely impacted farmer yields, resulting in decreased maize production. This research aims to create a system that can identify diseases in maize based on images of the leaves. Three deep convolutional neural network (DCNN) models, namely MobileNetV2, InceptionV3, and ResNet50, were selected to achieve this goal because of their prior ability. The transfer learning technique was adopted to develop new models for classifying maize disease using a hybrid maize leaf image dataset comprising 6,543 images from the University of Pretoria and Kaggle repositories. Furthermore, the dataset was split into 80% for training, 10% for validation, and 10% for testing and the three model were configured and trained. According to the evaluation results, MobileNetV2 was the best model for classifying maize leaf diseases, with a 95.29% classification accuracy. In comparison, InceptionV3 and ResNet-50 yielded accuracies of 92.18% and 74.48%, respectively. The MobileNetV2 was chosen for the dual deployment in both a web-based and a mobile application due to its exceptional performance metrics and its lightweight API. Evaluation of the deployed MobileNetV2 model on both the web and mobile applications showed that it achieved an average confidence rate of 91% on both platforms, with response times of 0.159 s and 0.163 s, and throughputs of 5.88 images/s and 6.28 images/s, respectively. This research offers a simple and intuitive tool for users and agricultural professionals to quickly detect maize leaf diseases and take necessary precautions to mitigate losses.

Maize Disease, DCNN, Transfer Learning, MobileNetV2, Web application, Mobile applications, API

Короткий адрес: https://sciup.org/15020574

IDR: 15020574   |   DOI: 10.5815/ijem.2026.04.02

Текст научной статьи Development of a Real-Time Maize Leaf Disease Classification System Deployed on Web and Mobile-Based Applications

Published Online on August 8, 2026 by MECS Press

Agriculture continues to be at the centre of human existence, the provider of vital food and sustenance for millions around the world. From its myriad facets, food crops are most immediate with respect to human use and cash crops for commercial cultivation. Maize is the most widely cultivated and consumed food crop in many regions and holds significant economic and nutritional importance in West Africa. Over time, it has increasingly replaced indigenous grains such as millet and sorghum, becoming the dominant staple in most areas. Maize is extremely productive, extremely resilient, and multifarious, thereby qualifying it as a primary source of carbohydrates for animal and human consumption. Apart from use as food, maize is also a significantly valuable crop for the production of ethanol and bioplastics [1]. West African maize cultivation takes up approximately 24% of the arable land and produces roughly 3 tons per hectare annually. Nigeria alone produces the highest quantity of maize on the continent, over 34 million tons annually. Maize production in Nigeria has expanded tenfold since independence in 1960, reflecting the crop's prominence in the country's agriculture [2]. Despite these successes, maize production is still beset by chronic pest and disease problems that result in significant yield losses.

At the global level, maize yield loss caused by pests and diseases was estimated at 22.5%. Numerous diseases, including common rust, gray leaf spot, northern corn leaf blight, southern rust, and phaeosphaeria leaf spot, damage maize crops mostly by injuring their leaves[3]. These diseases manifest as chlorosis, spots, or necrosis, which adversely affect plant physiology and photosynthesis, reducing plant health. To minimise losses, early and accurate detection of these diseases is crucial. However, conventional detection methods are slow, labour-intensive, and not accessible to farmers in rural areas. Many farmers do not know which diseases specifically affect crop yields, so they are vulnerable to reduced productivity and economic hardship.

Traditional maize disease detection systems depend upon manual scouting, which can be fallible, or basic digital applications that utilise minimal image analysis or expert systems. Solutions to alleviate these conditions are often expensive, hard to reach, and user-unfriendly, rendering them impossible for the majority of maize-producing regions in the world, where smallholder farmers are responsible for most maize production. Therefore, there is an urgent need for solutions that are more effective, scalable, and accessible to help farmers diagnose and manage diseases in maize.

Currently, fields that need a lot of data analysis have benefited from the application of machine learning in agriculture. Systems with machine learning capabilities are being utilised for preprocessing, data collection, and monitoring. The integration of machine learning not only benefits farm productivity but also enhances agricultural product output. Large-scale farming has gained a lot from machine learning in tasks such as crop output prediction and pest and disease identification [4,5]. Also, machine learning has improved agricultural research by identifying the best farming practices and mitigating agricultural challenges. Furthermore, advances in machine learning have enabled agriculture to make the best possible choices for preservation, storage, and quality inspection [6]. Advancements in deep learning techniques have improved tackling complex tasks such as feature extraction, image segmentation, image identification, and classification, and also other computer vision-related problems. Convolutional neural networks, a subset of machine learning, have excelled at image identification and classification [7,8]. However, this study proposes a dual system to classify maize leaf disease by training a convolutional neural network model on a dataset that contains maize leaf disease. The proposed system will be designed to be accurate in recognising and classifying maize leaf defects and be user-friendly to give prompt responses on uploaded images of maize leaves with defects by the farmer or user.

2.    Related Works.

The various machine learning and deep learning techniques employed by previous scholars, along with their methodology and results, are discussed in this section of the research

The study of [9] proposed the classification of maize leaf disease using CNN. In order to detect and categorise maize leaf diseases, a mobile application was developed based on the CNN-pretrained VGG16 model. Three maize leaf diseases—gray leaf spots, common rust, and northern corn leaf blight were successfully identified by the configured model. The model was trained using a dataset of 3024 images that were collected both locally and globally. A training accuracy of 95.16% and a testing accuracy of 93% were obtained when the model's performance was evaluated. The model provides an early warning on maize leaf diseases to alert the user/farmer to mitigate losses associated with the maize crop. However, the developed model was limited to only three disease classes, which did not account for the wide variety of leaf diseases that may affect maize.

The researcher in [10] proposed using the PRF-SVM method for the identification of diseases on maize leaves. The PRFSVM model was developed by combining three significant components: PSPNet, ResNet50, and Fuzzy Support Vector Machine (Fuzzy SVM). In addition to enhancing end-to-end training for a smooth integration, the combination of PSPNet and ResNet50 allowed the model to recognise sensitive visual elements. Fuzzy SVM was included in the last classification layer to lessen the impact of fuzziness and uncertainty that could exist in actual image data. To train and test the algorithm, five classes of maize diseases—common rust, southern rust, gray leaf spot, maydis leaf blight, and turcicum leaf blight—as well as healthy leaves were taken from the Plant Village dataset. The model's average accuracy and precision were 96.67% and 0.81, respectively, according to evaluation results. A limitation of the study was that the model was not deployed in real-time to evaluate its performance in real-life scenarios.

In [11], deep transfer learning was proposed for fine-grained disease classification in maize plants, a task made complex due to the sophisticated disease patterns. For this research, the framework of four DCNN variants, namely Inception V3, VGGNET, ResNet50, and Inception_ResNetV2, was trained. Evaluation results revealed that ResNet50 attained the best validation accuracy of 87.51%, precision of 90.33%, and recall of 99.80%. However, the models considered for the research are computationally heavy architectures with high parameter counts and resource demands, hence making them not well-suited for deployment on lightweight or resource-constrained environments such as mobile or edge.

The study of [12] integrated deep learning into a mobile-based system to detect and classify leaf disease in maize plants. A dataset containing three maize diseases—Blight, Sugarcane Mosaic Virus, and Leaf Spot—was obtained from University Research Farm Koont, PMAS-AAUR, for this study at various growth stages and meteorological circumstances. Five YOLO variants—YOLOv3-tiny, YOLOv4, YOLOv5s, YOLOv7s, and YOLOv8n—were trained using this dataset. According to evaluation results, the classification accuracies of YOLOv3-tiny, YOLOv4, YOLOv5s, YOLOv7s, and YOLOv8n were 69.40%, 97.50%, 88.23%, 93.30%, and 99.04%, respectively. These results indicated that YOLOv8n was on top of the performance metric. However, due to the dataset employed in the study, the developed model could not differentiate between a diseased maize leaf and a healthy one.

The research of [13] employed deep transfer convolutional neural networks to identify maize leaf disease. The study used a double-phase deep transfer learning technique for detecting maize leaf diseases under certain conditions. For this research, the plant dataset was used, and during the training stage, eight (8) deep and four (4) lightweight CNN models were employed. Results revealed that the ResNet achieved a test accuracy of 99.48% and MobileNet achieved a test accuracy of 98.69%. Furthermore, the models were fine-tuned and trained on a field dataset of maize leaf disease captured using a mobile cell phone. MobileNet was at its peak with an accuracy of 99.11%. However, the Plant Village dataset served as the primary source domain for the built model. Because this dataset was collected in controlled settings, it might not accurately reflect the variations found in actual field situations, such as variations in backdrop clutter, leaf orientations, and lighting.

Furthermore, [14] employed a deep learning algorithm to classify diseases of maize leaves. To increase the accuracy of identifying maize leaf disease, CNN-based methods were applied in this study. Inception V3, VGG16, VGG19, and EfficientNetB7 are the four CNN variations that were trained and contrasted. With an overall accuracy of 98.77%, the EfficientNetB7 model was the most accurate. However, the study relied on a relatively small and controlled dataset for training and evaluation, without extensive validation under diverse real-world field conditions.

In [15], to identify maize illness, an optimised support vector machine that made use of DenseNet201's deep features was employed. 4,988 maize leaf photos were compiled into four classes of maize leaf diseases—blight, common rust, gray leaf spot, and healthy—using a novel classification algorithm that combined deep feature extraction and a sophisticated optimisation technique. The DenseNet201 CNN architecture was also used in the study to successfully extract key features from the maize leaf image. Additionally, utilising the retrieved core characteristics, the Support Vector Machine was refined through Bayesian optimisation to reliably categorise maize leaves. The suggested model outperformed the support vector machine without deep feature extraction and optimization, with a classification accuracy of 94.6%, despite its excellent accuracy, the model could only identify three types of maize diseases out of the large spectrum of maize diseases.

Research [16] proposed a Deep SqueezeNet learning algorithm for the prediction and diagnosis of maize leaf diseases. The three maize leaf diseases that were taken into consideration for the study were common rust, blight, and grey leaf spot. Additionally, pre-processing methods like labelling, sampling, and data augmentation were employed to guarantee class balance and reduce overfitting using the SMOTE algorithm. The dataset was trained in mini-batches using four pretrained DCNN variants: VGG16, ResNet34, ResNet50, and SqueezeNet. Metrics including recall, accuracy, precision, and F1-score were used to assess the pretrained models' performance. With an overall accuracy of 97%, the SqueezeNet model outscored the VGG16, ResNet34, and ResNet50 models. This represents a 2–5% improvement in accuracy and a 4–11% reduction in mean square error. Nevertheless, the model was restricted to just three leaf diseases, which might have an impact on how well it generalises to other possible or unknown maize leaf diseases.

The work of [17] presented a deep learning model based on feature fusion and state-space attention for precise maize disease classification. The spatial and developmental defects of maize leaves were extracted in this study by combining a multi-scale feature fusion module with a state-space attention mechanism. The constructed model attained a 95% precision when compared to baseline models like ViT, ResNet, AlexNet, GoogleNet, and EfficientNet. The precision of the Convolutional Block Attention Module was 97%, compared to 74% for the normal self-attention model. Additionally, with an accuracy, recall, and precision of 94%, the state space attention module obtained the highest precision of 95%. However, the state-space attention mechanism achieves high precision and accuracy, but suffers from increased computational complexity due to additional state modeling and feature fusion operations.

The researcher [18] Using deep learning to detect maize leaf disease automatically. In contrast to another well-known deep learning model, two variations of the EfficientNet deep learning model—EfficientNet B3 and EfficientNet B6— were suggested for the categorization of maize leaf diseases. The models were trained using two different datasets: 4188 photographs of maize leaf illnesses comprised the first dataset, while 6176 images of leaf diseases comprised the second dataset, which was referred to as the augmented dataset. When comparing the models' performance, the EfficientNet B3 model had the highest accuracy of 99.66% on the supplemented dataset, while the EfficientNet B6 model achieved an impressive 98.10% accuracy on the original dataset. However, the model was restricted to just three leaf diseases.

Many researchers have conducted research on the classification of maize leaf diseases, achieving significant results using various machine learning and deep learning models, such as support vector machines, deep convolutional neural networks, and You Only Look Once. However, these studies have been faced with a few challenges related to the reliance on small or biased datasets that are made of a few classes of diseases, which may hinder the generalisation to other types of maize leaf diseases, and limit model testing capabilities to controlled environments lacking real-world validation under different scenarios of alternating weather conditions. Most of the existing models are computationally expensive, which limits their deployment in resource-constrained environments. In addition, many of the reviewed approaches have not been evaluated in real-time settings, thereby restricting their assessment of practical performance and reducing their applicability in real-world deployment scenarios. In order to improve on these gaps, this research seeks to use a hybrid dataset containing multiple classes of diverse images of maize leaf disease under different weather conditions to mitigate the problem of generalisation and testing capabilities to unseen examples.

This research proposes dual (web and mobile) real-time deployment to evaluate the practical performance under real-world settings. Table A1 in the appendix provides a concise summary of the literature review, comparing previous studies on maize leaf disease detection using machine learning and deep learning. It highlights the key limitations of existing works and shows how the current study addresses these gaps.

3.    Methodology

This section provides a thorough explanation of the approach used to create a convolutional neural network (CNN)-based real-time maize leaf disease classification model. The section begins with a conceptual framework depicted in Fig. 1., which shows the various stages employed, ranging from the maize leaf image data acquisition, image preprocessing, model fine-tuning, model training and evaluation, and lastly, model deployment.

Fig. 1. Conceptual Framework for Model Development and Deployment

  • 3.1.    Image Dataset Acquisition

    The hybrid dataset used in this study was created by combining two datasets and included 6543 images that were divided into six classes that represented different diseases of maize leaves, including common rust (CR), gray leaf spot (GLS), northern corn leaf blight (NCR), southern rust (SR), Phaeosphaeria leaf spot (PLS), and a healthy leaf class. 2355 photos of maize leaf diseases taken in various South African locales and at various dates made up the first dataset, which was obtained from the University of Pretoria's collection. Additionally, this dataset was composed of six classes: Phaeosphaeria leaf spot (PLS), southern rust (SR), northern corn leaf blight (NCR), common rust (CR), gray leaf spot (GLS), and a healthy leaf class [19]. The second dataset was retrieved as a result of the dataset's limited size and the inability to identify certain photographs because of leaf destruction. The second dataset, which was taken from the Kaggle

    dataset repository, had 4188 photos of four different classes of maize diseases: common rust (CR), gray leaf spot (GLS), northern corn leaf blight (NCR), and healthy leaf class [20]. Sample images of the various classes are shown in Fig. 2a-f.

(a)

(b)

(d)

(e)                  (f)

Fig. 2. Image of maize leaves representing each class from the dataset. (a) Healthy, (b) Common Rust, (c) Gray Leaf Spot (d) Northern Corn Leaf Blight (e) Southern Rust, and (f) Phaeosphaeria Leaf Spot

  • 3.2.    Image Data pre-processing

The data preprocessing involves several stages in this research. The first was image cleaning, which involved systematic removal of corrupted images, duplicate samples (detected using hash-based comparison), and blurred images identified through visual inspection and basic quality screening. Images with incomplete labels or poor visibility of maize leaf structures were also excluded to ensure dataset integrity. The second step involved removing identical or duplicate images of maize leaf disease to mitigate bias in the model training process. Resizing of the image was the final step. The image resizing ensured every image had the same dimensions, which is important for effective multiscale feature extraction of models. Also, the resizing process also enables and improves batch processing during training of the model. In this research, the image resizing was performed using the mathematical formulas in equations (1) and (2). Following resizing, the pixel value was normalised. To ensure uniformity among images, the pixel intensities were scaled within a regular range of 0 to 1, as indicated by equation (3).

x ' = -^ x W ' W

У

У=йx №

where (x,y) are the original pixel coordinates, and (x′,y′) are the new coordinates after resizing

Normalized Value =

Pixel Value

Although the preprocessing operations employ standard normalisation and scaling techniques, they are essential for ensuring uniform input dimensions and stabilising gradient-based optimisation during CNN training.

  • 3.3.    Image Data Partitioning

    Data portioning, also known as data splitting, was applied to the image dataset, which made a total of 6543 images distributed across six distinct classes related to maize leaf diseases rust, gray leaf spot , northern corn leaf blight, southern rust , Phaeosphaeria leaf spot, and a healthy leaf class. In ML and DL, data portioning optimises model performance and improves generalisation ability. In this research, 80% of the dataset was assigned for training; this provided the model with enough data to learn the patterns from each class. Out of the remaining 20% after allotting 80% for training, 10% was assigned for validation to continue monitoring the training performance. The validation mitigates overfitting experienced by the model during training by adjusting certain hyperparameters to ensure the model is generalizable, not memorising well-known patterns. After training and validation, the final 10% was set aside for testing to give an objective assessment of the model.

  • 3.4.    Model selection

  • 3.5.    Model Configuration and Training

This subsection under the methodology presents the deep learning models and the rationale behind the selection of the models for the study on the Real-Time Maize Leaf Disease Classification Model using CNNs. Immediately after the data partitioning, three pre-trained deep learning models, such as MobileNetV2, InceptionV3, and ResNet50, were selected for the study due to their well-known. From literature, these selected pre-trained models have displayed exceptional robustness, efficiency, and feature extraction abilities with little computational requirement, especially the MobileNetV2 when trained on large-scale datasets such as ImageNet. MobileNetV2 offers low computational requirements and a lightweight architecture, making it ideal for real-time deployment. The InceptionV3 offers high accuracy due to its deep multi-branch architecture that captures complex patterns from an image, whereas the vanishing gradient issue, which impedes the efficient training of deep neural networks, is effectively mitigated by the ResNet50's architecture.

The deep learning models selected for this research, which are the MobileNetV2, InceptionV3, and ResNet-50, are well-known and perform exceptionally in image classification tasks based on their different architectures. The MobileNetV2 is a great option for embedded systems and mobile applications because of its computational efficiency. It uses depth-wise separable convolutions that split the traditional convolution into smaller operations, decreasing the computational complexity without affecting the accuracy [21]. Furthermore, it uses an inverted residual structure together with the bottleneck layer to enhance feature extraction and reduce model size. With the Inception family, InceptionV3 uses “inception modules,” which are parallel convolutions with different kernel sizes to capture different spatial information from the image's most basic patterns. Additionally, it uses factorised convolutions and batch normalisation to maximise efficiency and reduce computing costs [22]. ResNet-50 is a 50-layer deep residual network that overcomes the vanishing gradient issue and makes training extremely deep networks easier by using skip (residual) connections. Also, ResNet-50 employs basic residual blocks, which add the output to the input, enabling more efficient training and deeper architectures without degrading the model [23]. For this study, MobileNetV2’s, InceptionV3’s, and ResNet-50 models’ respective input sizes for classifying maize leaf diseases were set to 224x224 pixels, 299x299 pixels, and 224x224 pixels, which is a common specification for the three models examined. The input size balances the critical attributes of the images and the computation required, which is necessary for agricultural domains, especially for real-time forecasts and productivity. In this instance, the models were pre-trained on ImageNet, which helps the models extract features due to a large, diverse set. This approach of transfer learning enables the models to use the knowledge contained in the primary dataset of ImageNet to classify maize leaf diseases, alleviating the burden of needing extensive labeled data concerning plant diseases. Leveraging these pretrained weights results in faster convergence with improved accuracy and smaller datasets comprising annotated maize leaf images.

In order to refine these models towards the classification of maize leaf diseases, additional terminal layers were added to the end of each architecture as illustrated in Fig. 3. The classification head consists of a Flatten layer followed by a Dense layer with 256 neurons and the Swish activation function. This is followed by a Dropout layer with a rate of 0.5 to reduce overfitting. A second Dense layer with 128 neurons and Swish activation is added, followed by another Dropout layer with a rate of 0.5. The output layer uses softmax activation with L2 regularization (λ = 0.0001) to further minimize overfitting. The Swish activation function is defined by equation (4).

S-wish (xx) = x • sigmoid(x) (4)

Swish makes learning easier by enabling the network to recognize intricate non-linearities in the properties it has learned from the maize leaf pictures. A simpler pattern is advanced from the middle of the neural using another dropout layer (50%) to avoid overfitting, which is very important in plant disease classification due to the lack of images with corresponding labels. Another dense layer (128 units) with Swish enabled takes the model even further in terms of recognizing complex patterns. A second Dropout layer allows the model to avoid overfitting. Finally, the output layer takes the form of a Dense layer that is softmax activated to give the probabilities of the different diseases with L2 regularization to minimize overfitting.

Fig. 3. Transfer learning pipeline

The hyperparameters that are set for the models MobileNetV2, InceptionV3, and ResNet-50 are presented in Table 1. An important feature of the Efficient Mobile-Web System for Maize Leaf Disease Classification is its ability to optimize all three models’ performance while economizing computing resources. To enhance accuracy on minimal resources, the inceptionV3 makes use of an input size of 299x299, while the MobileNetV2 and ResNet-50 make use of a reduced size of 224x224. A batch size and epoch of 32 and 50 were selected to reduce the training time and mitigate overfitting. Early stopping (patience: 3) is implemented along with these parameters to assist in halting overfitting. To achieve effective convergence for the model during training, the learning rate is set to 0.001 when using the Adam optimizer. The dataset is split into 80% training data, 10% validation data, and 10% testing data for model evaluation. Multi-class disease classification is applied with a categorical cross-entropy loss function. This set of practices will enhance accuracy with economic resource consumption applicable for mobile web devices needing fast and efficient processing.

Table 1. Hyper parameters Configured in the Pretrained models

Parameters

MobileNetV2

InceptionV3

ResNet-50

Image Size

224x224

299x299

224x224

Batch Size

32

32

32

Epochs

50

50

50

Patience

3

3

3

Learning Rate

0.001

0.001

0.001

Optimizer

Adam

Adam

Adam

Loss Function

Categorical cross-entropy

Categorical cross-entropy

Categorical cross-entropy

Training Split

80%

80%

80%

Validation Split

10%

10%

10%

Test Split

10%

10%

10%

Callbacks

EarlyStopping

EarlyStopping

EarlyStopping

  • 3.6.    Model Evaluation

The confusion matrix was used to determine the accuracy, precision, recall, and F1-score ratings of the DL models in order to assess their performance in classifying maize leaf disease. The accuracy of this study was determined by how often the models correctly classified data. To reduce the possibility of incorrectly diagnosing a healthy leaf as diseased, precision which is the number of true positive predictions made over the sum of true positives and false positives was also crucial. Recall, which calculates the proportion of genuine positive predictions to all real positive examples, was crucial in ensuring that every sick leaf was correctly identified because diseases like Gray Leaf Spot can cause significant damage if there is no reaction. A well-earned compromise between precision and recall, the F1 score which is the harmonic mean of the two—was particularly useful in resolving issues with class imbalance in the majority of agricultural datasets. The formulas for accuracy, precision, recall, and F1-score are shown in equations 5 through 8. [24-26].

TP + TN

Accuracy = —————-—— TP + TN + FP + FN

Precison = Tp + Fp                                   (6)

TP    TP

Recall (TPR) = — = ——— P TP + FN

PPVx TPR

F1 = 2 x ---------- PPV+TPR

where PPV stands for Positive Predictive Value, TPR for True Positive Rate, FN for False Negative, FP for False Positive, and TP for True Positive.

  • 3.7.    Model Deployment

In this research, a real-time maize leaf disease classification model using convolutional neural networks (CNNs was deployed as a web-application and mobile. For the web interface, HTML/CSS/JavaScript was used for the front-end design, and for the back end, Flask was employed. Also, the mobile version was developed from a cross-platform framework known as React Native. This dual deployment enables the users to easily upload images of maize leaves either through the mobile application or the web application to get a prompt response. The classifier classified a number of leaf images into six groups: healthy leaves, Southern Rust, Northern Corn Leaf Blight, Common Rust, Phaeosphaeria Leaf Spot, and Gray Leaf Spot. The technology was user-friendly and enabled the instantaneous display of classification results on mobile devices and the web application.

For the web-based system classifying maize leaf diseases using CNN, the following steps were carried out to develop it:

  • i.    The User Interface Design

Flask was used to develop the backend interface of the application on the web platform, and it worked as a framework to receive user requests, query them through the deep learning model, and respond back. The front-end interface was developed using with HTML, CSS, and Javascript to ensure it is clean, responsive, and user-friendly. Interfaces had a major file upload option that allowed users to upload maize leaf images. Additionally, classification results may be shown on the interface, which was made to be intuitive in a variety of web browsers.

  • ii.    Uploading and Displaying Maize Leaf Images

Through the web application, users could easily upload images of maize leaves by clicking on the Choose File button. A file dialog box would allow users to search for an image on their device that they want to be uploaded for classification. The uploaded image then underwent pre-processing via the Pillow library, which resized the image to the required size, for example, 224x224 pixels, and also made various other changes that were necessary for the image to be used by the model. Once uploaded, the image appeared on the web interface, and users were able to confirm their selection prior to proceeding to classification.

  • iii.    Displaying Classification Results

Following preprocessing, the CNN model examined the image and predicted one of six classes: a healthy leaf, Phaeosphaeria Leaf Spot, Southern Rust, Northern Corn Leaf Blight, Common Rust, or Gray Leaf Spot. The web interface displayed each disease category's classification findings, because of this, the user was able to quickly determine which specific disease was afflicting the maize leaf.

Deployment of on Mobile Application

The steps listed below were used to build a mobile application for CNN-based maize leaf disease classification.

  • i.    User Interface Design

To make sure that the application could run seamlessly on a wide variety of devices and platforms, such as iOS and Android, the mobile application was developed with the use of React Native. This framework gave users an extremely simple and easy-to-use interface. The app integrated a prominent “Choose File” button to enable users to upload images of maize leaves and a results section to provide the classification output. The design of the interface was focused on minimalism so that even users with ‘small screen’ devices, as well as ‘large screen’ devices, can navigate with ease.

  • ii.    Uploading and Displaying

Maize Leaf Images Directly through the app, users could upload images of the maize leaves. The “Choose File” button initiated the native file picker/camera of the users’ devices, enabling them to either pick an image from the gallery or take a new photo for classification. After the image was successfully uploaded, it was forwarded to the back-end server, where the Pillow library was used to preprocess the images by reducing them to the required dimension and preparing them for further analysis. After the preprocessing, the uploaded images were displayed within the application to enable the user to review them before proceeding.

  • iii.    Displaying Results

  • 3.8.    System specifications

    The research was implemented using an HP Pavilion 15 laptop with an Intel® Core™ i7-7500U processor with a 2.70 GHz speed, 8.00 GB RAM, a 64-bit OS, and Windows 10. The back-end and front-end interfaces for the mobile web system for real-time classification of maize leaf disease using Convolutional Neural Networks (CNNs) were done using Flask, HTML, CSS, and JavaScript. The model development and implementation was done using libraries such as TensorFlow and Keras, Pillow, and OpenCV library were used for image preprocessing while NumPy, Pandas, and Matplotlib were responsible for data handling and visualization task, while the SQLite was used for storing image data. These libraries aided in model development and implementation, but the absence of a dedicated GPU made it tedious, especially training complex CNNs with MobileNetV2 and ResNet-50. The increased training times were a function of the high resolution of the input images (for example, maize leaf classification images are 224x224 pixels) and the models’ computational needs. During the training epochs, the system’s RAM and other resources were heavily consumed, resulting in slow processing, especially during backpropagation and data preprocessing.

  • 4.    Result and Discussion
  • 4.1.    MobileNetV2

The embedded DL model located on the back-end server processed the uploaded image and predicted one of the six classes of maize leaf diseases it was trained to predict. The classification result, as well as confidence scores, was shown in real-time in the mobile app within the results section. This feature made it easier for users to interpret the health status of the maize leaf and take corrective measures accordingly.

The interactions between the system and the single actor "User" are shown in Fig. 4. Both the mobile and web applications are easy to use. Uploading an image is the first step. Before delivering the image to the model, the web/mobile application will resize it to the appropriate input size after it has been uploaded.

ACTOR

Fig. 4. Sequence Diagram for Maize Disease System

This sections discusess the results obtained employing convolutional neural networks for the development of a realtime maize leaf disease classification model. MobileNetV2, InceptionV3, and ResNet-50 CNN models were extensively trained on a maize leaf image dataset to determine their resilience on different disease type classifications. Outcomes were obtained after training all the models. Accuracy, precision, recall, and F1-score were determined using a confusion matrix to assess their performance. The confusion matrix in this study shows the number of true versus wrong predictions for each category, providing an overview of a system's classification performance. Additionally, it helps assess how well the model performs in categorizing different diseases, such as normal leaves, Phaeosphaeria Leaf Spot, Southern Rust, Northern Corn Leaf Blight, Common Rust, and Gray Leaf Spot.

The maize leaf disease classification model's training and validation accuracy plots across 50 epochs are displayed in Fig. 5. Training and validation accuracies rise early on, indicating that the model is picking up knowledge from the data. However, at final epoch, the validation accuracy attains a peak of 95.38%. When combined with the training accuracy, which attains a peak of approximately 97.12%, narrow gap between the training and validation accuracy implies a strong generalization performance, which indicates that the model has successfully minimized overfitting.

Fig. 5. Training and Validation Accuracy for MobileNetV2

Fig. 6. illustrates that training and validation losses experience a steep drop in the first few epochs, directly showing aggressive learning and optimization from the model. While the training loss decrease continues steadily trending toward zero, validating the model’s fitting into the training data, validation loss, conversely, remains static after a small decline, signifying a lack of improvement in generalization beyond early epochs. The MobileNetV2 generally obtained training and validation accuracy of 97.12%, and 95.38%, respectively, with training and validation loss of 0.20 and 0.40

Fig. 6. Training and Validation loss for MobileNetV2

  • 4.2.    InceptionV3

  • 4.3.    ResNet 50

The accuracy of the Inception V3 model's training along with validation for the categorization of maize leaf disease throughout 50 epochs is shown in Fig. 7. Early on, at the initial epochs, the training and validation accuracy was on the increase, showing the model effectively captured the patterns within the data. Furthermore, training accuracy reached a peak of 95%, while the validation accuracy was fluctuating between 88-92%.

Fig. 7. Training and Validation Accuracy for InceptionV3

From Fig. 8., training loss along with the validation loss experienced a sharp decline. However, subsequent to reaching approximately 10 epochs, this observation changed drastically. The training loss did continue to drop, but it plateaued at a rather low value, while the validation loss settled at a higher level accompanied with oscillations. This shows potential overfitting as the model memorizes the training set, making it susceptible to poor performance on the test set. Lastly, a training accuracy and validation accuracy of 91% and 87% were achieved by the Inception V3 model, while the training loss along with the validation loss stood at 0.30 and 0.42, respectively.

Fig. 8. Training and Validation loss for InceptionV3.

Training accuracy along with validation accuracy of ResNet-50 model for maize leaf disease classification for over 50 epochs is depicted in Fig. 9. The training accuracy together with validation accuracy increased steadily throughout the initial epochs, indicating learning of basic features by the model from the data. In particular, around the 10th epoch, training and the validation accuracy begin to stabilize, with little variation in the validation accuracy. Furthermore, validation accuracy and the training were near to each other, that is, successful training and generalization to novel data. Validation accuracy was affected by batch selection sensitivity leading to changes. Early stop employed in this research terminated training at epoch 30 as no accuracy improvement in the subsequent epochs.

Fig. 9. Training and Validation Accuracy for ResNet50

For the training loss and validation loss in Fig. 10., the training loss decreased dramatically from over 2.5 to 1 at iteration 5, showing that the model is learning. The validation loss's fluctuation also demonstrates how the model generalizes to new data. Both training and validation loss fall below 1 by iteration 10; both losses oscillate but stay within limits thereafter, which means little or no susceptibility to overfitting. The validation loss increases between the 15th and 20th epochs. Reflecting a minor decline in performance, but by the 30th epoch, the training and validation loss overlap almost exactly, reflecting an efficaciously trained model. On average, the ResNet-50 model had a training accuracy along validation accuracy of 77% and 76% respectively, also, training and validation losses of 0.70 and 0.60 were attained.

Fig. 10. Training and Validation loss for ResNet50

  • 4.4.    Models Performance in terms of confusion matrices

The performance of MobileNetV2, Inception V3, and ResNet50 in classifying maize leaf disease was quantified using the confusion matrix. The confusion matrix is divided into two components, i.e., off-diagonal and diagonal elements. The diagonal elements are the correctly classified instances, i.e., predicted labels equal to the truth table. Even though the off-diagonal elements were indicative of misclassifications, where the model labeled the data incorrectly. More clustering of values along the diagonal indicates more accuracy in prediction, and more off-diagonal lesser error. Confusion matrix for MobileNetV2, Inception V3, and ResNet50 models is illustrated in Fig. 11-13. The plot shows a complete comparison of the MobileNetV2, Inception V3, and ResNet50 models.

Fig. 12. Confusion Matrix for InceptionV3

Fig. 11. Confusion Matrix for MobileNetV2

Fig. 13. Confusion Matrix for ResNet50

  • 4.5.    Discussion of Result

  • 4.6.    Model Deployment

This section provides a detailed comparison of the three evaluated classification model used for the classification maize leaf defects. From Table 2, the metrics used in comparing the performances of MobileNetV2, InceptionV3, and ResNet50 classification models were test accuracy, precision, recall, and F1 score. The MobileNetV2 was the best in terms of performance and predictive ability, with an overall test accuracy of 95.29%, followed by the Inception V3 and ResNet50, which obtained 92.18% and 74.48% accuracies, respectively.

Table 2. Comparative Evaluation of Adopted Models.

Metrics

Disease

MobileNetV2

InceptionV3

ResNet50

Test Accuracy

95.29%

92.18%

74.48%

Precision

Common Rust

91.71%

75.93%

61.39%

Gray Leaf Spot

79.46%

88.64%

60.13%

Northern Corn Leaf Blight

97.01%

93.76%

82.04%

Southern Rust

89.32%

81.27%

70.11%

Phaeosphaeria Leaf Spot

90.35%

90.40%

81.02%

Healthy Leaf

93.87%

90.62%

87.34%

Recall

Common Rust

91.74%

87.83%

73.39%

Gray Leaf Spot

79.66%

82.15%

63.81%

Northern Corn Leaf Blight

93.49%

94.02%

88.56%

Southern Rust

76.21%

77.22%

79.29%

Phaeosphaeria Leaf Spot

96.93%

92.21%

89.16%

Healthy Leaf

98.93%

83.47%

87.37%

F1-score

Common Rust

91.72%

81.46%

66.88%

Gray Leaf Spot

79.56%

85.27%

61.92%

Northern Corn Leaf Blight

95.21%

93.89%

85.17%

Southern Rust

82.22%

79.20%

74.40%

Phaeosphaeria Leaf Spot

93.50%

91.29%

84.89%

Healthy Leaf

96.32%

86.89%

87.36%

For many of the maize leaf disease classes, the MobileNetV2 achieved the highest precision, recall, and F1 score based on the performance metrics shown in Table 2. It attests to the strength and capability of the MobileNetV2 in the processing of both imbalanced and balanced datasets. For instance, in Northern Corn Leaf Blight, 97.01% precision was recorded, while in healthy leaves, 93.87% precision was recorded. These are instances of the ability of the MobileNetV2 to properly classify true positives. With a recall of 96.93% and 98.93%, respectively, in Phaeosphaeria Leaf Spot and leafy healthy, MobileNetV2 also demonstrated strong recall performance, aiming to keep false positive rates low. While in the case of the Inception V3, it had a steady precision and recall of 94.02% and 88.64% for Gray Leaf Spot and Northern Corn Leaf Blight, respectively, which indicated its potential to be a decent alternative that was slightly inferior to the MobileNetV2. The ResNet50, meanwhile, was very poor in precision with 60.13% and 70.11% for Gray Leaf Spot and Southern Rust, respectively. These outcomes demonstrate the MobileNetV2 model's accuracy and potency in classifying maize leaf diseases.

In this research, after the model training and evaluation stage, the MobileNetV2 classification model was adopted for deployment into the web application and mobile application due to its excellent performance in terms of achieving the highest accuracy, consistency in terms of results achieved from multiple classes of maize leaf disease, and its lightweight architecture resulting from the use of depthwise separable convolutions, which decreases computational complexity and model size without affecting accuracy. When excellent real-time inference is needed in resource-constrained situations, including mobile devices and cloud-based applications, these qualities make the MobieNetV2 the ideal option. Furthermore, the lightweight API offers high speed in classification to enable timely decisions to be made by the user.

Fig 14, presents a sample image from the web-based deployment of the real-time maize leaf disease classification model. The web page interface allows users to upload maize leaf disease for evaluation, after which a predict button is to be clicked, the image is then pre-processed, and the particular leaf disease is identified within a split second. In this research, Northern Corn Leaf Blight was identified. The web application could efficiently identify five maize leaf diseases and a healthy one, making a total of six classes. Table 3 performance evaluation of MobileNetV2 Deployed on Web Application using confidence, data rate, file size, response time, and Throughput

A sample image from the mobile deployment of the real-time maize leaf disease classification model is presented in Fig. 15. From the mobile application, users can easily upload a maize leaf image by clicking on the select image button. The mobile application automatically pre-processes the uploaded image and provides a prompt result. For this research, as seen in Fig. 15., a southern rust was identified by the application. Table 4 Performance evaluation of MobileNetV2 Deployed on Mobile Application using confidence, data rate, file size, response time, and Throughput.

Fig. 14. Image of Maize Leaf Disease Being Classified with Web Application

Table 3. Performance evaluation of MobileNetV2 Deployed on Web Application using confidence, data rate, file size, response time, and Throughput

S/N

Maize Disease

Confidence (%)

Data Rate (KB/s)

Response Time (Seconds)

Throughput (Images/Second)

1

Common Rust

0.94

89.21

0.212

4.21

2

Gray Leaf Spot

0.93

102.76

0.145

6.18

3

Northern Corn Leaf Blight

0.89

78.62

0.145

6.18

4

Southern Rust

0.91

80.81

0.189

6.37

5

Phaeosphaeria Leaf Spot

0.88

112.21

0.147

5.31

6

Healthy Leaf

0.93

114.03

0.142

7.03

Average

0.91

96.27

0.163

5.88

Fig. 15. Image of Maize Leaf Disease Being Classified With Mobile Application

Table 4. Performance evaluation of MobileNetV2 Deployed on Mobile Application using confidence, data rate, file size, response time, and Throughput

S/N

Maize

Disease

Confidence (%)

Data Rate (KB/s)

Response Time (Seconds)

Throughput (Images/Second)

1

Common Rust

0.92

99.21

0.222

4.33

2

Gray Leaf Spot

0.94

101.12

0.132

7.34

3

Northern Corn Leaf Blight

0.87

76.27

0.132

7.12

4

Southern Rust

0.92

82.22

0.176

6.88

5

Phaeosphaeria Leaf Spot

0.89

110.13

0.144

5.02

6

Healthy Leaf

0.94

112.59

0.148

7.01

Average

0.91

96.92

0.159

6.28

  • 4.7.    Comparative Analysis

  • 5.    Conclusion

This section offers a thorough comparison between the recently developed and the most recent relevant research, focusing on performance parameters like accuracy, precision, recall, F1 score, and deployment model.

Table 5. Comparative Analysis of Developed Model with Most Recent Related Researchs

Author

Classifier

Dataset Size

Evaluation Metrics

Deployment

Accuracy

Precision

Recall

F1-Score

[11]

ResNet 50

20202

98.13%

90.33%

99.80

97.31%

No

[12]

YOLOv8n

2675

99.04%

88%

87.66%

85.23%

Mobile Application

[16]

SqueezeNet

4188

97%

98%

95%

96%

No

[18]

EfficientNetB3

6176

99.66%

99.39%

99.71%

99.55%

No

Developed Model

MobileNetV2

6543

95.29%

95%

97%

99%

Web Application and Mobile Application

The newly developed model achieved 95.29% classification accuracy and an F1-score of 99% f1-score , although it lags a little bit in terms of accuracy when compared to the EfficientNetB3 [18], which achieved an accuracy of 99.66%. The developed model was exceptional due to the deployment in both web and mobile applications, which were not deployed or limited to only mobile applications by [12], limiting the deployment flexibility. Based on the results in Table 5, it can be seen that existing approaches focused on achieving high accuracy without considering deployment adaptability, hence limiting their performance in real-world scenarios. The newly created model's performance was remarkable, and its dual deployment capabilities makes it more robust and useful in real-world situations.

This paper presented the development of a real-time maize leaf disease classification system to improve early detection and management of maize diseases in agricultural settings. The aim of this research was to develop an accurate, lightweight, and deployable deep learning model capable of classifying multiple maize leaf diseases using image data. To achieve this, a hybrid dataset of maize leaf images retrieved from University of Pretoria and Kaggle repositories were pre-processed and used to train three pre-trained CNN models namely, MobileNetV2, InceptionV3, and ResNet-50. The preprocessing stage ensured data uniformity through image cleaning, resizing, and normalization. Transfer learning was then applied to improve feature extraction and decrease training complexity. Performance evaluation showed that MobileNetV2 was the best classifier of maize leaf disease with a classification accuracy of 95.29%, followed by InceptionV3 and ResNet-50 models which achieved classification accuracies of 92.18% and 74.48%, respectively. The MobileNetV2 was chosen for the dual deployment in both a web-based and a mobile application due to its exceptional performance and lightweight API. Evaluation of the deployed MobileNetV2 model on both the web and mobile applications showed that it achieved an average confidence rate of 91% on both platforms, with response times of 0.159 s and 0.163 s, and throughputs of 5.88 images/s and 6.28 images/s, respectively. This research offers a simple and intuitive tool for users and agricultural professionals to quickly detect maize leaf diseases and take necessary precautions to mitigate losses. The key contributions of this research includes the development of a hybrid maize leaf disease dataset from multiple sources and the hybrid deployment of a dual-platform real-time system (web and mobile) for practical disease detection.

Nonetheless, among the main constraints in this study was the prolonged computation training time needed that was limited by inadequate resources for training. Additionally, the dataset used for this study includes multiple disease classes, further expansion is required to improve generalization across more diverse maize pathologies and real-world field conditions.

Future research will need to concentrate on supplementing both the size and variety of the maize leaf disease data set to fit in more classes of diseases such that the model can learn how to generalize to a wider group of maize pathologies. Also, it is recommended that high-performance computing resources with dedicated GPUs be employed to restrict the reliance on the CPU and accelerate training on big data. Utilization of GPUs will accelerate training by a significant amount by offering parallel processing, which is critical for handling deep learning models and big data, hence decreasing training time as well as model efficiency.

All the Declarations and Statements

Author Contributions Statement

K.O.O: Conceptualisation, methodology, data preparation, experiment, writing original draft and supervision.

J.S.M and O.C.R.: Review, methodology, data preparation, experiment, writing original draft and editing.

M.O.O: Critical review and editing.

All authors have read and approved the final manuscript.

Conflict of Interest Statement

The authors declare that they have no known competing financial interests or personal relationships that could have influenced the work reported in this paper.

Funding Declaration

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Data Availability Statement

The data supporting the results of this study are included in the article. Additionally, the Data for this article are available upon request from the corresponding author.

Ethical Declarations

This study was a non-invasive image collection of hand gestures with verbal consent of the participants. There was no involvement of human subjects or animals.

Acknowledgements

We acknowledged the Covenant University Centre for Research and Innovation and Development (CUCRID), located in Ota, Ogun State, Nigeria, for supporting this research

Declaration of Generative AI in Scholarly Writing

There was no use of a generative AI to create content, generate ideas, analyse data, generate figures, or write scientifically.

Abbreviations

This manuscript uses the following abbreviations:

Abbreviation

Full Meaning

AI

Artificial Intelligence

API

Application Programming Interface

CNN

Convolutional Neural Network

CNNs

Convolutional Neural Networks

CPU

Central Processing Unit

CR

Common Rust

CSS

Cascading Style Sheets

DCNN

Deep Convolutional Neural Network

DCNNs

Deep Convolutional Neural Networks

DL

Deep Learning

FN

False Negative

FP

False Positive

F1-score

Harmonic Mean of Precision and Recall

GB

Gigabyte

GHz

Gigahertz

GLS

Gray Leaf Spot

GPU

Graphics Processing Unit

HTML

HyperText Markup Language

ImageNet

Large-scale Image Database used for Pre-training

JavaScript (JS)

JavaScript Programming Language

KB/s

Kilobytes per Second

L2

L2    Regularization    (Euclidean    Norm

Regularization)

ML

Machine Learning

NCR

Northern Corn Leaf Blight

OS

Operating System

PLS

Phaeosphaeria Leaf Spot

PPV

Positive Predictive Value

RAM

Random Access Memory

SR

Southern Rust

SQLite

Structured Query Language Lite

SMOTE

Synthetic Minority Over-sampling Technique

TP

True Positive

TPR

True Positive Rate

VGG

Visual Geometry Group

ViT

Vision Transformer

Appendix A\B\C…, with appendix tile

Appendix A: Table A Comparative Analysis of Previous Related Works: Limitations and Research Gaps Addressed:

Appendix A

Table A: Comparative Analysis of Previous Related Works: Limitations and Research Gaps Addressed

Author

Model

Accuracy

Deployment

Limitation

Gap Addressed by Proposed Study

[9]

VGG16

95.16%

Mobile App

Only three types of maize diseases were considered and deployment was limited to a mobile APP

Improved the classes of maize disease to five and deployed in a

mobile and web application

[10]

PRF-SVM

96.67%

No

Absence of Real-time deployment

Deployed in web and mobile application and also evaluated its performance on both web and mobile

[11]

Inception V3, VGGNET,

ResNet50,           and

Inception_ResNetV2,

96.25%,

88.65%,

98.13%,   and

91.06%

No

The models adopted are computationally expensive, making them unsuitable for deployment to mobile or edge devices

MobileNetV2 was adopted due to its lightweight.

[12]

YOLOv3-tiny, YOLOv4, YOLOv5s, YOLOv7s and

YOLOv8n

69.40%,

97.50%,

88.23%,

93.30%,   and

99.04%, respectively

No

The developed model could not differentiate between a diseased maize leaf and a healthy one.

A healthy class was incorporated into the dataset.

[13]

VGG16,

VGG19,

ResNet50, DenseNet121,

DenseNet169,

DenseNet201,

InceptionV3,   Inception-

ResNetV2, Xception,

MobileNet, MobileNetV2, ShuffleNet

96.76%, 97.04%, 99.48%, 97.47%,

97.67%,

97.99%, I98.82%, 99.31%, 96.81%,

No

The selected models performed, well but however, the absence of           real-time

deployment evaluation may limit their effectiveness and reliability   in   real-

world applications.

Deployed in web and mobile application and also evaluated its performance on both web and mobile

98.69%,

98.04%,

96.08%

[14]

Inception V3, VGG16, VGG19, EfficientNetB7

95.34%

96.2%

95.31%

97.88%

No

The study relied on a relatively small and controlled dataset for training and evaluation, without extensive validation under diverse real-world field conditions.

Hybrid (University of Pretoria + Kaggle)

[15]

SVM+ DenseNet201

94.6%.

No

The model was restricted to just three leaf diseases

Improved the classes of maize disease to five

[16]

VGG16,

ResNet34,

ResNet50, SqueezeNet

92%

93%

94%

97%

No

The model was restricted to just three leaf diseases

Improved the classes of maize disease to five

[17]

standard self-attention model, the Convolutional Block Attention Module (CBAM) and state-space attention mechanism

72%, 85% and 94%

No

The       state-space

attention mechanism achieves        high

accuracy, but suffers from       increased

computational complexity due to additional       state

modeling and feature fusion operations,

MobileNetV2 was adopted due to its lightweight

[18]

EfficientNet B3

EfficientNet B6

99.66%

98.99%

No

The model was restricted to just three leaf diseases

Improved the classes of maize disease to five and deployed