FoveaBox: Beyond Anchor-based Object Detector
PDF: https://arxiv.org/pdf/1904.03797v1.pdf
PyTorch代码: https://github.com/shanglianlm0525/PyTorch-Networks

创新点:
1 提出了fovea的概念,重新定义正负样本,正样本比GT更小,负样本更远离GT.
2 FPN结构不同层负责不同尺度的目标.
3 Anchor-Free

1 FoveaBox网络结构:

2 方法介绍

2-1 尺度划分 (Scale Assignment)

FPN输出5个层P3, P4, P5, P6, P7,每个层分别负责尺度为

的,目标,其中 S l S_{l} Sl​分别为为 3 2 2 32^{2} 322, 6 4 2 64^{2} 642, 12 8 2 128^{2} 1282, 25 6 2 256^{2} 2562, 51 2 2 512^{2} 5122. η η η将控制每个层预测的目标尺度.如果 η ≤ 2 η \leq \sqrt{2} η≤2 ​, 每层目标尺度不重叠,如果 η > 2 η>\sqrt{2} η>2 ​,不同层预测的目标将会重叠,即同一个目标将会被多个层预测.

2-2 Fovea定义(Object Fovea)

因为目标真实的边框上的点通常远离目标中心,和背景较为接近,因此FoveaBox先计算出目标中心,然后对目标的真实边框向目标中心收缩一点,作为正样本, 同时向外扩展一点,作为负样本,中间的点忽略掉.

positive area (fovea)定义为:

其中
正负样本的划分 为σ1 = 0:3;和 σ2 = 0:4

2-3 预测边框(Box Prediction)

FoveaBox 回归每一个 cell 的坐标映射回原始图像之后和对应的 ground truth 的偏移量.

3 实验结果

PyTorch代码:

import torch
import torch.nn as nn
import torchvisiondef Conv3x3ReLU(in_channels,out_channels):return nn.Sequential(nn.Conv2d(in_channels=in_channels,out_channels=out_channels,kernel_size=3,stride=1,padding=1),nn.ReLU6(inplace=True))def locLayer(in_channels,out_channels):return nn.Sequential(Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),nn.Conv2d(in_channels=in_channels, out_channels=out_channels, kernel_size=3, stride=1, padding=1),)def confLayer(in_channels,out_channels):return nn.Sequential(Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),Conv3x3ReLU(in_channels=in_channels, out_channels=in_channels),nn.Conv2d(in_channels=in_channels, out_channels=out_channels, kernel_size=3, stride=1, padding=1),)class FoveaBox(nn.Module):def __init__(self, num_classes=80):super(FoveaBox, self).__init__()self.num_classes = num_classesresnet = torchvision.models.resnet50()layers = list(resnet.children())self.layer1 = nn.Sequential(*layers[:5])self.layer2 = nn.Sequential(*layers[5])self.layer3 = nn.Sequential(*layers[6])self.layer4 = nn.Sequential(*layers[7])self.lateral5 = nn.Conv2d(in_channels=2048, out_channels=256, kernel_size=1)self.lateral4 = nn.Conv2d(in_channels=1024, out_channels=256, kernel_size=1)self.lateral3 = nn.Conv2d(in_channels=512, out_channels=256, kernel_size=1)self.upsample4 = nn.ConvTranspose2d(in_channels=256, out_channels=256, kernel_size=4, stride=2, padding=1)self.upsample3 = nn.ConvTranspose2d(in_channels=256, out_channels=256, kernel_size=4, stride=2, padding=1)self.downsample6 = nn.Conv2d(in_channels=256, out_channels=256, kernel_size=3, stride=2, padding=1)self.downsample6_relu = nn.ReLU6(inplace=True)self.downsample5 = nn.Conv2d(in_channels=256, out_channels=256, kernel_size=3, stride=2, padding=1)self.loc_layer3 = locLayer(in_channels=256,out_channels=4)self.conf_layer3 = confLayer(in_channels=256,out_channels=self.num_classes)self.loc_layer4 = locLayer(in_channels=256, out_channels=4)self.conf_layer4 = confLayer(in_channels=256, out_channels=self.num_classes)self.loc_layer5 = locLayer(in_channels=256, out_channels=4)self.conf_layer5 = confLayer(in_channels=256, out_channels=self.num_classes)self.loc_layer6 = locLayer(in_channels=256, out_channels=4)self.conf_layer6 = confLayer(in_channels=256, out_channels=self.num_classes)self.loc_layer7 = locLayer(in_channels=256, out_channels=4)self.conf_layer7 = confLayer(in_channels=256, out_channels=self.num_classes)self.init_params()def init_params(self):for m in self.modules():if isinstance(m, nn.Conv2d):nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')elif isinstance(m, nn.BatchNorm2d):nn.init.constant_(m.weight, 1)nn.init.constant_(m.bias, 0)def forward(self, x):x = self.layer1(x)c3 =x = self.layer2(x)c4 =x = self.layer3(x)c5 = x = self.layer4(x)p5 = self.lateral5(c5)p4 = self.upsample4(p5) + self.lateral4(c4)p3 = self.upsample3(p4) + self.lateral3(c3)p6 = self.downsample5(p5)p7 = self.downsample6_relu(self.downsample6(p6))loc3 = self.loc_layer3(p3)conf3 = self.conf_layer3(p3)loc4 = self.loc_layer4(p4)conf4 = self.conf_layer4(p4)loc5 = self.loc_layer5(p5)conf5 = self.conf_layer5(p5)loc6 = self.loc_layer6(p6)conf6 = self.conf_layer6(p6)loc7 = self.loc_layer7(p7)conf7 = self.conf_layer7(p7)locs = torch.cat([loc3.permute(0, 2, 3, 1).contiguous().view(loc3.size(0), -1),loc4.permute(0, 2, 3, 1).contiguous().view(loc4.size(0), -1),loc5.permute(0, 2, 3, 1).contiguous().view(loc5.size(0), -1),loc6.permute(0, 2, 3, 1).contiguous().view(loc6.size(0), -1),loc7.permute(0, 2, 3, 1).contiguous().view(loc7.size(0), -1)],dim=1)confs = torch.cat([conf3.permute(0, 2, 3, 1).contiguous().view(conf3.size(0), -1),conf4.permute(0, 2, 3, 1).contiguous().view(conf4.size(0), -1),conf5.permute(0, 2, 3, 1).contiguous().view(conf5.size(0), -1),conf6.permute(0, 2, 3, 1).contiguous().view(conf6.size(0), -1),conf7.permute(0, 2, 3, 1).contiguous().view(conf7.size(0), -1),], dim=1)out = (locs, confs)return outif __name__ == '__main__':model = FoveaBox()print(model)input = torch.randn(1, 3, 800, 800)out = model(input)print(out[0].shape)print(out[1].shape)

