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


Python IMDB.merge_roidbs方法代码示例

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


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

示例1: selective_search_roidb

# 需要导入模块: from imdb import IMDB [as 别名]
# 或者: from imdb.IMDB import merge_roidbs [as 别名]
def selective_search_roidb(self, gt_roidb, append_gt=False):
        """
        get selective search roidb and ground truth roidb
        :param gt_roidb: ground truth roidb
        :param append_gt: append ground truth
        :return: roidb of selective search
        """
        cache_file = os.path.join(self.cache_path, self.name + '_ss_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 append_gt:
            print 'appending ground truth annotations'
            ss_roidb = self.load_selective_search_roidb(gt_roidb)
            roidb = IMDB.merge_roidbs(gt_roidb, ss_roidb)
        else:
            roidb = self.load_selective_search_roidb(gt_roidb)
        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:tonysy,项目名称:Deep-Feature-Flow-Segmentation,代码行数:27,代码来源:pascal_voc.py

示例2: selective_search_roidb

# 需要导入模块: from imdb import IMDB [as 别名]
# 或者: from imdb.IMDB import merge_roidbs [as 别名]
def selective_search_roidb(self, gt_roidb, append_gt=False):
        """
        get selective search roidb and ground truth roidb
        :param gt_roidb: ground truth roidb
        :param append_gt: append ground truth
        :return: roidb of selective search
        """
        cache_file = os.path.join(self.cache_path, self.name + '_ss_roidb.pkl')
        if os.path.exists(cache_file):
            with open(cache_file, 'rb') as fid:
                roidb = cPickle.load(fid)
            logger.info('%s ss roidb loaded from %s' % (self.name, cache_file))
            return roidb

        if append_gt:
            logger.info('%s appending ground truth annotations' % self.name)
            ss_roidb = self.load_selective_search_roidb(gt_roidb)
            roidb = IMDB.merge_roidbs(gt_roidb, ss_roidb)
        else:
            roidb = self.load_selective_search_roidb(gt_roidb)
        with open(cache_file, 'wb') as fid:
            cPickle.dump(roidb, fid, cPickle.HIGHEST_PROTOCOL)
        logger.info('%s wrote ss roidb to %s' % (self.name, cache_file))

        return roidb 
开发者ID:tech-quantum,项目名称:sia-cog,代码行数:27,代码来源:pascal_voc.py

示例3: rpn_roidb

# 需要导入模块: from imdb import IMDB [as 别名]
# 或者: from imdb.IMDB import merge_roidbs [as 别名]
def rpn_roidb(self, gt_roidb, append_gt=False):
        """
        get rpn roidb and ground truth roidb
        :param gt_roidb: ground truth roidb
        :param append_gt: append ground truth
        :return: roidb of rpn
        """
        if append_gt:
            print 'appending ground truth annotations'
            rpn_roidb = self.load_rpn_roidb(gt_roidb)
            roidb = IMDB.merge_roidbs(gt_roidb, rpn_roidb)
        else:
            roidb = self.load_rpn_roidb(gt_roidb)
        return roidb 
开发者ID:TuSimple,项目名称:mx-maskrcnn,代码行数:16,代码来源:cityscape.py


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