R-CNN & Fast R-CNN & Faster R-CNN

目标检测 | R-CNN、Fast R-CNN与Faster R-CNN理论讲解 目标检测:R-CNN、Fast R-CNN与Faster R-CNN理论讲解,根据B站up霹雳吧啦Wz总结。此文章包含R-CNN算法原理讲解、Fast R-CNN算法原理讲解、Faster R-CNN原理讲解、目标检测评价指标介绍与特征金字塔网络FPN讲解。 阅读详情

R-CNN & Fast R-CNN & Faster R-CNN

R-CNN: Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation

Paper:http://www.cs.berkeley.edu/~rbg/#girshick2014rcnn 
Tech report: http://arxiv.org/pdf/1311.2524v5.pdf 
Project:https://github.com/rbgirshick/rcnn 
Slides: http://www.cs.berkeley.edu/~rbg/slides/rcnn-cvpr14-slides.pdf

Referrence: a blog

object detection system

Three modules: 
1. Generate region proposals (~2k/image) 
2. Compute CNN features 
3. Classify regions using linear SVM

R-CNN at test time

  • Region proposals 
    Proposal-method agnostic, many choices: 
    • Selective Search (2k/image "fast mode") [van de Sande, Uijlings et al.] (Used in this work)(Enable a controlled comparison with prior detection work)
    • Objectness [Alexe et al.]
    • Category independent object proposals [Endres & Hoiem]
    • CPMC [Carreira & Sminchisescu] - segmentation
    • BING [Ming et al.] – fast
    • MCG [Arbelaez et al.] – high-quality segmentation
  • Feature extraction with CNN 
    • Dilate the proposal (At the warped size there are exactly p=16 pixels warped image context around the original box)
    • Crop and scale to 227*227(anisotropic)
    • Forward propagate in AlexNet (5conv & 2fc). Get fc_7 layer features.
  • Classify regions by SVM 
    • linear SVM per class 
      (With the sofmax classifier from fine-tuning mAP decreases from 54% to 51%)
    • greedy NMS(non-maximum suppression) per class : rejects a region if it has an intersection-overunion (IoU) overlap with a higher scoring selected region larger than a learned threshold.
  • Object proposal refinement 
    • Linear bounding-box regression on CNN features (pool_5 feature: mAP ~4% up)
    • (in Appendix C)

Training R-CNN

  • Bounding-box labeled detection data is scarce
  • Use supervised pre-training on a data-rich auxiliary task and transfer to detection

  • Supervised pre-training 
    Pre-train CNN on ILSVRC2012(1.2 million 1000-way image classification) using image-level annotations only

  • Domain-specific fine-tuing 
    Adapt to new task(detection) and new domain(warped proposal) 
    • random initialize (N+1)-way classification layer (N classes + background)
    • Positives: 0.5 IoU overlap with a ground-truth box. Negative: o.w.
    • SGD: learning rate: 0.001 (1/10 of original) mini-batch: 32 pos & 96 neg
  • Train binary SVM 
    • IoU overlap threshold: grid search over {0, 0.1, ... 0.5} 
      IoU = 0.5 : mAP ~5% down 
      IoU = 0.0 : mAP ~4% down

Fast R-CNN

Paper: http://arxiv.org/pdf/1504.08083v1.pdf 
Project: https://github.com/rbgirshick/fast-rcnn

Referrence: blog

Motivation

Drawback of R-CNN and the modification: 
1. Training is a multi-stage pipeline. -> End-to-end joint training. 
2. Training is expensive in space and time. -> Convolutional layer sharing. Classification in memory. 
For SVM and regressor training, features are extracted from each warped object proposal in each image and written to disk.(VGG16, 5k VOC07 trainval images : 2.5 GPU days). Hundreds of gigabytes of storage. 
3. Test-time detection is slow. -> Single scale testing, SVD fc layer. 
At test-time, features are extracted from each warped proposal in each img. (VGG16: 47s / image).

Contributions: 
1. Higher detection quality (mAP) than R-CNN 
2. Training is single-stage, using a multi-task loss 
3. All network layers can be updated during training 
4. No disk storage is required for feature caching

