Analytical Evaluation of CNN and Capsulenet Architectures for Grape Leaf Disease Prediction

R
Rasika Patil1,*
A
A
Avinash T. Gatade3
1Bharati Vidyapeeth’s Institute of Management and Technology, Mumbai University, Navi Mumbai-400 614, Maharashtra, India.
2Bharati Vidyapeeth Deemed to be University, Pune-411 030, Maharashtra, India.
3Pillai HOC College of Engineering and Technology, Mumbai University, Khalapur-410 207, Maharashtra, India.

Background: The purpose of this work was to develop a CNN-based deep learning model for enhancing disease detection in Grape leaves. The model was trained on a dataset of approximately 2,400 photographs of Grape leaves, containing images of bacterial blight, spider mites and leaf miners.

Methods: To ensure model robustness, a k-fold cross-validation approach was implemented for dataset splitting. The developed model exhibited impressive performance in accurately identifying leaf diseases, demonstrating its potential for real-time applications. This study emphasizes the effectiveness of IT-based disease management approaches as complementary strategies to conventional methods, enabling timely interventions and boosting grape sector production. Integrating this deep learning model into agricultural systems allows farmers to benefit from timely and targeted interventions, leading to increased crop yields and economic prosperity.

Result: The utilization of CNN and deep learning techniques in grape farming presents a pathway towards a more environmentally friendly future, showcasing the potential of IT-based methods in revolutionizing disease management. The study reveals that the CapsuleNet model unveils an accuracy rate of 91% in grape leaf disease detection.

Another of the multiple cultivable plants considered to be best for Ethiopia is grape. Both “White Gold” and “King of Fibres” are terms that are used to characterise grape. Despite the fact that agriculture is the backbone of Ethiopia’s economy, no current achievements in agricultural automation research have been investigated, so there are a number of problems with agricultural output and quality spurred on by numerous diseases and pests. The limitations are mostly caused by the presence of pests and illnesses that are frequently invisible to the naked eye. To better identify diseases and pests on Grape leaves using Deep learning methods, particularly Convolutional Neural Networks (CNN), we undertook research in an effort to address this problem (Jamali et al., 2023). We recognized the importance of timely detection and accurate Common Grape illnesses and pests are identified. Deep learning and specifically CNN, was chosen as the underlying technique for this research due to its proven effectiveness in image recognition tasks (Jashanjeet et al., 2022 and Manavalan, 2022). The dataset was carefully curated to encompass various stages and severities of the diseases and pests under investigation. The images were labelled and annotated, providing a ground truth for training the CNN model (Nikith et al., 2023).
       
The CNN along with capsule network model underwent a thorough evaluation phase after training to see how well it performed (Devi et al., 2022). The model was put to the test on a unique set of captioned photographs that it had never seen before during training (Bhagya et al., 2021). By comparing the model’s predictions against the ground truth labels, the researchers could measure its accuracy, precision, recall and other performance metrics.
       
This evaluation process ensured that the developed model was reliable and capable of detecting diseases and pests in unseen Grape samples. The model exhibited promising results during evaluation, demonstrating its potential as a valuable tool for Grape farmers and agricultural experts in Ethiopia. By integrating this model into existing agricultural systems, farmers can benefit from improved disease and pest detection, leading to more timely and targeted interventions, higher crop yields and ultimately, increased economic prosperity in the Grape industry (Devi et al., 2022).
       
A k-fold cross-validation technique was used for dataset splitting to ensure the accuracy and generality of the created CNN model. The other k-1 folds are then utilised for training while each fold is used as a test set. Each fold serves as the set of testing once throughout this process, which is performed k times. The accuracy and efficiency of the model may be estimated more accurately by average the performance over all k iterations.
       
In this research, a deep learning architecture framework developed using CNN along with capsule network to classify disease found in grape plant accurately. The Capsule Network (CapsNet) model effectively preserves spatial relationships between features, which results in more accurate classification performance compared to conventional deep learning models. The findings of this study demonstrate the possibility for IT-based solutions to enhance and supplement manual approaches for identifying diseases and pests in an agriculture. The model exhibited promising results during evaluation, demonstrating its potential as a valuable tool for grape farmers and agricultural experts in Ethiopia. By integrating this model into existing agricultural systems, farmers can benefit from improved disease and pest detection, leading to more timely and targeted interventions, higher crop yields and ultimately, increased economic prosperity in the grape industry.
 
Literature review
 
This research was introduced by (Azath et al., 2021) these restrictions, which include illnesses and insects that are difficult to spot with the naked eye, are the focus of CNN’s work to use deep learning to create a model that will enhance the detection of grape pests and illnesses. The potential need for information-technology-based solutions to enhance conventional or manual sickness and pest diagnoses is shown, as well as the practicality of implementing them in real-time applications (Pawaskar et al., 2025).
       
Modelling and Stability Analysis of Grape Curl Virus (Club) Transmission Dynamics in in Cotton Plant (Song et al., 2022). This study of the literature concentrates on the modeling and stability analysis of Wheat Leaf Curl Virus (Club) the transmission process into Grape plants. The strategy used comprises developing mathematical models to understand the virus’s survival and proliferation throughout an estimated population of Grape plants. These models account for a number of variables, including host plant resistance, viral transmission rates and climatic circumstances. The stability analysis’s findings offer information about the virus’s long-term behavior and prospective effects on Grape output. CLCuV’s transmission kinetics and stability are examined in this study, which advances knowledge of the virus helps in the creation of effective techniques for managing and controlling the virus in Grape crops (Mehta et al., 2025).
       
Comparison of Grape Made from Toss Jute Fibre vs Original Grape this research was introduced by (Manavalan, 2022). The topic of this literature study is the production of Grape from Tossa Jute fiber and the ensuing comparison to genuine Grape. Toss jute fiber is converted into a Grape-like material using a variety of mechanical and chemical procedures in the technology used. The physical and chemical characteristics of the synthesized Grape, including fiber length, strength, fineness, transpiration and dye uptake, are then contrasted with those of the natural Grape. The comparison’s findings offer information on the viability of employing Toss Jute fiber in place of conventional Grape and about its possible uses in the textile industry.
       
