International Journal of Technology and Emerging Research

DOI: 10.64823/ijter.2606017

⚠️ This HTML version is automatically generated from the manuscript file and may contain formatting or data discrepancies compared to the original paper. Please refer to the PDF version for the authoritative, publisher-formatted record.

Introduction

Starfruit (Averrhoa carambola) is an important tropical fruit crop valued for its unique flavor, nutritional benefits, and commercial demand. However, its productivity and quality are significantly affected by various diseases such as anthracnose, fruit borer infestation, and bed bug damage, along with environmental stress factors. Early and accurate identification of these diseases is crucial for minimizing crop losses and improving agricultural yield. Traditional disease detection methods rely heavily on manual inspection by experts, which is time-consuming, subjective, and often impractical for large-scale farming. With the advancement of artificial intelligence and computer vision, deep learning-based approaches have emerged as an efficient alternative for automated plant disease detection. In this study, a custom Convolutional Neural Network (CNN) model is developed to classify starfruit diseases from leaf and fruit images. The proposed model learns hierarchical feature representations directly from raw images, enabling it to distinguish between healthy and diseased samples with high accuracy. The dataset includes multiple classes such as Carambola Anthracnose Disease, Bed Bugs Disease, Fruit Borer Disease, Healthy Fruits, and Healthy Leaves. The custom CNN architecture is optimized for improved feature extraction and classification performance while maintaining computational efficiency. Experimental results demonstrate that the model achieves strong accuracy and robust generalization, making it suitable for real-time agricultural applications. This approach highlights the potential of deep learning in supporting precision agriculture and assisting farmers in early disease management.

Literature Review

Plant and fruit disease detection has gained significant attention with the advancement of machine learning and deep learning techniques. Early research primarily relied on traditional image processing methods such as color, texture, and shape feature extraction combined with classifiers like Support Vector Machines (SVM) and K-Nearest Neighbors (KNN). However, these approaches were limited in handling complex variations in lighting conditions, backgrounds, and disease patterns.

With the emergence of deep learning, Convolutional Neural Networks (CNNs) have become the dominant approach for plant disease classification due to their ability to automatically learn hierarchical feature representations from raw images. Mohanty et al. demonstrated one of the earliest successful applications of deep learning for plant disease detection using large-scale datasets, achieving high accuracy across multiple crop types. Similarly, Sladojevic et al. showed that deep neural networks can effectively classify plant leaf diseases without requiring manual feature extraction, significantly improving performance over traditional methods.

Further studies by Ferentinos and Too et al. explored deep CNN architectures and transfer learning techniques, highlighting that pre-trained models such as AlexNet, VGG, and ResNet can achieve strong results even with limited agricultural datasets. These studies confirmed that transfer learning improves generalization and reduces training time, making it suitable for real-world agricultural applications.

Recent research has focused on lightweight and custom CNN architectures optimized for specific crops and real-time deployment. Works by Barbedo and Kamilaris et al. emphasized dataset quality, augmentation techniques, and environmental variability as critical factors influencing model performance. Additionally, recent surveys indicate that deep learning-based systems consistently outperform traditional methods, achieving accuracies above 95% in most cases.

In the context of fruit-specific disease detection, CNN-based models have been successfully applied to crops such as mango, apple, citrus, and cassava, demonstrating high robustness in identifying diseases under complex field conditions. However, challenges such as class imbalance, limited starfruit-specific datasets, and real-time deployment constraints still exist. This study builds upon these advancements by proposing a custom CNN model tailored for starfruit disease classification, aiming to achieve higher accuracy and improved generalization for practical agricultural use.

Methodology

Data Collection