Fast R-CNN training

  • RoI pooling layer 
    • Find the patch in feature map corresponding to the RoI; Get fixed-length feature using SPPnet to feed in fc layer
    • A simplified version of the spatial pyramid pooling used in SPPnet, in which "pyramid" has only one level
    • Input : 
      N feature maps (last conv layer H*W*C), 
      a list of R RoI(tuple [n, r, c, h, w] n: index of a feature map, (r,c): top-left loc) (R  N)
    • Output: max-pooled feature maps(H'*W'*C) (H'H, W'W)
  • Use pre-trained Networks 
    Tree transformations:(VGG 16) 
    • last pooling layer -> RoI pooling layer (H'*W' compatibale to fc layer)
    • final fc and softmax layer -> two sibling layers: fc + (K+1)-softmax and fc + bounding box regressor (is the number of the classes)
    • Modified to take two data inputs: N feature maps and a list of RoI
  • Fine-tuning for detection 
    • Back propogation through SPP layer.
    • BP through conv: Image-centric sampling. mini-batch sample hierachically: images -> RoI 
      Same image shares computation and memory
    • Joint optimaize a softmax classifier and bounding-box regressors
    • Multi-task Loss 
      • Two sibling output layers: 
        1. fc + (K+1)-softmax: Discrete probability distribution per RoI 
        2. fc + bbox regressor: bbox regression offsets , : a scale -invariant translation and log-space height-width shift relative to an object proposal
      • Multi-task loss

        where  is the true class label 
        1.  : standard cross entropy/log loss
        2.  :  true bbox regression target  predicted tuple for class 
          smoothed  loss : less sensitive to outliers (R-CNN L2 loss: requires significant tuning of learning rate, prevent exploding gradients)
        3. hyper-parameter:  (=1) normalize  to zero mean and unit variance
      • Mini-batch Sampling 
        128: 2 randomly sampled images with 64 PoI sampled from each image 
        25% positive: IoU > 0.5 
        75% background:IoU  [0.1, 0.5) 
        horizontally flipped with prob = 0.5
      • BP through RoI Pooling Layer 
         (if  was argmax assigned to  during the pool)
      • SGD hyper-parameter 
        new fc for softmax is initialized by N(0, 0.01) 
        new fc for bbox-reg is initilized by N(0. 0.001) 
        base_lr: 0.001 weight_lr: 1 bias_lr: 2 
        VOC07 VOC12: 30k-iter -> lr = 0.0001 10k-iter (larger dataset: momentum term 0.9 weight decay 0.0005)
    • Scale Invariance 
      scale invariance object detection : brute-force learning; using image pyramids [followed SPP]

Fast R-CNN detection

  • R ~ 2k, Forward pass, assign detection confidence , ans NMS
  • Truncated SVD for faster detection 
    mAP ~ 0.3% down; speed ~ 30% up 
    number of RoI for detection is large -> time spent on fc 
     (U : u*t, Sigma_t: t*t, V: v*t) 
    Compression : () fc -> () fc + () fc

Faster R-CNN

Paper: http://arxiv.org/abs/1506.01497 
Caffe Project: https://github.com/ShaoqingRen/caffe

Reference: blog1 blog2

Region Proposal Networks

RPN input: image of any size, output: rectangular object proposals with objectness score

  • Fully convolutional network 
    share computation with Fast R-CNN detection network(share conv layer)
  • Slide on n*n conv feature map output by last shared conv layer(ZF 5conv, VGG 13conv) 
    Sliding window mapped to a lower-dim vector(256-d ZF, 512-d VGG) (n = 3 large recpt field) 
    Fed into two sibling fc layers(1*1 conv): bbox-reg layer + box-cls layer
  • Translation-Invariant Anchors 
    At each sliding window loc, pridict k proposal: 4k outputs for reg layer, 2k outputs for cls layer (binary softmax). 
    Anchor: centered at sliding window with scale and aspect ratio: (; 1:2, 2:1, 1:1) 
    For a conv feature map:  (k=9 anchors) (2+4)*9 output layer
  • Loss function for Learning Region Proposal 
    positive label: the anchor has highest IoU with a gt-box or has an IoU>0.7 with any gt-box 
    negative label: IoU<0.3 for all gt-box 
    Objective function with multi-task loss: Similar to Fast R-CNN.
    where  is 1 if the anchor is labeled positive, and is 0 if the anchor is negative. 
     bias towards better box location
  • Optimization 
    fcn trained by end-to-end by bp and sgd 
    image-centric sampling strategy, sample 256 anchors in an image(Pos:neg = 1:1) 
    new layer initialization ~ N(0, 0.01) 
    tune ZFnet and conv3_1 and up for VGGnet, lr=0.001 for 60k batches, 0.0001 for 20k on PASCAL
  • Share Convolutional Features for Region Proposal and Objection Detection 
    Four-step training algorithm: 
    1. Train RPN, initialized with ImageNet pre-trained model
    2. Train a separate detection network by Fast R-CNN using proposals generated by step-1 RPN, initialized by ImageNet pre-trained model
    3. Fix conv layer, fine-tune unique layers to RPN, initialized by detector network in Step2
    4. Fix conv layer, fine-tune fc-layers of Fast
