实现Faster R-CNN的keras代码理解(二)-配置文件解析

 

该章节主要介绍配置文件的构成,包括:

1、网络的选取   2、是否进行数据增强  3、anchor_box中scales以及ratios  4、Rois的个数  5、分类检测的over_laps的确定

from keras import backend as K
import math
class Config:
    def __init__(self):
        self.verbose=True;
        self.network='resnet50'
        ##setting for data agumentation
        self.use_horizontal_flips=False
        self.use_verticle_flips=False
        self.ro_90=False
        #anchor box scales
        self.anchor_box_scales=[128,256,512]
        #anchor box ratios
        self.anchor_box_ratios=[[1,1],[1./math.sqrt(2),2./math.sqrt(2)],[2./math.sqrt(2),1./math.sqrt(2)]]
        #size to resize the smallest side of the image
        self.im_size=600
        #image channel-wise mean to subtract#??
        self.img_channel_mean=[103.939, 116.779, 123.68]
        self.img_scaling_factor=1.0
        # number of ROIs at once
        self.num_rois=4
        # stride at the RPN (this depends on the network configuration)
        self.rpn_stride = 16

        self.balanced_classes = False

        # scaling the stdev
        self.std_scaling = 4.0#??
        self.classifier_regr_std = [8.0, 8.0, 4.0, 4.0]#??

        # overlaps for RPN
        self.rpn_min_overlap = 0.3
        self.rpn_max_overlap = 0.7

        # overlaps for classifier ROIs
        self.classifier_min_overlap = 0.1
        self.classifier_max_overlap = 0.5

        # placeholder for the class mapping, automatically generated by the parser
        self.class_mapping = None

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值