Replies: 2 comments 1 reply
-
@markstanl, thanks for bringing this to our attention. Yeah we had some plans, but it's been on our backlog. torchmetrics has |
Beta Was this translation helpful? Give feedback.
1 reply
-
I was really just trying to visualize the ROC curve. from anomalib.data import MVTecAD
from anomalib.engine import Engine
from anomalib.models import EfficientAd
from anomalib.metrics import AUROC
datamodule = MVTecAD(
root="./datasets/MVTecAD", # Path to download/store the dataset
category="bottle", # MVTec category to use
train_batch_size=1, # Number of images per training batch
eval_batch_size=1, # Number of images per validation/test batch
num_workers=8, # Number of parallel processes for data loading
)
model = EfficientAd()
engine = Engine(max_epochs=2)
engine.fit(datamodule=datamodule, model=model)
res = engine.predict(model=model, dataloaders=datamodule.test_dataloader())
auroc = AUROC(fields=["anomaly_map", "gt_mask"])
for batch in res:
auroc.update(batch)
fig, _ = auroc.generate_figure()
fig.savefig("roc_curve.png") |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am struggling to use the MetricsVisualizer() class, and cannot find any relevant documentation to help me.
I am following what the docstrings say in the file, and have this code
Which yields result:
AttributeError: 'EfficientAd' object has no attribute 'image_metrics'
I understand
MetricsVisualizer
inheritsBaseVisualizer
, which is deprecated in place ofVisualizer
, however it seems like there is no new version. Are there plans to re-implement it?Beta Was this translation helpful? Give feedback.
All reactions