Fixed wandb logger KeyError (#6637)
Browse files
utils/loggers/wandb/wandb_utils.py
CHANGED
@@ -487,7 +487,7 @@ class WandbLogger():
|
|
487 |
if self.current_epoch % self.bbox_interval == 0:
|
488 |
box_data = [{"position": {"minX": xyxy[0], "minY": xyxy[1], "maxX": xyxy[2], "maxY": xyxy[3]},
|
489 |
"class_id": int(cls),
|
490 |
-
"box_caption": f"{names[cls]} {conf:.3f}",
|
491 |
"scores": {"class_score": conf},
|
492 |
"domain": "pixel"} for *xyxy, conf, cls in pred.tolist()]
|
493 |
boxes = {"predictions": {"box_data": box_data, "class_labels": names}} # inference-space
|
|
|
487 |
if self.current_epoch % self.bbox_interval == 0:
|
488 |
box_data = [{"position": {"minX": xyxy[0], "minY": xyxy[1], "maxX": xyxy[2], "maxY": xyxy[3]},
|
489 |
"class_id": int(cls),
|
490 |
+
"box_caption": f"{names[int(cls)]} {conf:.3f}",
|
491 |
"scores": {"class_score": conf},
|
492 |
"domain": "pixel"} for *xyxy, conf, cls in pred.tolist()]
|
493 |
boxes = {"predictions": {"box_data": box_data, "class_labels": names}} # inference-space
|