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


Python roidb.add_bbox_regression_targets方法代码示例

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


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

示例1: __init__

# 需要导入模块: from roi_data_layer import roidb [as 别名]
# 或者: from roi_data_layer.roidb import add_bbox_regression_targets [as 别名]
def __init__(self, sess, saver, network, imdb, roidb, output_dir, pretrained_model=None):
        """Initialize the SolverWrapper."""
        self.net = network
        self.imdb = imdb
        self.roidb = roidb
        self.output_dir = output_dir
        self.pretrained_model = pretrained_model

        print 'Computing bounding-box regression targets...'
        if cfg.TRAIN.BBOX_REG:
            self.bbox_means, self.bbox_stds = rdl_roidb.add_bbox_regression_targets(
                roidb)
        print 'done'

        # For checkpoint
        self.saver = saver 
开发者ID:chenwuperth,项目名称:rgz_rcnn,代码行数:18,代码来源:train.py

示例2: __init__

# 需要导入模块: from roi_data_layer import roidb [as 别名]
# 或者: from roi_data_layer.roidb import add_bbox_regression_targets [as 别名]
def __init__(self, solver_prototxt, roidb, output_dir, pretrained_model=None):
        """Initialize the SolverWrapper."""
        self.output_dir = output_dir

        print 'Computing bounding-box regression targets...'
        if cfg.TRAIN.BBOX_REG:
            if cfg.IS_RPN:
                self.bbox_means, self.bbox_stds = gdl_roidb.add_bbox_regression_targets(roidb)
            else:
                self.bbox_means, self.bbox_stds = rdl_roidb.add_bbox_regression_targets(roidb)
        print 'done'

        self.solver = caffe.SGDSolver(solver_prototxt)
        if pretrained_model is not None:
            print ('Loading pretrained model '
                   'weights from {:s}').format(pretrained_model)
            self.solver.net.copy_from(pretrained_model)

        self.solver_param = caffe_pb2.SolverParameter()
        with open(solver_prototxt, 'rt') as f:
            pb2.text_format.Merge(f.read(), self.solver_param)

        self.solver.net.layers[0].set_roidb(roidb) 
开发者ID:tanshen,项目名称:SubCNN,代码行数:25,代码来源:train.py

示例3: __init__

# 需要导入模块: from roi_data_layer import roidb [as 别名]
# 或者: from roi_data_layer.roidb import add_bbox_regression_targets [as 别名]
def __init__(self, solver_prototxt, roidb, output_dir,
                 pretrained_model=None):
        """Initialize the SolverWrapper."""
        self.output_dir = output_dir

        if (cfg.TRAIN.HAS_RPN and cfg.TRAIN.BBOX_REG and
            cfg.TRAIN.BBOX_NORMALIZE_TARGETS):
            # RPN can only use precomputed normalization because there are no
            # fixed statistics to compute a priori
            assert cfg.TRAIN.BBOX_NORMALIZE_TARGETS_PRECOMPUTED

        if cfg.TRAIN.BBOX_REG:
            print 'Computing bounding-box regression targets...'
            self.bbox_means, self.bbox_stds = \
                    rdl_roidb.add_bbox_regression_targets(roidb)
            print 'done'

        self.solver = caffe.SGDSolver(solver_prototxt)
        if pretrained_model is not None:
            print ('Loading pretrained model '
                   'weights from {:s}').format(pretrained_model)
            self.solver.net.copy_from(pretrained_model)

        self.solver_param = caffe_pb2.SolverParameter()
        with open(solver_prototxt, 'rt') as f:
            pb2.text_format.Merge(f.read(), self.solver_param)

        self.solver.net.layers[0].set_roidb(roidb) 
开发者ID:playerkk,项目名称:face-py-faster-rcnn,代码行数:30,代码来源:train.py

示例4: __init__

# 需要导入模块: from roi_data_layer import roidb [as 别名]
# 或者: from roi_data_layer.roidb import add_bbox_regression_targets [as 别名]
def __init__(self, sess, saver, network, imdb, roidb, output_dir, pretrained_model=None):
        """Initialize the SolverWrapper."""
        self.net = network
        self.imdb = imdb
        self.roidb = roidb
        self.output_dir = output_dir
        self.pretrained_model = pretrained_model

        print 'Computing bounding-box regression targets...'
        if cfg.TRAIN.BBOX_REG:
            self.bbox_means, self.bbox_stds = rdl_roidb.add_bbox_regression_targets(roidb)
        print 'done'

        # For checkpoint
        self.saver = saver 
开发者ID:smallcorgi,项目名称:Faster-RCNN_TF,代码行数:17,代码来源:train.py


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