目标检测-RCNN系列 •   RCNN        RCNN(Regions with CNN features)是将CNN方法应用到目标检测问题上的一个里程碑,由年轻有为的RBG大神提出,借助CNN良好的特征提取和分类性能,通过RegionProposal方法实现目标检测问题的转化。        算法可以分为四步:        1)候选区域选择        Region Proposal是一类传统的区域提取方 阅读详情

相关推荐

R-CNN,SPP-net,Fast R-CNN,Faster R-CNN区别和基本理解

R-CNN,SPP-net,Fast R-CNN,Faster R-CNN区别和基本理解 最近学习目标检测,入手当然首先要看RNN系列,其中有一些启发,和大家分享一下,有理解偏差希望大神给与指正。 这张图对我的理解帮助很大,特意贴出。可以发现他们是环环相扣发展过来的,主要区别在于卷积模型、候选框、分类回归方式(Classification + Localization): 首先我们先搞清一些小的...

XM_no_homework的博客 2660

基础目标检测算法介绍:CNN、RCNN、Fast RCNN和Faster RCNN

使用CNN的问题在于,图片中的物体可能有不同的长宽比和空间位置。例如,在有些情况下,目标物体可能占据了图片的大部分,或者非常小。目标物体的形状也可能不同。 有了这些考虑因素,我们就需要分割很多个区域,需要大量计算力。所以为了解决这一问题,减少区域的分割,我们可以使用基于区域的CNN(基于区域的卷积神经网络,R-CNN),它可以进行区域选择。 1、R-CNN简介 和在大量区域上工作...

weixin_44285715的博客 3055

【Faster RCNN】Faster R-CNN笔记

论文理论笔记部分: rcnn是将每个proposal都放入到卷积层来进行计算,fast rcnn呢,则是将图片和proposal作为输入,并且proposal是为feature map的提取提供位置信息、为regression提供位置信息、以及在classification提供位置信息。在这里,faster rcnn的输入是一张图,提取到了共享的feature map后,将feature m...

OneCoder的博客 2222

目标检测:rcnn-->sppnet-->fast rcnn-->faster rcnn

R-CNN --> SPPNet-->  FAST-RCNN --> FASTER-RCNN   1、R-CNN:  https://zhuanlan.zhihu.com/p/23006190?refer=xiaoleimlnote (1)输入测试图像; (2)利用selective search 算法在图像中从上到下提取2000个左右的Region Proposal;

2350

allegro 约束管理Constraint Manager(一)

介绍Cadence allegro 约束管理器CM的使用方法。

weixin_38975819的博客 8741

【Docker】搭建一个媒体服务器插件后端API服务 - MetaTube

本教程基于群晖的NAS设备DS423+的docker功能进行搭建,DSM版为 7.2.1-69057 Update 5。MetaTube是一个媒体服务器插件,主要用于Emby和Jellyfin媒体服务器。它的主要功能是从互联网上抓取内容并响应 JSON 数据,然后通过预安装的 MetaTube 插件请求服务器并下载相应的元数据,以与 Jellyfin/Emby 服务器配合使用。使用 MetaTube 的步骤大致如下:部署后端:首先,需要部署一个名为​ 的后端 API 服务器来抓取内容。

小小笔记大大用处 1万+

一文通透目标检测:R-CNN、Fast R-CNN、Faster R-CNN、YOLO、SSD、DETR(首发于18年,修订于25年)

一文读懂目标检测:R-CNN、Fast R-CNN、Faster R-CNN、YOLO、SSD 前言 之前我所在的公司七月在线开设的深度学习等一系列课程经常会讲目标检测,包括R-CNN、Fast R-CNN、Faster R-CNN,但一直没有比较好的机会深入(但当你对目标检测有个基本的了解之后,再看这些课程你会收益很大)。但目标检测这个领域实在是太火了,经常会看到一些写的不...

结构之法 算法之道 14万+

中小团队必看!用Harbor+Jenkins打造轻量级K3S交付流水线(含成本优化方案)

本文为中小团队详细介绍了如何利用K3S、Harbor与Jenkins构建一套高性价比的自动化交付流水线。内容涵盖单节点K3S集群的效能配置、Harbor镜像仓库的磁盘空间优化、Jenkins共享库实现流水线复用,并提供了完整的实战案例与成本优化方案,帮助团队以较低成本快速落地高效的自动化部署。

weixin_29223603的博客 504

一小时吃透 R-CNN & Fast R-CNN & Faster R-CNN

一小时吃透 R-CNN & Fast R-CNN & Faster R-CNN.

我是小白呀的博客 2043

2024高教社杯数学建模国赛B题丨国一原创论文解析及源码超详细分享!

继续分享一篇2024国赛B题的国奖论文,包含可运行源代码jupyter,国赛B题通常比较聚焦实际复杂系统的多目标优化决策,主要偏重算法实现与概率建模解决开放性的管理问题。而且高度开放,无标准答案,学科交叉复杂,如资源调度、交通优化、海洋探测等。比较建议有一定统计学基础的同学参加。

ihui永不放弃 6743

HanLP的分词

HanLP的分词

sikh_0529的博客 1万+

【深度学习 & 目标检测】R-CNN系列算法全面概述(一文搞懂R-CNN、Fast R-CNN、Faster R-CNN的来龙去脉)

RCNN在2013年在目标检测领域首次使用深度学习和卷积神经网络,他与Alex net一起引爆了21世纪第二个十年计算机视觉领域的技术爆炸。后续所有基于深度学习的目标检测——特别是两阶段目标检测算法。如Fast RCNN Faster R-CNN,都是在R-CNN上进行的迭代升级。所以弄懂RCNN特别重要。甚至可以说,没弄懂RCN后边的算法根本就看不懂。候选区域生成:利用Selective Search算法在每张图像上生成约2000个候选区域。这些候选区域被认为是可能包含目标的区域。特征提取。

z135733的博客 1万+

【Halcon 】Halcon 实战:如何为 XLD 模板添加极性信息以提升匹配精度?

本文介绍了Halcon中为XLD轮廓模板添加极性信息的实用技巧。通过先以&quot;ignore_local_polarity&quot;模式创建模板,首次匹配获得位置后,使用set_shape_model_metric运算符结合真实图像为模板注入极性信息(边缘明暗方向)。这种方法弥补了XLD模板初始不支持极性的缺陷,可显著提升后续匹配的精度和抗干扰能力。实验显示,添加极性信息后的模板匹配效果明显优于无极性的匹配结果。该技术特别适用于基于手动绘制或处理后的XLD轮廓创建模板的场景。

songhuangong123的博客 753

R-CNN & Fast R-CNN & Faster R-CNN(自用)

对R-CNN的学习

对cv的学习之路 182

数据结构课程设计C/C++版--美团餐馆预定信息的管理与分析7 8

本关任务:编写一个能查询预定的程序。输入餐馆名称,查询用户账号为当前登录用户且餐馆名称为当前输入餐馆名称的结点信息,并输出其预定时间。本关任务:编写一个能查看预定的程序。创建链队列,从文件order.txt中读取数据,依次进入链队列中。遍历链队列,筛选出用户账号为当前登录用户的结点信息,并依次输出相应的餐馆名称和预定时间。烤肉刘老北京炙子烤肉(四道口店) 11月20日晚餐 0。外婆家(清河华润五彩城店) 12月12日午餐 0。甜鸭梨烤鸭店(农大店) 12月5日晚餐 0。鼎坤朋湘菜馆 12月8日晚餐 0。

m0_62222486的博客 1356

YOLOv8【第九章:模型部署篇·第2节】一文搞懂,模型剪枝与压缩技术!

🏆 本文收录于 《YOLOv8实战:从入门到深度优化》 专栏。该专栏系统复现并梳理全网各类 YOLOv8 改进与实战案例(当前已覆盖分类 / 检测 / 分割 / 追踪 / 关键点 / OBB 检测等方向),坚持持续更新 + 深度解析,质量分长期稳定在 97 分以上,可视为当前市面上 覆盖较全、更新较快、实战导向极强 的 YOLO 改进系列内容之一。

**My Coding Family** 1530

D5-Fast R-CNN & Faster R-CNN论文解读

R-CNN缺点: 训练分为多个阶段。首先使用log损失函数对ConvNet候选区域进行微调。然后,将SVM与CNN相结合。这些SVM作为对象检测器,代替了通过微调学习的softmax分类器。在第三个训练阶段,学习bbox回归函数。 训练浪费大量内存空间和训练时间。每个候选区域都要经过CNN提取特征,然后前向传播。 测试比较慢。 SPPNet缺点: 为了克服R-CNN在CNN过程中重复计算造成...

