New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defining new threshold for new dataset #12
Comments
For getting the thresholds out, you would like to edit Since a recent commit, fit and evaluate require dataloaders. However, you can simply go from dataset to dataloader with DataLoader(dataset). If you have a custom dataset, like the way you described, you can just change the cls argument. It should be able to handle it. |
Do you mean, instead of getting image_rocauc as an output, I just directly make |
I'm sorry, I might have put you on the wrong track. You should look in normal RoC: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html#sklearn.metrics.roc_curve It returns True Positive Rate, False Positive Rate and Thresholds. Hope it's clear now! |
Hi there, thanks for sharing your codes publicly.
I am trying to follow the custom dataset workflow. My question is about defining my own threshold based on required prec/recall, as you mentioned in here. I am quite newbie and would like to use your repo for my study thesis. My I ask for quick clue where in the code and how can I set a new threshold?
After training with spade method, I test the model on an anomaly test image and got the img anom score: tensor(8.3064), while I obtained even similar value with a good test image.
btw, as you mentioned I defined a custom dataset folder, but do we need to also define a new dataloader? as the already utilized the one in the run.py is for MVTecDataset.
train_ds, test_ds = MVTecDataset(cls).get_dataloaders()
My dataset folder structure is like:
-custom_dataset
--train
---good
--test
---good
---bad
--ground_truth
---bad
I really appreciate your help and effort.
The text was updated successfully, but these errors were encountered: