generated from dopt-python/py311
fix type issue for anomaly label
This commit is contained in:
parent
9e6daa01ea
commit
08f70ee672
@ -176,7 +176,7 @@ def infer_image(
|
||||
output = model(input_tensor)
|
||||
|
||||
anomaly_score = output.pred_score.item()
|
||||
anomaly_label = 1 if anomaly_score >= .2 else 0
|
||||
anomaly_label = bool(1 if anomaly_score >= 0.2 else 0)
|
||||
anomaly_map = output.anomaly_map.squeeze().cpu().numpy()
|
||||
|
||||
img_np = np.array(pil_image)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user