Source-linked AI summary

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

arXiv:2608.28070v1cs.CV

TL;DR

Industrial micro-defect detection is difficult because tiny anomalies have weak representations and resemble complex backgrounds, causing missed detections and false positives. CF-YOLO combines context perception and feature refinement with the CTDD benchmark, achieving the best reported CTDD AP50, Precision, and F1-score while maintaining real-time GPU inference. External validation is preliminary rather than evidence of universal generalization, and edge deployment may remain constrained.

  • Problem

    Copper-tube micro-defects are difficult to detect accurately because their minute scale and visual camouflage weaken representations and increase missed detections and false positives.

  • Method

    CF-YOLO combines CPAM for contextual aggregation, FARM for global semantic feature refinement, and the manually annotated CTDD benchmark for copper-tube defect detection.

  • Results

    CF-YOLO achieves the best AP50, Precision, and F1-score among evaluated methods on CTDD while maintaining real-time inference speed on an RTX 3090.

  • Takeaways & Limitations

    The framework provides a specialized real-time solution for high-precision copper-tube inspection and a benchmark for evaluating future industrial defect detectors.

  • Takeaways & Limitations

    External validation on NEU-DET is preliminary because AP50, F1-score, and Recall improve while AP50-95 and Precision are slightly lower than YOLOv11n.

Abstract

from arXiv · show

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 boundingbox 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/CFYOLO-Context-Aware-Feature-Refinement-for-Camouflaged-Industrial-Micro-Defect-Detection

1 Introduction

Industrial copper-tube micro-defect detection must be accurate and real-time, but tiny, low-contrast anomalies are easily lost and visually camouflaged by substrate textures. CF-YOLO addresses these challenges with context perception, feature refinement, and the CTDD benchmark.

  • Automated copper-tube inspection is important because surface integrity affects the sealing performance and operational safety of refrigeration, plumbing, and heat-exchange equipment.
  • Micro-scale defects occupy few pixels and may disappear during downsampling, weakening their feature representations.
  • Visual similarity between defects and copper substrates makes anomalies difficult to distinguish from background textures or oxidation noise, producing missed detections and false positives.
  • CF-YOLO introduces CPAM, combining large-kernel contextual perception with small-kernel dynamic aggregation to model macro-texture and separate anomalies from the background.
  • FARM uses a linear-complexity additive token mixer for global semantic verification, refining candidate features to distinguish true defects from surface noise.
  • CTDD provides a standardized copper-tube benchmark with 1,847 images and 4,898 single-class bounding-box defect annotations collected under industrial lighting conditions.

2 Related work

Related work spans classical image-processing methods, deep CNN and transformer detectors, efficient context modeling, and data-augmentation approaches. These methods target texture preservation, small-object detection, efficiency, robustness, or data scarcity.

  • Two-stage detectors such as Faster R-CNN and Cascade R-CNN emphasize accuracy and robustness but incur slower inference or greater training and computational demands.
  • One-stage detectors prioritize speed, while SSD and RetinaNet address multi-scale detection and class imbalance with different accuracy trade-offs.
  • Recent YOLO variants adapt one-stage detection to harsh industrial or dynamic environments through specialized blocks and geometric constraints.
  • Traditional surface-defect methods use hand-crafted features, edge detection, thresholding, Fourier reconstruction, low-rank models, or contour registration, but rely heavily on manual design.
  • Deep-learning approaches preserve texture, improve small-object feature fusion, or combine lightweight vision transformers with decoupled heads for classification and regression.
  • Efficient context modeling uses large-kernel attention or lightweight additive attention, while GANs and global-context augmentation address data scarcity through synthetic data generation.

3 Proposed Method

CF-YOLO formulates micro-defect detection as supervised dense prediction and combines context-aware feature extraction, feature refinement, and decoupled detection. CPAM captures macro-texture and aggregates local features, while FARM performs global semantic refinement before multi-scale prediction and suppression.

  • Preliminaries and Problem Formulation: CF-YOLO maps input images to multi-scale feature pyramids for localizing and classifying industrial-surface anomalies.The pyramid uses stride-8, stride-16, and stride-32 features to balance fine spatial cues with contextual reasoning.
  • Context-Perception Aggregation Module: CPAM decouples processing into Large-Kernel Perception and Small-Kernel Aggregation to model background context and refine local features.Large-kernel depth-wise convolution captures macro-texture, while dynamic kernels aggregate local neighborhoods.
  • Context-Perception Aggregation Module: By coupling large-field perception with local aggregation, CPAM delineates defect boundaries from complex backgrounds.The aggregation uses group-wise dynamic convolution guided by a context-derived weight tensor.
  • Feature Additive Refinement Module: FARM addresses insufficient small-target feature capture through linear-complexity global verification using projected Query, Key, and Value features.Its Convolutional Additive Token Mixer integrates spatial and channel interactions and uses additive similarity instead of matrix multiplication.
  • Decoupled Detection Head: The decoupled detection head separates classification and regression into parallel streams with task-specific convolutions.Classification uses depth-wise followed by 1 × 1 convolution, whereas regression uses standard 3 × 3 followed by 1 × 1 convolution.
  • Detection and Optimization: Predictions from P3, P4, and P5 are decoded, consolidated with NMS, and jointly optimized using regression, classification, and distribution focal losses.NMS suppresses overlapping boxes above an IoU threshold, while the total loss balances its components with λbox, λcls, and λdfl.

