Organizations: Beijing Institute of Technology, Beijing, China · The Hong Kong Polytechnic University, Hong Kong, China · Li Auto, Beijing, China · Tsinghua University, Beijing, China
Image generation technology can synthesize condition-specific images to supplement real-world industrial anomaly data and enhance anomaly detection model performance. Existing generation techniques rarely account for the pose and orientation of industrial components in assembly, making the generated images difficult to utilize for downstream application. To solve this, we propose a novel image synthesis approach, called PostureObjectStitch, that achieves accurate generation to meet the requirement of industrial assembly. A condition decoupling approach is introduced to separate input multi-view images into high-frequency, texture, and RGB features. The feature temporal modulation mechanism adapts these features across diffusion model time-steps, enabling progressive generation from coarse to fine details while maintaining consistency. To ensure semantic accuracy, we introduce a conditional loss that enhances critical industrial elements and a geometric prior that guides component positioning for correct assembly relationships. Comprehensive experimental results on the MureCom dataset, our newly contributed DreamAssembly dataset, and the downstream application validate the outstanding performance of our method.
Figures & tables
Figure 1. Fantastic application of our proposed PostureObjectstitch in industrial anomaly generation considering assembly relationships. Compared to other methods, we simultaneously consider background retention, detail restoration, and assembly relationships. Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Figure 2. Overview of PostureObjectstitch. Given N reference images of a specific sample, PostureObjectstitch fine-tunes the model to generate high-quality anomaly images for industrial assembly scenarios. Our method has three key components: First, we design a condition decoupling strategy that splits input information into high frequency features, texture features, and RGB features to better suit industrial generation needs. Second, we propose a feature temporal modulation mechanism that allows different features to work properly across diffusion timesteps, enabling gradual generation from coarse to fine details. Finally, we introduce positional pose priors and conditional loss. The former ensures accurate component positioning and correct assembly relationships, while the latter improves generation quality of industrial information like text.
Figure 3. OCR auxiliary loss.
Figure 4. Pose and orientation prior fusion.
Figure 5. Dreamassembly dataset overview. Background: The background images are collected from real industrial environments on actual production lines. These backgrounds cover typical automotive assembly scenarios including assembly workstations, inspection platforms, and industrial equipment. Foreground: The foreground section presents 25 common key components in industrial assembly. Each component is captured under various poses including different rotation and tilt angles.
Figure 6. Visualization of different methods on the MureCom dataset. For each row, we present the background image with bounding box and a reference image, followed by the generation outputs of IC-custom, anydoor, Objectstitch, MureObjectstitch and our PostureObjectstitch method.
Method
CLIP-I ↑
DINO ↑
LPIPS ↓
SSIM ↑
ObjectStitch
0.7891
0.4831
0.0683
0.7636
MureObjectStitch
0.8139
0.5729
0.0694
0.7633
Anydoor
0.8118
0.6281
0.0676
0.8766
IC-Custom
0.7891
0.5092
0.0900
0.8452
Ours
0.8143
0.5885
0.0645
0.7703
Table 1. Quantitative comparison on MureCom dataset.
Method
CLIP-I ↑
DINO ↑
LPIPS ↓
SSIM ↑
ObjectStitch
0.7621
0.4103
0.0512
0.8268
MureObjectStitch
0.8033
0.5621
0.0411
0.8366
Anydoor
0.8789
0.7773
0.1677
0.8364
IC-Custom
0.7011
0.2258
0.4043
0.5458
Ours
0.8563
0.6651
0.0230
0.9821
Table 2. Quantitative comparison on our Dreamassembly dataset.
Figure 7. Visualization of different methods on our DreamAssembly dataset. For each row, we present the background image with mask and a reference image, followed by the generation outputs of IC-custom, anydoor, Objectstitch,MureObjectstitch and our PostureObjectstitch method.
Method
Acc
Precision
Recall
F1-score
ObjectStitch
0.6667
0.7345
0.6667
0.6991
MureObjectStitch
0.6800
0.7954
0.6800
0.7331
Anydoor
0.7200
0.7909
0.7200
0.7537
IC-Custom
0.2133
0.2055
0.2133
0.2093
Ours
0.8000
0.8437
0.8000
0.8211
Table 3. Quantitative comparison on YOLOv5 classification.
Method Components
Evaluation Metrics
TFD
TM
POP
OAL
CLIP-I ↑
DINO ↑
LPIPS ↓
SSIM ↑
0.8033
0.5621
0.0411
0.8366
✓
0.8212
0.6012
0.0422
0.8582
✓
✓
0.8401
0.6715
0.0485
0.8802
✓
✓
✓
0.8425
0.6612
0.0225
0.9815
✓
✓
✓
✓
0.8563
0.6651
0.0230
0.9821
Table 4. Ablation Study Results. TFD is target feature distanglement and TM is time-feature modulation. POP means pose and orientation prior. OAL means the OCR auxiliary loss.
Industrial anomaly inspection is severely hindered by the scarcity of real anomalous data. Zero-shot industrial anomaly generation addresses this by generating anomalies on specific products without requiring any of their real anomalous images. However, existing methods suffer from two critical limitations, i.e., inaccurate anomaly information acquisition and uncontrolled anomaly-product fusion. To overcome these challenges, we propose DeCo, which decouples the anomaly structure from its source product, and explicitly recouples it with the normal textures of the target product. During anomaly information acquisition, Dual-Routing Flow (DR-Flow) binds the texture-invariant anomaly structure to an abnormal token, while a parallel constraint, Product-Invariant Flow (PI-Flow), prevents the abnormal token from binding the source product. During anomaly-product fusion, we propose a hybrid injection to recouple the acquired anomaly structure with the target product, and Product Compatibility Correction (PCC) to compensate for the incompatibility between the acquired anomaly structure and the product. Extensive experiments demonstrate that DeCo establishes a new state-of-the-art. Training downstream detection models on our generated data yields massive pixel AP improvements of 5.1% on MVTec AD and 8.2% on VisA. Code is available at https://github.com/HUST-SLOW/DeCo.
Shilei Zeng, Xurui Li, Yaohan Tang +1
School of Electronic Information and Communications, Huazhong University of Science and Technology
Industrial anomaly generation is a crucial method for alleviating the data scarcity problem in anomaly detection tasks. Most existing anomaly synthesis methods rely on single-step generation mechanisms, lacking complex reasoning and iterative optimization capabilities, making it difficult to generate anomaly samples with high semantic realism. We propose AnomalyAgent, an anomaly synthesis agent with self-reflection, knowledge retrieval, and iterative refinement capabilities, aiming to generate realistic and diverse anomalies. Specifically, AnomalyAgent is equipped with five tools: Prompt Generation (PG), Image Generation (IG), Quality Evaluation (QE), Knowledge Retrieval (KR), and Mask Generation (MG), enabling closed-loop optimization. To improve decision-making and self-reflection, we construct structured trajectories from real anomaly images and design a two-stage training framework: supervised fine-tuning followed by reinforcement learning. This process is driven by a three-part reward mechanism: (1) task rewards to supervise the quality and location rationality of generated anomalies; (2) reflection rewards to train the model's ability to improve anomaly synthesis prompt; (3) behavioral rewards to ensure adherence to the trajectory. On the MVTec-AD dataset, AnomalyAgent achieves IS/IC-L of 2.10/0.33 for anomaly generation, 57.0% classification accuracy using ResNet34, and 99.3%/74.2% AP at the image/pixel level using a simple UNet, surpassing all zero-shot SOTA methods. The code is publicly available at https://github.com/sssjmmm/AnomalyAgent.
Jiaming Su, Tengchao Yang, Ruikang Zhang +3
Shanghai Jiao Tong University Shanghai, China · Tongji University Shanghai, China · Fudan University Shanghai, China
Industrial anomaly inspection faces a major challenge due to the lack of real-world anomaly samples. While generative models are used to create anomaly data, existing methods still struggle when handling small-scale anomalies. This failure occurs because extreme downsampling in diffusion models causes the information of small anomalies to be lost in the latent space. To address this, we introduce UniScale, a unified training and inference framework for high-fidelity industrial anomaly generation across arbitrary scales. During training, we introduce an Error-Suppressed Multi-Scale Training (EMT) strategy, which enables the model to learn the rich location-aware textures of anomalies, while suppressing upsampling-induced interpolation errors in texture acquisition, ensuring the model is capable of learning small-scale anomalies, while remaining effective for regular scale anomalies. For inference, we propose Generation-then-Fusion Denoising. It decouples anomaly generation from background integration, preventing small anomalies from being overwhelmed. Extensive experiments demonstrate that our method outperforms state-of-the-art competitors in both anomaly generation quality and downstream detection performance. It achieves a relative IS(a) improvement of 45.86% (from 1.81 to 2.64) on VisA and 37.70% (from 1.22 to 1.68) on MVTec AD 2, while also improving the downstream pixel-level IoU by 4.22% on VisA and AUROC by 6.55% on MVTec AD 2. Code is available at https://github.com/HUST-SLOW/UniScale.
Shilei Zeng, Linxin Guan, Xurui Li +2
School of Electronic Information and Communications, Huazhong University of Science and Technology