Data collection is a fundamental step in developing an accurate and reliable deep learning model for plant disease detection. The quality, diversity, and quantity of the collected images directly influence the performance of the classification model. For this study, a dataset containing images of healthy and diseased star fruit leaves and fruits was required to train and evaluate the proposed Custom Convolutional Neural Network (CNN) model. We collected the dataset from Kaggle, where it is publicly available for research and educational purposes. The dataset consists of images representing different disease categories along with healthy samples. To facilitate model development and evaluation, the dataset was already organized into separate training and testing folders. The training set was used for learning disease-related features, while the testing set was utilized to assess the model's generalization capability on unseen data. The collected images exhibit variations in lighting conditions, orientations, backgrounds, and disease severity levels, making the dataset suitable for building a robust classification system. Prior to model training, all images were examined to ensure proper labeling and class consistency. The dataset includes sufficient visual information to enable the CNN model to learn distinctive disease characteristics such as discoloration, spots, lesions, and texture changes. Since the dataset is publicly accessible, it supports reproducibility and allows future researchers to compare their results with the proposed approach. The availability of predefined train-test splits also helps maintain a standardized evaluation process. Overall, the collected dataset provides a comprehensive and reliable foundation for training, validating, and testing the custom CNN-based star fruit disease detection framework.

Data Preprocessing and Augmentation

Data collection is a fundamental step in developing an accurate and reliable deep learning model for plant disease detection. The quality, diversity, and quantity of the collected images directly influence the performance of the classification model. For this study, a dataset containing images of healthy and diseased star fruit leaves and fruits was required to train and evaluate the proposed Custom Convolutional Neural Network (CNN) model. We collected the dataset from Kaggle, where it is publicly available for research and educational purposes. The dataset consists of images representing different disease categories along with healthy samples. To facilitate model development and evaluation, the dataset was already organized into separate training and testing folders. The training set was used for learning disease-related features, while the testing set was utilized to assess the model's generalization capability on unseen data. The collected images exhibit variations in lighting conditions, orientations, backgrounds, and disease severity levels, making the dataset suitable for building a robust classification system. Prior to model training, all images were examined to ensure proper labeling and class consistency. The dataset includes sufficient visual information to enable the CNN model to learn distinctive disease characteristics such as discoloration, spots, lesions, and texture changes. Since the dataset is publicly accessible, it supports reproducibility and allows future researchers to compare their results with the proposed approach. The availability of predefined train-test splits also helps maintain a standardized evaluation process. Overall, the collected dataset provides a comprehensive and reliable foundation for training, validating, and testing the custom CNN-based star fruit disease detection framework.

Proposed model

Input Layer

The proposed Custom CNN model receives RGB images of star fruit leaves and fruits with a fixed input size of 224 × 224 × 3. All images are resized to this dimension during preprocessing to maintain consistency across the dataset and facilitate efficient batch processing. The input layer serves as the entry point of the network and passes the normalized image data to subsequent layers for feature extraction. Standardizing the image size helps reduce computational complexity while preserving sufficient visual information required for disease classification. The normalized pixel values enable stable gradient propagation during training and contribute to faster convergence of the model.

Stem Layer

The Stem Layer acts as the initial feature extraction stage of the proposed architecture. Its primary objective is to capture low-level visual patterns from the input images before they are processed by deeper convolutional layers. The stem block consists of multiple convolutional operations with small kernel sizes, followed by batch normalization and ReLU activation functions. These operations enable the model to detect fundamental image characteristics such as edges, corners, textures, color variations, and disease-related patterns. Batch normalization stabilizes the learning process by reducing internal covariate shifts and accelerating convergence. The ReLU activation function introduces non-linearity, allowing the network to learn complex visual representations. A max-pooling operation is incorporated to reduce the spatial dimensions of the feature maps while retaining the most informative features. This dimensionality reduction decreases computational cost and helps the network focus on essential disease characteristics. The stem layer provides a strong foundation for subsequent feature extraction stages by generating informative and discriminative feature maps. As a result, the network becomes capable of identifying early disease symptoms present on star fruit leaves and fruits.

Custom CNN Layer

The Custom CNN Layer is designed to learn hierarchical and disease-specific features from the extracted feature maps. This module consists of multiple convolutional blocks arranged sequentially, where each block includes convolution, batch normalization, ReLU activation, and pooling operations. The convolutional filters automatically learn visual characteristics associated with different disease categories, including lesions, discoloration, pest damage, and healthy tissue structures. As the network depth increases, the model progressively captures more abstract and complex features. Batch normalization improves training stability and reduces the risk of overfitting, while ReLU activation enhances feature discrimination by introducing non-linearity. Pooling operations reduce feature dimensions and preserve dominant information. The custom design allows the model to efficiently learn patterns unique to Carambola diseases while maintaining a manageable number of trainable parameters. By extracting both local and global disease-related characteristics, this layer significantly improves the model's ability to distinguish between visually similar classes. The resulting feature maps contain rich information that is subsequently refined through the attention mechanism.