Preparation and Properties of Soy Protein Isolate/Grape Nano crystalline Cellulose Films this research was introduced by (Guoyu, 2021). The problem that the literature review seeks to address is the paucity of information on the production and properties of soybean protein isolate/Grape nanocrystal line cellulose films. The method used entailed creating films by combining cellulose from Grape nanocrystal lines with soy protein isolate (Zehua et al., 2022).
       
The difficulty of intelligent target recognition in photographs of complex scenes, research was suggested by (Zehua et al., 2022), is the issue that the literature study attempts to solve. The method used entailed creating an intelligent system that makes use of cutting-edge machine learning and image processing algorithms to find targets in complicated scenarios. The method used entailed the creation of a smart device that spots targets in complicated settings by using cutting-edge algorithms for image processing and machine learning approaches. The system was designed to recognized and categorized targets of interest by using features like edge detection, object identification and pattern analysis. Numerous datasets with complicated scene photos and numerous target kinds were used in extensive tests.
       
The quest for substitute materials for wound dressing applications is the issue that the literature review addresses, with an emphasis on Grape cellulose-derived hydrogel and electro spun fibred (Supidcha et al., 2022). Grape cellulose was used as the primary material in the approach, which entailed the manufacture and analysis of gel and electro spun fibred. The biocompatibility, mechanical strength and wound-healing-promoting potential of the resultant materials were assessed. The outcomes showed that Grape cellulose-derived hydrogel and electro spun fibred had outstanding biocompatibility, appropriate mechanical qualities and the capacity to offer an optimal environment for wound healing.
       
The crucial part of the development of an image classification deep learning model using machine learning techniques was addressed. The technique employed is the utilization of deep learning algorithms suggested by (Qing et al., 2022) to train the model on a large dataset of images, enabling it to accurately categorize new images into predefined classes. The results obtained from this research demonstrate the successful implementation of the deep learning model for image classification. High accuracy rates were achieved, with the model correctly classifying images with a precision of over 90%.
In this research, a total of nearly 2,207 specimens were collected in the month of November 2024 to January 2025 from actual grape fields in the Sangli district of Maharashtra state, with an approximately 1,000 images available in each class. The research work is carried out at Bharati Vidyapeeth Deemed university, Pune, Maharashtra. The dataset was carefully curated to include a diverse range of grape images representing different stages and severity levels of diseases. For the purpose of detecting grape disease, we employed a Convolutional Neural Network (CNN). Its components, equations and general function must be understood. Here’s an explanation of the key elements of a CNN and how they are utilized in the context of grape disease detection.
 
Convolutional layers
 
The foundational elements of a CNN are convolutional layers. They execute convolutional operations on the input pictures after applying filters (kernels) in order to extract pertinent information (Patil et al., 2025). The feature maps that emerge when each filter examines the input picture capture patterns at various sizes.
Equation for the convolution operation:
 
            C (i, j) = Σm Σn I (i + m, j + n) . k (m, n)                ...(1)
                            
Where,
C (i, j)= The value at position (i, j) in the output feature map.
I (i + m, j + n)= The pixel value at position (i + m, j + n) in the input image.
k (m, n)= The value of the filter at position (m, n).
 
Activation function
 
A function of activation causes the output of each convolutional layer to become complex. The activation functions of Rectified Linear Units (ReLU) and its variants are often used. ReLU can be expressed as:
 
f (x) = Max (0, x)
 
Where,
Zero= Substituted for any negative values.
 
Pooling layers
 
Down sampling of convolutional layer feature maps is achieved through pooling layers, which lowers the spatial dimensionality while keeping important properties. The “max pooling” pooling technique selects the highest value inside a pooling frame.
 
Fully connected layers
 
All of the leftover map features have been flattened or fed into fully connected layers after a number of convolutional and pooling layers. These layers enable the neural network to learn intricate correlations since they link all neurons in the layers below and above them.
 
SoftMax activation
 
For classification tasks, a function that activates SoftMax is frequently employed in the last fully connected layer. The resulting values are transformed into probabilities that add up to 1, showing the probability of each class.
Equation for softmax activation:


In Grape detection of diseases, a CNN learns to derive disease-specific characteristics from input photos using a forward and backpropagation training method. Optimization methods such as Adam or RMSprop be used to change the network’s weights based on calculated gradients and a loss function of choice. Fresh Grape pictures may be categorized using the trained network, which produces predicted probability for each class. The most likely illness condition is indicated with the highest likelihood. CNN design and hyperparameter customization, which include layers, filters sizes, pooling dimensions, ranging and learning rate, are critical for model efficacy. Experimentation entails tinkering with parameters like as dropout, augmentation, optimizer, periods and dataset colour. Dataset augmentation, which involves changes to boost dataset size and variety, has proven beneficial, resulting in a 15% gain in accuracy when compared to non-augmented datasets.




Fig 1 shows the distribution of subfolders inside a primary category labelled as “Disease” or “Healthy,” based on a dataset devoted to grapes leaf diseases. The x-axis is called “Subfolders,” and the y-axis shows the number of subfolders. A greater subfolder count for folders related to diseased grape leaves is shown by the “Healthy” category, which starts at 0 subfolders and peaks at 1150. On the other hand, the “Disease” category has a maximum of about 950 subfolders, beginning at 0 subfolders. A correctly labelled dataset comprising Grape leaf pictures in healthy and sick stages is required for teaching the CNN model. Scaling the photos to a common size is used to pre-process the training data. For model creation, hyperparameter modification and final assessment, the dataset is separated into three sets: training, validation and testing. The architecture of the CNN model is constructed, which includes convolutional layers of various filter dimensions, ranging pooling layers, layers that are completely connected and an outcome layer. Before constructing the model, the loss function, optimization strategy and measurement metric are defined. Iterative sweeps of pre-processed training pictures through the network are used for training, with weights updated using an optimization technique and backpropagation. The algorithm predicts what will be the labels of fresh photos after training, signaling whether the images are healthy or unhealthy. This forecast can be displayed as a classification or a likelihood score. During training, the data is processed by transforming pictures into a layer with one dimension and employing generators to dynamic load and pre-process data. Finally, the model that was learned is utilized to predict new picture class labels, discriminating between “Disease” vs “Healthy” categories.

Fig 1: Number of filters for “Disease” or “Healthy” category.


       
The effect of varying epoch counts on model performance was explored. The maximum accuracy was obtained by training the framework with 15 epochs, showing that this is the ideal number of epochs with this dataset overall model architecture.

 
Transforming grape disease prediction: Unleashing the power of hierarchical capsule networks
 
The research concentrates on utilizing different CNN structures to anticipate grape ailments. Implementing the Capsule Net methodology in Fig 2 involves several phases. Initially, input images go through Convolutional layers with ReLU activation to extract features. Then, primary capsules are generated via Conv2D, reshaping and squash activation. Dynamic routing enhances interactions among capsules, facilitating effective feature comprehension. Following this, secondary capsules are formed, leading to class capsules linked with specific diseases. Dense layers and ReLU activation further handle capsule outputs, succeeded by squash activation and length computation. The 2-norm operation highlights capsules with higher probabilities. Ultimately, classification relies on the standardized lengths of class capsules, denoting the anticipated disease. This approach offers a methodical and all-encompassing approach to disease prediction, leveraging Capsule Nets to capture intricate feature hierarchies for enhanced precision.

Fig 2: Hierarchical capsule network for grape disease prediction.

Machine learning algorithms were used to categorise Grape photos as diseased or healthy. The photos were pre-processed before being turned onto a one-dimensional layer and fed onto a Dense layer with the help of a generator. After that, the model that was trained was used to forecast the labels of new pictures. The matrix of confusion was created to examine the model’s efficacy and precision in recognising illnesses in grape leaves.
       
Numbers of Images collected are 2207 using Canon EOS 5D Mark III camera having horizontal resolution 72 dpi and vertical resolution 72 dpi. Fig 3 shows that the sample dataset consists of 1207 photographs that show healthy samples and 1000 shots that show instances of grape leaf illnesses. This disparity in numbers suggests that the collection is noticeably skewed, with a higher percentage of photos showing healthy grape leaves than those illustrating cases of disease.

Fig 3: Image size and number of channels differ each other.


 
Advanced capsule network delivers accurate grape disease prediction
 
The network encompasses primary and secondary capsules utilizing Routing by Agreement principles and class capsules for feature extraction and prediction. Employing TensorFlow and Keras, the code handles data preprocessing through generators, applying transformations to training and testing data. The model is compiled using Adam optimizer and binary cross-entropy loss, then trained over defined epochs while being validated against a separate dataset. The ‘history’ variable stores accuracy and loss metrics, serving as indicators of the model’s performance and guiding potential refinements.
       
The progression of training and validation loss during the Capsule Network’s training process is depicted in Fig 4. As the model gains insightful representations from the training data, the training loss gradually drops. The model maintains a balance between learning and generalization, as evidenced by the validation loss’s initial decline and subsequent stabilization across epochs. Such behavior implies that the network can extend its learned characteristics to unobserved grape leaf samples and avoids severe overfitting. A well-regularized capsule network is indicated by a steady decrease in training loss and a stable validation loss.

Fig 4: Dynamic evolution of training and validation loss in a capsule network.


       
The Capsule Network’s training and validation accuracy curves for grape disease prediction are shown in Fig 5. As the number of epochs increases, the training accuracy gradually rises, indicating successful learning. The validation accuracy first shows a similar rising trend before plateauing, indicating that the model has reached a convergence point. Controlled overfitting and good generalization performance are indicated by the near alignment of the training and validation accuracy curves. All things considered, the Capsule Network shows good prediction power while retaining respectable generalization to new data.

Fig 5: Accuracy trends of capsule network for grapes disease prediction.


 
Comparative analysis
 
The experiment results shown in Table 1 represent the performance of two different models for detecting diseases in grape leaves.

Table 1: Comparative analysis model.


       
As shown in Fig 6, the Faster DR-IACNN detection model displayed a notable precision of 81.1% measured by mean Average Precision (mAP), demonstrating its effectiveness in accurately identifying grape leaf diseases. Conversely, the CapsuleNet model exhibited an impressive accuracy rate of 91% in grape leaf disease detection. CapsuleNet, recognized for its understanding of spatial hierarchies and improved adaptability, showcased its capability by achieving a high accuracy level. Faster DR-IACNN excels in precision, while Capsule Net stands out for its high accuracy. To maximize our model’s inference efficiency, authors have used methods like Knowledge Distillation (KD) and Dynamic Weight Slicing (DWS). While DWS dynamically distributes resources during inference to improve operational efficiency for real-time agricultural applications, KD minimizes model complexity while preserving accuracy. Addresses class imbalance and guarantee model resilience through the use of strategies like class-weight modifications. Furthermore, improving image augmentations and preprocessing will aid in controlling variations in disease presentations and picture quality.

Fig 6: Comparative analysis model.


       
Our method, which combines CNN with Added Hidden layers, goes one step further by maximizing computing efficiency in addition to correcting class imbalance and enhancing resilience. Because of this, our approach is more suited for real-time applications in agricultural situations with limited resources, offering both high accuracy and useful deployment capabilities.
       
In addition, we want to expand the model to include other crops and improve its resilience to other environmental factors and disease kinds in subsequent studies. This integration guarantees deployment that is realistic, real-time and flexible enough to meet a range of agricultural concerns. However, real-time agricultural applications are better suited for our CNN technique, which is supplemented with Knowledge Distillation (KD) and Dynamic Weight Slicing (DWS). Without requiring a large amount of semantic information, our method offers strong performance while guaranteeing excellent accuracy and computational economy. Because of this, our approach is more feasible for quick implementation and accurate disease detection in modern agricultural contexts.
       
