MCPcopy Create free account
hub / github.com/TonyLianLong/LLM-groundedDiffusion / visualize_bboxes

Function visualize_bboxes

utils/vis.py:210–217  ·  view source on GitHub ↗
(bboxes, H, W)

Source from the content-addressed store, hash-verified

208
209
210def visualize_bboxes(bboxes, H, W):
211 num_boxes = len(bboxes)
212 for ind, bbox in enumerate(bboxes):
213 plt.subplot(1, num_boxes, ind + 1)
214 fg_mask = utils.proportion_to_mask(bbox, H, W)
215 plt.title(f"transformed bbox ({ind})")
216 plt.imshow(fg_mask.cpu().numpy())
217 plt.show()
218
219def reset_save_ind():
220 global save_ind

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected