Not displaying class labels/captions in BoundingBoxes2D images

Hi all! I’m logging some images to my dashboard using this code:

box_data = [{
  "position": {
  "minX": xywh[0] - 3,  # ignore the weird  -3/+3 hardcoded offsets
  "minY": xywh[1] - 3,
  "maxX": xywh[0] + 3,
  "maxY": xywh[1] + 3},
  "class_id": int(cls),
  "scores": {
  "class_score": conf},
  "domain": "pixel"} for *xywh, conf, cls in pred.tolist()]
boxes = {"predictions": {"box_data": box_data, "class_labels": names}}  # inference-space
self.bbox_media_panel_images.append(wandb.Image(im, boxes=boxes,

My images are filled with tiny cells and I want to have the cleanest visualization of my bounding boxes, without any captions/class labels. Therefore I’m purposefully not filling in the box_caption arg, but the visualization seems to default back to the class_id label, which is mandatory. I then still get images where the labels obscure other cells:

Any way of just visualizing the bounding boxes without captions or labels?

Bump, this is getting buried :slight_smile:

Hi Leander,

Thank you for your patience and for contacting us about this.
If I understand correctly what you are trying to do and from your code and visualization, I see that you have assigned a value to the class_id  label but I do not see any box_caption label. I suppose that can be the reason?
Please add the option and let me know if there is still an issue?

Hi Leander,

Checking out if you tried my suggestion?

Hi Bill! Sorry for the slow response. I filled in box_caption with an empty string "", but this just makes the visualization show empty label boxes of arguably the same size as when I had filled them with the class_ids:

box_caption=None throws an error (it has to be a string).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.