The official code of the paper "Few-Shot Anomaly Detection via Category-Agnostic Registration Learning".
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.
Please follow RegAD (named Files Preparation
) to set up the datasets.
python train.py --obj class_name --shot shot_number --data_path_train train_data_path --data_path_test test_data_path
class_name
with the real object class name, e.g., zipper
. shot_number
with the shot number, e.g., 8
. train_data_path
with the training data path, e.g., Dataset/MPDD
. class_name
with the testing data path, e.g., Dataset/MVTec
. For example,
python train.py --obj 'zipper' --shot 8 --data_path_train 'Dataset/MPDD' --data_path_test 'Dataset/MVTec'