4 Experimental Results

The experimental setup introduces CTDD and evaluates detection with multiple complementary metrics, emphasizing localization, classification, reliability, and box-level alignment.

  • Dataset: CTDD contains 1,847 high-resolution images and 4,898 single-class defect instances captured under diverse industrial lighting conditions.
  • Evaluation Metrics: The evaluation protocol measures Precision, F1-score, Average Precision, and mean Intersection over Union.
  • Evaluation Metrics: mAP is reported as AP50, averaging per-class Average Precision at an IoU threshold of 0.5.
  • Evaluation Metrics: F0.5 weights Precision more heavily, reflecting the importance of controlling false alarms in industrial inspection.
  • Evaluation Metrics: A high F1-score indicates a trade-off between minimizing missed detections and reducing false alarms.
  • Evaluation Metrics: mIoU evaluates spatial alignment between predicted and ground-truth bounding boxes rather than pixel-level mask overlap.

4.4 Comparison with Evaluated Detection Methods

The study compares CF-YOLO with established CNN-based, one-stage, anchor-free, and recent detection architectures under a broad benchmark design.

  • Established CNN-based Baselines: The comparison benchmarks two-stage detectors including Faster R-CNN, Cascade R-CNN, and Dynamic R-CNN.
  • Established CNN-based Baselines: The benchmark also includes one-stage or anchor-free detectors such as RetinaNet, ATSS, CenterNet, and FoveaNet.
  • Recent Architectures: Recent architectures in the comparison include YOLOv11n and RF-DETR.

4.5 External Validation on NEU-DET

The experiments evaluate CF-YOLO against baselines on CTDD and provide external validation on NEU-DET, while visual comparisons examine challenging detection cases.

  • CTDD Comparison: CF-YOLO achieves the best Precision, AP50, AP75, F1-score, F0.5-score, and Avg among the evaluated CTDD baselines.
  • CTDD Comparison: Compared with YOLOv11n, CF-YOLO raises AP50 from 0.801 to 0.823, F1-score from 0.771 to 0.796, and Precision from 0.843 to 0.882.
  • External Validation on NEU-DET: The NEU-DET evaluation merges six original defect categories into one class and uses 1,800 images with 4,189 defect instances.
  • Visual Analysis: Visual comparisons place predictions from CF-YOLO and other models alongside ground-truth annotations, with ground truth shown in the last column.
  • External Validation on NEU-DET: On NEU-DET, CF-YOLO improves AP50, F1-score, and Recall, while AP50-95 and Precision are slightly lower than YOLOv11n.

4.6 Ablation of the Component

The ablation study incrementally adds CPAM and FARM to vanilla YOLOv11, with visualizations examining their respective contributions to camouflaged-defect localization and micro-anomaly capture. The combined CF-YOLO configuration delivers the strongest reported component-ablation performance.

  • The qualitative analysis uses CPAM to examine camouflaged-defect localization and FARM to examine micro-scale anomaly capture.
  • CPAM expands the receptive field to capture copper-surface macro-texture and preserve weak defect evidence.
  • FARM improves F1-score and AP@50 while helping suppress false positives caused by intricate surface noise.
  • 3.9%, 4.0%, and 7.4% are CF-YOLO’s gains over the baseline in Precision, F1-score, and AP@50, respectively.

4.7 Design Ablation Study

The design ablations test FARM composition and placement, CPAM placement and quantity, and dual-kernel settings to assess whether the adopted architecture is necessary. The reported best configurations support dual-domain refinement, mid-level context perception, and balanced kernel interaction.

  • FARM branch composition: The complete FARM achieves the best performance across all metrics, while removing either branch degrades detection accuracy.
  • FARM placement: Placing FARM inside the neck yields the highest AP50, AP50-95, and F1-score, indicating effective refinement during multi-scale feature fusion.
  • CPAM placement and quantity: The mid-backbone CPAM configuration performs best, and reducing CPAM blocks causes a noticeable accuracy drop.
  • CPAM kernel configuration: KS = 7 and KL = 11 achieves the best overall performance among evaluated CPAM kernel combinations.

5 Conclusions

CF-YOLO combines CPAM and FARM for copper-tube micro-defect detection, addressing background camouflage and semantic ambiguity while releasing CTDD. On CTDD, it achieves the best reported AP50, Precision, and F1-score among evaluated methods with real-time GPU inference.

  • KL denotes the Large-Kernel Perception branch, while KS denotes the Small-Kernel Aggregation branch in CPAM.
  • CF-YOLO integrates CPAM for receptive-field expansion and FARM for global semantic verification that suppresses noise-induced false positives.
  • CF-YOLO achieves the best AP50, Precision, and F1-score among evaluated methods on CTDD while maintaining real-time inference speed on an RTX 3090.

Declarations

The declarations report no conflict of interest and specify the article’s Creative Commons Attribution 4.0 licensing terms.

  • The authors declare that they have no conflict of interest.
  • The article is licensed under Creative Commons Attribution 4.0 International, subject to attribution and license-link requirements.
Loading 2608.28070v1…