本文整理匯總了Python中rcnn.get_rcnn_testbatch方法的典型用法代碼示例。如果您正苦於以下問題:Python rcnn.get_rcnn_testbatch方法的具體用法?Python rcnn.get_rcnn_testbatch怎麽用?Python rcnn.get_rcnn_testbatch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rcnn
的用法示例。
在下文中一共展示了rcnn.get_rcnn_testbatch方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_batch
# 需要導入模塊: import rcnn [as 別名]
# 或者: from rcnn import get_rcnn_testbatch [as 別名]
def get_batch(self, cur_from=None):
if cur_from is None:
cur_from = self.cur
cur_to = min(cur_from + self.batch_size, self.size)
roidb = [self.roidb[self.index[i]] for i in range(cur_from, cur_to)]
if self.has_rpn:
data, label, im_info = get_rpn_testbatch(roidb, self.cfg)
else:
data, label, im_info = get_rcnn_testbatch(roidb, self.cfg)
data = [[mx.nd.array(idata[name]) for name in self.data_name] for idata in data]
self.lock_data.acquire()
self.data = data
self.im_info = im_info
self.lock_data.release()
return data, im_info
示例2: get_batch_individual
# 需要導入模塊: import rcnn [as 別名]
# 或者: from rcnn import get_rcnn_testbatch [as 別名]
def get_batch_individual(self, cur_from=None):
if cur_from is None:
cur_from = self.cur
cur_to = min(cur_from + self.batch_size, self.size)
roidb = [self.roidb[self.index[i]] for i in range(cur_from, cur_to)]
if self.has_rpn:
data, label, im_info = get_rpn_testbatch(roidb, self.cfg)
else:
data, label, im_info = get_rcnn_testbatch(roidb, self.cfg)
self.lock_data.acquire()
self.data = [mx.nd.array(data[name]) for name in self.data_name]
self.im_info = im_info
self.lock_data.release()
return data, im_info
示例3: get_batch
# 需要導入模塊: import rcnn [as 別名]
# 或者: from rcnn import get_rcnn_testbatch [as 別名]
def get_batch(self):
cur_from = self.cur
cur_to = min(cur_from + self.batch_size, self.size)
roidb = [self.roidb[self.index[i]] for i in range(cur_from, cur_to)]
if self.has_rpn:
data, label, im_info = get_rpn_testbatch(roidb, self.cfg)
else:
data, label, im_info = get_rcnn_testbatch(roidb, self.cfg)
self.data = [[mx.nd.array(idata[name]) for name in self.data_name] for idata in data]
self.im_info = im_info
示例4: get_batch_individual
# 需要導入模塊: import rcnn [as 別名]
# 或者: from rcnn import get_rcnn_testbatch [as 別名]
def get_batch_individual(self):
cur_from = self.cur
cur_to = min(cur_from + self.batch_size, self.size)
roidb = [self.roidb[self.index[i]] for i in range(cur_from, cur_to)]
if self.has_rpn:
data, label, im_info = get_rpn_testbatch(roidb, self.cfg)
else:
data, label, im_info = get_rcnn_testbatch(roidb, self.cfg)
self.data = [mx.nd.array(data[name]) for name in self.data_name]
self.im_info = im_info