amazon-science / patchcore-inspection

Apache License 2.0
719 stars 146 forks source link

@authors , what is the meaning of the follwing things? #12

Closed MlLearnerAkash closed 2 years ago

MlLearnerAkash commented 2 years ago

Q.1)What is meaning of "Num. nearest neighbours to use for anomaly detection"? Q.2)what does it stand for : "neighbourhoodsize for local aggregation"

******"Num. nearest neighbours to use for anomaly detection & neighbourhoodsize for local aggregation."****** 
Confusezius commented 2 years ago

(1) So num. nearest neighbours to use for anomaly detection refers to the number of nearest neighbours to retrieve for each query, whose distances are then averaged to provide a mean anomaly score for said query. (2) The neighbourhoodsize refers to the patchsize/local neighbourhood around each element of the featuremap to take into account. I.e. assuming that PatchCore is given a featuremap of size h x w x d, each feature element of size 1 x 1 x d is expanded to patchsize/neighbourhoodsize x patchsize/neighbourhoodsize x d, before being aggregated to a single score again via the self.preprocessing-Module in the PatchCore main-class.

Hope that helps!

MlLearnerAkash commented 2 years ago

thanks @Confusezius ...