百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

GLASS

> 编程语言
开源

[ECCV 2024] "一种统一的异常合成策略与梯度上升法,用于工业异常检测和定位"的官方实现和数据集发布

391 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

[ECCV 2024] "一种统一的异常合成策略与梯度上升法,用于工业异常检测和定位"的官方实现和数据集发布

GLASS

A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localization

Qiyu Chen, Huiyuan Luo, Chengkan Lv*, Zhengtao Zhang

Springer DOI Link & ArXiv Preprint Link

Table of Contents

  • Introduction
  • Environments
  • Data Preparation
  • Run Experiments
  • Dataset Release
  • Citation
  • Acknowledgements
  • License

Introduction

This repository contains source code for GLASS implemented with PyTorch. GLASS is a unified framework designed to enhance unsupervised anomaly detection by addressing the limitations in coverage and controllability of existing anomaly synthesis strategies, particularly for weak defects that resemble normal regions.

This repository also contains the self-built datasets (WFDD, MAD-man, and MAD-sys) proposed in our paper. Here, we present a brief summary of GLASS's performance across several benchmark datasets.

GLASS MVTec AD VisA MPDD WFDD
I-AUROC 99.9% 98.8% 99.6% 100%
P-AUROC 99.3% 98.8% 99.4% 98.9%

Environments

Create a new conda environment and install required packages.

bash
conda create -n glass_env python=3.9.15
conda activate glass_env
pip install -r requirements.txt

Experiments are conducted on NVIDIA Tesla A800 (80GB). Same GPU and package version are recommended.

Data Preparation

The public datasets employed in the paper are listed below. DTD is an auxiliary texture dataset used for data augmentation in GLASS, while the other datasets are used for anomaly detection evaluation. These dataset folders/files follow its original structure.

  • DTD (Download link)
  • MVTec AD (Download link)
  • VisA (Download link)
  • MPDD (Download link)

We also release the model weights of GLASS-j on MVTec AD reported in the paper. If you want to further explore based on these models, you need to download the results folder (Download link) and move it to the root directory of this repository. Note that you should clear the existing results folder before moving.

Run Experiments

Edit ./shell/run-dataset.sh to configure arguments --datapath, --augpath, --classes, and hyperparameter settings. Please modify argument --test to 'ckpt' / 'test' to toggle between training and testing modes.

bash run-dataset.sh

"Note that 'dataset' refers to any dataset. Currently, the shell folder contains scripts for six datasets, such as run-mvtec.sh for MVTec AD. If you want to train your own dataset, please create a new run-*.sh file."

Dataset Release

1.WFDD (Download link)

The Woven Fabric Defect Detection (WFDD) dataset includes 4101 woven fabric images categorized into 4 categories: grey cloth, grid cloth, yellow cloth, and pink flower. The first three classes are collected from the industrial production sites of WEIQIAO Textile, while the 'pink flower' class is gathered from the publicly available Cloth Flaw Dataset. Each category contains block-shape, point-like, and line-type defects with pixel-level annotations.

2.MAD-man (Download link)

The MVTec AD-manual (MAD-man) test set is constructed to evaluate weak defect detection. It includes samples independently selected by 5 individuals from all 15 categories of MVTec AD. Each subset contains 2 normal and 6 anomaly samples per category.

3.MAD-sys (Download link)

The MVTec AD-synthesis (MAD-sys) test set is constructed from 5 texture categories of MVTec AD. It includes 4 subsets with varying degrees of weak defects which are adjusted by the transparency coefficient. Each subset contains 320 normal and 946 anomaly samples.

"Note that due to weak defects under β=0.9 which are very close to normal, we did not use the 5th subset in our study. However, we choose to release this subset, sincerely hoping that future work can further address this challenge."

4.Foreground Mask (Download link)

The foreground masks of normal samples from various datasets are obtained through binarization inspired by BGAD. If a dataset does not have or require the foreground masks, please set argument --fg to '0' in shell script.

Citation

Please cite the following paper if the code and dataset help your project:

bibtex
@inproceedings{chen2024unified,
  title={A unified anomaly synthesis strategy with gradient ascent for industrial anomaly detection and localization},
  author={Chen, Qiyu and Luo, Huiyuan and Lv, Chengkan and Zhang, Zhengtao},
  booktitle={European Conference on Computer Vision},
  pages={37--54},
  year={2024},
  organization={Springer}
}

Acknowledgements

Thanks for the great inspiration from SimpleNet.

License

The code and dataset in this repository are licensed under the MIT license.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言