# Automated Visual Identification of Foliage Chlorosis in Lettuce Grown in Aquaponic Systems
## 4 Results and Discussion
The (\(d_{1}\)) and (\(d_{2}\)) were determined for all 120 images in the validation dataset using Equations (17) and (18), respectively. The quality indicator, (\(Q\)), was also determined using Equation (19) for 120 images. The performance of the model on the validation dataset was then evaluated by analyzing the ground truth (\(Q\)) value and predicted (\(Q\)) value. In the validation dataset, 60 images have a ground truth (\(Q\)) value of 1, meaning these images contain healthy and green lettuce foliage, and 60 images have a ground truth value of 0, meaning these Images contain unhealthy and yellow lettuce foliage. The performance is presented in the form of a confusion matrix (CM), shown in Figure 8 [2]. The different values of the CM are interpreted as:  
* True Positive (TP) = 58. Thus, 58 plants were healthy, and the model correctly classified them healthy as well. * True Negative (TN) = 57. Thus, 57 plants were unhealthy, and the model correctly classified them unhealthy as well. * False Positive (FP) = 3. Thus, 3 plants were unhealthy, but the model incorrectly classified them as healthy. * False Negative (FN) = 2. Thus, 2 plants were healthy, but the model incorrectly classified them as unhealthy. Figure 6: Example of images generated in Adobe Photoshop (left original images, right for the altered images). Figure 8: Confusion Matrix. Figure 7: Example of segmented images ((**a**,**c**): segmented green lettuce; (**b**,**d**): segmented altered yellowed lettuce). The performance metrics based on CM are also computed using the formulae given below and are summarized in Table 1.  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN} \tag{29}\]  
\[Precision=\frac{TP}{TP+FP} \tag{30}\]  
\[Recall=\frac{TP}{TP+FN} \tag{31}\]  
\[F1-Score=\frac{2\times Precision\times Recall}{Precision+Recall} \tag{32}\]  
In Table 1, N (truth) tells the number of actual cases in a particular class, and N (classified) tells the number of predicted cases belonging to a class. Table 1 shows that the model has achieved an average accuracy of 95%, precision of 96%, recall of 96%, and F1-Score of 96%. The model has correctly classified 115 cases out of a total of 120 cases. Figure 9 shows an example of correctly classified cases. To further investigate the performance of the proposed methodology, it was compared with the existing vision-based methods mentioned in Section 2. These methods were implemented on the dataset prepared in this study, and their performance was evaluated using the metrics based on CM, which are presented in \[y_{ref}=[\overline{x}_{R,l},\overline{x}_{G,\ l},\overline{x}_{B,l}]=[156.6, \ 155.8,\ 22.2] \tag{28}\]0 The results show that the proposed method has outperformed the similar existing methods, achieving an average accuracy of 96%, precision, recall, and F1-score of 96%. The method proposed by [PERSON] et al. has shown appreciable performance when implemented on the dataset prepared in this study by achieving an average accuracy of 94%, a precision of 94%, a recall of 95%, and an F1-score of 94.45% [25]. Whereas, with their apple leaf dataset, they have achieved an accuracy of 98.63%. The final model was then deployed in the aquaporics facility through a cloud-based application. This time, instead of manually taking the images, four ELP 1080P webcams (2.8-12 mm HD Varifocal Lens) were installed at a distance of 40 cm from the channels for image acquisition. Each camera is programmed through a Raspberry Pi 4 (Model B Rev 1) controller to take one image per day at 9:00 am, which along with the sensor values from WSM, are wirelessly uploaded to the 'IoT enabled Aquaporics Dashboard' developed by the authors in previous work [26]. The images and sensor data are available on the cloud as well as locally, and the app developed in this study can access them. The ontology model discussed in Section 3.4 was also integrated with the proposed model and deployed on a cloud-based application.