Patch-Shuffled Superpixel Synthetic Anomaly Insertion in Autoencoder Foreground Extracted Regions for Improved Visual Anomaly Detection
We propose a self-supervised framework that combines an autoencoder and segmentation model to enhance anomaly detection and segmentation by inserting synthetic anomalies into the foreground regions of normal images. Synthetic anomalies were generated through a novel Patch Shuffle Superpixel Anomaly Insertion Method (PSSAIM), involving two stages. First, the normal images were divided into disjoint patches that were shuffled and rotated to produce distorted versions of the original images. Second, a Simple Linear Iterative Clustering (SLIC) superpixel extraction method is applied to distorted images to create abnormal segments that simulate real anomalies and cover a diverse range of synthetic anomalies. To identify regions of interest (RoI) where real defects typically occur,We developed a lightweight autoencoder (AE) model for each dataset class to identify RoIs where real defects typically occur. AE computes patch-wise similarities using the Structural Similarity Index Measure (SSIM) to map background areas, which are inverted to foreground regions using dissimilarity maps (1-SSIM). Threshold-based cleaning and region-based analysis refined the masks by removing noise and spurious blobs. For real test anomalies, we designed an enhanced segmentation model (EnSeg) featuring an encoder-decoder network with attention blocks and multiscale context aggregation. When trained on PSSAIM-augmented images, EnSeg achieved promising results: 98.9% area under the receiver operating characteristic curve (AUROC) for image-level detection, 77.1% average precision (AP) for pixel-level localization on the MVTec anomaly detection (MVTec AD) dataset, and 94.9% AUROC with 67.8% AP on the Kolektor SDD2 benchmark dataset. EnSeg also ensures rapid inference at 200 frames per second (fps), offering both accuracy and efficiency.
Authors
- Rizwan Ali Shah (ORCID: https://orcid.org/0000-0001-7162-6615)
- HyungWon Kim (ORCID: https://orcid.org/0000-0003-2602-2075)
- Jae‐Won Suh
- Zain Ul Arifeen
Institutions
- Chungbuk National University (KR)
Publication Details
- Journal
- IEEE Access
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1109/access.2025.3603201
- Citations
- 1
- Primary Topic
- Anomaly Detection Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 2.48