Python roi_data_layer.minibatch.get_minibatch() Examples
The following are 29
code examples of roi_data_layer.minibatch.get_minibatch().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
roi_data_layer.minibatch
, or try the search function
.
Example #1
Source File: layer.py From caffe-faster-rcnn-resnet-fpn with MIT License | 6 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] if cfg.TRAIN.USE_OHEM: blobs = get_allrois_minibatch(minibatch_db, self._num_classes) else: blobs = get_minibatch(minibatch_db, self._num_classes) return blobs
Example #2
Source File: layer.py From faster-rcnn-resnet with MIT License | 6 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] if cfg.TRAIN.USE_OHEM: blobs = get_allrois_minibatch(minibatch_db, self._num_classes) else: blobs = get_minibatch(minibatch_db, self._num_classes) return blobs
Example #3
Source File: roibatchLoader.py From OICR-pytorch with MIT License | 6 votes |
def __getitem__(self, index): # get the anchor index for current sample index # here we set the anchor index to the last one # sample in this group minibatch_db = [self._roidb[index]] # [self._roidb[index_ratio]] blobs = get_minibatch(minibatch_db, self._num_classes) np.random.shuffle(blobs['rois']) rois = torch.from_numpy(blobs['rois'][:self.max_rois_size]) data = torch.from_numpy(blobs['data']) labels = torch.from_numpy(blobs['labels']) data_height, data_width = data.size(1), data.size(2) data = data.permute(0, 3, 1, 2).contiguous().view(3, data_height, data_width) info = torch.Tensor([rois.size(0), data_height, data_width]) return data, rois, labels, info
Example #4
Source File: layer.py From Faster-RCNN_TF with MIT License | 5 votes |
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 #5
Source File: layer.py From py-R-FCN with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #6
Source File: layer.py From py-R-FCN with MIT License | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #7
Source File: layer.py From pytorch-faster-rcnn with MIT License | 5 votes |
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 #8
Source File: layer.py From oicr with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #9
Source File: layer.py From oicr with MIT License | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #10
Source File: layer.py From caffe-faster-rcnn-resnet-fpn with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] if cfg.TRAIN.USE_OHEM: blobs = get_allrois_minibatch(minibatch_db, self._num_classes) else: blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #11
Source File: layer.py From SubCNN with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #12
Source File: layer.py From SubCNN with MIT License | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #13
Source File: layer.py From face-magnet with Apache License 2.0 | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #14
Source File: layer.py From face-magnet with Apache License 2.0 | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #15
Source File: layer.py From uai-sdk with Apache License 2.0 | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #16
Source File: layer.py From uai-sdk with Apache License 2.0 | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #17
Source File: layer.py From Collaborative-Learning-for-Weakly-Supervised-Object-Detection with MIT License | 5 votes |
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 #18
Source File: layer.py From tf-faster-rcnn with MIT License | 5 votes |
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 #19
Source File: layer.py From scene-graph-TF-release with MIT License | 5 votes |
def _get_next_minibatch(self, db_inds): """Return the blobs to be used for the next minibatch. """ minibatch_db = [self._roidb[i] for i in db_inds] if cfg.TRAIN.USE_RPN_DB: minibatch_db = self.imdb.add_rpn_rois(minibatch_db) prepare_roidb(minibatch_db) add_bbox_regression_targets(minibatch_db, self.bbox_means, self.bbox_stds) blobs = get_minibatch(minibatch_db, self._num_classes) if blobs is not None: blobs['db_inds'] = db_inds return blobs
Example #20
Source File: layer.py From rgz_rcnn with MIT License | 5 votes |
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 #21
Source File: layer.py From faster-rcnn-resnet with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] if cfg.TRAIN.USE_OHEM: blobs = get_allrois_minibatch(minibatch_db, self._num_classes) else: blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #22
Source File: layer.py From face-py-faster-rcnn with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #23
Source File: layer.py From face-py-faster-rcnn with MIT License | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #24
Source File: layer.py From dpl with MIT License | 5 votes |
def run(self): print 'BlobFetcher started' while True: db_inds = self._get_next_minibatch_inds() minibatch_db = [self._roidb[i] for i in db_inds] blobs = get_minibatch(minibatch_db, self._num_classes) self._queue.put(blobs)
Example #25
Source File: layer.py From dpl with MIT License | 5 votes |
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. """ if cfg.TRAIN.USE_PREFETCH: return self._blob_queue.get() else: 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 #26
Source File: layer.py From RGB-N with MIT License | 5 votes |
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 #27
Source File: layer.py From tf_ctpn with MIT License | 5 votes |
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 #28
Source File: layer.py From SSH-TensorFlow with MIT License | 5 votes |
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 #29
Source File: layer.py From pytorch-FPN with MIT License | 5 votes |
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)