ganomaly icon indicating copy to clipboard operation
ganomaly copied to clipboard

Prediction

Open vinodrajendran001 opened this issue 6 years ago • 5 comments

Could you please include the instruction for doing the prediction?

vinodrajendran001 avatar Nov 19 '18 09:11 vinodrajendran001

Due to my busy schedule, I won't be able to update the code in short-term. But here is the idea: based on the dataset you train the model on, you could find the threshold for anomaly scores (See Figure 6a in the paper). Then based on this anomaly score, you could classify an input image as either normal or abnormal. I'm happy to answer any more questions that you might have.

samet-akcay avatar Dec 03 '18 01:12 samet-akcay

@samet-akcay I also has met this questions, I write a test code according your test() in model.py, the input is an image, I print the error value, how can I classify it real or fake according to the error value?

JiangAndy avatar Jul 18 '19 10:07 JiangAndy

I created the custom dataset as mentioned in the README.txt with train and test directories. train -> normal test -> normal -> abnormal During training, the code splits the train set into "train" and "test". This means that it does not process the original test set created. My question is how can I test the code on the "test" dataset which has normal and abnormal images.

Also, when the training is completed, my final AUC reading is: AUC: 0.797 max AUC: 0.816 but when the ROC is drawn, I am getting the AUC as: AUC = 0.80, EER = 0.28 Can anyone explain to me why am I getting this AUC value? As I am new to this field, I am trying to understand the calculations.

Any explanation is appreciated.

matak07 avatar Jul 25 '19 11:07 matak07

@ samet-akcay Hello samet-akcay, Firstable,thanks for ur work,

I wanna know the predict answer with test data, I searching the threshold,but cant find it,dose it is " _ " in evaluate.py ?

evaluate.py : fpr, tpr, _ = roc_curve(labels, scores)

If it is,it has arranged,how can I make it arrang with test data? Very thanks for your help and great work!

jade0088 avatar Jun 03 '20 02:06 jade0088

I created the custom dataset as mentioned in the README.txt with train and test directories. train -> normal test -> normal -> abnormal During training, the code splits the train set into "train" and "test". This means that it does not process the original test set created. My question is how can I test the code on the "test" dataset which has normal and abnormal images.

Also, when the training is completed, my final AUC reading is: AUC: 0.797 max AUC: 0.816 but when the ROC is drawn, I am getting the AUC as: AUC = 0.80, EER = 0.28 Can anyone explain to me why am I getting this AUC value? As I am new to this field, I am trying to understand the calculations.

Any explanation is appreciated.

hi,why in my train the AUC is always nan,but the train generate picture is not too bad

Viki-researcher avatar Jun 09 '20 09:06 Viki-researcher