Cross-level attention and lightweight feature extraction for improved tomato ripeness detection in complex greenhouse environments
Abstract
Misclassification of tomato ripeness in greenhouses can lead to premature harvesting, spoilage due to overripeness, and incorrect or missed picks during automated harvesting. However, the color similarity between unripe fruits and leaves, low-contrast changes between adjacent ripeness stages, occlusion by branches and leaves, and the attenuation of small-scale target features make it difficult for existing detection models to simultaneously maintain both ripeness classification accuracy and cross-scenario stability. To address these issues, this paper proposes YOLO26-CUH, an enhanced tomato ripeness detection model based on YOLO26n. This model employs the C2PSA-CC module to jointly model spatial positions and ripeness-related channel responses, thereby suppressing interference from complex backgrounds; it utilizes the C3k2-UIB module to enhance the extraction efficiency of fruit edges, local coloration, and surface textures; further designs the HV-LCA cross-layer feature interaction module to enable selective fusion of shallow-layer spatial details with deep-layer semantic information. This paper constructed a dataset comprising 5, 296 Provence tomato images, classifying the fruits into three maturity levels: unripe, color-changing, and ripe, and employed a separate cherry tomato dataset—which was not used in model training or parameter tuning—for independent external validation. On the Provence tomato test set, YOLO26-CUH achieved precision, recall, [email protected], and [email protected] of 0.917, 0.896, 0.946, and 0.897, respectively. Compared to the original YOLO26n, these four metrics improved by 6.7, 5.1, 1.9, and 1.9 percentage points, respectively, while the number of model parameters increased only from 2, 375, 421 to 2, 380, 194, and the inference speed reached 93.9 FPS. On the cherry tomato dataset, YOLO26-CUH’s [email protected] and [email protected] reached 0.808 and 0.656, respectively, representing improvements of 5.3 and 4.1 percentage points over the baseline, with a recall increase of 8.4 percentage points. Luminance perturbation and ablation experiments further demonstrate that this model can enhance the expression of maturity-related features, preserve local details, and reduce missed detections of low-contrast and occluded targets. With the parameter scale remaining largely unchanged, it improves detection accuracy, robustness to luminance perturbations, and generalization performance under an independent cross-domain setting, providing real-time visual support for greenhouse tomato grading and selective harvesting.
Related
- LeafXNet: A Lightweight Explainable Model With Integrated Attention Mechanism for Fruit Leaf Disease Detection
- LT-YO-AN: lightweight YOLOv12 with asymmetric neck for apple fruitlet detection in complex orchard environments
- ISD-YOLO: A lightweight and efficient feature extraction network for invoice seal detection
- Lightweight YOLOv8n marigold corolla detection and picking-point localization method based on ECR progressive channel compression and dual attention mechanisms
- HECA-MobileNet: an explainable lightweight attention-based deep learning framework for custard apple disease detection
BibTeX
@article{cui2026crosslevel,
title = {{Cross-level attention and lightweight feature extraction for improved tomato ripeness detection in complex greenhouse environments}},
author = {Xiao Cui and Jisheng Liu and Yujin Guo and Jiayi Li and Enyu He and Kaijie Yang and Fuzhong Li},
journal = {Frontiers in Plant Science},
year = {2026},
month = oct,
doi = {10.3389/fpls.2026.1974752},
url = {https://www.frontiersin.org/articles/10.3389/fpls.2026.1974752},
note = {CC BY 4.0},
}
RIS
TY - JOUR
TI - Cross-level attention and lightweight feature extraction for improved tomato ripeness detection in complex greenhouse environments
AU - Xiao Cui
AU - Jisheng Liu
AU - Yujin Guo
AU - Jiayi Li
AU - Enyu He
AU - Kaijie Yang
AU - Fuzhong Li
PY - 2026
DA - 2026/10/30
JO - Frontiers in Plant Science
DO - 10.3389/fpls.2026.1974752
UR - https://www.frontiersin.org/articles/10.3389/fpls.2026.1974752
AB - Misclassification of tomato ripeness in greenhouses can lead to premature harvesting, spoilage due to overripeness, and incorrect or missed picks during automated harvesting. However, the color similarity between unripe fruits and leaves, low-contrast changes between adjacent ripeness stages, occlusion by branches and leaves, and the attenuation of small-scale target features make it difficult for existing detection models to simultaneously maintain both ripeness classification accuracy and cross-scenario stability. To address these issues, this paper proposes YOLO26-CUH, an enhanced tomato ripeness detection model based on YOLO26n. This model employs the C2PSA-CC module to jointly model spatial positions and ripeness-related channel responses, thereby suppressing interference from complex backgrounds; it utilizes the C3k2-UIB module to enhance the extraction efficiency of fruit edges, local coloration, and surface textures; further designs the HV-LCA cross-layer feature interaction module to enable selective fusion of shallow-layer spatial details with deep-layer semantic information. This paper constructed a dataset comprising 5, 296 Provence tomato images, classifying the fruits into three maturity levels: unripe, color-changing, and ripe, and employed a separate cherry tomato dataset—which was not used in model training or parameter tuning—for independent external validation. On the Provence tomato test set, YOLO26-CUH achieved precision, recall, [email protected], and [email protected] of 0.917, 0.896, 0.946, and 0.897, respectively. Compared to the original YOLO26n, these four metrics improved by 6.7, 5.1, 1.9, and 1.9 percentage points, respectively, while the number of model parameters increased only from 2, 375, 421 to 2, 380, 194, and the inference speed reached 93.9 FPS. On the cherry tomato dataset, YOLO26-CUH’s [email protected] and [email protected] reached 0.808 and 0.656, respectively, representing improvements of 5.3 and 4.1 percentage points over the baseline, with a recall increase of 8.4 percentage points. Luminance perturbation and ablation experiments further demonstrate that this model can enhance the expression of maturity-related features, preserve local details, and reduce missed detections of low-contrast and occluded targets. With the parameter scale remaining largely unchanged, it improves detection accuracy, robustness to luminance perturbations, and generalization performance under an independent cross-domain setting, providing real-time visual support for greenhouse tomato grading and selective harvesting.
SN - 1664-462X
ER -