You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ssk-2610, I suppose you are wondering how we can obtain the ROC curve,
To generate a ROC curve for your datasets you will need a ground truth for your anomalies (note that this is not used for the training of the model but only for evaluation purposes). The ground truth (refered to as gt in the code) corresponds to a mask where pixels are white in anomalous region (and black pixel everywhere else).
In the following piece of code you obtain an anomaly score for each pixel of your input image and you vectorize the score map as well as the ground truth mask.
score_map=get_score_map(inputs, teacher, students, params).cpu()
y_score=np.concatenate((y_score, rearrange(score_map, 'b h w -> (b h w)').numpy()))
y_true=np.concatenate((y_true, rearrange(gt, 'b c h w -> (b c h w)').numpy()))
How do you find the accuracy metrics with the help of score_map for a dataset?
The text was updated successfully, but these errors were encountered: