AROMA: Adaptive ROI-Based Morphology-Aware Augmentation
Abstract
Anomaly detection in industrial automated visual inspection (AVI) is constrained by severe data sparsity and class imbalance, as defect samples are both scarce and morphologically heterogeneous in real production environments. Existing context-aware synthesis frameworks, such as CASDA, alleviate this limitation by modeling defect–background relationships. However, they depend on domain-specific handcrafted rules and manually constructed compatibility matrices that must be redesigned for each new dataset, limiting scalability. We propose AROMA (adaptive ROI-based morphology-aware augmentation), a framework whose central contribution is the automatic, data-driven re-derivation of the defect–background compatibility matrix that prior work constructed by hand. AROMA profiles defect-morphology and background-context distributions and, from their patch-level co-occurrence, learns a symmetric compatibility gate that scores placement locations without any per-dataset hand-tuning, automatically replacing the handcrafted compatibility matrices required by previous approaches. It further summarizes each dataset’s difficulty with a morphology complexity index (MCI) and a context complexity index (CCI); the CCI, in particular, characterizes when context-aware placement can help. To evaluate the placement mechanism independently of generative-model quality, we employ a training-free copy–paste compositing engine with gradient-domain or alpha blending, driven by this data-driven symmetric compatibility gate. Experiments on five industrial datasets spanning textiles (AITeX), metal commutators (Kolektor), steel (Severstal), magnetic tiles (MTD), and leather (MVTec) show that the effectiveness of context-aware ROI selection is not universal but jointly depends on two conditions: sufficient baseline headroom and adequate background-context complexity (CCI). Performance gains are consistently observed on datasets satisfying both conditions (AITeX: +9.4 pp mAP@0.5 over baseline and +2.8 pp over random placement; Severstal: +1.6 pp and +1.3 pp), whereas the advantage narrows to parity—without reversing—on datasets with near-ceiling baseline accuracy (Kolektor, MTD) or largely homogeneous backgrounds that make placement position inconsequential (MVTec Leather, where both placement strategies gain equally, about +9 pp). These findings indicate that context-aware ROI selection is beneficial when both improvement headroom and contextual diversity are present and is otherwise neutral rather than harmful, providing practical guidance on when adaptive ROI optimization is expected to outperform random placement.