Algorithm 1 LA-EAD inference process |
Input: input image I, EfficientAD model , proposed extractor E, precomputed covariance matrix , precomputed feature vector , precomputed normalization parameters , , and
|
Output: final anomaly score
|
-
1:
Extract features from the proposed extractor E
-
2:
Get output feature of the proposed extractor for I:
-
3:
-
4:
Compute global average pooled feature vector:
-
5:
-
6:
Calculate anomaly score of the logical anomaly detection module:
-
7:
Compute Mahalanobis distance using precomputed and :
-
8:
-
9:
Get anomaly score from EfficientAD
-
10:
Feed the image I into EfficientAD for the inference process and obtain the anomaly score:
-
11:
-
12:
Normalize and fuse scores
-
13:
Perform separate normalization on the and , with the normalization parameters (mean and variance) calculated from the inference results of the validation subset. (following PUAD [24])
-
14:
-
15:
Compute final anomaly score:
-
16:
-
17:
return
|