Abstract Accurate litchi ( Litchi chinensis Sonn.) maturity detection in natural environments remains challenging due to complex illumination, occlusions, and fruit clustering. Existing methods struggle with degraded image quality and difficulty in capturing discriminative features during the critical red–green transition phase. To address these limitations, this study proposes an improved YOLOv5 model (where YOLO is You Only Look Once), termed PEANet‐YOLOv5‐D. The core innovations include a dedicated color enhancement module and a cooperative attention mechanism (PEANet), alongside the adoption of the Distance Intersection over Union loss function. When handling complex scenarios, the proposed model shows superior performance compared to several representative state‐of‐the‐art detection models and attention mechanisms in our comparative study. Evaluated on a self‐built, multi‐stage dataset of 4730 images capturing four distinct maturity levels under diverse orchard conditions, PEANet‐YOLOv5‐D achieves a mean average precision (mAP) of 87.5%, surpassing the baseline YOLOv5 by 2.2 percentage points. Notably, for highly challenging fruits in the red–green stage, the detection accuracy is markedly improved by 5.5 percentage points. Feature activation heatmap analysis further confirms that the model exhibits a broader perceptual range and stronger resilience to environmental interference. While maintaining low computational costs (7.07 million parameters, 8.52 G floating point operations), the model achieves superior accuracy, outperforming several representative models, including the baseline YOLOv5, YOLOv7‐x, and YOLOv8‐s, by 2.2%, 1.8%, and 2.5% in mAP, respectively. Experiments demonstrate that the proposed model effectively enhances the robustness of litchi maturity detection in complex natural environments, showing significant application potential for high‐precision and efficient automated orchard sorting and intelligent harvesting.
Lin et al. (Fri,) studied this question.