A novel smartphone application for early detection of habanero disease

Habanero plant diseases can significantly reduce crop yield and quality, making early detection and treatment crucial for farmers. In this study, we discuss the creation of a modified VGG16 (MVGG16) Deep Transfer Learning (DTL) model-based smartphone app for identifying habanero plant diseases. With the help of the smartphone application, growers can quickly diagnose the health of a habanero plant by taking a photo of one of its leaves. We trained the DTL model on a dataset of labelled images of healthy and infected habanero plants and evaluated its performance on a separate test dataset. The MVGG16 DTL algorithm had an accuracy, precision, f1-score, recall and AUC of 98.79%, 97.93%, 98.44%, 98.95 and 98.63%, respectively, on the testing dataset. The MVGG16 DTL model was then integrated into a smartphone app that enables users to upload photographs, get diagnosed, and explore a history of earlier diagnoses. We tested the software on a collection of photos of habanero plant leaves and discovered that it was highly accurate at spotting infected plants. The smartphone software can boost early identification and treatment of habanero plant diseases, resulting in higher crop output and higher-quality harvests.

The disease is seen in the United States and Canada, with more severe cases occurring in humid locations, particularly in the Midwest and eastern states.Early blight manifests as depressed lesions on the fruit's stem in tomatoes, eggplants, and peppers.Spots have a concentric ring pattern or a target-shaped appearance.The pathogen spreads from the branch to cause decay in the fruit.
In this study, we describe the creation of a smartphone app based on a Convolutional Neural Network (CNN) model for identifying habanero plant diseases.The created method enables farmers to take pictures of infected habanero plants using their smartphones and then utilize the CNN model to determine whether the photographs are healthy or infected and, if infected, to determine which disease is present.The smartphone application may connect farmers with agricultural specialists for more advice and provide information on suggested treatments for each infected plant diagnosed.
Recent years have seen a rise in interest in applying deep learning models to detect plant diseases 11−14 .Numerous research has shown these models' ability to increase the precision and effectiveness of disease detection 15−18 .Only a few studies have been published 19−21 , making developing smartphone apps 22 specifically for plant disease detection a relatively young field.Our study expands on these earlier studies by creating a smartphone app specifically for diagnosing habanero plant diseases and analyzing its performance on a collection of photos of habanero plants.
The remainder of the document is structured as follows: Section "Related Works" provides an overview of a review of related work on developing smartphone apps for plant disease detection.Section "Materials and Methods" describes the dataset used to train and test the CNN model.Section "Materials and Methods" presents the methodology for developing the smartphone app and training the CNN model.Section "Results and Discussion" provides the results of our tests on both the mobile app and the CNN model.Section "Limitations of the Study" discussed the study's limitations and how it can be improved.Implications of our research and directions for future work are discussed in the last section of the paper, Section "Conclusion".

