Code Monkey home page Code Monkey logo

draw.io's People

Watchers

 avatar

draw.io's Issues

Object detection RCNN 系列之 RCNN

Object detection 的RCNN系列演变:

RCNN(2014), SPP NET -> Fast RCNN(2015) -> Faster RCNN(2016)

文章中的缩写:
RP -> region proposal
GT -> ground-truth
IoU -> 目标检测指标(两个框面积交集/两个框面积并集)

RCNN

RCNN 是RCNN网络的第一篇。是结合了CNN作为特征提取的物体检测,比传统的 HOG-based DPM等方法表现更突出,mAP(mean average precision)达到53.3%, 前者只有30%左右。

模型概括

_20171217163745

  1. 输入任意图片
  2. 在图像中确定约2000个RP (使用selective search算法选取)
  3. 每个RP内图像块缩放至相同大小,并输入到CNN内进行特征提取
  4. 对RP中提取出的特征,使用分类器判别是否属于一个特定类,每一个框针对每一个种类都有一个分数(non-maximum suppression 算法选出合适的框)
  5. 对于属于某一特征的RP,用Bounding-box regression进一步调整其位置

训练过程

finetune

Alex Net:
alexnet

借鉴在 ImageNet数据集上训练好的模型,finetune 成N+1种类的分类器(N个种类+1个背景),得到一个向量矩阵,文中使用的是AlexNet, 提取的是fc7后得到的4096维的向量。
** ILSVRC2013 detection dataset** train (395,918), val (20,121), and test (40,152),
数据 与GT有大于0.5重合(>=0.5 IoU)的为正样本,其余的为负样本(数量多效果好)
学习率 0.001
batch-size 32正样本+96负样本,模拟真实情况中负样本会比正样本多得多

训练SVM

每一类训练一个SVM分类器
数据 只有GT为正样本,与GT有<0.3IoU的RP为该类别的负样本,落入中间部分的RP将被忽略

Bounding-box regression

得到SVM分数后,在feature map 上预测一个新的 bounding box。
因为选择出来的RP是很粗略的,与标注的GT存在一定的偏差,所以需要对RP进行微调,得到更加精确的框bounding box。
box_reg
方法是在已有的预测框P基础上,学习一个从P到GT的映射,得到更加准确的框,映射得到的结果设为(图中的G)

设定映射中有四个参数,可以理解为预测与映射的偏移量,我们可以通过平移和缩放得到映射:
screenshot from 2017-12-18 15-01-54
预测框P在pool5得到的特征向量为
的线性方程。通过学习得到

其中:

  1. 为预测P与GT的偏差,由下面公式计算得到:
    screenshot from 2017-12-18 15-24-52
  2. 给予val数据集选择
  3. 只对与GT有大于0.6覆盖度的预测P进行bounding-box regression, 如果P与GT距离很远, 很难学习到一个线性映射对P进行调整

测试过程

  1. 与训练过程一致,得到有SVM分数的RP
  2. 每一个类别,采取non-maximum suppression的方法,选择最终的bounding box作为返回结果。

Non-maximum suppression

这里的non-maximum suppression方法是找出score比较高的RP,其中需要考虑不同RP的重叠问题。 假设有N个种类,提取2000个RP,通过CNN后得到2000 * 4096 的特征矩阵,然后通过N个SVM来判断每一个RP属于各个类的scores。其中,SVM的权重矩阵大小为4096N,最后得到2000N的一个分数矩阵。根据分数矩阵和RP的坐标信息,找到置信度比较高的bounding box。

  1. 对于每一个种类,计算出每一个bounding box的面积,根据分数排序,取出分数最高的bounding box。
  2. 计算其余bounding box与当前最大分数与box的IoU,去除IoU大于阈值的bounding box。同时删除分数较低的。剩下的为最终结果
  3. 有N个分类则计算N遍。

Reference

  1. Rich feature hierarchies for accurate object detection and semantic segmentation
    Tech report
  2. blog.csdn.net/danieljianfeng/article/details/43084875

Object detection RCNN 系列之Faster RCNN

Object detection 的RCNN系列演变:

RCNN(2014), SPP NET -> Fast RCNN(2015) -> Faster RCNN(2016)

Faster RCNN

  1. 对整张图片输进CNN,得到feature map
  2. 卷积特征输入到RPN,得到候选框的特征信息
  3. 对候选框中提取出的特征,使用分类器判别是否属于一个特定类
  4. 对于属于某一特征的候选框,用回归器进一步调整其位置
https://www.cnblogs.com/skyfsm/p/6806246.html

https://www.cnblogs.com/neopenx/p/4851806.html

blog.csdn.net/sunshine_in_moon/article/details/45797599

blog.csdn.net/crzy_sparrow/article/details/7407604

Object detection RCNN 系列之Fast RCNN

Object detection 的RCNN系列演变:

RCNN(2014), SPP NET -> Fast RCNN(2015) -> Faster RCNN(2016)

Fast RCNN

  1. 在图像中确定约1000-2000个候选框 (使用选择性搜索)
  2. 对整张图片输进CNN,得到feature map
  3. 找到每个候选框在feature map上的映射patch,将此patch作为每个候选框的卷积特征输入到SPP layer和之后的层
  4. 对候选框中提取出的特征,使用分类器判别是否属于一个特定类
  5. 对于属于某一特征的候选框,用回归器进一步调整其位置

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.