diff --git a/code/d2lzh_pytorch/utils.py b/code/d2lzh_pytorch/utils.py index 0171e42feaf695b3ec0171f55f6a83a1099cc6ba..0e1a4b32df585c6d876eae524a7384fd25bdec77 100644 --- a/code/d2lzh_pytorch/utils.py +++ b/code/d2lzh_pytorch/utils.py @@ -777,7 +777,7 @@ def show_bboxes(axes, bboxes, labels=None, colors=None): colors = _make_list(colors, ['b', 'g', 'r', 'm', 'c']) for i, bbox in enumerate(bboxes): color = colors[i % len(colors)] - rect = d2l.bbox_to_rect(bbox.detach().cpu().numpy(), color) + rect = bbox_to_rect(bbox.detach().cpu().numpy(), color) axes.add_patch(rect) if labels and len(labels) > i: text_color = 'k' if color == 'w' else 'w'