arXiv:2608.28070cs.CVAug 2026

Manuscript Offprint

arXiv:2608.28070

CF-YOLO: Context-Aware Feature Refinement for Camouflaged Industrial Micro-Defect Detection

Xinda Yu, Kunxin Zheng, Chunan Yu, Qingbo Song, Hao Xiao, Ying Zang, Jie Liu

Xinda Yu 1^{1}, Kunxin Zheng 1^{1}, Chunan Yu 2^{2}, Qingbo Song 1^{1}, Hao Xiao 1^{1}, Ying Zang 1^{1} and Jie Liu 1∗^{1*}

1^{1}School of Information Engineering, Huzhou University, Huzhou, 313000, China.

2^{2}School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing, 210000, China.

*Corresponding author: Jie Liu, E-mail: liujie52@zjhu.edu.cn; Contributing authors: Xinda Yu, E-mail: 2025388032@stu.zjhu.edu.cn; Kunxin Zheng, E-mail: 2024092411@stu.zjhu.edu.cn; Chunan Yu, E-mail: yuchun_an@njust.edu.cn; Qingbo Song, E-mail: 2025388020@stu.zjhu.edu.cn; Hao Xiao, E-mail: xiaohao@zjhu.edu.cn; Ying Zang, E-mail: 02750@zjhu.edu.cn;

Abstract

Automated detection of surface micro-defects on industrial components, such as copper tubes, is critically important for quality assurance but remains challenging due to the minute scale of anomalies and their visual camouflage against complex backgrounds. These factors lead to weak feature representations and high rates of false positives and missed detections. To address these issues, we propose a novel real-time detection framework designed for efficient context perception and feature refinement. Our method integrates a Context-Perception Aggregation Module (CPAM), which synergises large-kernel perception for macro-texture context and small-kernel aggregation for sharp boundary delineation, effectively breaking the background camouflage. Furthermore, a Feature Additive Refinement Module (FARM) employs a linear-complexity additive token mixer to globally verify and refine the representation of fine-grained anomalies, suppressing noise-induced errors. To support research in this domain, we introduce the Copper Tube Defect Dataset (CTDD), a manually annotated benchmark containing 1,847 images and 4,898 bounding-box defect instances from copper-tube inspection scenarios. Extensive experiments demonstrate that our detector achieves strong and consistent performance on CTDD, outperforming representative baseline detectors, including YOLOv11, by 2.2% in mAP@50 and 3.9% in Precision while maintaining real-time inference speed. This work provides a robust and efficient solution for high-precision industrial inspection, bridging the gap between contextual understanding and detailed feature analysis. Our code and model are available at: https://github.com/Yu-Xinda/CF-YOLO-Context-Aware-Feature-Refinement-for-Camouflaged-Industrial-Micro-Defect-Detection

Keywords: Object Detection; Industrial Defect Detection; Feature Refinement; Micro-Defect Detection; Context-Aware Feature Aggregation; Copper Tube Defect Dataset

CF-YOLO

1 Introduction

In the era of Industry 4.0, intelligent manufacturing has become a cornerstone for enhancing production efficiency and product quality [1–5]. As a critical component in refrigeration, plumbing, and heat exchange systems, the surface integrity of copper tubes directly dictates the sealing performance and operational safety of the final equipment. Consequently, the transition from labor-intensive manual inspection to automated defect detection is not merely an option but an imperative necessity for the industry [6]. However, despite rapid advancements in computer vision, establishing a high-precision, real-time detection system for industrial micro-defects remains a formidable task, presenting complexities that far exceed those encountered in generic object detection scenarios [7–9].

The primary obstacles hindering effective detection in this domain are twofold: micro-scale targets and background camouflage, as shown in Fig. 1. First, the defects typically appear as faint, fine-grained scratches that occupy a negligible proportion of image pixels, leading to weak feature representations that are easily lost during network downsampling [10, 11]. Secondly, and more critically, these defects often exhibit visual patterns—such as color and texture—that are highly homologous to the copper substrate. This “camouflaged” nature makes it exceptionally difficult to distinguish genuine anomalies from complex background textures or surface oxidation noise, resulting in a high rate of both missed detections and false positives [12, 13]. Moreover, environmental variation and complex region-dependent textures further increase feature ambiguity in industrial inspection scenes [14, 15].

Figure

Fig. 1 Visualization of challenging defects with severe background camouflage. The anomalies are nearly indistinguishable due to highly similar textures with the background. Their locations are indicated by red bounding boxes.

To address these issues, various effective deep learning paradigms and advanced model architectures have been proposed [16–19]. Specifically, mainstream approaches typically employ Convolutional Neural Networks (CNNs) or Vision Transformers (ViTs) [20]. Recent detectors such as the YOLO series utilize sophisticated blocks for efficiency, relying on the stacking of compact convolutional layers to extract fine-grained patterns. These mechanisms suffer from a restricted receptive field, limiting their ability to perceive the broader contextual consistency required to identify camouflaged defects [21]. Conversely, while ViTs offer global context via self-attention [20], their quadratic computational complexity renders them unsuitable for real-time industrial deployment [22]. Furthermore, the attention mechanism tends to smooth out high-frequency details, which is detrimental to preserving the sharp edges of micro-defects [23]. Recent studies have shown that structure-aware feature interaction and fine-grained representation learning are crucial for capturing subtle visual discrepancies in complex scenes [24, 25]. Thus, a solution that balances global context perception, local detail preservation, and inference speed is urgently needed [26].

In this paper, we propose CF-YOLO, which stands for Context-perception and Feature-refinement YOLO. Additionally, the acronym "CF" implicitly embodies the "Coarse-to-Fine" detection philosophy integrated into our architecture, which synergizes the strengths of large-kernel convolutions and additive attention. First, to tackle the "background camouflage" issue, we introduce the Context-Perception Aggregation Module (CPAM). By decoupling feature processing into large-kernel contextual perception and small-kernel dynamic aggregation, CPAM effectively models the macro-texture of the copper surface, enabling the network to differentiate anomalies from the background. Second, to address the "micro-scale" issues, we design the Feature Additive Refinement Module (FARM) following the spatial attention stage. Adopting a linear-complexity additive token mixer, FARM integrates spatial details with channel-wise semantic attributes. This allows for global semantic verification of candidate features, effectively refining representations to distinguish true defects from intricate surface noise.

Beyond algorithmic improvements, the lack of high-quality, publicly available datasets for copper tube defects significantly hinders research progress in this community. To bridge this gap, we construct and release a comprehensive dataset named the Copper Tube Defect Dataset (CTDD). CTDD contains 1,847 copper-tube images and 4,898 single-class bounding-box defect annotations collected under industrial lighting conditions. Recent studies have highlighted the importance of transparent datasets and reproducible evaluation in visual-computing research [27, 28]. CTDD therefore provides a standardized benchmark for industrial defect detection. The release of CTDD not only serves as a rigorous benchmark for evaluating our proposed method but also provides a valuable resource for data augmentation and future research in the field of industrial surface inspection. The main contributions of this work are summarized as follows:

• We propose a real-time detector tailored for industrial micro-defect detection, achieving an explicit accuracy-efficiency trade-off.

• We design two task-adapted modules: CPAM for context-guided local aggregation and FARM for high-level feature refinement.

• We contribute CTDD, an annotated copper tube defect detection benchmark with 1,847 images and 4,898 defect instances.

References (54)