DualFlow: Dual-Branch Flow for Unsupervised Anomaly Detection and Localization
Yantao Zhao, Xiaojun Wu, Jun Sheng Cheng · IEEE Transactions on Instrumentation and Measurement · 2025
Industrial production processes present challenges in collecting and annotating defect samples, primarily due to cost constraints and the inability to comprehensively cover all defect categories. To address this issue, recent research has focused on modeling normal sample features. This paper proposes DualFlow, an unsupervised anomaly detection and localization algorithm based on normalizing flow. DualFlow utilizes a dualbranch architecture to effectively balance the detection and localization capabilities of existing algorithms. To handle features of different scales, we propose a compact and efficient module called the gated multi-scale feature fusion module. Additionally, DualFlow incorporates a variance stability loss to exploit the inherent stability of normal sample features, resulting in a significant reduction in false-positive instances. DualFlow is designed for end-to-end training and inference, greatly enhancing defect detection and localization capabilities. DualFlow achieved 99.33% image-level AUROC and 98.05% pixel-level AUROC on the MVTec AD dataset. Furthermore, DualFlow exhibits robust generalization performance, as confirmed by its evaluation on the more challenging MVTec LOCO AD, BTAD, VisA and KolektorSDD2 datasets.