parameters: (im_blob, rois_blob, labels_blob, overlaps)
docstring: Visualize a mini-batch for debugging.
docstring_summary: Visualize a mini-batch for debugging.
docstring_tokens: Visualize a mini - batch for debugging .
function: def _vis_minibatch(im_blob, rois_blob, labels_blob, overlaps):
      """Visualize a mini-batch for debugging."""
      import matplotlib.pyplot as plt
      for i in xrange(rois_blob.shape[0]):
          rois = rois_blob[i, :]
          im_ind = rois[0]
          roi = rois[1:]
          im = im_blob[im_ind, :, :, :].transpose((1, 2, 0)).copy()
          im += cfg.PIXEL_MEANS
          im = im[:, :, (2, 1, 0)]
          im = im.astype(np.uint8)
          cls = labels_blob[i]
          plt.imshow(im)
          print 'class: ', cls, ' overlap: ', overlaps[i]
          plt.gca().add_patch(
              plt.Rectangle((roi[0], roi[1]), roi[2] - roi[0],
                            roi[3] - roi[1], fill=False,
                            edgecolor='r', linewidth=3)
              )
          plt.show()
function_tokens: def _vis_minibatch ( im_blob , rois_blob , labels_blob , overlaps ) : import matplotlib . pyplot as plt for i in xrange ( rois_blob . shape [ 0 ] ) : rois = rois_blob [ i , : ] im_ind = rois [ 0 ] roi = rois [ 1 : ] im = im_blob [ im_ind , : , : , : ] . transpose ( ( 1 , 2 , 0 ) ) . copy ( ) im += cfg . PIXEL_MEANS im = im [ : , : , ( 2 , 1 , 0 ) ] im = im . astype ( np . uint8 ) cls = labels_blob [ i ] plt . imshow ( im ) print 'class: ' , cls , ' overlap: ' , overlaps [ i ] plt . gca ( ) . add_patch ( plt . Rectangle ( ( roi [ 0 ] , roi [ 1 ] ) , roi [ 2 ] - roi [ 0 ] , roi [ 3 ] - roi [ 1 ] , fill = False , edgecolor = 'r' , linewidth = 3 ) ) plt . show ( )