Haoyan-Guan / CAReg

MIT License
15 stars 2 forks source link

CAReg

The official code of the paper "Few-Shot Anomaly Detection via Category-Agnostic Registration Learning".

Preparation

Environment

This code is built on top of RegAD. Based on that project, run pip install -r requirements.txt to install a few more packages. Then, you are ready to go.

Data

Please follow RegAD (named Files Preparation) to set up the datasets.

Training

python train.py --obj class_name --shot shot_number --data_path_train train_data_path --data_path_test test_data_path

For example,

python train.py --obj 'zipper' --shot 8 --data_path_train 'Dataset/MPDD' --data_path_test 'Dataset/MVTec'