目标检测论文:FoveaBox: Beyond Anchor-based Object Detector及其PyTorch实现相关推荐

  1. 【论文阅读】【3d目标检测】Embracing Single Stride 3D Object Detector with Sparse Transformer

    论文标题:Embracing Single Stride 3D Object Detector with Sparse Transformer 源码地址:https://github.com/TuSi ...

  2. 显著目标检测论文(三)——Minimum Barrier Salient Object Detection at 80 FPS (2015)

    这篇文章最大的亮点就是其实时性, 80 fps. 个人感觉论文的效果还是很惊艳的. 可以先看看论文的效果. 如 Figure 1 所示. 作者使用的机器配置如下: 3.2GHz x 2 CPU 12G ...

  3. 【目标检测】cvpr2021_VarifocalNet: An IoU-Aware Dense Object Detector

    文章目录 一.背景 二.动机 三.方法 3.1 IACS--IoU-Aware Classification Score 3.2 Varifocal loss 3.3 Star-Shaped Box ...

  4. 目标检测论文阅读:GHM(anchor based)

    目标检测论文阅读:GHM(anchor based) 论文链接:https://arxiv.org/abs/1811.05181 代码链接:https://github.com/libuyu/GHM_ ...

  5. 毫米波目标检测论文 阅读笔记 | Radar Transformer: An Object Classification Network Based on 4D MMW Imaging Radar

    毫米波目标检测论文 | Radar Transformer: An Object Classification Network Based on 4D MMW Imaging Radar Jie Ba ...

  6. FoveaBox 超越anchor based检测框架

    目标检测系列文章 yolo v1原理:https://blog.csdn.net/cjnewstar111/article/details/94035842 yolo v2原理:https://blo ...

  7. 【目标检测论文阅读笔记】Feature-Enhanced CenterNet for Small Object Detection in Remote Sensing Images

    Abstract: 与 anchor-based基于锚点的检测器相比,anchor-free无锚点检测器 具有灵活性和较低计算复杂度的优点.然而,在复杂的遥感场景中,受限的几何尺寸.目标的弱特征 以及 ...

  8. 【弱监督显著目标检测论文】Weakly-Supervised Salient Object Detection via Scribble Annotations

    2020年发表在CVPR上的一篇使用涂鸦注释的弱监督显著目标检测论文 论文原文 代码地址 文章目录 摘要 一.创新点 二.Related Work 1.Learning Saliency from W ...

  9. 【弱监督显著目标检测论文】Weakly-Supervised Salient Object Detection Using Point Supervison

    2022年在AAAI上发表的一篇使用点监督的弱监督显著目标检测论文 论文原文 代码地址 文章目录 摘要 一.创新点 二.方法 1.Adaptive Flood Filling 2.Non-Salien ...

  10. 目标检测论文综述(四)Anchor-Free

    --CNN based Anchor-Free Detectors 所有论文综述均保持如下格式: 1.一页PPT内容总结一篇论文 2.标题格式一致:出处 年份 <标题> 3.内容格式一致: ...

最新文章

  1. excel表格行列显示十字定位_Excel行列十字交叉高亮显示
  2. cuda7.5 和cuda8共存
  3. 【转】JPG打包压缩后比原来尺寸还大
  4. datatable 多字段 排序;
  5. python创建和控制的实体称为_Python语法基础
  6. 采用lamp架构搭建discuz论坛
  7. 软件构造学习笔记-第三周
  8. CSS垂直居中的11种实现方式
  9. 计算机软件知识pdf,[计算机软件及应用]PDF基础知识.doc
  10. 数据分析数据挖掘(五)
  11. C语言:求两个整数的最大公约数
  12. jQuery 生成随机字符
  13. 媲美Teamviewer的远程桌面软件推荐 总有一款适合你
  14. 宽带无线通信OFDM技术
  15. 小鹿线前端课程怎么样
  16. Pillow 库简介
  17. python 进程池pool使用详解
  18. 服务器网卡组(team)技术原理与实践
  19. 中忻嘉业:抖音小店主要引流玩法
  20. 大数据的流处理和批处理及其框架

热门文章

  1. Leet Code OJ 91. Decode Ways [Difficulty: Medium]
  2. Mina中的stake delegation
  3. weiit—全渠道新零售saas,重构“人、货、场”
  4. thinkphp5RCE
  5. 文件名后缀查看及修改
  6. for in for of forEach
  7. c#使用斑马打印机打印标签(链接数据库)
  8. 2007我们的铁路春运
  9. 计算机专业独显好还是集显好,独显和集显的区别全方面分析
  10. linux核显显示独显内容,GPU工作站核显加独显,Ubuntu系统安装总结