本文整理汇总了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