def imdb_proposals(net, imdb):
 _t = Timer()
 imdb_boxes = [[] for _ in xrange(imdb.num_images)]
 for i in xrange(imdb.num_images):
  im = cv2.imread(imdb.image_path_at(i))
  _t.tic()
  (imdb_boxes[i], scores) = im_proposals(net, im)
  _t.toc()
  print 'im_proposals: {:d}/{:d} {:.3f}s'.format((i + 1), imdb.num_images, _t.average_time)
  if 0:
   dets = np.hstack((imdb_boxes[i], scores))
   _vis_proposals(im, dets[:3, :], thresh=0.9)
   plt.show()
 return imdb_boxes

def imdb_proposals ( net , imdb ) : _t = Timer ( ) imdb_boxes = [ [ ] for _ in xrange ( imdb . num_images ) ] for i in xrange ( imdb . num_images ) : im = cv2 . imread ( imdb . image_path_at ( i ) ) _t . tic ( ) ( imdb_boxes [ i ] , scores ) = im_proposals ( net , im ) _t . toc ( ) print 'im_proposals: {:d}/{:d} {:.3f}s' . format ( ( i + 1 ) , imdb . num_images , _t . average_time ) if 0 : dets = np . hstack ( ( imdb_boxes [ i ] , scores ) ) _vis_proposals ( im , dets [ : 3 , : ] , thresh = 0.9 ) plt . show ( ) return imdb_boxes
generate rpn proposals on all images in an imdb .