You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I fit() and then test() a model on anomalib, then everything seems to work fine.
I can look at the images in the "results" folder from the test run and their heat map looks great:
However, when I then export the model to ONNX and load it via OpenVINOInferencer, then predict() on the same image, the result does not look as great any more:
The model seem to work great in the test run, so the problem might be way I run inferecing.
Note that the same "bad" heat map is produced if I export and load the model to OpenVINO or ONNX format.
When I compare both screenshots then I can see that the first one from test run has quadratic images, as I train with 256x256. However, the second one seems to be rectangular, as the original image shape. Do I have to manually resize the image before I run prediction on it?
Describe the bug
When I
fit()
and thentest()
a model on anomalib, then everything seems to work fine.I can look at the images in the "results" folder from the test run and their heat map looks great:
However, when I then export the model to ONNX and load it via
OpenVINOInferencer
, thenpredict()
on the same image, the result does not look as great any more:The model seem to work great in the test run, so the problem might be way I run inferecing.
Note that the same "bad" heat map is produced if I export and load the model to OpenVINO or ONNX format.
When I compare both screenshots then I can see that the first one from test run has quadratic images, as I train with 256x256. However, the second one seems to be rectangular, as the original image shape. Do I have to manually resize the image before I run prediction on it?
Dataset
Other (please specify in the text field below)
Model
N/A
Steps to reproduce the behavior
First I train the model on a custom dataset:
Then in another script I load the trained model:
The last line prints:
OS information
Expected behavior
I would expect that the same image would lead to the same heat map in both the test run and during prediction.
Screenshots
No response
Pip/GitHub
pip
What version/branch did you use?
No response
Configuration YAML
Where to find that?
Logs
Code of Conduct
The text was updated successfully, but these errors were encountered: