PaDiM-Anomaly-Detection-Localization-master
PaDiM-Anomaly-Detection-Localization-master copied to clipboard
about embedding concat
layer1 ~ layer3 have different feature map size, so how to concate embedding from layer1 ~ layer3? i can't find it from the paper
layer1 ~ layer3 have different feature map size, so how to concate embedding from layer1 ~ layer3? i can't find it from the paper
The concatenation function is defined here: https://github.com/xiahaifeng1995/PaDiM-Anomaly-Detection-Localization-master/blob/65adb9c461017e542b09b08042e21e606a8f8977/main.py#L286
You could also use torch.nn.functional.interpolate(input, scale_factor=2, mode='nearest') as you like.
Hello Have any one got this error x = x.view(B, C1, -1, H2, W2) RuntimeError: shape '[20, 256, -1, 50, 50]' is invalid for input of size 200724480
@Omarelsaadany. you need to change your input image size, as with your current input image size there is an dimension error. 200724480/(20x256x50x50) is a float number and not an integer The dimension "-1" is a PyTorch alias for "infer this dimension given the others have all been specified" (i.e. the quotient of the original product by the new product)