Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def display_image(index):
  2. plt.imshow(images[index].T, cmap = "binary", origin='lower', extent = [0, img_size, 0, img_size])
  3. for box in bounding_boxes[index]:
  4. plt.gca().add_patch(Rectangle((box[0], box[1]), box[2], box[3], ec = 'r', fc = 'none'))
  5. plt.xticks([])
  6. plt.yticks([])
  7. plt.show()
  8.  
  9. display_image(np.random.randint(0, n_images))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement