【转载】Notes: From Faster R-CNN to Mask R-CNN

原文链接:http://www.yuthon.com/2017/04/27/Notes-From-Faster-R-CNN-to-Mask-R-CNN/


That’s my notes for the talk “From Faster-RCNN to Mask-RCNN” by Shaoqing Ren on April 26th, 2017.

Yesterday – background and pre-works of Mask R-CNN

Key functions

Classification- What are in the image?

Localization- Where are they?

Mask (per pixel) classification- Where+ ?

More precise to bounding box

Landmarks localization- What+, Where+ ?

Not only per-pixel mask, but also key points in the objects

Mask R-CNN Architecture

Classification

Please ignoring the bounding box in the image

class=Classifier(image)class=Classifier(image)

Problems

High-level semantic concepts

High efficiency

Solutions

SIFTorHOG(about 5 or 10 years ago)

Based on edge feature (low- level semantic infomations)

Sometimes mistake two objects which people can distinguish easily

e.g. mark the telegraph pole as a man

CNN(nowadays)

Based on high-level semantic concepts

Rarely mistake objects. If it do so, people are likely to mix up them, too.

Translation invariance

Scale invariance

Detection

location=Classifier(all patches of an image)precise_location=Regressor(image,rough_location)location=Classifier(all patches of an image)precise_location=Regressor(image,rough_location)

Problems

High efficiency

Solutions

Traverseall patches of an image and apply image classifier on them, then patches with highest scores are looked as locations of objects.

As long as the classifier is precise enough, and we are able to traverse millions of patches in an image, we can always get a satisfactory result.

But the amount of calculations is too large. (about 1 or 10 millon)

DoRegressioncosntantlty, starting from a rough location of an object, and finally we’ll get the precise object location.

Low amount of calculations. (about 10 or 100 times)

Hard to locate many adjacent and similar objects

The state-of-the-art methods tend to use exhaustion on large-scale, and refine the rough localtions by regression on small-scale.

R-CNN

Useregion proposalto decline millions of patches into 2~10k.

Use classifier to determine the class of a patch

Use BBox regression to refine the location

SPP-net / Fast R-CNN

UsePyramid Pooling / RoI-Poolingto generate a fixed-length representation regardless of image size/scale

Faster R-CNN

UseRPN(Region Proposal Network) that shares full-image convolutional features with the detection network, thus enabling nearly cost-free region proposals.

An RPN is a fully convolutional network that simultaneously predicts object bounds and objectness scores at each position.

The RPN is trained end-to-end to generate high-quality region proposals, which are used by Fast R-CNN for detection.

We further merge RPN and Fast R-CNN into a single network by sharing their convolutional features—using the recently popular terminology of neural networks with ‘attention’ mechanisms, the RPN component tells the unified network where to look.

Number of patches:width×height×scales×ratioswidth×height×scales×ratios

scalestands for the size of image and objects

ratiostands for the aspect ratio of filter

Different schemes for addressing multiple scales and sizes.

Pyramids of images and feature maps are built, and the classifier is run at all scales.

Pyramids of filters with multiple scales/sizes are run on the feature map.

Faster R-CNN use pyramids of reference boxes in the regression functions, which avoids enumerating images or filters of multiple scales or aspect ratios.

SSD / FPN

FPN (Feature Pyramid Network)exploit the inherent multi-scale, pyramidal hierarchy of deep convolutional networks to construct feature pyramids with marginal extra cost. A top-down architecture with lateral connections is developed for building high-level semantic feature maps at all scales.

Instance Segmentation

UseMask Regressionto predict instance segmentation based on object bounding box.

Replace RoI Pooling withRoI Align

Keypoint Detection

We make minor modifications to the segmentation system when adapting it for keypoints.

For each of theKKkeypoints of an instance, the training target is a one-hotm×mm×mbinary mask where only a single pixel is labeled as foreground.

Today - details about Mask-RCNN and comparisons

RoI Align

RoI pooling contains two step of coordinates quantization: from original image into feature map (divide by stride) and from feature map into roi feature (use grid).Those quantizations cause a huge loss of location precision.

e.g. we have two boxes whose coordinate are 1.1 and 2.2, and the stride of feature map is 16, then they’re the same in the feature map.

