Trident Networks学习记录

论文的主题及主要改进的东西:

主要通过改变dilation rate来变化receptive field的大小,测试不同的receptive field 对识别不同大小的目标的影响。最后证明receptive field确实是对识别有影响。

模型结构:

分为3个branch,每个branch都相同,只是dilation rate不同,甚至连weights都是共享的。因为都相同,所以只说一个branch。

一个branch是resnet,

(1)具体怎么修改每个conv block如图:

(2)而resnet有那么多block,修改哪些block?具体文中做了实验,结果如下

文中没有提到deformable具体加在哪?不清楚。

另贴deformable 原论文中是如何添加deformable convolution 的,其仅仅是在最后一个部分添加了可变形卷积:

阅读源代码,可以看到,其只更改了第四个卷积部分,其他部分和resnet一样,只有第四部分变了

c1 = cls.resnet_c1(data, use_3x3_conv0, use_bn_preprocess, norm_type, norm_mom, ndev)
c2 = cls.resnet_c2(c1, num_c2_unit, 1, 1, norm_type, norm_mom, ndev)
c3 = cls.resnet_c3(c2, num_c3_unit, 2, 1, norm_type, norm_mom, ndev)
c4 = cls.resnet_trident_c4(c3, num_c4_unit, 2, branch_dilates, norm_type, norm_mom, ndev, num_trident_block,
                           num_branch, branch_ids, branch_bn_shared, branch_conv_shared, branch_deform)
# stack branch features and merge into batch dim
c4 = cls.stack_branch_symbols(c4)
c5 = cls.resnet_c5(c4, num_c5_unit, 1, 2, norm_type, norm_mom, ndev)

而第四部分有多个block,具体几个都可以,每个block的dilate按照论文中的1,2,3。只有(3X3)那个卷据修改了dilate,同样只有这个地方会修改为可变型卷积,如代码所示:

conv2_offset = cls.conv_shared(
    relu2, name=name + "_conv2_offset", num_filter=72, kernel=(3, 3),
    pad=(1, 1), stride=(1, 1), dilate=(1, 1), no_bias=False,
    branch_ids=branch_ids, share_weight=branch_conv_shared)
conv2 = cls.deform_conv_shared(
    relu2, name=name + "_conv2", conv_offset=conv2_offset,  num_filter=filter // 4, kernel=(3, 3),
    pad=dilate, stride=stride, dilate=dilate, num_deformable_group=4,
    branch_ids=branch_ids, share_weight=branch_conv_shared)

 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值