l2181265的博客 524

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

【目标检测算法】R-CNN & FAST-RCNN & FASTER-RCNN

R-CNN --&gt; FAST-RCNN --&gt; FASTER-RCNN 转: faster-rcnn原理及相应概念解释 RCNN学习笔记(2):Fast R-CNN R-CNN: (1)输入测试图像; (2)利用selective search 算法在图像中从上到下提取2000个左右的Region Proposal; (3)将每个Region Proposal缩放(war...

littlemichelle 284

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

从Fast R-CNN到Faster R-CNN:目标检测技术的进化之路

本文深入探讨了从Fast R-CNN到Faster R-CNN的目标检测技术演进历程,重点分析了Fast R-CNN的架构革新和Faster R-CNN的Region Proposal Network(RPN)突破。通过对比三种架构的关键指标,揭示了目标检测技术如何实现从非端到端到准实时的跨越,为现代计算机视觉应用奠定基础。

weixin_29185199的博客 913

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

R-CNN , Fast R-CNN , Faster R-CNN原理及区别

github博客传送门 博客园传送门 RCNN 1、生成候选区域 使用Selective Search(选择性搜索)方法对一张图像生成约2000-3000个候选区域,基本思路如下: (1)使用一种过分割手段,将图像分割成小区域 (2)查看现有小区域,合并可能性最高的两个区域,重复直到整张图像合并成一个区域位置。优先合并以下区域: 颜色(颜色直方图)相近的 纹理(梯度直方图)相近的 合并后总面积小...

Mrzhang 1559

R-CNN、Fast R-CNN、Faster R-CNN

1、R-CNN(Regions with CNN features) 2014年提出,可以说是利用深度学习进行目标检测的开山之作,将识别准确率从30%多提高到50%多。与R-CNN同一时期的深度学习方法有overfit,但效果没有RCNN好,故听说得少。 ① R-CNN算法流程四步 第二步:这里的深度网络指的是图片分类网络,这里将候选区域丢入到特征提取网络就能得到特征向量; 第四步:因为通过SS算法框定的候选框不是那么准,于是选用回归器修正候选框的位置; Ⅰ 候选区域的生成 ...

qq_42261092的博客 2467

深度学习目标检测之 R-CNN 系列: 从 R-CNN 和 Fast R-CNN 到 Faster R-CNN

深度学习目标检测之 R-CNN 系列: 从 R-CNN 和 Fast R-CNN 到 Faster R-CNN 深度学习目标检测之 R-CNN 系列包含 3 篇文章: 从 R-CNN 和 Fast R-CNN 到 Faster R-CNN Faster R-CNN 网络详解 用 Faster R-CNN 训练自己的数据 1. 前言 这一篇文章主要是从 R-CNN 的发展历程来介绍各个版本的 R...

生命在于折腾! 806

深入浅出Faster R-CNN:目标检测的里程碑算法

在日常生活中,我们经常需要让计算机"看懂"图像——不仅仅是知道图像里有什么,还要知道这些东西在​​什么位置​​。这就是​​目标检测(Object Detection)​​ 的任务:在图像中找出感兴趣的目标(物体),并确定它们的​​位置​​和​​类别​​。想象一下,如果你正在教一个小朋友认识动物:不仅要告诉他"这是狗",还要用手指着狗的位置。目标检测算法做的就是类似的事情!🐶Faster R-CNN是目标检测领域的一个重要里程碑,它通过引入​​区域提议网络(RPN)​。

qiutesting的博客 2441

动手学深度学习13.8. 区域卷积神经网络(R-CNN)系列-笔记&练习(PyTorch)

李沐老师《动手学深度学习(PyTorch版)13.8. 区域卷积神经网络(R-CNN)系列-笔记&练习详解

scdifsn的博客 762

【目标检测】用Faster R-CNN训练自己的数据集

目录 一、环境准备 二、训练过程 三、推理过程 一、环境准备 我这里的环境是ubuntu18.04系统,colab + python3.7 二、训练过程 1、下载Faster R-CNN源码 ,我这里使用的源码是pytorch版本的 ,原作者的是tensorflow版本。在这里贴上代码地址。 https://github.com/chenyuntc/simple-faster-rcnn-pytorchhttps://github.com/chenyuntc/simple-fa...

qq_41464279的博客 1万+
上一篇: Caffe各层的参数设置(在prototxt文件中设置)
下一篇: 高中数学思维导图
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值