PaDiM-Anomaly-Detection-Localization-master
PaDiM-Anomaly-Detection-Localization-master copied to clipboard
when i test,the time is so long
when i test some images, whatever the number of images is 1 or 100,the time spent is so long. I want to know whether it is nomal
No, it is not normal,
No, it is not normal, i find the time is spent follow the code, my H*W is 4096,it has to loop 4096 times, is it normal? for i in range(H * W): mean = train_outputs[0][:, i] conv_inv = np.linalg.inv(train_outputs[1][:, :, i]) dist = [mahalanobis(sample[:, i], mean, conv_inv) for sample in embedding_vectors] dist_list.append(dist)
Yes, please have a look on the Inference time issue
https://github.com/xiahaifeng1995/PaDiM-Anomaly-Detection-Localization-master/issues/8#issuecomment-1002495651
Read the whole issue