ByChelsea / VAND-APRIL-GAN

[CVPR 2023 Workshop] VAND Challenge: 1st Place on Zero-shot AD and 4th Place on Few-shot AD
193 stars 22 forks source link

Few Shot is just One Shot here? #15

Closed alexander-fischer closed 9 months ago

alexander-fischer commented 10 months ago

From debugging the code, it seems that here the patch tokens of just one reference image are compared to the query image since we iterate over patch_tokens that has the length of few_shot_features. Shouldn't it be possible to use multiple reference images with the k_shot variable?

https://github.com/ByChelsea/VAND-APRIL-GAN/blob/46fcbe567752dbcc84a26a05fb7b3794a72aa008/test.py#L189-L201

ByChelsea commented 10 months ago

Hi, the iteration over patch_tokens is carried out to individually compare the stored normal features and test images of different blocks (which is 4 in the code).

Besides, during data preparation, we employ the variable k_shot, and for example, the names of the randomly selected reference images are recorded in ./results/mvtec/few_shot/4shot/seed42/k_shot.txt.

alexander-fischer commented 9 months ago

You're right!