A discussion of zero-shot learning (ZSL) may, in fact, pave the way for the development of more adaptive and flexible models that can handle the changing landscape of agricultural disease risks, thereby future-proofing the technology. ZSL uses semantic information to help models identify and categorize diseases they have never seen before. On the other hand, our CNN approach guarantees great accuracy and computational efficiency, offering a more practical and rapid answer. While ZSL provides long-term flexibility, our method is more suitable for immediate deployment and real-world application since it performs well and can be applied in real-time in contemporary agricultural situations. Future work will expand our model’s detection capabilities by exploring its adaptability to emerging threats or rare diseases without extensive retraining. By utilizing transfer learning strategies, the model will be able to swiftly adjust to novel illness patterns. This method guarantees that the model will stay highly accurate and efficient while being adaptable and responsive to changing agricultural issues.
Its application in the agricultural informatics domain has significant implications in this study, especially in disease detection of Grape plants. Using Python, Keras and Jupyter, we created an accurate deep learning model that can classify leaf pests and diseases better. Results are evaluated on a benchmark dataset showcasing state-of-the-art performance that is optimized through dataset preprocessing, color augmentation and regularization techniques, proving high accuracy and potential cost savings for farmers. In the future, taking advantage of the proposed changes and observing insights from modern literature (i.e., using more complex architectural CNNs and moving to multi-classification) will increase the architectural rigor of the model and improve methodological levity. Going forward, the model’s theoretical depth and methodological robustness will be improved by incorporating recommendations for enhancements and insights from recent research, like utilizing sophisticated CNN architectures and investigating multi-class categorization. Therefore, this study is more imperative, which will also help in strengthening its utility in IT-supported disease control strategies in agriculture informatics research in the future.
All authors have equally contributed to the research work.
 
Disclaimers
 
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.
 
Informed consent
 
While collecting Healthy and Unhealthy leaf specimens Care must be taken to ensure that sampling does not cause unnecessary harm to the plants or the surrounding environment.
The authors declare that there are no conflicts of interest regarding the publication of this article. No funding or sponsorship influenced the design of the study, data collection, analysis, decision to publish, or preparation of the manuscript.

  1. Azath, M., Zekiwos, M. and Abey, B. (2021). Deep learning-based image processing for cotton leaf disease and pest diagnosis. Journal of Electrical and Computer Engineering Hindawi. 2021: 1-10. 

  2. Bhagya, M.P. and Vishwanath, B. (2021). A perspective view of grape image classification using machine learning algorithms using WEKA. Advances in Human-Computer Interaction. 2021: 15.

  3. Devi, N. and Laskar, S. (2022). A transfer learning approach for leaf image based classification of healthy and diseased leaves. Bhartiya Krishi Anusandhan Patrika. 37(2): 173- 177.  doi: 10.18805/BKAP467.

  4. Guoyu, Z., Zhou, C. and Fangyu, F. (2021). Preparation and properties of soy protein isolate/grape-nanocrystalline cellulose film. International Journal of Polymer Science. 150: 7.

  5. Jamali, S.S., Yeganeh, B. and Yahya, E. (2023). Wheat leaf traits monitoring based on machine learning algorithms and high-resolution satellite imagery. Ecological Informatics. 74: 101. 

  6. Jashanjeet, K.D., Panday, D., Saha, D., Lee, J., Jagadamma, S., Schaeffer, S. and Mengistu, A. (2022). Predicting and interpreting grape yield and its determinants under long- term conservation management practices using machine learning. Computers and Electronics in Agriculture. 199: 107. 

  7. Manavalan, R. (2022). Towards an intelligent approach for grape diseases detection: A review. Computers and Electronics in Agriculture. 200: 107-255.

  8. Mehta, R.A., Kumar, P., Guru, P., Shalini, A. and Kumar, R. (2025). AI-powered innovations in agriculture: A systematic review on plant disease detection and classification. Indian Journal of Agricultural Research. 59(9): 1321- 1330. doi: 10.18805/IJARe.A-6371.

  9. Nikith, B.V., Keerthan, N.K.S., Praneeth, M.S. and Amrita, T. (2023). Leaf disease detection and classification. Procedia Computer Science. 218: 291-300. 

  10. Patil, R.G. and More, A. (2025). A comparative study and optimization of deep learning models for grape leaf disease identification. Indian Journal of Agricultural Research. 59(4): 654-663. doi: 10.18805/IJARe.A-6242.

  11. Pawaskar, P., Yogish, H.K., Pakruddin, B. and Deepa Y. (2025). A novel and efficient deep learning models for assessing AI’s impact on disease diagnosis in agriculture. Indian Journal of Agricultural Research. 59(9): 1395-1403. doi: 10.18805/IJARe.A-6388.

  12. Qing, L.V., Zhang, S. and Yuechun, W. (2022). Deep learning model of image classification using machine learning. Advances in Multimedia. 12. https://doi.org/10.1155/ 2022/3351256.

  13. Song, Q.F. and Abayneh, K. (2022). Modelling and stability analysis of cotton leaf curl virus (CLCuV) transmission dynamics in cotton plant. Journal of Applied Mathematics Hindawi. 2022: 1-12.

  14. Supidcha, J., Mitaim, S., Ching-Yi, C. and Nisa, P. (2022). Grape cellulose-derived hydrogel and electrospun fiber as alternative material for wound dressing application. International Journal of Biomaterials. 222: 12. 

  15. Zehua, F., Zhang, N., Wang, D., Zhi, J. and Xuedong, Z. (2022). Monitoring and analysis of grape planting parameters in multiareas based on multisensor. Mathematical Problems in Engineering. 202: 8.

