Pleurotus ostreatus, classified under the phylum Basidiomycota, order Agaricales, and family Pleurotaceae, is a prevalent gray edible fungus. Its physical damage not only compromises quality and appearance but also significantly diminishes market value. This study proposed an enhanced method for detecting Pleurotus ostreatus damage based on an improved YOLOv8n model, aiming to advance the accessibility of damage recognition technology, enhance automation in Pleurotus cultivation, and reduce labor dependency. This approach holds critical implications for agricultural modernization and serves as a pivotal step in advancing China’s agricultural modernization, while providing valuable references for subsequent research. Utilizing a self-collected, self-organized, and self-constructed dataset, we modified the feature extraction module of the original YOLOv8n by integrating a lightweight GhostHGNetv2 backbone network. During the feature fusion stage, the original YOLOv8 components were replaced with a lightweight SlimNeck network, and an Attentional Scale Sequence Fusion (ASF) mechanism was incorporated into the feature fusion architecture, resulting in the proposed OMB-YOLO model. This model achieves a remarkable balance between parameter efficiency and detection accuracy, attaining a parameter of 2.24 M and a mAP@0.5 of 90.11% on the test set. To further optimize model lightweighting, the DepGraph method was applied for pruning the OMB-YOLO model, yielding the OMB-YOLO-tiny variant. Experimental evaluations on the damaged Pleurotus dataset demonstrate that the OMB-YOLO-tiny model outperforms mainstream models in both accuracy and inference speed while reducing parameters by nearly half. With a parameter of 1.72 M and mAP@0.5 of 90.14%, the OMB-YOLO-tiny model emerges as an optimal solution for detecting Pleurotus ostreatus damage. These results validate its efficacy and practical applicability in agricultural quality control systems.
To address the low efficiency of manual quality grading for Pleurotus ostreatus in factory-scale production and the difficulty existing computer vision models face in balancing high localization accuracy with real-time edge deployment for food processing, a lightweight non-destructive detection model named POC-DETR-Prune is proposed. Based on an improved RTDETR framework, FasterNet is introduced to optimize feature extraction, reducing memory access latency while ensuring deep feature representation for complex food morphologies. A Small Object Enhancement Pyramid (SOEP) module is designed to mitigate the loss of subtle features caused by dense mushroom clustering. Furthermore, the Inner-MPDIoU loss function is proposed to significantly improve bounding box localization accuracy in highly overlapped food sorting scenarios. To adapt to industrial hardware constraints, a Random channel pruning strategy compresses computational overhead. Experimental results demonstrate that POC-DETR-Prune achieves a mAP@0.5:0.95 of 83.7% with a computation load of only 38.2 GFLOPs. Deployment testing on the NVIDIA Jetson Orin Nano Super edge computing platform achieves a real-time detection rate of 30.2 FPS. This emerging technology provides a certain level of visual algorithm support for automated quality grading equipment in the edible fungi industry.