Open Williamyichang opened 2 years ago
When training, the maximum mean and minimum mean values of all images are obtained and stored. It is used for thresholds for determining abnormalities or create heat map
Look at this. def analyze_data(self):
double maxscore = cfg.vanomaly[category].anomalyMaxScore; double minscore = cfg.vanomaly[category].anomalyMinScore;
When training, the maximum mean and minimum mean values of all images are obtained and stored. It is used for thresholds for determining abnormalities or create heat map
Look at this. def analyze_data(self):
double maxscore = cfg.vanomaly[category].anomalyMaxScore; double minscore = cfg.vanomaly[category].anomalyMinScore;
Thank you for your reply, May I have one more questions? Is the code "scores = (score_pathces - min_score) / (max_score - min_score)" is equal to below formula?
Thank you for your reply, May I have one more questions? Is the code "scores = (score_pathces - min_score) / (max_score - min_score)" is equal to below formula?
No.It's for the heat map.
There is no GT in the industry. Therefore, the value of the patch scores was used.
score_patches = knn(torch.from_numpy(embedding_test).cuda())[0].cpu().detach().numpy() np.mean(score_patches ) *Require precise processing of data depending on the situation
Then, find the threshold value between OK and NG data through "Find_Optimal_Cutoff."
Thank you for the explanation. I need take time to digest.
In your code, I didn't find any implement for below formula, if no need this code , Could a little bit explain?