About self-built dataset
First of all, thank you to the author for such excellent work! When I tried to run your code on my self-built dataset, it was missing the Few-shot Normal Samples and Pre-train Models. So, is there a way to make them?
Hi, thanks for your attention to this work. If you want to evaluate our model on your self-built dataset, you should first split the training and test datasets by following the form of MVTecAD, where the training set only contains the normal samples and the test set includes both normal and abnormal samples.
Then using our gen_val_json.py to generate JSON files and the few-shot normal samples are randomly extracted from the training set.
I have run gen_train_json.py and gen_val_json.py on my custom dataset to obtain the four JSON files shown in Figure 1. However, how can I obtain the Few-shot Normal Samples and Pre-train Models required in Step 3 and Step 4?
Hello, after running main.py, I obtained the following ten .pyth files. However, when I tried to execute test.py on my custom dataset, I found that the Few-shot Normal Samples mentioned in Step 3 are still missing (.pt files).
Hi, you can write a script to randomly select the few-shot samples from training set and save the image features after your own image transformation. The dimensions of image features should be aligned with the input of the visual encoder.