parameters: (im, dets, thresh=0.5)
docstring: Draw detected bounding boxes.
docstring_summary: Draw detected bounding boxes.
docstring_tokens: Draw detected bounding boxes .
function: def _vis_proposals(im, dets, thresh=0.5):
      """Draw detected bounding boxes."""
      inds = np.where(dets[:, -1] >= thresh)[0]
      if len(inds) == 0:
          return
  
      class_name = 'obj'
      im = im[:, :, (2, 1, 0)]
      fig, ax = plt.subplots(figsize=(12, 12))
      ax.imshow(im, aspect='equal')
      for i in inds:
          bbox = dets[i, :4]
          score = dets[i, -1]
  
          ax.add_patch(
              plt.Rectangle((bbox[0], bbox[1]),
                            bbox[2] - bbox[0],
                            bbox[3] - bbox[1], fill=False,
                            edgecolor='red', linewidth=3.5)
              )
          ax.text(bbox[0], bbox[1] - 2,
                  '{:s} {:.3f}'.format(class_name, score),
                  bbox=dict(facecolor='blue', alpha=0.5),
                  fontsize=14, color='white')
  
      ax.set_title(('{} detections with '
                    'p({} | box) >= {:.1f}').format(class_name, class_name,
                                                    thresh),
                    fontsize=14)
      plt.axis('off')
      plt.tight_layout()
      plt.draw()
function_tokens: def _vis_proposals ( im , dets , thresh = 0.5 ) : inds = np . where ( dets [ : , - 1 ] >= thresh ) [ 0 ] if len ( inds ) == 0 : return class_name = 'obj' im = im [ : , : , ( 2 , 1 , 0 ) ] fig , ax = plt . subplots ( figsize = ( 12 , 12 ) ) ax . imshow ( im , aspect = 'equal' ) for i in inds : bbox = dets [ i , : 4 ] score = dets [ i , - 1 ] ax . add_patch ( plt . Rectangle ( ( bbox [ 0 ] , bbox [ 1 ] ) , bbox [ 2 ] - bbox [ 0 ] , bbox [ 3 ] - bbox [ 1 ] , fill = False , edgecolor = 'red' , linewidth = 3.5 ) ) ax . text ( bbox [ 0 ] , bbox [ 1 ] - 2 , '{:s} {:.3f}' . format ( class_name , score ) , bbox = dict ( facecolor = 'blue' , alpha = 0.5 ) , fontsize = 14 , color = 'white' ) ax . set_title ( ( '{} detections with ' 'p({} | box) >= {:.1f}' ) . format ( class_name , class_name , thresh ) , fontsize = 14 ) plt . axis ( 'off' ) plt . tight_layout ( ) plt . draw ( )