Related works
Deep learning algorithms have been used in various fields for detection, such as 23 , surgical instruments 24 , outlier detection 25 , constructing agricultural information systems 26 and so on.The most prevalent architecture for plant disease diagnosis using deep learning (DL) algorithms is CNN, which has shown encouraging results.Applications that rely significantly on image analysis, such as plant disease diagnostic, may benefit from CNNs because of their ability to automatically learn properties from images and classify them into a wide variety of categories.CNNs have been investigated for their potential in diagnosing plant diseases in recent research 11−14 , with encouraging results.
Smartphones have also emerged as a powerful tool for simplifying and increasing access to plant disease detection.Apps that utilize a smartphone's camera to diagnose infected plants by analyzing phones using deep-learning models are already widely available 19,21 .These applications have the potential to significantly enhance the pace at which infected plants may be diagnosed while also reducing the cost and level of expertise required for diagnosis.
Several smartphone applications for plant disease detection have been developed recently, such as Plantix, Nuru, and Crop Doctor 19−21 .These apps use a variety of deep learning models, including CNNs, to classify images of infected plants and provide treatment recommendations.To create an automated diagnosis and identification method for leaf spot-infected plants in all three sugar beet ailment severity categories (mild, moderate, and severe), Ozguven and Adem 27 revised the Faster R-CNN by boosting the depth of the data layer from 32 × 32 to 600 × 600 pixels.The created Faster R-CNN outperformed the Faster R-CNN with an accuracy of 95.48 per cent.A method of categorization for the degree of severity of crop infections and bug pests was established by Yu et al. 28 , who set out to address the issue that the algorithm used for classification was not satisfactory by proposing a better ResNet50 framework (CDCNNv2) that utilized DTL.The technology does more than identify crop pests and infected plants in real time; it also offers advice on how to avoid and treat them and what medications to use.
The PARNet framework and accompanying WEB interface were developed by Li et al. 29 , who fused the attention technique with the residual architecture to achieve a significant effect.The method has a typical accuracy of 96.84% in detecting five infected plants affecting tomato leaves.It outperformed the VGG16, ResNet50, and SENet algorithms by 2.25%-11.58%.Jiang et al. 30 suggested a CNN framework for ginger-infected plant detection using four types of ginger ailment gathered in their natural habitats, and they did so by redesigning and optimizing the CNN architecture centred on the conventional LeNet-5 network.The diagnosis accuracy for four distinct infected plants affecting ginger was 96%.
Using DTL and the Faster R-CNN, Zhou 31 identified five types of apple leaf infected and created an Androidbased device to detect them.For apple leaf infected, the algorithm saw them with a typical identification accuracy of 76.55%.When Liu et al. 32 implemented the MobileNet model on a mobile phone, they achieved a typical identification accuracy of 87.5% for six types of infected grape leaves gathered in the real world, with a mean computation time of 134 ms per imagery.
Esgario et al. 33 built a device using the ResNet50 framework to detect and quantify the impact of environmental stressors on coffee leaves.The method's categorization of the effects of biological stressors on coffee leaves had an accuracy of 95.24 per cent, and the degree of stress estimate accuracy was 86.51 per cent.Xiong et al. 34 suggested an automated picture segmentation technique founded on the GrabCut methodology to create a crop-infected identification tool for mobile intelligent gadgets 35 .They chose the MobileNet as the DL categorization approach.Over 80 per cent of 27 infections across six crops were correctly identified by the technology in the testing environment and the real world.
Bezabih et al. 36 suggest employing a merged neural network that combines the retrieved characteristics from VGG16 and AlexNet networks.This approach aims to create a better infection classification model using fully connected layers.The proposed concatenated CNN model involves many processes, including dataset collecting,

Dataset
We gathered a dataset of habanero plant images, including 1478 images of healthy plants and 997 photos of plants with one of five common diseases: bacterial spot, anthracnose, powdery mildew, Phytophthora blight, and tomato spotted wilt virus as obtained from the Kaggle repository with link: https:// www.kaggle.com/ datas ets/ arjun tejas wi/ plant-villa ge? resou rce= downl oad.We used this dataset to train and test our CNN model.The images were collected from multiple sources, including field surveys and online plant pathology databases.
Before Analysis, the dataset was preprocessed by scaling each image to 224 × 224 pixels and standardizing the pixel values to be between 0 and 1. 60% of the photos were utilized for training, 20% for validation, and 20% for testing after the dataset had been randomly divided into these three sets.

