Nighttime pineapple detection for automated harvesting robots is a significant challenge in intelligent agriculture. As a crucial component of robotic vision systems, accurate fruit detection is essential for round-the-clock operations. The study compared advanced end-to-end style transfer models, including U-GAT-IT, SCTNet, and CycleGAN, finding that CycleGAN produced relatively good-quality images but had issues such as the inadequate restoration of nighttime details, color distortion, and artifacts. Therefore, this study further proposed an enhanced CycleGAN approach to address limited nighttime datasets and poor visibility, combining style transfer with small-sample object detection. The improved model features a novel generator structure with ResNeXtBlocks, an optimized upsampling module, and a hyperparameter optimization strategy. This approach achieves a 29.7% reduction in FID score compared to the original CycleGAN. When applied to YOLOv7-based detection, this method significantly outperforms existing approaches, improving precision, recall, average precision, and F1 score by 13.34%, 45.11%, 56.52%, and 30.52%, respectively. These results demonstrate the effectiveness of our enhanced CycleGAN in expanding limited nighttime datasets and supporting efficient automated harvesting in low-light conditions, contributing to the development of more versatile agricultural robots capable of continuous operation.
Estimating grape yields in viticulture is hindered by persistent challenges, including strong occlusion between grapes, irregular cluster morphologies, and fluctuating illumination throughout the growing season. This study introduces YOLOv11-IMP, an improved multiscale anchor-free detection framework extending YOLOv11, tailored to vineyard environments. Its architecture comprises five specialized components: (i) a viticulture-oriented backbone employing cross-stage partial fusion with depthwise convolutions for enriched feature extraction, (ii) a bifurcated neck enhanced by large-kernel attention to expand the receptive field coverage, (iii) a scale-adaptive anchor-free detection head for robust multiscale localization, (iv) a cross-modal processing module integrating visual features with auxiliary textual descriptors to enable fine-grained cluster-level yield estimation, and (v) aross multiple scales. This work evaluated YOLOv11-IMP on five grape varieties collecten augmented spatial pyramid pooling module that aggregates contextual information acd under diverse environmental conditions. The framework achieved 94.3% precision and 93.5% recall for cluster detection, with a mean absolute error (MAE) of 0.46 kg per vine. The robustness tests found less than 3.4% variation in accuracy across lighting and weather conditions. These results demonstrate that YOLOv11-IMP can deliver high-fidelity, real-time yield data, supporting decision-making for precision viticulture and sustainable agricultural management.