Analytical Evaluation of CNN and Capsulenet Architectures for Grape Leaf Disease Prediction

R
Rasika Patil1,*
A
A
Avinash T. Gatade3
1Bharati Vidyapeeth’s Institute of Management and Technology, Mumbai University, Navi Mumbai-400 614, Maharashtra, India.
2Bharati Vidyapeeth Deemed to be University, Pune-411 030, Maharashtra, India.
3Pillai HOC College of Engineering and Technology, Mumbai University, Khalapur-410 207, Maharashtra, India.

Background: The purpose of this work was to develop a CNN-based deep learning model for enhancing disease detection in Grape leaves. The model was trained on a dataset of approximately 2,400 photographs of Grape leaves, containing images of bacterial blight, spider mites and leaf miners.

Methods: To ensure model robustness, a k-fold cross-validation approach was implemented for dataset splitting. The developed model exhibited impressive performance in accurately identifying leaf diseases, demonstrating its potential for real-time applications. This study emphasizes the effectiveness of IT-based disease management approaches as complementary strategies to conventional methods, enabling timely interventions and boosting grape sector production. Integrating this deep learning model into agricultural systems allows farmers to benefit from timely and targeted interventions, leading to increased crop yields and economic prosperity.

Result: The utilization of CNN and deep learning techniques in grape farming presents a pathway towards a more environmentally friendly future, showcasing the potential of IT-based methods in revolutionizing disease management. The study reveals that the CapsuleNet model unveils an accuracy rate of 91% in grape leaf disease detection.

Another of the multiple cultivable plants considered to be best for Ethiopia is grape. Both “White Gold” and “King of Fibres” are terms that are used to characterise grape. Despite the fact that agriculture is the backbone of Ethiopia’s economy, no current achievements in agricultural automation research have been investigated, so there are a number of problems with agricultural output and quality spurred on by numerous diseases and pests. The limitations are mostly caused by the presence of pests and illnesses that are frequently invisible to the naked eye. To better identify diseases and pests on Grape leaves using Deep learning methods, particularly Convolutional Neural Networks (CNN), we undertook research in an effort to address this problem (Jamali et al., 2023). We recognized the importance of timely detection and accurate Common Grape illnesses and pests are identified. Deep learning and specifically CNN, was chosen as the underlying technique for this research due to its proven effectiveness in image recognition tasks (Jashanjeet et al., 2022 and Manavalan, 2022). The dataset was carefully curated to encompass various stages and severities of the diseases and pests under investigation. The images were labelled and annotated, providing a ground truth for training the CNN model (Nikith et al., 2023).
       
The CNN along with capsule network model underwent a thorough evaluation phase after training to see how well it performed (Devi et al., 2022). The model was put to the test on a unique set of captioned photographs that it had never seen before during training (Bhagya et al., 2021). By comparing the model’s predictions against the ground truth labels, the researchers could measure its accuracy, precision, recall and other performance metrics.
       
This evaluation process ensured that the developed model was reliable and capable of detecting diseases and pests in unseen Grape samples. The model exhibited promising results during evaluation, demonstrating its potential as a valuable tool for Grape farmers and agricultural experts in Ethiopia. By integrating this model into existing agricultural systems, farmers can benefit from improved disease and pest detection, leading to more timely and targeted interventions, higher crop yields and ultimately, increased economic prosperity in the Grape industry (Devi et al., 2022).
       
A k-fold cross-validation technique was used for dataset splitting to ensure the accuracy and generality of the created CNN model. The other k-1 folds are then utilised for training while each fold is used as a test set. Each fold serves as the set of testing once throughout this process, which is performed k times. The accuracy and efficiency of the model may be estimated more accurately by average the performance over all k iterations.
       
In this research, a deep learning architecture framework developed using CNN along with capsule network to classify disease found in grape plant accurately. The Capsule Network (CapsNet) model effectively preserves spatial relationships between features, which results in more accurate classification performance compared to conventional deep learning models. The findings of this study demonstrate the possibility for IT-based solutions to enhance and supplement manual approaches for identifying diseases and pests in an agriculture. The model exhibited promising results during evaluation, demonstrating its potential as a valuable tool for grape farmers and agricultural experts in Ethiopia. By integrating this model into existing agricultural systems, farmers can benefit from improved disease and pest detection, leading to more timely and targeted interventions, higher crop yields and ultimately, increased economic prosperity in the grape industry.
 
Literature review
 
This research was introduced by (Azath et al., 2021) these restrictions, which include illnesses and insects that are difficult to spot with the naked eye, are the focus of CNN’s work to use deep learning to create a model that will enhance the detection of grape pests and illnesses. The potential need for information-technology-based solutions to enhance conventional or manual sickness and pest diagnoses is shown, as well as the practicality of implementing them in real-time applications (Pawaskar et al., 2025).
       
Modelling and Stability Analysis of Grape Curl Virus (Club) Transmission Dynamics in in Cotton Plant (Song et al., 2022). This study of the literature concentrates on the modeling and stability analysis of Wheat Leaf Curl Virus (Club) the transmission process into Grape plants. The strategy used comprises developing mathematical models to understand the virus’s survival and proliferation throughout an estimated population of Grape plants. These models account for a number of variables, including host plant resistance, viral transmission rates and climatic circumstances. The stability analysis’s findings offer information about the virus’s long-term behavior and prospective effects on Grape output. CLCuV’s transmission kinetics and stability are examined in this study, which advances knowledge of the virus helps in the creation of effective techniques for managing and controlling the virus in Grape crops (Mehta et al., 2025).
       
Comparison of Grape Made from Toss Jute Fibre vs Original Grape this research was introduced by (Manavalan, 2022). The topic of this literature study is the production of Grape from Tossa Jute fiber and the ensuing comparison to genuine Grape. Toss jute fiber is converted into a Grape-like material using a variety of mechanical and chemical procedures in the technology used. The physical and chemical characteristics of the synthesized Grape, including fiber length, strength, fineness, transpiration and dye uptake, are then contrasted with those of the natural Grape. The comparison’s findings offer information on the viability of employing Toss Jute fiber in place of conventional Grape and about its possible uses in the textile industry.
       
Preparation and Properties of Soy Protein Isolate/Grape Nano crystalline Cellulose Films this research was introduced by (Guoyu, 2021). The problem that the literature review seeks to address is the paucity of information on the production and properties of soybean protein isolate/Grape nanocrystal line cellulose films. The method used entailed creating films by combining cellulose from Grape nanocrystal lines with soy protein isolate (Zehua et al., 2022).
       
The difficulty of intelligent target recognition in photographs of complex scenes, research was suggested by (Zehua et al., 2022), is the issue that the literature study attempts to solve. The method used entailed creating an intelligent system that makes use of cutting-edge machine learning and image processing algorithms to find targets in complicated scenarios. The method used entailed the creation of a smart device that spots targets in complicated settings by using cutting-edge algorithms for image processing and machine learning approaches. The system was designed to recognized and categorized targets of interest by using features like edge detection, object identification and pattern analysis. Numerous datasets with complicated scene photos and numerous target kinds were used in extensive tests.
       
The quest for substitute materials for wound dressing applications is the issue that the literature review addresses, with an emphasis on Grape cellulose-derived hydrogel and electro spun fibred (Supidcha et al., 2022). Grape cellulose was used as the primary material in the approach, which entailed the manufacture and analysis of gel and electro spun fibred. The biocompatibility, mechanical strength and wound-healing-promoting potential of the resultant materials were assessed. The outcomes showed that Grape cellulose-derived hydrogel and electro spun fibred had outstanding biocompatibility, appropriate mechanical qualities and the capacity to offer an optimal environment for wound healing.
       
The crucial part of the development of an image classification deep learning model using machine learning techniques was addressed. The technique employed is the utilization of deep learning algorithms suggested by (Qing et al., 2022) to train the model on a large dataset of images, enabling it to accurately categorize new images into predefined classes. The results obtained from this research demonstrate the successful implementation of the deep learning model for image classification. High accuracy rates were achieved, with the model correctly classifying images with a precision of over 90%.
In this research, a total of nearly 2,207 specimens were collected in the month of November 2024 to January 2025 from actual grape fields in the Sangli district of Maharashtra state, with an approximately 1,000 images available in each class. The research work is carried out at Bharati Vidyapeeth Deemed university, Pune, Maharashtra. The dataset was carefully curated to include a diverse range of grape images representing different stages and severity levels of diseases. For the purpose of detecting grape disease, we employed a Convolutional Neural Network (CNN). Its components, equations and general function must be understood. Here’s an explanation of the key elements of a CNN and how they are utilized in the context of grape disease detection.
 
Convolutional layers
 
The foundational elements of a CNN are convolutional layers. They execute convolutional operations on the input pictures after applying filters (kernels) in order to extract pertinent information (Patil et al., 2025). The feature maps that emerge when each filter examines the input picture capture patterns at various sizes.
Equation for the convolution operation:
 
            C (i, j) = Σm Σn I (i + m, j + n) . k (m, n)                ...(1)
                            
Where,
C (i, j)= The value at position (i, j) in the output feature map.
I (i + m, j + n)= The pixel value at position (i + m, j + n) in the input image.
k (m, n)= The value of the filter at position (m, n).
 
Activation function
 
A function of activation causes the output of each convolutional layer to become complex. The activation functions of Rectified Linear Units (ReLU) and its variants are often used. ReLU can be expressed as:
 
f (x) = Max (0, x)
 
Where,
Zero= Substituted for any negative values.
 
Pooling layers
 
Down sampling of convolutional layer feature maps is achieved through pooling layers, which lowers the spatial dimensionality while keeping important properties. The “max pooling” pooling technique selects the highest value inside a pooling frame.
 
Fully connected layers
 
All of the leftover map features have been flattened or fed into fully connected layers after a number of convolutional and pooling layers. These layers enable the neural network to learn intricate correlations since they link all neurons in the layers below and above them.
 
SoftMax activation
 
For classification tasks, a function that activates SoftMax is frequently employed in the last fully connected layer. The resulting values are transformed into probabilities that add up to 1, showing the probability of each class.
Equation for softmax activation:


In Grape detection of diseases, a CNN learns to derive disease-specific characteristics from input photos using a forward and backpropagation training method. Optimization methods such as Adam or RMSprop be used to change the network’s weights based on calculated gradients and a loss function of choice. Fresh Grape pictures may be categorized using the trained network, which produces predicted probability for each class. The most likely illness condition is indicated with the highest likelihood. CNN design and hyperparameter customization, which include layers, filters sizes, pooling dimensions, ranging and learning rate, are critical for model efficacy. Experimentation entails tinkering with parameters like as dropout, augmentation, optimizer, periods and dataset colour. Dataset augmentation, which involves changes to boost dataset size and variety, has proven beneficial, resulting in a 15% gain in accuracy when compared to non-augmented datasets.




Fig 1 shows the distribution of subfolders inside a primary category labelled as “Disease” or “Healthy,” based on a dataset devoted to grapes leaf diseases. The x-axis is called “Subfolders,” and the y-axis shows the number of subfolders. A greater subfolder count for folders related to diseased grape leaves is shown by the “Healthy” category, which starts at 0 subfolders and peaks at 1150. On the other hand, the “Disease” category has a maximum of about 950 subfolders, beginning at 0 subfolders. A correctly labelled dataset comprising Grape leaf pictures in healthy and sick stages is required for teaching the CNN model. Scaling the photos to a common size is used to pre-process the training data. For model creation, hyperparameter modification and final assessment, the dataset is separated into three sets: training, validation and testing. The architecture of the CNN model is constructed, which includes convolutional layers of various filter dimensions, ranging pooling layers, layers that are completely connected and an outcome layer. Before constructing the model, the loss function, optimization strategy and measurement metric are defined. Iterative sweeps of pre-processed training pictures through the network are used for training, with weights updated using an optimization technique and backpropagation. The algorithm predicts what will be the labels of fresh photos after training, signaling whether the images are healthy or unhealthy. This forecast can be displayed as a classification or a likelihood score. During training, the data is processed by transforming pictures into a layer with one dimension and employing generators to dynamic load and pre-process data. Finally, the model that was learned is utilized to predict new picture class labels, discriminating between “Disease” vs “Healthy” categories.