Proposed MVGG16 model
The study proposed a deep transfer learning model VGG 16, which was optimized by fine-tuning some layers and adding dropout and regularization techniques to prevent overfitting.The study also employed the transfer learning method because of the small dataset obtainable.In Section V, we provide the results of our tests on both the mobile app and the CNN model.Lastly, section VI uses the picture of an infected leaf to diagnose a plant.Some leaf functions, such as recognizing infection, are associated with a particular colour, and this hue may change according to the procedure.Here, we put leaf photos through some deep learning algorithms to predict the plant disease name based on the colour of the splits in the broad leaf, which signal the presence of a disease.
The CNN model utilized in this investigation was based on the VGG16 architecture, which has been extensively used in earlier studies to identify plant diseases 12−14 .Using the Keras deep learning framework, the model was put into practice.It was trained using stochastic gradient descent (SGD) on the habanero plant dataset with a learning rate of 0.001 and a momentum of 0.9.The model was trained for 50 epochs with dropout and regularization (L2) to avoid overfitting.The smartphone app was developed using the Flutter framework, which allows for the development of cross-platform apps for both Android and iOS devices.The app will enable users to capture images of habanero plants using their smartphone phones, then use the trained CNN model to classify the images as healthy or infected and, if infected, to identify the specific disease.The app also provides information on recommended treatment options for each identified condition and can connect farmers with agricultural experts for further guidance.
The VGG16 is a well-known convolutional neural network (CNN) with a total of sixteen layers, thirteen of which are convolutional layers and three fully connected layers.The design is distinguished by the fact that it employs 3 × 3 convolutional filters with a stride of 1 to extract distinguishing characteristics from the pictures fed into it.Max-pooling layers are used to decrease the size of feature maps while still preserving the necessary information.ReLU activation functions introduce non-linearity, and the final fully connected layer generally corresponds to the number of classes being classified in the classification job.Throughout the training, dropout layers randomly deactivate neurons, which helps to prevent overfitting throughout the process.
Pretraining is an essential phase in the transfer learning process, providing its context.The VGG16 model is first pre-trained on a massive dataset such as ImageNet, enabling it to learn broad visual properties and patterns without further training.After completing the pretraining phase, the model is then fine-tuned for a particular purpose, such as identifying infections in habanero plants.This method of fine-tuning entails adjusting the Vol:.(1234567890 Additionally, the basis of the VGG16 architecture is leveraged by the VGG16 DTL model that was applied in the study.After pretraining on a broad dataset, it is then fine-tuned for the habanero plant disease detection job by using a particular dataset and approach.The model's capacity to accurately classify habanero plant infections is improved by using transfer learning, which enables the model to benefit from information obtained from a wide variety of photos.

Modification made on VGG16
A number of standard modifications were likely made to adapt the VGG16 architecture for detecting habanero plant diseases.In the first place, the original final output layer would have been changed with a tailored output layer to match the number of classes in the habanero plant disease dataset.This specific output layer often comprises neurons representative of each infected group.The researchers may have also modified a number of the convolutional layers of the VGG16 algorithm to improve their ability to identify characteristics of habanero plant infections.The updated data preparation would have included data augmentation strategies and input image scaling techniques specifically customized to habanero plant photographs.In order to achieve the highest possible level of performance, hyperparameters such as learning rate, batch size, and optimizer would have been fine-tuned.
Additionally, regularization techniques like dropout or L2 regularization may have been used to reduce the amount of overfitting.It would have been essential to use an appropriate loss function, such as categorical crossentropy, to classify diseases affecting habanero plants accurately.During the training phase, several different measures could be taken.These included adjusting the number of training epochs, implementing early stopping, and monitoring the model's performance on a validation dataset.According to the particular infection detection target, using domain-specific information or rules in creating the model or the post-processing procedures to increase accuracy is contingent upon the model.  1 and Fig. 2.
The system utilized dropout and regularization techniques to prevent overfitting.The model was trained at 50 epochs and used a batch size 32.The models were trained using Stochastic gradient descent (SGD) on the habanero plant dataset with a learning rate of 0.001 and a momentum of 0.9.The proposed MVGG16 CNN model outperformed the existing model with a training accuracy of 100%, validation accuracy of 98.42% and  testing accuracy of 98.79%, as shown in Fig. 2 and Table 1.The training, validation and testing losses were 0.0047, 0.0424 and 0.0678, respectively, as seen in Table 1.This depicts that the proposed MVGG16 had the lowest losses over the other two models.
Figure 3 shows the confusion matrix for the three models implemented, and it can be depicted in Table 2 that the proposed model had the best values for the TP, TN, FP, and FN.It was presented in both Fig. 3 and Table 2 that the proposed model had the highest TP and TN values of 189 and 300 with the lowest FP and FN values of 4 and, respectively.
The models were evaluated using five performance measures: accuracy, precision, f1-score, recall and AUC.It was presented in Table 3 that the proposed model outperformed the two models it was evaluated with a 98.79% www.nature.com/scientificreports/accuracy, 97.93% precision, 98.44% f1-score, 98.95% recall and 98.63% AUC score.Figure 4 shows the ROC-AUC curve for the three models, and it is depicted that the proposed MVGG16 performed best.

Discussion
The article concludes with a discussion of the consequences of our research and future work, and Fig. 5 depicts the suggested application system interface.The habanero plant diseases dataset was acquired from the Kaggle repository, and image preprocessing and segmentation were conducted on the dataset.The diagram shown in Fig. 5 shows the proposed disease detection application system interface.This shows the home page of the mobile application where the user logs in to carry out the detection process.Figure 5 shows the login page interface of the smartphone design.The visualization of the semantic dictionary can be shown in Fig. 6. Figure 7 shows the snapshots for the testing dataset used in this study.Reports generated from the habanero disease inputted by the system users are shown in Fig. 8.The confidence level was also used to evaluate the effectiveness of the proposed system, and it was discovered that the proposed MVGG16 CNN had a high confidence level from 99.00 to 100.00, as seen in Fig. 9. Twelve Habanero Plant Diseases datasets involving healthy and infected leaves were used to evaluate the system performance by prediction method.It can be seen in Fig. 9 that all the leaves selected for the prediction were predicted rightly when comparing them with the proper labels.

Comparative analysis with related works
The proposed approach is similar to other studies that have used deep learning for plant disease detection.However, our study focused on habanero plants with unusual disease symptoms requiring specialized detection methods.Our results show that our model outperformed previous studies' accuracy results.Table 4 shows the comparative Analysis with existing studies that have examined the detection or classification of plant diseases.It can be demonstrated in the table that our proposed system outperformed all the existing methods with an accuracy of 98.42% over the studies conducted by Bezabih et al. 36 with an accuracy of 95.82, one driven by Kumar, Razi, Singh & Das 37 with an accuracy of 87.00% and third study conducted by Pant et al. 38 with an accuracy of 96.00%.

Limitations of the study
The limitation of the study is that it uses high computation resources such as space and time.The time complexity was too high because the modified algorithm layers increased, making the network deeper.Since the study is on mobile applications, it is suggested that in the future, mobile-based lightweight algorithms such as MobileNet, MobileNetV2, or V3 can be employed to detect plant disease.

Conclusion
In this study, using an MVGG16 model, we created a smartphone app for detecting habanero plant disease.The software accurately distinguished between healthy and unhealthy plants, and in every instance where the plant was seriously infected, it could identify the precise ailment.These findings show how deep learning methods and smartphone technology can potentially increase the effectiveness and accessibility of plant disease diagnosis.To enhance the VGG16 model's performance on less prevalent diseases or plants in varying environmental circumstances, further research may concentrate on extending the dataset used to train the VGG16 model.Incorporating additional capabilities like real-time disease management advice or developing the software's use for crops other than habanero peppers could also help the app get better.As a result, we contend that the creation of this smartphone app for habanero plant disease detection is a significant advancement in the study of plant pathology and has the potential to be very helpful to farmers and agricultural experts in diagnosing and managing plant infections.The study can employ lightweight algorithms such as MobileNet versions, SqueezeNet, AlexNet, etc., to implement plant detection systems.
In the future, we intend to include two or more specific diseases, quick wilt caused by Phytophthora and slow wilt caused by Fusarium, and we want to expand the dataset to include these additional diseases to create a more comprehensive disease detection system.

( 3 )Figure 1 .
Figure 1.Sample of the images used for the experimentation.

Figure 6 .
Figure 6.Plant Disease Visualization of Semantic Dictionary.

Figure 9 .
Figure 9. Prediction with a Confidence Rate of the Habanero Plant Diseases.
architecture of the model and the weights so that they align with the categories of the target dataset.It is possible to extend the size of the training dataset by using data augmentation methods such as zooming and rotating the data inside the dataset.Classification accuracy is measured by using an appropriate loss function, such as categorical cross-entropy.

Table 1 .
Training , validation and testing accuracies and losses for the models.Significant values are in[bold].Model Training

Table 2 .
Confusion matrix table values for the models.

Table 3 .
Performance evaluation of the MVGG 16 with baseline models.Significant values are in [bold].

Table 4 .
Comparative analysis with existing studies.Significant values are in [bold].