Make visualization configurable
jschneider opened this issue · comments
Hey,
we are using this code, which works fine:
dataset = PredictDataset(image_path)
dataloader = DataLoader(dataset, num_workers=15)
model = get_model("Patchcore")
output = engine.predict(
model=model,
ckpt_path=model_path,
dataloaders=[dataloader],
)
The output contains everything I expect, everything is fine.
But:
I have a lot of pictures, I want to analyze - and performance matters:
- Therefore, it would be great if I was able to load the model only once and use it for multiple images.
- It would be great to avoid generating the debug picture (containing the heat map, mask etc).
I am sure I am missing a simple way to achieve this. Any help appreciated ;-)
I have had the same problem and did not find a fix. Looking forward to a solution!
it is currently not configurable, but we will enable it in v1.1.0. For now, you could disable these lines to not visualize the outputs
anomalib/src/anomalib/engine/engine.py
Lines 412 to 418 in ca90807
Great! Thanks.
Will it be possible to load the model just once and call "predict" several times?
yes, ideally it should be possible. Let us know if it does not work
I can't find a way to load the model once and reuse the loaded model.
Could you give me a hint? I am quite new in this area, so might be a bit blind here...