Fig 1: Number of filters for “Disease” or “Healthy” category.


       
The effect of varying epoch counts on model performance was explored. The maximum accuracy was obtained by training the framework with 15 epochs, showing that this is the ideal number of epochs with this dataset overall model architecture.

 
Transforming grape disease prediction: Unleashing the power of hierarchical capsule networks
 
The research concentrates on utilizing different CNN structures to anticipate grape ailments. Implementing the Capsule Net methodology in Fig 2 involves several phases. Initially, input images go through Convolutional layers with ReLU activation to extract features. Then, primary capsules are generated via Conv2D, reshaping and squash activation. Dynamic routing enhances interactions among capsules, facilitating effective feature comprehension. Following this, secondary capsules are formed, leading to class capsules linked with specific diseases. Dense layers and ReLU activation further handle capsule outputs, succeeded by squash activation and length computation. The 2-norm operation highlights capsules with higher probabilities. Ultimately, classification relies on the standardized lengths of class capsules, denoting the anticipated disease. This approach offers a methodical and all-encompassing approach to disease prediction, leveraging Capsule Nets to capture intricate feature hierarchies for enhanced precision.

Fig 2: Hierarchical capsule network for grape disease prediction.

Machine learning algorithms were used to categorise Grape photos as diseased or healthy. The photos were pre-processed before being turned onto a one-dimensional layer and fed onto a Dense layer with the help of a generator. After that, the model that was trained was used to forecast the labels of new pictures. The matrix of confusion was created to examine the model’s efficacy and precision in recognising illnesses in grape leaves.
       
Numbers of Images collected are 2207 using Canon EOS 5D Mark III camera having horizontal resolution 72 dpi and vertical resolution 72 dpi. Fig 3 shows that the sample dataset consists of 1207 photographs that show healthy samples and 1000 shots that show instances of grape leaf illnesses. This disparity in numbers suggests that the collection is noticeably skewed, with a higher percentage of photos showing healthy grape leaves than those illustrating cases of disease.

Fig 3: Image size and number of channels differ each other.


 
Advanced capsule network delivers accurate grape disease prediction
 
The network encompasses primary and secondary capsules utilizing Routing by Agreement principles and class capsules for feature extraction and prediction. Employing TensorFlow and Keras, the code handles data preprocessing through generators, applying transformations to training and testing data. The model is compiled using Adam optimizer and binary cross-entropy loss, then trained over defined epochs while being validated against a separate dataset. The ‘history’ variable stores accuracy and loss metrics, serving as indicators of the model’s performance and guiding potential refinements.
       
The progression of training and validation loss during the Capsule Network’s training process is depicted in Fig 4. As the model gains insightful representations from the training data, the training loss gradually drops. The model maintains a balance between learning and generalization, as evidenced by the validation loss’s initial decline and subsequent stabilization across epochs. Such behavior implies that the network can extend its learned characteristics to unobserved grape leaf samples and avoids severe overfitting. A well-regularized capsule network is indicated by a steady decrease in training loss and a stable validation loss.

Fig 4: Dynamic evolution of training and validation loss in a capsule network.


       
The Capsule Network’s training and validation accuracy curves for grape disease prediction are shown in Fig 5. As the number of epochs increases, the training accuracy gradually rises, indicating successful learning. The validation accuracy first shows a similar rising trend before plateauing, indicating that the model has reached a convergence point. Controlled overfitting and good generalization performance are indicated by the near alignment of the training and validation accuracy curves. All things considered, the Capsule Network shows good prediction power while retaining respectable generalization to new data.

Fig 5: Accuracy trends of capsule network for grapes disease prediction.


 
Comparative analysis
 
The experiment results shown in Table 1 represent the performance of two different models for detecting diseases in grape leaves.

Table 1: Comparative analysis model.


       
As shown in Fig 6, the Faster DR-IACNN detection model displayed a notable precision of 81.1% measured by mean Average Precision (mAP), demonstrating its effectiveness in accurately identifying grape leaf diseases. Conversely, the CapsuleNet model exhibited an impressive accuracy rate of 91% in grape leaf disease detection. CapsuleNet, recognized for its understanding of spatial hierarchies and improved adaptability, showcased its capability by achieving a high accuracy level. Faster DR-IACNN excels in precision, while Capsule Net stands out for its high accuracy. To maximize our model’s inference efficiency, authors have used methods like Knowledge Distillation (KD) and Dynamic Weight Slicing (DWS). While DWS dynamically distributes resources during inference to improve operational efficiency for real-time agricultural applications, KD minimizes model complexity while preserving accuracy. Addresses class imbalance and guarantee model resilience through the use of strategies like class-weight modifications. Furthermore, improving image augmentations and preprocessing will aid in controlling variations in disease presentations and picture quality.

Fig 6: Comparative analysis model.


       
Our method, which combines CNN with Added Hidden layers, goes one step further by maximizing computing efficiency in addition to correcting class imbalance and enhancing resilience. Because of this, our approach is more suited for real-time applications in agricultural situations with limited resources, offering both high accuracy and useful deployment capabilities.
       
In addition, we want to expand the model to include other crops and improve its resilience to other environmental factors and disease kinds in subsequent studies. This integration guarantees deployment that is realistic, real-time and flexible enough to meet a range of agricultural concerns. However, real-time agricultural applications are better suited for our CNN technique, which is supplemented with Knowledge Distillation (KD) and Dynamic Weight Slicing (DWS). Without requiring a large amount of semantic information, our method offers strong performance while guaranteeing excellent accuracy and computational economy. Because of this, our approach is more feasible for quick implementation and accurate disease detection in modern agricultural contexts.
       