Attention Mechanism

An Attention Mechanism is integrated into the proposed architecture to enhance the network's ability to focus on the most informative regions of the image. In disease detection tasks, symptoms often occupy only a small portion of the leaf or fruit surface, making it essential to emphasize these critical areas. The attention module assigns adaptive weights to feature channels and spatial locations according to their relevance to the classification task. Features associated with disease symptoms receive higher importance, while irrelevant background information is suppressed. This selective emphasis improves feature representation and enables the model to capture subtle visual differences among disease categories. The attention mechanism also helps reduce the influence of noise, lighting variations, and complex backgrounds. By guiding the network toward disease-specific regions, the module enhances discriminative learning and improves classification accuracy. Furthermore, it allows the model to better identify small lesions, insect damage, and texture abnormalities that may otherwise be overlooked. Consequently, the attention mechanism contributes significantly to robust and reliable disease recognition performance.

Global Average Pooling Layer

The Global Average Pooling (GAP) Layer is employed after the feature extraction and attention stages to transform the high-dimensional feature maps into a compact feature representation. Unlike traditional fully connected flattening approaches, GAP computes the average value of each feature map, resulting in a single representative value per channel. This operation significantly reduces the number of trainable parameters and minimizes the risk of overfitting. The GAP layer preserves the most relevant semantic information learned by the network while maintaining spatial robustness. It also encourages the network to identify the overall presence of disease-related features rather than relying on specific pixel locations. The reduced feature vector improves computational efficiency and facilitates faster training and inference. Additionally, the compact representation enables better generalization when classifying unseen images. By summarizing the extracted features effectively, the GAP layer serves as an efficient bridge between the feature extraction module and the final classification stage. This contributes to improved model performance and reduced computational complexity.

Classification Layer

The Classification Layer represents the final stage of the proposed Custom CNN model and is responsible for assigning each input image to one of the five predefined classes. The compact feature vector generated by the Global Average Pooling layer is passed through one or more fully connected layers, followed by a Softmax activation function. The Softmax function converts the output scores into probability values corresponding to each class. The model predicts the class with the highest probability as the final output. The five target classes considered in this study are Carambola Anthracnose Disease, Carambola Bed Bugs Disease, Carambola Fruit Borer Disease, Carambola Healthy Fruits, and Carambola Healthy Leaf. During training, categorical cross-entropy loss is utilized to measure the discrepancy between predicted and actual labels. The classification layer learns to maximize the probability of the correct class while minimizing prediction errors. Through continuous optimization, the model develops strong discriminative capabilities for disease recognition. Consequently, the classification layer enables accurate identification of both diseased and healthy star fruit samples, supporting efficient disease monitoring and management in agricultural environments.

Results

Accuracy Curve

Training and Validation Accuracy Curves of Starfruit disease detection model.

Training and validation Loss Curve

Training and validation loss curve of starfruit disease detection model.

Confusion Matrix

Confusion Matrix of starfruit disease detection model

Conclusion and Future Work

