Vision-based quantitative assessment of strawberry ripeness using a detail-aware perception transformer in complex agricultural environments
摘要
Accurate and objective measurement of strawberry ripeness is essential for ensuring postharvest quality, nutritional value, and timely harvesting in modern agriculture. However, existing detection methods show limited capability in real agricultural environments, often constrained by fruit morphology, scale variation, complex backgrounds, and continuous changes in appearance during maturation. To address these challenges, this study defines strawberry ripeness detection as a detail-aware perception task (DAPT) and proposes an end-to-end framework, DAPT-DETR. In this task, the detector is required not only to localize strawberry instances but also to capture subtle appearance differences associated with ripeness, rather than merely determining object presence and location. The framework employs a multi-path feature fusion structure to improve recognition of fruits with subtle ripeness differences or occlusion by leaves, an adaptive small-fruit feature fusion method to enhance the detection of small and densely distributed fruits, and an efficient attention mechanism to achieve robust global feature modeling under complex field conditions. In addition, a hybrid shape-aware loss function based on a two-dimensional Gaussian elliptical distribution is developed to better capture fruit morphology and reduce background interference. A large-scale, cross-scene strawberry ripeness dataset, consisting of 7,700 images and 85,601 annotated instances collected from greenhouses, plastic tunnels, open-field soil cultivation, and hanging cultivation systems under diverse climatic and management conditions, is constructed to evaluate the proposed method. Strawberry ripeness is categorized into three levels (unripe, turning, and fully ripe) according to the proportion of red surface coverage on the fruit. Experimental results show that DAPT-DETR achieves an AP of 80.6% and an APS of 56.1%, surpassing mainstream detection algorithms while maintaining relatively low computational complexity. Overall, the proposed approach provides a non-destructive, quantitative tool for strawberry ripeness assessment in complex agricultural environments, offering reliable support for automated grading systems and contributing to consistency and quality in fruit production and supply chains.
Graphical abstract