imyhxy commited on
Commit
ca0a007
1 Parent(s): 5389300

Fixed wandb logger KeyError (#6637)

Browse files
Files changed (1) hide show
  1. utils/loggers/wandb/wandb_utils.py +1 -1
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