A discussion of zero-shot learning (ZSL) may, in fact, pave the way for the development of more adaptive and flexible models that can handle the changing landscape of agricultural disease risks, thereby future-proofing the technology. ZSL uses semantic information to help models identify and categorize diseases they have never seen before. On the other hand, our CNN approach guarantees great accuracy and computational efficiency, offering a more practical and rapid answer. While ZSL provides long-term flexibility, our method is more suitable for immediate deployment and real-world application since it performs well and can be applied in real-time in contemporary agricultural situations. Future work will expand our model’s detection capabilities by exploring its adaptability to emerging threats or rare diseases without extensive retraining. By utilizing transfer learning strategies, the model will be able to swiftly adjust to novel illness patterns. This method guarantees that the model will stay highly accurate and efficient while being adaptable and responsive to changing agricultural issues.
Its application in the agricultural informatics domain has significant implications in this study, especially in disease detection of Grape plants. Using Python, Keras and Jupyter, we created an accurate deep learning model that can classify leaf pests and diseases better. Results are evaluated on a benchmark dataset showcasing state-of-the-art performance that is optimized through dataset preprocessing, color augmentation and regularization techniques, proving high accuracy and potential cost savings for farmers. In the future, taking advantage of the proposed changes and observing insights from modern literature (i.e., using more complex architectural CNNs and moving to multi-classification) will increase the architectural rigor of the model and improve methodological levity. Going forward, the model’s theoretical depth and methodological robustness will be improved by incorporating recommendations for enhancements and insights from recent research, like utilizing sophisticated CNN architectures and investigating multi-class categorization. Therefore, this study is more imperative, which will also help in strengthening its utility in IT-supported disease control strategies in agriculture informatics research in the future.
All authors have equally contributed to the research work.
 
Disclaimers
 
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.
 
Informed consent
 
While collecting Healthy and Unhealthy leaf specimens Care must be taken to ensure that sampling does not cause unnecessary harm to the plants or the surrounding environment.
The authors declare that there are no conflicts of interest regarding the publication of this article. No funding or sponsorship influenced the design of the study, data collection, analysis, decision to publish, or preparation of the manuscript.

  1. Azath, M., Zekiwos, M. and Abey, B. (2021). Deep learning-based image processing for cotton leaf disease and pest diagnosis. Journal of Electrical and Computer Engineering Hindawi. 2021: 1-10. 

  2. Bhagya, M.P. and Vishwanath, B. (2021). A perspective view of grape image classification using machine learning algorithms using WEKA. Advances in Human-Computer Interaction. 2021: 15.

  3. Devi, N. and Laskar, S. (2022). A transfer learning approach for leaf image based classification of healthy and diseased leaves. Bhartiya Krishi Anusandhan Patrika. 37(2): 173- 177.  doi: 10.18805/BKAP467.

  4. Guoyu, Z., Zhou, C. and Fangyu, F. (2021). Preparation and properties of soy protein isolate/grape-nanocrystalline cellulose film. International Journal of Polymer Science. 150: 7.

  5. Jamali, S.S., Yeganeh, B. and Yahya, E. (2023). Wheat leaf traits monitoring based on machine learning algorithms and high-resolution satellite imagery. Ecological Informatics. 74: 101. 

  6. Jashanjeet, K.D., Panday, D., Saha, D., Lee, J., Jagadamma, S., Schaeffer, S. and Mengistu, A. (2022). Predicting and interpreting grape yield and its determinants under long- term conservation management practices using machine learning. Computers and Electronics in Agriculture. 199: 107. 

  7. Manavalan, R. (2022). Towards an intelligent approach for grape diseases detection: A review. Computers and Electronics in Agriculture. 200: 107-255.

  8. Mehta, R.A., Kumar, P., Guru, P., Shalini, A. and Kumar, R. (2025). AI-powered innovations in agriculture: A systematic review on plant disease detection and classification. Indian Journal of Agricultural Research. 59(9): 1321- 1330. doi: 10.18805/IJARe.A-6371.

  9. Nikith, B.V., Keerthan, N.K.S., Praneeth, M.S. and Amrita, T. (2023). Leaf disease detection and classification. Procedia Computer Science. 218: 291-300. 

  10. Patil, R.G. and More, A. (2025). A comparative study and optimization of deep learning models for grape leaf disease identification. Indian Journal of Agricultural Research. 59(4): 654-663. doi: 10.18805/IJARe.A-6242.

  11. Pawaskar, P., Yogish, H.K., Pakruddin, B. and Deepa Y. (2025). A novel and efficient deep learning models for assessing AI’s impact on disease diagnosis in agriculture. Indian Journal of Agricultural Research. 59(9): 1395-1403. doi: 10.18805/IJARe.A-6388.

  12. Qing, L.V., Zhang, S. and Yuechun, W. (2022). Deep learning model of image classification using machine learning. Advances in Multimedia. 12. https://doi.org/10.1155/ 2022/3351256.

  13. Song, Q.F. and Abayneh, K. (2022). Modelling and stability analysis of cotton leaf curl virus (CLCuV) transmission dynamics in cotton plant. Journal of Applied Mathematics Hindawi. 2022: 1-12.

  14. Supidcha, J., Mitaim, S., Ching-Yi, C. and Nisa, P. (2022). Grape cellulose-derived hydrogel and electrospun fiber as alternative material for wound dressing application. International Journal of Biomaterials. 222: 12. 

  15. Zehua, F., Zhang, N., Wang, D., Zhi, J. and Xuedong, Z. (2022). Monitoring and analysis of grape planting parameters in multiareas based on multisensor. Mathematical Problems in Engineering. 202: 8.
In this Article
Published In
Indian Journal of Agricultural Research

Editorial Board

View all (0)