ganomaly
ganomaly copied to clipboard
Prediction
Could you please include the instruction for doing the prediction?
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 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?
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.
@ 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!
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