How to start an inference test after completed training
Closed this issue · 4 comments
How do i start an inference after i have completed the training?
I started training with mvtec ad dataset class 7 with:
$ python runners/run_single_mvtec.py --normal-class 7
Training works perfect but how can i make an inference from my own image of a screw after training is done?
What size should the inference image file be? Does it need to be resized before inference?
Hey.
There's a script for that purpose (here). It takes a snapshot of the trained model to produce anomaly scores and heatmaps for any images. Since you trained on MVTec, you just have to change a few lines: 47 to point to your snapshot, 54 to point to your own images, 57 to set the trained class, and 72 to set a target directory for the heatmaps.
If you need any help, let me know.
works perfect! Ty
Hi,
I'm trying to make inference after having trained a 224_VGG model on a custom dataset (using the run_custom.py runner) and I can't understand how to configure the variable transform in this script.
What are the default transform steps performed on custom datasets?
Hey. You can find the default transformations for custom datasets here. This is because the default argument for the preprocessing pipeline (i.e., transformations) is set to aug1
as you can see here. The custom dataset automatically computes the empirical mean and std of the normal training data. To get the same mean and std for interference, you can just put a print here.