MediaBrain-SJTU / RegAD

[ECCV2022 Oral] Registration based Few-Shot Anomaly Detection
MIT License
277 stars 40 forks source link

Question about the specific implementation of the training #30

Closed yanghy-hy closed 1 year ago

yanghy-hy commented 1 year ago

From the paper, a pair of images Ia and Ib of the same category are selected as query and support respectively, and their features are obtained for loss calculation during the training of registration network. However, it is found in the code that k images (shot number) are selected as support images for a query image and the support feature is the mean of k support features when calculating the loss during training. What is the reason for this inconsistency or is there any mistake with my understanding?

chaoqinhuang commented 1 year ago

Your understanding is correct. It is an improved version, which gets better and more robust results than the paper (see Tables in README). It needn't keep the same as the shot number. Set it as any number you want.

chaoqinhuang commented 1 year ago

f there are no other problems I close this issue.