[Task]: Inference on a test set #861
Replies: 5 comments 2 replies
-
Hi @dangmanhtruong1995, python tools/inference/torch_inference.py \
--config anomalib/models/padim/config.yaml \
--weights results/padim/mvtec/bottle/run/weights/model.ckpt \
--input datasets/MVTec/bottle/test/broken_large \ # Path to broken_large images in the test set.
--output output/broken_large # An output directory to save the predicted images. Let me know if this is what you are looking for. |
Beta Was this translation helpful? Give feedback.
-
I'm converting this to a Q&A in discussions. Let's continue there. |
Beta Was this translation helpful? Give feedback.
-
Hi @samet-akcay , so I have a test folder containing images in "abnormal" and "normal" subfolders, I want to do inference on all of those images and then output F1 score, AUC, .... as when we trained before. |
Beta Was this translation helpful? Give feedback.
-
Hm, sounds like |
Beta Was this translation helpful? Give feedback.
-
https://github.com/openvinotoolkit/anomalib/blob/main/tools/test.py#L23-L25 You will need to provide python tools/test.py \
--config </path/to/your/config/file>
--weight_file </path/to/your/weight/file> if you use this script, make sure that your the data that you want to test follows the same structure as specified in your config file (mvtec, btech, folder etc). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the motivation for this task?
The example on the github page shows only inference for an image.
Describe the solution you'd like
If anyone know how to do inference on a test set that would be great.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions