# AnoSeg
This is a simplified implementation of the AnoSeg: Anomaly Segmentation Network Using Self-Supervised Learning paper. Here, we provide training and inference code of the proposed method as follows:

- Anomaly maps on all images (bottle, leather)
- pretrained AnoSeg model (tile.tar.gz)
- The proposed model code.
- AnoSeg training code.
- AnoSeg inference code.
- Data processing code.
- Hard augmentation code.

In the future, we will upload a detailed implementation of this paper on GitHub, including the proposed anomaly detector training/inference code and pretrained model.

## Usage

* Download the dataset from [MVTec website](https://www.mvtec.com/company/research/datasets/mvtec-ad/).

* Set the class and imagepath in data.py.

* Run anoseg_training.py to train AnoSeg network.

* Run anomaly_segmentation.py to obtain an anomaly map for each image of the test set.
