4.2 Model Training and Validation
Both models were trained using a combination of
supervised learning techniques. For NPK prediction,
the dataset was divided into 80% for training and 20%
for testing. A similar split was applied for disease
detection models. The training process utilized
different loss functions based on the task — Mean
Squared Error (MSE) for NPK prediction, ensuring
accurate nutrient value predictions, and Categorical
Cross-Entropy for disease classification to optimize
multi-class predictions. To achieve efficient learning,
the Adam optimizer was used in both cases,
leveraging adaptive learning rates for faster
convergence. Key hyperparameters included a batch
size of 32 and an initial learning rate of 0.001.
Additionally, early stopping was implemented to
prevent overfitting, ensuring the models generalize
well on unseen data.
4.3 Evaluation Metrics
Different evaluation metrics were used to evaluate the
models performance. To measure the overall
correctness of the predictions, we calculated
accuracy, defined as the ratio of correct predictions
to total predictions. Overall performance of the model
was assessed using Precision and Recall mechanisms
applied to the positive cases that were correctly
identified, where precision is the ratio of relevant
instances amongst the retrieved instances, and recall
is the ratio of relevant instances that were
successfully retrieved. To account for both metrics,
we used the F1-Score, which provides a harmonic
mean of precision and recall.
Also, the ROC Curve was used to graphically
represent the trade-off between true positive versus
false positive rates, giving insight to the model’s
performance in classification. And as the Precision-
Recall Curve tends to be more informative than the
ROC curve in the exposition of class imbalance, it
was performed to reassert the accuracy of the model.
The Figures 1 to 8 are the illustrations for these
metrics, showing the results of the NPK prediction
and disease classification by using the proposed
AGRO-AI models.
5 RESULTS AND DISCUSSION
The results from the AGRO-AI models for both NPK
prediction and disease detection are presented and
analyzed in this section. Visual representations in
Figures 1 to 8 illustrate the performance of the models
using various evaluation metrics.
5.1 NPK Prediction Results
The predicted nitrogen, phosphorus and potassium
(NPK) levels of paddy leaves showed a strong
performance in their ability to utilize deep learning
models such as ResNet-34 and BiGRU. The number
of true positive (TP), true negative (TN), false
positive (FP), and false negative (FN) rates can be
seen in the figure below (Figure 1) With our
accuracy over epochs (Figure 2) steadily increasing
during training and the loss over epochs (Figure 3)
largely decreasing indicating that we are learning, it
is time to move on to testing our new model.
The results highlight the model's effectiveness in
learning complex patterns through the integration of
image processing and sequential modeling techniques
within the time series context. Vegetation indices
(VARI, GLI, and ExG) used in this study were
important in achieving a higher accuracy for the
model.
5.2 Disease Detection Results
The CNN and GAN models were well suited for
disease detection as they accurately classified paddy
leaf diseases with a high percentage of accuracy. The
confusion matrix (Figure 4) in the below depicts that
the model can distinguish between healthy and
diseased leaves with good accuracy. As depicted in
the accuracy over epochs chart (Figure 5), there is an
apparent upward trend of accuracy line with epochs
while loss over epochs chart (Figure 6) depicts the
downward journey of loss, indicating better
convergence of the model.
To provide a more thorough assessment of
classification performance, the ROC curve (shown in
Figure 7) illustrates the rate of true positive
predictions against false positive predictions for the
model, which is maximally enclosed due to a
favorable area under the curve (AUC). Finally, the
precision-recall curve in Figure 8 confirms that the
model is effective, especially in the case of a class
imbalance.
5.3 Comparative Analysis
These suggest that the AGRO-AI models provide
higher accuracy prediction and robustness in disease
detection compared to existing methods. This
substantial gain in prediction accuracy can be
attributed to the application of deep learning