def _get_next_minibatch(self):
        """Return the blobs to be used for the next minibatch.

        If cfg.TRAIN.USE_PREFETCH is True, then blobs will be computed in a
        separate process and made available through self._blob_queue.
        """
        db_inds = self._get_next_minibatch_inds()
        minibatch_db = [self._roidb[i] for i in db_inds]
        return get_minibatch(minibatch_db, self._num_classes)
Example #2
0
    def _get_next_minibatch(self):
        """Return the blobs to be used for the next minibatch.

        If cfg.TRAIN.USE_PREFETCH is True, then blobs will be computed in a
        separate process and made available through self._blob_queue.
        """
        db_inds = self._get_next_minibatch_inds()
        # print('db_inds:', db_inds)
        minibatch_db = [self._roidb[i] for i in db_inds]
        # print('minibatch_db:', minibatch_db)
        while len(minibatch_db[0]['boxes']) < 1:
            print(len(minibatch_db[0]['boxes']))
            db_inds = self._get_next_minibatch_inds()
            minibatch_db = [self._roidb[i] for i in db_inds]
        return get_minibatch(minibatch_db, self._num_classes)
Example #3
0
    def _get_next_minibatch(self):
        """return the blobs to be used for the next minibatch

        if cfg.TRAIN.USE_PREFETCH (好像没有这个参数)
        is True, then blobs will be computed in a
        separate process and made available through self._blob_queue.
        """
        """
        获取下一个mini_batch中roidb(即为minibatch.py中roidb,部分图像的rois相关信息),
        调用_get_next_minibatch_inds()获取下一个mini_batch中roidb的索引--->获取minibatch_db(即minibatch.py中的roidb)
        --->以minibatch_db作为参数调用get_minibatch(minibatch_db, self._num_classes)构造网络输入blobs
        (默认训练阶段使用RPN时,blob含'data'、'gt_boxes'、'gt_ishard'、'dontcare_area'、'im_info'、'im_name'字段),被forward(...)调用
        """
        # 获取下一批图片的索引,即获取下一个mini_batch中roidb
        db_inds = self._get_next_minibatch_inds()
        # 把对应索引的图像信息(dict)取出来,放入一个列表中
        minibatch_db = [self._roidb[i] for i in db_inds]
        return get_minibatch(minibatch_db, self._num_classes)
Example #4
0
 def _get_next_minibatch(self):
     # 根据序号,返回mini-batch数据
     db_inds = self._get_next_minibatch_inds()
     minibatch_db = [self._roidb[i] for i in db_inds]
     return get_minibatch(minibatch_db)