当前位置: 首页>>代码示例>>Python>>正文


Python imdb.merge_roidbs方法代码示例

本文整理汇总了Python中datasets.imdb.imdb.merge_roidbs方法的典型用法代码示例。如果您正苦于以下问题:Python imdb.merge_roidbs方法的具体用法?Python imdb.merge_roidbs怎么用?Python imdb.merge_roidbs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在datasets.imdb.imdb的用法示例。


在下文中一共展示了imdb.merge_roidbs方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: rpn_roidb

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def rpn_roidb(self):
    if int(self._year) == 2007 or self._image_set != 'test':
      gt_roidb = self.gt_roidb()
      rpn_roidb = self._load_rpn_roidb(gt_roidb)
      roidb = imdb.merge_roidbs(gt_roidb, rpn_roidb)
    else:
      roidb = self._load_rpn_roidb(None)

    return roidb 
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:11,代码来源:pascal_voc.py

示例2: selective_search_roidb

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def selective_search_roidb(self):
    """
    Return the database of selective search regions of interest.
    Ground-truth ROIs are also included.

    This function loads/saves from/to a cache file to speed up future calls.
    """
    cache_file = os.path.join(self.cache_path,
                              self.name + '_selective_search_roidb.pkl')

    if os.path.exists(cache_file):
        with open(cache_file, 'rb') as fid:
            roidb = pickle.load(fid)
        print('{} ss roidb loaded from {}'.format(self.name, cache_file))
        return roidb

    if int(self._year) == 2007 or self._image_set != 'test':
        gt_roidb = self.gt_roidb()
        # ss_roidb = self._load_selective_search_roidb(gt_roidb)
        # roidb = datasets.imdb.merge_roidbs(gt_roidb, ss_roidb)
        roidb = self._load_selective_search_roidb(gt_roidb)
    else:
        roidb = self._load_selective_search_roidb(None)
    with open(cache_file, 'wb') as fid:
        pickle.dump(roidb, fid, pickle.HIGHEST_PROTOCOL)
    print('wrote ss roidb to {}'.format(cache_file))

    return roidb 
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:30,代码来源:pascal_voc.py

示例3: rpn_roidb

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def rpn_roidb(self):
        if int(self._year) == 2007 or self._image_set != 'test':
            gt_roidb = self.gt_roidb()
            rpn_roidb = self._load_rpn_roidb(gt_roidb)
            roidb = imdb.merge_roidbs(gt_roidb, rpn_roidb)
        else:
            roidb = self._load_rpn_roidb(None)

        return roidb 
开发者ID:Sanster,项目名称:tf_ctpn,代码行数:11,代码来源:pascal_voc.py

示例4: rpn_roidb

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def rpn_roidb(self):
        if self._image_set != 'test':
            gt_roidb = self.gt_roidb()
            rpn_roidb = self._load_rpn_roidb(gt_roidb)
            roidb = imdb.merge_roidbs(gt_roidb, rpn_roidb)
        else:
            roidb = self._load_rpn_roidb(None)

        return roidb 
开发者ID:Feynman27,项目名称:pytorch-detect-to-track,代码行数:11,代码来源:imagenet_detect.py

示例5: rpn_roidb

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def rpn_roidb(self):
        if self._image_set != 'testing':
            gt_roidb = self.gt_roidb()
            rpn_roidb = self._load_rpn_roidb(gt_roidb)
            roidb = imdb.merge_roidbs(gt_roidb, rpn_roidb)
        else:
            roidb = self._load_rpn_roidb(None)

        return roidb 
开发者ID:ucbdrive,项目名称:3d-vehicle-tracking,代码行数:11,代码来源:kitti.py

示例6: selective_search_roidb

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def selective_search_roidb(self):
        """
        Return the database of selective search regions of interest.
        Ground-truth ROIs are also included.

        This function loads/saves from/to a cache file to speed up future calls.
        """
        cache_file = os.path.join(self.cache_path,
                                  self.name + '_selective_search_roidb.pkl')

        if os.path.exists(cache_file):
            with open(cache_file, 'rb') as fid:
                roidb = cPickle.load(fid)
            print '{} ss roidb loaded from {}'.format(self.name, cache_file)
            return roidb

        if int(self._year) == 2007 or self._image_set != 'test':
            gt_roidb = self.gt_roidb()
            ss_roidb = self._load_selective_search_roidb(gt_roidb)
            roidb = imdb.merge_roidbs(gt_roidb, ss_roidb)
        else:
            roidb = self._load_selective_search_roidb(None)
        with open(cache_file, 'wb') as fid:
            cPickle.dump(roidb, fid, cPickle.HIGHEST_PROTOCOL)
        print 'wrote ss roidb to {}'.format(cache_file)

        return roidb 
开发者ID:playerkk,项目名称:face-py-faster-rcnn,代码行数:29,代码来源:pascal_voc.py

示例7: _roidb_from_proposals

# 需要导入模块: from datasets.imdb import imdb [as 别名]
# 或者: from datasets.imdb.imdb import merge_roidbs [as 别名]
def _roidb_from_proposals(self, method):
        """
        Creates a roidb from pre-computed proposals of a particular methods.
        """
        top_k = self.config['top_k']
        cache_file = osp.join(self.cache_path, self.name +
                              '_{:s}_top{:d}'.format(method, top_k) +
                              '_roidb.pkl')

        if osp.exists(cache_file):
            with open(cache_file, 'rb') as fid:
                roidb = cPickle.load(fid)
            print '{:s} {:s} roidb loaded from {:s}'.format(self.name, method,
                                                            cache_file)
            return roidb

        if self._image_set in self._gt_splits:
            gt_roidb = self.gt_roidb()
            method_roidb = self._load_proposals(method, gt_roidb)
            roidb = imdb.merge_roidbs(gt_roidb, method_roidb)
            # Make sure we don't use proposals that are contained in crowds
            roidb = _filter_crowd_proposals(roidb, self.config['crowd_thresh'])
        else:
            roidb = self._load_proposals(method, None)
        with open(cache_file, 'wb') as fid:
            cPickle.dump(roidb, fid, cPickle.HIGHEST_PROTOCOL)
        print 'wrote {:s} roidb to {:s}'.format(method, cache_file)
        return roidb 
开发者ID:playerkk,项目名称:face-py-faster-rcnn,代码行数:30,代码来源:coco.py


注:本文中的datasets.imdb.imdb.merge_roidbs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。