faster rcnn keras 版本调参总结

基于keras 版本的调参,首先要搞清楚每一个文件的用处,其次是每句代码的意思。本文简单指明几个要点。

在datagenerator以及test.py中注意修改几个overlap

from keras import backend as K
import math

class Config:

	def __init__(self):

		self.verbose = True

		self.network = 'resnet50'
		#选用网络

		# setting for data augmentation
                 #是否图像增强,水平垂直以及翻转
		self.use_horizontal_flips = False
		self.use_vertical_flips = False
		self.rot_90 = False

		# anchor box scales
                #anchor尺寸以及rations比率,是自己数据集以及目标尺寸而定
		self.anchor_box_scales = [30, 50, 20]

		# 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 = 1200

		# image channel-wise mean to subtract
                #通道像素值减少多少,我的目标很小,所以我设置为0.
		#self.img_channel_mean = [103.939, 116.779, 123.68]
		self.img_channel_mean = [0, 0, 0]
		self.img_scaling_factor = 1.0

		# number of ROIs at once
                #训练回归框,设置ROI数目
		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
                #设置交并比大小,小于0.3为负样本,大于0.7为正样本,两者之间中性样本丢弃
		self.rpn_min_overlap = 0.3
		self.rpn_max_overlap = 0.7

		# overlaps for classifier ROIs
                #第一次两分类识别中阈值大小,两分类小目标检测最好设置为-1
		self.classifier_min_overlap = -1
		self.classifier_max_overlap = 0.5

		# placeholder for the class mapping, automatically generated by the parser类别映射表
		self.class_mapping = None

		#location of pretrained weights for the base network 
		# weight files can be found at:
		# https://github.com/fchollet/deep-learning-models/releases/download/v0.2/resnet50_weights_th_dim_ordering_th_kernels_notop.h5
		# https://github.com/fchollet/deep-learning-models/releases/download/v0.2/resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5

		self.model_path = 'model_frcnn.vgg.hdf5'

 

 

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sun_ching

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值