Abstract:To address the challenges in industrial parts detection, including background interference caused by insufficient contextual information, limited fine-grained recognition due to the loss of high-frequency details, weak adaptability to dynamic poses, and difficulty in balancing accuracy and efficiency, this study proposes CHD-YOLO11, an enhanced high-precision industrial parts detection algorithm based on YOLO11. First, a context-guided mechanism is introduced to improve the conventional downsampling structured by employing the context-guided block down (CGBD) module to achieve the fusion of local, contextual, and global semantics, thus enhancing discrimination in complex backgrounds. Second, a high-frequency enhancement residual block (Hfer Block) is designed and embedded into the C3k2 module, explicitly modeling edge and texture features at the 1–5 pixel scale through multi-path convolution, reinforcing fine-grained recognition. Third, a novel detection head, DyHead_DCNv4, is developed by integrating DCNv4 deformable convolution with multi-dimensional attention mechanisms, enabling dynamic adaptation to multi-pose and multi-scale parts. Furthermore, an EMASlideLoss loss function is proposed, combining exponential moving average and sliding-window weighting strategies to improve hard sample mining and boundary localization accuracy. Experiments are conducted on a self-constructed industrial parts dataset collected using the Astra Pro Plus depth camera. The experimental results show that, with parameters increasing from 2.58M to 2.89M, CHD-YOLO11 improves mAP@0.5 from 85.37% to 88.36% and mAP@0.5:0.95 from 69.58% to 74.53%, representing increases of approximately 3.0 and 4.95 percentage points compared with the original YOLO11, respectively, and outperforming common single-stage and two-stage baseline models. Furthermore, generalization experiments on public datasets including MVTec-Industrial and NEU-DET further demonstrate that the proposed algorithm has excellent cross-domain adaptability and robustness. Experimental results show that CHD-YOLO11 achieves a good balance among detection accuracy, model complexity, and inference efficiency, and its high accuracy and inference speed of 315.28 f/s make it highly suitable for real-time detection in industrial automation scenarios.