Walnut detection in mountainous and hilly regions often faces significant challenges due to obstructions, which adversely affect model performance. To address this issue, we collected a dataset comprising 2379 walnut images from these regions, with detailed annotations for both obstructed and non-obstructed walnuts. Based on this dataset, we propose OW-YOLO, a lightweight object detection model specifically designed for detecting small, obstructed walnuts. The model’s backbone was restructured with the integration of the DWR-DRB (Dilated Weighted Residual-Dilated Residual Block) module. To enhance efficiency and multi-scale feature fusion, we incorporated the HSFPN (High-Level Screening Feature Pyramid Network) and redesigned the detection head by replacing the original head with the more efficient LADH detection head while removing the head processing 32 × 32 feature maps. These improvements effectively reduced model complexity and significantly enhanced detection accuracy for obstructed walnuts. Experiments were conducted using the PyTorch framework on an NVIDIA GeForce RTX 4060 Ti GPU. The results demonstrate that OW-YOLO outperforms other models, achieving an mAP@0.5 (mean average precision) of 83.6%, mAP@[0.5:0.95] of 53.7%, and an F1 score of 77.9%. Additionally, the model’s parameter count decreased by 49.2%, weight file size was reduced by 48.1%, and computational load dropped by 37.3%, effectively mitigating the impact of obstruction on detection accuracy. These findings provide robust support for the future development of walnut agriculture and lay a solid foundation for the broader adoption of intelligent agriculture.
The growth environment of green walnuts is complex. In the actual picking and identification process, interference from near-background colors, occlusion by branches and leaves, and excessive model complexity pose higher demands on the performance of walnut detection algorithms. Therefore, a lightweight walnut detection algorithm suitable for complex environments is proposed based on YOLOv5s. First, the backbone network is reconstructed using the lightweight GhostNet network, laying the foundation for a lightweight model architecture. Next, the C3 structure in the feature fusion layer is optimized by proposing a lightweight C3 structure to enhance the model’s focus on important walnut features. Finally, the loss function is improved to address the problems of target loss and gradient adaptability during training. To further reduce model complexity, the improved algorithm undergoes pruning and knowledge distillation operations, and is then deployed and tested on small edge devices. Experimental results show that compared to the original YOLOv5s model, the improved algorithm reduces the number of parameters by 72.9% and the amount of computation by 84.1%. The mAP0.5 increased by 1.1%, the precision increased by 0.7%, the recall increased by 0.3%, and the FPS is 179.6% of the original model, meeting the real-time detection needs for walnut recognition and providing a reference for walnut harvesting identification.
The presence of non-tobacco-related materials can significantly compromise the quality of tobacco. To accurately detect non-tobacco-related materials, this study introduces a lightweight and real-time detection model derived from the YOLOv11 framework, named LRNTRM-YOLO. Initially, due to the sub-optimal accuracy in detecting diminutive non-tobacco-related materials, the model was augmented by incorporating an additional layer dedicated to enhancing the detection of small targets, thereby improving the overall accuracy. Furthermore, an attention mechanism was incorporated into the backbone network to focus on the features of the detection targets, thereby improving the detection efficacy of the model. Simultaneously, for the introduction of the SIoU loss function, the angular vector between the bounding box regressions was utilized to define the loss function, thus improving the training efficiency of the model. Following these enhancements, a channel pruning technique was employed to streamline the network, which not only reduced the parameter count but also expedited the inference process, yielding a more compact model for non-tobacco-related material detection. The experimental results on the NTRM dataset indicate that the LRNTRM-YOLO model achieved a mean average precision (mAP) of 92.9%, surpassing the baseline model by a margin of 4.8%. Additionally, there was a 68.3% reduction in the parameters and a 15.9% decrease in floating-point operations compared to the baseline model. Comparative analysis with prominent models confirmed the superiority of the proposed model in terms of its lightweight architecture, high accuracy, and real-time capabilities, thereby offering an innovative and practical solution for detecting non-tobacco-related materials in the future.
Field-scale pest monitoring requires accurate pest recognition and classification techniques. However, there are two main challenges in practical pest detection tasks. First, both intra-species morphological variation across developmental stages and inter-species size differences create challenges for models adapting to multi-scale features. Second, biological camouflage reduces target-background contrast, increasing the difficulty of model recognition. To address these issues, this paper proposes an improved pest detection model, IP-YOLOv8, based on YOLOv8s. First, a multi-scale feature fusion architecture is introduced, establishing a cross-layer feature interaction mechanism that effectively integrates shallow detailed features and deep semantic features, significantly enhancing the model’s multi-scale representation ability. Second, a dynamic detection head is designed to address the diverse morphology of pests. This head adapts the receptive field through a dynamic sampling mechanism, allowing the model to accurately capture pest features of varying scales and shapes. Finally, to tackle the issue of camouflage background confusion, an edge feature fusion module is proposed to enhance target contour information, thereby addressing the blurring of edge features caused by camouflage. Experimental results demonstrate that IP-YOLOv8 outperforms YOLOv8s on the IP102 dataset, achieving improvements of 2.2% in mAP50, 1.3% in mAP50:95, 3.1% in precision, and 1.5% in recall. This method effectively adapts to complex field pest detection tasks, providing strong technical support for precision agriculture.
Object detection models are commonly used in yield estimation processes in intelligent walnut production. The accuracy of these models in capturing walnut features largely depends on the quality of the input images. Without changing the existing image acquisition devices, this study proposes a super-resolution reconstruction module for drone-acquired walnut images, named Walnut-SR, to enhance the detailed features of walnut fruits in images, thereby improving the detection accuracy of the object detection model. In Walnut-SR, a deep feature extraction backbone network called MDAARB (multilevel depth adaptive attention residual block) is designed to capture multiscale information through multilevel channel connections. Additionally, Walnut-SR incorporates an RRDB (residual-in-residual dense block) branch, enabling the module to focus on important feature information and reconstruct images with rich details. Finally, the CBAM (convolutional block attention module) attention mechanism is integrated into the shallow feature extraction residual branch to mitigate noise in shallow features. In 2× and 4× reconstruction experiments, objective evaluation results show that the PSNR and SSIM for 2× and 4× reconstruction reached 24.66 dB and 0.8031, and 19.26 dB and 0.4991, respectively. Subjective evaluation results indicate that Walnut-SR can reconstruct images with richer detail information and clearer texture features. Comparative experimental results of the integrated Walnut-SR module show significant improvements in mAP50 and mAP50:95 for object detection models compared to detection results using the original low-resolution images.