parameters: (net, im)
return_statement: return boxes, scores
docstring: Generate RPN proposals on a single image.
docstring_summary: Generate RPN proposals on a single image.
docstring_tokens: Generate RPN proposals on a single image .
function: def im_proposals(net, im):
      """Generate RPN proposals on a single image."""
      blobs = {}
      blobs['data'], blobs['im_info'] = _get_image_blob(im)
      net.blobs['data'].reshape(*(blobs['data'].shape))
      net.blobs['im_info'].reshape(*(blobs['im_info'].shape))
      blobs_out = net.forward(
              data=blobs['data'].astype(np.float32, copy=False),
              im_info=blobs['im_info'].astype(np.float32, copy=False))
  
      scale = blobs['im_info'][0, 2]
      boxes = blobs_out['rois'][:, 1:].copy() / scale
      scores = blobs_out['scores'].copy()
      return boxes, scores
function_tokens: def im_proposals ( net , im ) : blobs = { } blobs [ 'data' ] , blobs [ 'im_info' ] = _get_image_blob ( im ) net . blobs [ 'data' ] . reshape ( * ( blobs [ 'data' ] . shape ) ) net . blobs [ 'im_info' ] . reshape ( * ( blobs [ 'im_info' ] . shape ) ) blobs_out = net . forward ( data = blobs [ 'data' ] . astype ( np . float32 , copy = False ) , im_info = blobs [ 'im_info' ] . astype ( np . float32 , copy = False ) ) scale = blobs [ 'im_info' ] [ 0 , 2 ] boxes = blobs_out [ 'rois' ] [ : , 1 : ] . copy ( ) / scale scores = blobs_out [ 'scores' ] . copy ( ) return boxes , scores