3.1. Recall Confidence
It is essential to understand that setting the appropriate confidence threshold depends on the specific application and the trade-off between missing detections (false negatives) and accepting false positives.
Figure 6 shows how the recall confidence level decreases as the batch sizes are increased. The obtained recall confidence values for each of the batch sizes were 0.840, 0.820, 0.780, 0.790, 0.750, 0.830, 0.770, 0.840, and 0.77 for batch sizes 10, 20, 30, 40, 50, 60, 70, 80, and 90, respectively. The highest recall confidence was recorded at batch size 10 and 80.
The confusion matrices obtained for all the batch sizes are presented in
Figure 7a–i. In the confusion matrices, the diagonal elements, running from the top left to the bottom right represent the number of true positive (TP) predictions for each class.
Figure 7a presents the confusion matrix for batch size 10. Specifically, it shows that 67% of items in the “banana” class, 30% in the “pepper” class, 46% in the “spinach” class, 59% in the “sugarcane” class, and 6% in the “weed” class were correctly classified.
Conversely, 33%, 70%, 54%, 41%, and 94% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown.” These are instances where the classifier could not confidently assign these objects to any specific class.
Table 1,
Table 2,
Table 3,
Table 4,
Table 5,
Table 6,
Table 7,
Table 8 and
Table 9 present the crop-specific performance of the model at different batch sizes. In these tables, the precision values span from 0 (indicating no precision) to 1 (perfect precision), while the recall values also range from 0 (no recall) to 1.0 (ideal recall). For batch size 10 (see
Table 1), among the different classes ‘banana’ exhibited the highest precision at approximately 0.884, making it the most precise class. This was followed by ‘spinach’, ‘pepper crops’, ‘sugarcane crops’, and finally ‘weeds’ with approximately 0.278 precision, ranking as the least precise. For recall, the ‘banana’ class achieved the highest recall value at approximately 0.778, making it the best recognized class. In descending order, the classes ‘sugarcane crops’, ‘spinach’, ‘pepper crops’, and ‘weeds’ followed, with ‘weeds’ having the lowest recall value at approximately 0.118. This suggests that the classifier identified fewer positive samples of ‘weeds’ compared to ‘spinach’, ‘bananas’, ‘pepper crops’, and ‘sugarcane’.
The confusion matrix obtained at batch size 20 for the multi-class classification is illustrated in
Figure 7b. Specifically, it shows that 44% of items in the “banana” class, 80% in the “pepper” class, 57% in the “spinach” class, 59% in the “sugarcane” class, and 6% in the “weed” class were correctly classified. Conversely, 56%, 20%, 43%, 41%, and 88% of objects belonging to the banana, pepper, spinach, sugarcane, and weed classes, respectively, were classified as “unknown.”
As shown in
Table 2, ‘banana’ also exhibited the highest precision at approximately 0.826, making it the most precise. This was followed by ‘pepper crops’, ‘weeds’, and ‘spinach’, in that order, with ‘sugarcane’ ranking as the least precisely detected with approximately 0.511 precision. Notably, the ‘pepper’ class achieved the highest recall, with an approximate value of 0.634. In descending order, ‘sugarcane crops’, banana’, ‘spinach’, and finally ‘weeds’, with an approximate recall value of 0.118 followed, indicating that the classifier identified fewer positive instances of ‘sugarcane’, ‘spinach’, ‘bananas’, and ‘pepper crops’ and the least positive instances of ‘weeds’.
The confusion matrix obtained at batch size 30 for the classification (see
Figure 7c) shows that 78% of items in the “banana” class, 60% in the “pepper” class, 65% in the “spinach” class, 59% in the “sugarcane” class, and 6% in the “weed” class were correctly classified. Conversely, 22%, 40%, 35%, 41%, and 94% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown.” These instances could not be confidently assigned to any specific class by the classifier.
Table 3 shows that ‘banana’ exhibited the highest precision at approximately 0.882, making it the most precise. This was followed by ‘spinach’, ‘pepper’, ‘weeds’, and finally ‘sugarcane crops’ with approximately 0.439 precision ranking as the least precise. In addition, the ‘banana’ class achieved the highest recall, with an approximate value of 0.778. In descending order, ‘spinach’, pepper’, and ‘sugarcane’ followed, with ‘weeds’ returned the lowest recall with an approximate value of 0.0588, indicating that the classifier identified few or no positive instances.
Figure 7d presents the confusion matrix obtained at batch size 40 for the crop classification. Specifically, it shows that 56% of items in the “banana” class, 50% in the “pepper” class, 65% in the “spinach” class, 51% in the “sugarcane” class, and 12% in the “weed” class were correctly classified. Conversely, 44%, 50%, 35%, 49%, and 88% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown.”
Table 4 also shows that ‘banana’ exhibited the highest precision at approximately 0.635, which was followed by ‘spinach’, ‘weeds’, ‘pepper crops’, and finally ‘sugarcane crops’ with approximately 0.304 precision ranking as the least precise. On the other hand, the ‘spinach’ class achieved the highest recall, with an approximate value of 0.595. In descending order, ‘banana’, sugarcane crops’, ‘pepper crops’, and ‘weeds’, with an approximate recall value of 0.118 followed, indicating that the classifier identified few positive instances of ‘sugarcane’, ‘spinach’, ‘bananas’, and ‘pepper crops’ and the least positive instances of ‘weeds’.
The confusion matrix obtained at batch size 50 for the classification (see
Figure 7e) shows that 56% of items in the “banana” class, 30% in the “pepper” class, 65% in the “spinach” class, 46% in the “sugarcane” class, and 12% in the “weeds” class were correctly classified. Conversely, 44%, 70%, 35%, 54%, and 88% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown.”
Of all the classes presented in
Table 5, ‘banana’ exhibited the highest precision at approximately 0.857, making it the most precise. This was followed by ‘spinach’, ‘pepper crops’, ‘sugarcane’, and finally ‘weeds’ with approximately 0.292 precision ranking as the least precise. The ‘spinach’ class also achieved the highest recall, with an approximate value of 0.703. In descending order, ‘banana’, pepper crops’, ‘sugarcane crops’, and ‘weeds’ followed, the latter with an approximate recall value of 0.176, indicating that the classifier identified few or no positive instances.
Figure 7f presents the confusion matrix obtained at batch size 60 for the multi-class classification. It shows that 67% of items in the “banana” class, 70% in the “pepper” class, 57% in the “spinach” class, 59% in the “sugarcane” class, and 12% in the “weed” class were correctly classified. Conversely, 33%, 30%, 43%, 41%, and 88% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown”.
Table 6 shows that ‘pepper’ exhibited the highest precision at approximately 0.796, making it the most precise. This was followed by ‘banana’, ‘spinach’, ‘weed’, and finally ‘sugarcane crops’ with approximately 0.306 precision ranking as the least precise. The ‘pepper crops’ class also achieved the highest recall, with an approximate value of 0.800, making it the class with the best recall. In descending order, ‘banana’, spinach’, ‘sugarcane crop’, followed, while ‘weeds’, with an approximate recall value of 0.118, yielded the lowest recall.
The confusion matrix obtained at Batch size 70 for the crop classification is illustrated in
Figure 7g, showing that 67% of items in the “banana” class, 80% in the “pepper” class, 62% in the “spinach” class, 70% in the “sugarcane” class, and 6% in the “weed” class were correctly classified. Conversely, 33%, 20%, 38%, 30%, and 94% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown”.
As shown in
Table 7, The ‘banana’ class exhibited the highest precision at approximately 0.870, making it the most precise. This was followed by ‘spinach’, ‘pepper’, ‘sugarcane crops’, and finally ‘weeds’ with approximately 0.172 precision ranking as the least precise. Notably, the ‘banana’ class also achieved the highest recall, with an approximate value of 0.745, making it the class with the best recall. In descending order, ‘sugarcane crop’, spinach’, ‘pepper crop’, and ‘weeds’ followed, the latter with an approximate recall value of 0.0588, indicating that the classifier identified fewer positive instances of ‘sugarcane’, ‘spinach’, ‘bananas’, and ‘pepper crops’ and the least positive instances of ‘weeds’.
The confusion matrix obtained at batch size 80 for the multi-crop classification (see
Figure 7h) shows that 78% of items in the “banana” class, 40% in the “pepper” class, 68% in the “spinach” class, 57% in the “sugarcane” class, and 6% in the “weeds” class were correctly classified. Conversely, 22%, 60%, 32%, 43%, and 94% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weeds class, respectively, were classified as “unknown.” In
Table 8, it can be observed that ‘banana’ exhibits the highest precision at approximately 0.717, making it the most precise. This is followed by ‘spinach’, ‘pepper’, ‘sugarcane crops’, and finally ‘weeds’ with approximately 0.211 precision ranking as the least precise. The ‘banana’ class also achieves the highest recall, with an approximate value of 0.847, followed in descending order by ‘spinach’, ‘sugarcane crops’, ‘pepper crops’, and finally ‘weeds’ with an approximate recall value of 0.0588, indicating that the classifier identified fewer positive instances of ‘sugarcane’, ‘spinach’, ‘bananas’, and ‘pepper crops’ and the least positive instances of ‘weeds’ at this batch size.
Figure 7i presents the confusion matrix obtained at batch size 90 for the multi-class classification. It shows that 78% of items in the “banana” class, 30% in the “pepper” class, 59% in the “spinach” class, 65% in the “sugarcane” class, and 6% in the “weed” class were correctly classified. Conversely, 22%, 70%, 41%, 35%, and 94% of objects belonging to the banana class, pepper class, spinach class, sugarcane class, and weed class, respectively, were classified as “unknown.” As shown in
Table 9, ‘banana’ exhibited the highest precision at approximately 0.965, followed by ‘spinach’, ‘sugarcane’, ‘weeds’, and then ‘pepper’ with approximately 0.397 precision. Likewise, the ‘banana’ class achieved the highest recall, with an approximate value of 0.778. In descending order, ‘sugarcane crops’, ‘spinach’, ‘pepper crops’, and ‘weeds’ followed, indicating that the classifier identified fewer positive instances of ‘sugarcane’, ‘spinach’, ‘bananas’, and ‘pepper crops’ and the least positive instances of ‘weeds’.