import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
%matplotlib inline
plt.imshow(img.numpy())
rect = Rectangle((xmin, ymin), (xmax-xmin), (ymax-ymin), fill=False, color=’red’)
ax = plt.gca()
ax.axes.add_patch(rect)
plt.show()
Posted in自动化