DOI: 10.3390/sym18071101 ISSN: 2073-8994

Symmetry-Aware Discrepancy Representation and Collaborative Optimization for Multi-Class Defect Image Generation

Beibei Jia, Haijian Shao, Dengbiao Jiang, Nian Tao, Guoquan Yao

Industrial defect image generation is an effective way to alleviate data scarcity and class imbalance in visual inspection. In industrial images, defects usually appear as local asymmetric perturbations on globally regular background structures, which makes defect synthesis dependent on both background consistency and local anomaly fidelity. Existing generative methods still face difficulties when only limited anomalous samples are available, especially in representing fine-grained discrepancies among defect categories, coordinating global and local branches across diffusion stages, and constraining small defect regions and their boundary transitions. To address these issues, this paper develops a symmetry-aware multi-constraint diffusion framework based on the dual-branch architecture of DualAnoDiff. The framework treats multi-class industrial defect generation as a joint optimization problem involving class-conditioned discrepancy representation, diffusion-stage-aware branch coordination, and saliency-guided regional supervision. First, Class-Conditioned Shared-Basis LoRA (CSB-LoRA) models category-specific defect characteristics by combining cross-class shared low-rank bases with class-dependent coefficients, allowing common structural priors and class-specific asymmetric patterns to be represented simultaneously. Second, Temporal Dual-branch Attention Modulation (TDAM) adjusts branch interaction, background information injection, and residual feature fusion according to the denoising stage, so that the generation process can gradually shift from global structure restoration to local defect refinement. Third, Saliency-Guided Reconstruction Loss (SGRL) applies stronger spatial constraints to defect regions and boundary neighborhoods, improving local detail preservation and defect-background continuity. Experiments on the MVTec AD dataset show that the proposed method improves both generation quality and perceptual diversity compared with DualAnoDiff. The average IS increases from 1.93 to 2.07, and IC-LPIPS increases from 0.38 to 0.41. When the generated samples are used for downstream defect segmentation, AP-P improves from 84.5% to 85.7%, and F1-P improves from 78.8% to 79.3%. These results indicate that the generated samples can serve as useful synthetic training data for few-shot and class-imbalanced industrial inspection.

More from our Archive