Skip to content

Commit ca0a007

Browse files
authored
Fixed wandb logger KeyError (#6637)
1 parent 5389300 commit ca0a007

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/loggers/wandb/wandb_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ def val_one_image(self, pred, predn, path, names, im):
487487
if self.current_epoch % self.bbox_interval == 0:
488488
box_data = [{"position": {"minX": xyxy[0], "minY": xyxy[1], "maxX": xyxy[2], "maxY": xyxy[3]},
489489
"class_id": int(cls),
490-
"box_caption": f"{names[cls]} {conf:.3f}",
490+
"box_caption": f"{names[int(cls)]} {conf:.3f}",
491491
"scores": {"class_score": conf},
492492
"domain": "pixel"} for *xyxy, conf, cls in pred.tolist()]
493493
boxes = {"predictions": {"box_data": box_data, "class_labels": names}} # inference-space

0 commit comments

Comments
 (0)