## 4 Applications of GenAI-Driven CV in Smart Agriculture
### Agricultural Product Quality Control and Food Safety
Similarly, for predicting postharvest decay in apples, a Pix2 PixHD model was used to generate synthetic VNIR images from RGB images with high fidelity (Structural Similarity Index Measure, SSIM = 0.972). A subsequent Mask R-CNN model trained on these images effectively segmented fungal and decay zones with an F1-score of up to 94.8% [266]. In the context of industrial production, StyleGAN2 was employed to address class imbalance in candy defect detection. By augmenting the dataset with synthetic defective candy images, an improved YOLOv7 model's recognition accuracy increased by 3.0% and its recall rate by 3.7% [267], demonstrating the practical benefits of generative augmentation in real-time detection scenarios. Real-Time Quality Assessment in Commercial Applications.Real-time quality assessment has been increasingly deployed in commercial grading lines, facilitated by lightweight object detection algorithms like improved YOLOv5 and YOLOv10 [268; 269]. These networks are often embedded in automated grader systems or mobile applications, enabling on-the-spot quality evaluations. For example, a mobile food grading system combining YOLO and SVMs demonstrated high performance in detecting various food defects [270], while a CNN framework integrated into a smartphone has been developed for the rapid assessment of Zanthoxylum fruit quality [155]. Spectral Sensor Fusion and Electronic Sensing Technologies.Beyond visual defect detection, research has focused on spectral sensor fusion and electronic sensing technologies. Colourimetric sensor arrays, often embedded in low-cost electronic noses, have been used for tasks like detecting pork adulteration in beef [271], tracing the geographical origin of edible bird's nests [272], and discriminating rice varieties [273]. When combined with CV models, these sensors extend inspection capabilities to chemical contamination and authenticity verification. Portable Vis/NIR systems integrated with CNNs have enabled the non-destructive detection of the watercore degree in apples [274]. Quality Authentication through Multi-Source Data Integration.The authentication of quality in fruits like citrus has benefited significantly from non-destructive sensing approaches that are based on data fusion. By integrating hyperspectral images, RGB texture features, and spectroscopic sensors, studies have achieved superior prediction of Brix values, acidity, and phenolic content [275]. Models like FastSegFormer have demonstrated how deep learning can balance computational efficiency and accuracy in real-time processing, as seen in surface defect detection in naval oranges [276]. Industrial Applications and Food Packaging Innovations.In industrial settings, real-time visual inspection systems for grading fruits and vegetables are becoming commonplace. These systems combine high-resolution imaging with CNNs for defect classification, achieving scalable performance with minimal human intervention [18; 277]. One system grades mangoes by detecting colour, shape, and texture inconsistencies using deep grading networks [20]. Traditional CV methods using monochrome imaging are still explored for their simplicity and interpretability [278]. CV has also been applied to food packaging and spoilage monitoring. Smart packaging films embedded with pH-sensitive dyes can detect spoilage in real time [279]. Electrochemical aptasensors and biosensors are used for detecting pesticide residues and microbial contaminants, such as acetamiprid detection using impedimetric sensors [280] and Fusarium spore detection with attention-residual networks [281]. _Enhancing Transparency with Explainable AI._ To improve interpretability and model transparency, XAI is being integrated into classification frameworks. Visual saliency maps and feature importance scores have been used to demystify CV models in tasks like carambola fruit classification [282]. Robust defect detection in noisy environments remains a challenge, but bilayer inspection methods and fusion techniques have shown promise.