arXiv:2610.38194cs.AIOct 2026

Manuscript Offprint

arXiv:2610.38194

Prototype-Guided Dynamic Domain Modulation and a Large-Scale Multi-SKU Benchmark for Shampoo Bottle Surface Defect Detection

Yuehang Li, Xiao Wang, Qiang Chen, Yangyi Fan, Bo Jiang, Yaowei Wang, Jin Tang

ABSTRACT

Industrial shampoo-bottle surface defect detection must operate across many stock keeping units (SKUs), where differences in bottle geometry, material, label layout, reflectance, and imaging conditions can substantially alter the appearance of the same defect. Existing industrial defect datasets rarely provide both instance-level defect annotations and product-variant identities, making it difficult to study SKU-aware detection under realistic manufacturing conditions. We introduce Bottle-SKU, a large-scale multi-SKU benchmark for shampoo bottle surface defect detection. Bottle-SKU contains 13,119 images, 20,419 instance-level bounding boxes, seven defect categories, and 48 bottle SKUs, enabling evaluation of both shared defect recognition and SKU-specific appearance variation. To address the challenge of SKU-specific appearance variation, we propose Prototype-Guided Dynamic Domain Modulation (ProDMM). ProDMM constructs a visual prototype for each SKU from training images and predicts a soft SKU distribution for each input. The resulting prototype-conditioned representation dynamically generates low-rank Query/Value modulation for the visual backbone and residual conditioning for defect-text-to-visual attention, while preserving the pretrained Grounding DINO detection pathway. The model is trained jointly with detection, SKU-domain classification, and modulation-regularization objectives. Experiments on Bottle-SKU and the public GC10-DET-SKU metallic surface defect dataset demonstrate the effectiveness of prototype-guided domain conditioning for industrial surface defect detection.

1 INTRODUCTION

Industrial visual inspection promises scalable quality control, yet models that perform well in a controlled production setting can degrade when the product, material, illumination, or imaging configuration changes. Reviews of surface-defect detection identify appearance variation, subtle defect boundaries, and strong dependence on acquisition conditions as recurring obstacles to deployment Bhatt et al. (2021). Industrial domain-adaptation studies likewise report that a detector trained on one inspection distribution requires explicit adaptation when transferred to another Li et al. (2023a). This problem is particularly visible on shampoo-bottle production lines, where one system serves many Stock Keeping Units (SKUs). Changes in bottle geometry, label layout, surface reflectance, viewpoint, and camera elevation can alter the texture, contrast, and geometric context of the same semantic defect.

This deployment problem is more specific than a shortage of labeled images. Adding samples from already observed products can improve interpolation, but it does not by itself establish transfer to a newly introduced SKU. A random image-level split can also place nearly identical product appearances in both training and test sets, thereby measuring interpolation rather than cross-product generalization. The desired detector must therefore separate two factors. Defect semantics should be shared across products, whereas the appearance prior should change with the current product

Figure

Figure 1: Overview of the proposed cross-SKU defect detection benchmark and method. (Left) Appearance gap between training and deployment. Shampoo bottles from different SKUs vary substantially in appearance and material, while defects such as scratches and wrinkles remain visually similar. (Middle) Task setting. We adopt an SKU-level deployment protocol, training on a set of seen SKUs (SKU-1, SKU-2, ...) and testing on unseen SKUs (SKU-a, SKU-b, ...), which emulates the real-world scenario where a production line switches to a new product. (Right) (a) Conventional visual-language methods feed visual and text features directly into the detection head. (b) Our prototype-guided modulation injects domain shift into the text and visual branches, enabling robust detection on unseen SKUs.

variant. This motivates an evaluation protocol in which product variants are explicit domains and held-out variants are used to test generalization.

Domain adaptation provides an important starting point. Adversarial alignment methods learn representations that make domains difficult to distinguish Ganin et al. (2016). Detection-specific methods align image-level and instance-level features Chen et al. (2018). Multi-source adaptation combines information from several labeled domains Yao et al. (2021). These approaches are not a direct solution to the multi-SKU setting. They commonly formulate a source-target transfer problem or seek a domain-invariant representation, while a production line contains many related variants and the appearance differences themselves can provide useful evidence for resolving ambiguous defects. Recent open-set defect recognition also broadens the range of defect appearances that a model can recognize Kim et al. (2026), but does not establish an instance-level, SKU-disjoint detection protocol with explicit product-variant conditioning.

Vision-language detectors offer a complementary source of transferable defect semantics. Grounding DINO Liu et al. (2024) and subsequent systems use text-conditioned visual interaction to localize concepts beyond a fixed detector vocabulary. Recent work improves this paradigm through large-language-model supervision Fu et al. (2025); Zhou et al. (2026), retrieval-based open-vocabulary detection Fu et al. (2026a), semantic augmentation Cao et al. (2026), visual-token prompt refinement Qin et al. (2026), richer category descriptions Yang et al. (2026), and hierarchical objectness calibration Lee et al. (2026). These methods strengthen the semantic interface between a defect prompt and visual evidence, but the text prompt for “scratch” or “fold” is still shared across SKUs. Thus, language conditioning alone does not tell the detector how the same defect should appear on a particular product variant, nor does it provide a mechanism for soft transfer among visually related SKUs.

Existing defect benchmarks leave this product-variant setting under-specified. NEU-DET and GC10-DET focus on defects in steel-strip imagery Song & Yan (2013); Lv et al. (2020), HRIPCB targets PCB defects Huang et al. (2020a), and MVTec AD emphasizes unsupervised anomaly localization across object and texture categories Bergmann et al. (2019). These benchmarks are valuable for measuring defect localization, but they generally do not jointly expose full-product appearance variation, explicit product-variant identities, instance-level defect boxes, and a product-disjoint test protocol. As a result, they cannot directly answer whether a detector can preserve defect semantics while adapting to the appearance of an unseen product variant.

To study this problem, we introduce Bottle-SKU, a multi-SKU shampoo-bottle surface-defect benchmark with instance-level annotations and explicit SKU identities, and propose Prototype-Guided Dynamic Domain Modulation (ProDMM). ProDMM extracts a prototype for each training SKU, predicts a soft SKU posterior for an input image, and uses the resulting mixture of prototypes to condition low-rank visual modulation and defect-text cross-attention. This design retains a shared detection pathway for defect semantics while allowing the appearance-dependent computation to vary smoothly across related products. We evaluate the proposed setting on Bottle-SKU and on a pseudo-SKU split of GC10-DET-SKU. Our contributions are threefold:

  • We introduce Bottle-SKU, a large-scale full-object surface-defect benchmark with explicit SKU identities, professional instance-level annotations, and an SKU-disjoint evaluation protocol.

  • We propose ProDMM, which converts a soft mixture of SKU prototypes into image-conditioned low-rank QLer/VLer residuals for the frozen visual backbone, preserving the shared pretrained detection pathway.

  • We introduce Domain Cross Attention (DCA), which injects prototype-conditioned visual evidence into defect-text interaction, and demonstrate the resulting framework on Bottle-SKU and GC10-DET-SKU under product-aware evaluation.

References (80)