This study presented a Custom Convolutional Neural Network (CNN)-based framework for the automatic detection and classification of star fruit (Carambola) diseases using deep learning techniques. The proposed model was designed to identify five classes, namely Carambola Anthracnose Disease, Carambola Bed Bugs Disease, Carambola Fruit Borer Disease, Carambola Healthy Fruits, and Carambola Healthy Leaf. A publicly available dataset collected from Kaggle was utilized for training and evaluation purposes. The proposed architecture incorporated a stem layer, multiple custom CNN blocks, an attention mechanism, global average pooling, and a classification layer to effectively extract and learn disease-specific features. Data preprocessing and augmentation techniques enhanced dataset diversity and improved model generalization. Experimental results demonstrated that the model achieved high classification performance with strong training and validation accuracy while maintaining low loss values throughout the training process. The confusion matrix analysis further confirmed the model’s ability to correctly distinguish between healthy and diseased samples with minimal misclassification. The integration of the attention mechanism significantly improved the network’s capability to focus on disease-affected regions and suppress irrelevant background information. Overall, the proposed framework provides an efficient, reliable, and automated solution for star fruit disease diagnosis, which can assist farmers and agricultural experts in early disease detection and timely crop management. Although the proposed model achieved promising results, several directions can be explored to further enhance its performance and practical applicability. Future research may focus on collecting larger and more diverse datasets captured under real-field conditions, including variations in weather, illumination, background complexity, and disease severity. The incorporation of additional disease categories and pest infestations can improve the robustness of the classification system. Advanced deep learning architectures such as Vision Transformers (ViTs), Swin Transformers, and hybrid CNN-Transformer models may be investigated to further improve feature representation and classification accuracy. Explainable Artificial Intelligence (XAI) techniques can also be integrated to provide visual explanations of model decisions, increasing user trust and interpretability. Furthermore, the proposed model can be deployed as a mobile application or cloud-based decision support system to enable real-time disease diagnosis in agricultural environments. Future studies may also explore disease severity estimation, multi-disease detection, and integration with Internet of Things (IoT) sensors for developing intelligent precision agriculture solutions. These advancements can contribute to sustainable crop management, increased productivity, and reduced economic losses in star fruit cultivation.

References

  1. Mohanty, S. P., Hughes, D. P., & Salathé, M. (2016). Using deep learning for image-based plant disease detection. Frontiers in Plant Science.
  2. Sladojevic, S., Arsenovic, M., Anderla, A., Culibrk, D., & Stefanovic, D. (2016). Deep neural networks based recognition of plant diseases by leaf image classification. Computational Intelligence and Neuroscience.
  3. Ferentinos, K. P. (2018). Deep learning models for plant disease detection and diagnosis. Computers and Electronics in Agriculture.
  4. Zhang, K., et al. (2019). Identification of plant disease using convolutional neural networks. IEEE Access.
  5. Too, E. C., et al. (2019). A comparative study of fine-tuning deep learning models for plant disease identification. Computers and Electronics in Agriculture.
  6. Ramcharan, A., et al. (2017). Deep learning for image-based cassava disease detection. Frontiers in Plant Science.
  7. Picon, A., et al. (2019). Deep convolutional neural networks for mobile capture device-based crop disease classification. Computers and Electronics in Agriculture.
  8. Barbedo, J. G. A. (2018). Impact of dataset size and variety on plant disease classification accuracy using deep learning. Computers and Electronics in Agriculture.
  9. Mohanty, S. P., & Hughes, D. P. (2018). Using transfer learning for plant disease detection. arXiv preprint.
  10. Kamilaris, A., & Prenafeta-Boldú, F. X. (2018). Deep learning in agriculture: A survey. Computers and Electronics in Agriculture.
  11. Liu, B., et al. (2017). Plant disease recognition based on deep learning and transfer learning. IEEE.
  12. Chen, J., et al. (2020). Automatic detection of plant diseases using deep CNN. Pattern Recognition Letters.
  13. Singh, V., et al. (2020). Plant leaf disease detection using machine learning and deep learning techniques. International Journal of Computer Applications.
  14. Ma, J., et al. (2018). Identification of plant diseases using CNN-based architecture. Sensors.
  15. Zhang, S., et al. (2020). Deep learning for image-based plant disease detection: A review. IEEE Access.
  16. Wang, G., et al. (2019). Crop disease detection using deep convolutional neural networks. Information Processing in Agriculture.
  17. Kaur, S., & Kaur, P. (2021). Leaf disease detection using CNN models. Journal of Plant Pathology.
  18. Ramesh, S., et al. (2021). Plant disease detection using image processing and deep learning. Artificial Intelligence in Agriculture.
  19. Sibiya, M., & Sumbwanyambe, M. (2019). Automatic detection of plant diseases using deep learning. Procedia Computer Science.
  20. Zhu, X., et al. (2021). Deep learning-based plant disease classification: A survey and outlook. Agronomy.