PaDiM-Anomaly-Detection-Localization-master icon indicating copy to clipboard operation
PaDiM-Anomaly-Detection-Localization-master copied to clipboard

The score is very different depending on the random idx value

Open dhkdnduq opened this issue 4 years ago • 1 comments
trafficstars

//root code Big difference between anomaly data and a normal data dist score idx = torch.tensor(sample(range(0, t_d), d))

//my code Little difference between anomaly data and a normal data dist score. idx = torch.randint(0,t_d - 1,(d,)) or idx = torch.range(t_d - d ,t_d - 1,1,dtype = torch.int64)

I don't understand this phenomenon.

-add

It is the magic of seed number 1024. --code-- random.seed(1024) torch.manual_seed(1024)

I still don't understand. Why do random.seed(1024) make so many changes to dist score?

dhkdnduq avatar Mar 21 '21 09:03 dhkdnduq

PaDiM is using random, but every time the same embedding vectors from the layers of resnet. I'd say you can interpret the random seed as a hyperparameter. You can also store the selected indexes of these embedding vectors in the model

manureini avatar May 14 '21 16:05 manureini