提交 4f0cdd8a 编写于 作者: S ShusenTang

fix bug in bbox_to_rect

上级 2c0212fd
......@@ -719,7 +719,7 @@ def train(train_iter, test_iter, net, loss, optimizer, device, num_epochs):
def bbox_to_rect(bbox, color):
# 将边界框(左上x, 左上y, 右下x, 右下y)格式转换成matplotlib格式:
# ((左上x, 左上y), 宽, 高)
return d2l.plt.Rectangle(
return plt.Rectangle(
xy=(bbox[0], bbox[1]), width=bbox[2]-bbox[0], height=bbox[3]-bbox[1],
fill=False, edgecolor=color, linewidth=2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册