Abstract:Accurate detection of quantity and distribution information of fallen fruits after disasters is of great significance for the rapid assessment of agricultural fruit insurance. In view of the unstructured orchard environment, the aerial images obtained by the UAV showed that the pear fruit target was small, the color was similar to the fruit leaves, and it was easy to be blocked by ground debris, thus a detection method was proposed based on improved YOLO v12 model. Building on the YOLO v12 model, a coordinate attention (CA) attention module was embedded in the feature extraction layer to enhance the model’s capability to extract features of small-scale fallen fruit targets. A bidirectional weighted feature pyramid (BiFPN) structure was employed in the neck network to optimize the representation ability of low-layer high-resolution features for small targets through cross-scale feature bidirectional fusion and adaptive weight distribution, alleviating the problem of missed detection of pear fruits due to insufficient resolution. Finally, the ShapeIoU loss function was introduced to dynamically adjust feature weights, improving the boundary regression accuracy for irregularly shaped fallen fragrant pear fruit. Experimental results showed that the improved YOLO v12 achieved an mean average precision (mAP@0.5), precision and recall rates of 94.9%, 88.8% and 87.6% respectively on the fallen fragrant pear dataset, outperforming that of YOLO v7-tiny, YOLO v8n, YOLO v9s, YOLOv 10n, YOLO 11n and YOLO v12n models. The research result demonstrated that the improved YOLO v12 model exhibited superior detection performance for hail-damaged fallen fragrant pears, accurately identifying dense, small-sized, and partially occluded fallen fruit targets in complex orchard environment, providing technical support for disaster loss assessment of fragrant pears in complicated settings.