RoI Alignremove those two quantizations, andmanipulate coordinates on continuous domain, which increase the location accuracy greatly.

RoI Align really improves the result.

Moreover, note that with RoIAlign, using stride-32 C5 features (30.9 AP) is more accurate than using stride-16 C4 features (30.3 AP, Table 2c).RoIAlign largely resolves the long-standing challenge of using large-stride features for detection and segmentation.

Without RoIAlign, AP in ResNet-50-C4 is better than that in C5 with RoIPooling, i.e., large stride is worse.Thus many precious work try to find methods to get better results in smaller stride. Now with RoIAlign, we can consider whether to use those tricks.

Multinomial vs. Independent Masks

Replace softmax with sigmoid.

Mask R-CNN decouples mask and class prediction: as the existing box branch predicts the class label, we generate a mask for each class without competition among classes (by a per-pixel sigmoid and a binary loss).

In Table 2b, we compare this to using a per-pixel softmax and a multinomial loss (as com- monly used in FCN). This alternative couples the tasks of mask and class prediction, and results in a severe loss in mask AP (5.5 points).

The result suggests thatonce the instance has been classified as a whole (by the box branch), it is sufficient to predict a binary mask without concern for the categories, which makes the model easier to train.

Multi-task Cascade vs. Joint Learning

Cascading and paralleling are adopted alternately.

On training time, three tasks of Mask R-CNN areparalleling trained.

Buton testing time, we do classification and bbox regression first, and then use those results to get masks.

BBox regression may change the location of bbox, so we should wait it to be done.

After bbox regression, we may adopt NMS or other methods to reduce the number of boxes. That decreases the workload of segmenting masks.

Adding the mask branchto the box-only (i.e., Faster R-CNN) or keypoint-only versions consistentlyimproves these tasks.

However, adding the keypoint branch reduces the box/mask AP slightly, suggest- ing that while keypoint detection benefits from multitask training, it does not in turn help the other tasks.

Nevertheless, learning all three tasks jointly enables a unified system to efficiently predict all outputs simultaneously (Figure 6).

Comparison on Human Keypoints

Table 4 shows that our result (62.7 APkp) is 0.9 pointshigher than the COCO 2016 keypoint detection winner [4]that uses a multi-stage processing pipeline (see caption ofTable 4). Our method is considerably simpler and faster.

More importantly, we have a unified model that can si-multaneously predict boxes, segments, and keypoints whilerunning at 5 fps.

Results

Future - discussion

Order of key functions?

Order of classification, localization, mask classification and landmarks localization?

Top down or Buttom up?

Mask R-CNN uses Top-down method.

the COCO 2016 keypoint detection winner CMU-Pose+++ uses Buttom-up method.

Detect key points first (don’t know which keypoint belongs to which person)’

Then gradually stitch them together

Precious & semantic label

box-level label -> instance segmentation & keypoints detection -> instance seg with body parts

Semantic 3D reconstruction

Future

the performance & system improves rapidly

join a team, keep going

always try, thinking and discussion

understand and structure the world

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,684评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 87,143评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,214评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,788评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,796评论 5 368
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,665评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,027评论 3 399
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,679评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 41,346评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,664评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,766评论 1 331
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,412评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,015评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,974评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,203评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,073评论 2 350
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,501评论 2 343

推荐阅读更多精彩内容

  • 突然有种理解老师良苦用心的感觉,希望通过我们这个月作业的完成,不断的重复我们学的知识,并且进行刻意练习,使我们在整...
    陈天美阅读 458评论 1 5
  • 不知道大家有没有这样的经验? 我们很多思想和行为都是过去的重复。 比如我们有些人每次打开电脑,都会去播放相同的几首...
    梁超文阅读 586评论 0 1
  • 昨天去了蓟县公益 见了ss她们 充实的不得了 然而 今天买票就犯二了 身份证号没填 无效 也是醉了 太着急...
    微凉r阅读 102评论 0 0
  • ⊙桉树先森 空气安静 炉火自娱 四月的雨嘀嗒嗒 驻进农田中 游在城巷里 流在房檐下 滴到心坎上 你不说话 我不打扰...
    桉树先森阅读 136评论 0 0