MMask R-CNN
Kaiming He Georgia Gkioxari Piotr Doll´ar Ross GirshickFacebook AI Research (FAIR)
Abstract
We present a conceptually simple, flexible, and generalframework for object instance segmentation. Our approachefficiently detects objects in an image while simultaneouslygenerating a high-quality segmentation mask for each in-stance. The method, called Mask R-CNN, extends FasterR-CNN by adding a branch for predicting an object mask in parallel with the existing branch for bounding box recogni-tion. Mask R-CNN is simple to train and adds only a smalloverhead to Faster R-CNN, running at 5 fps. Moreover,Mask R-CNN is easy to generalize to other tasks, e.g ., al-lowing us to estimate human poses in the same framework.We show top results in all three tracks of the COCO suiteof challenges, including instance segmentation, bounding-box object detection, and person keypoint detection. With-out bells and whistles, Mask R-CNN outperforms all ex-isting, single-model entries on every task, including theCOCO 2016 challenge winners. We hope our simple andeffective approach will serve as a solid baseline and helpease future research in instance-level recognition. Codehas been made available at: https://github.com/facebookresearch/Detectron .
1. Introduction
The vision community has rapidly improved object de-tection and semantic segmentation results over a short pe-riod of time. In large part, these advances have been drivenby powerful baseline systems, such as the Fast/Faster R-CNN [12, 36] and Fully Convolutional Network (FCN) [30]frameworks for object detection and semantic segmenta-tion, respectively. These methods are conceptually intuitiveand offer flexibility and robustness, together with fast train-ing and inference time. Our goal in this work is to develop acomparably enabling framework for instance segmentation .Instance segmentation is challenging because it requiresthe correct detection of all objects in an image while alsoprecisely segmenting each instance. It therefore combineselements from the classical computer vision tasks of ob-ject detection , where the goal is to classify individual ob-jects and localize each using a bounding box, and semantic
RoIAlignRoIAlign classbox convconv convconv
Figure 1. The
Mask R-CNN framework for instance segmentation. segmentation , where the goal is to classify each pixel intoa fixed set of categories without differentiating object in-stances. Given this, one might expect a complex methodis required to achieve good results. However, we show thata surprisingly simple, flexible, and fast system can surpassprior state-of-the-art instance segmentation results.Our method, called
Mask R-CNN , extends Faster R-CNN[36] by adding a branch for predicting segmentation maskson each Region of Interest (RoI), in parallel with the ex-isting branch for classification and bounding box regres-sion (Figure 1). The mask branch is a small FCN appliedto each RoI, predicting a segmentation mask in a pixel-to-pixel manner. Mask R-CNN is simple to implement andtrain given the Faster R-CNN framework, which facilitatesa wide range of flexible architecture designs. Additionally,the mask branch only adds a small computational overhead,enabling a fast system and rapid experimentation.In principle Mask R-CNN is an intuitive extension ofFaster R-CNN, yet constructing the mask branch properlyis critical for good results. Most importantly, Faster R-CNN was not designed for pixel-to-pixel alignment be-tween network inputs and outputs. This is most evident inhow
RoIPool [18, 12], the de facto core operation for at-tending to instances, performs coarse spatial quantizationfor feature extraction. To fix the misalignment, we pro-pose a simple, quantization-free layer, called
RoIAlign , thatfaithfully preserves exact spatial locations. Despite being Following common terminology, we use object detection to denotedetection via bounding boxes , not masks, and semantic segmentation todenote per-pixel classification without differentiating instances. Yet wenote that instance segmentation is both semantic and a form of detection. a r X i v : . [ c s . C V ] J a n ining table.96 person1.00person1.00 person1.00 person1.00 person1.00person1.00person1.00 person.94bottle.99 bottle.99 bottle.99motorcycle1.00 motorcycle1.00person1.00 person1.00 person.96person1.00person.83person.96person.98person.90 person.92person.99person.91 bus.99 person1.00person1.00 person1.00 backpack.93person1.00 person.99person1.00 backpack.99person.99 person.98person.89person.95 person1.00 person1.00car1.00 traffic light.96 person.96truck1.00 person.99car.99 person.85motorcycle.95car.99car.92person.99person1.00traffic light.92 traffic light.84traffic light.95 car.93person.87person1.00person1.00 umbrella.98umbrella.98 backpack1.00handbag.96elephant1.00person1.00 person1.00person.99 sheep1.00 person1.00sheep.99 sheep.91 sheep1.00sheep.99 sheep.99 sheep.95 person.99sheep1.00 sheep.96sheep.99sheep.99 sheep.96sheep.96sheep.96 sheep.86sheep.82sheep.93dining table.99 chair.99chair.90 chair.99chair.98chair.96 chair.86 chair.99bowl.81chair.96tv.99bottle.99 wine glass.99wine glass1.00 bowl.85knife.83 wine glass1.00wine glass.93 wine glass.97 fork.95 Figure 2.
Mask R-CNN results on the COCO test set. These results are based on ResNet-101 [19], achieving a mask
AP of 35.7 andrunning at 5 fps. Masks are shown in color, and bounding box, category, and confidences are also shown. a seemingly minor change, RoIAlign has a large impact: itimproves mask accuracy by relative 10% to 50%, showingbigger gains under stricter localization metrics. Second, wefound it essential to decouple mask and class prediction: wepredict a binary mask for each class independently, withoutcompetition among classes, and rely on the network’s RoIclassification branch to predict the category. In contrast,FCNs usually perform per-pixel multi-class categorization,which couples segmentation and classification, and basedon our experiments works poorly for instance segmentation.Without bells and whistles, Mask R-CNN surpasses allprevious state-of-the-art single-model results on the COCOinstance segmentation task [28], including the heavily-engineered entries from the 2016 competition winner. Asa by-product, our method also excels on the COCO objectdetection task. In ablation experiments, we evaluate multi-ple basic instantiations, which allows us to demonstrate itsrobustness and analyze the effects of core factors.Our models can run at about 200ms per frame on a GPU,and training on COCO takes one to two days on a single8-GPU machine. We believe the fast train and test speeds,together with the framework’s flexibility and accuracy, willbenefit and ease future research on instance segmentation.Finally, we showcase the generality of our frameworkvia the task of human pose estimation on the COCO key-point dataset [28]. By viewing each keypoint as a one-hotbinary mask, with minimal modification Mask R-CNN canbe applied to detect instance-specific poses. Mask R-CNNsurpasses the winner of the 2016 COCO keypoint compe-tition, and at the same time runs at 5 fps. Mask R-CNN,therefore, can be seen more broadly as a flexible frameworkfor instance-level recognition and can be readily extendedto more complex tasks.We have released code to facilitate future research.
2. Related Work
R-CNN:
The Region-based CNN (R-CNN) approach [13]to bounding-box object detection is to attend to a manage-able number of candidate object regions [42, 20] and evalu-ate convolutional networks [25, 24] independently on eachRoI. R-CNN was extended [18, 12] to allow attending toRoIs on feature maps using RoIPool, leading to fast speedand better accuracy. Faster R-CNN [36] advanced thisstream by learning the attention mechanism with a RegionProposal Network (RPN). Faster R-CNN is flexible and ro-bust to many follow-up improvements ( e.g ., [38, 27, 21]),and is the current leading framework in several benchmarks.
Instance Segmentation:
Driven by the effectiveness of R-CNN, many approaches to instance segmentation are basedon segment proposals . Earlier methods [13, 15, 16, 9] re-sorted to bottom-up segments [42, 2]. DeepMask [33] andfollowing works [34, 8] learn to propose segment candi-dates, which are then classified by Fast R-CNN. In thesemethods, segmentation precedes recognition, which is slowand less accurate. Likewise, Dai et al . [10] proposed a com-plex multiple-stage cascade that predicts segment proposalsfrom bounding-box proposals, followed by classification.Instead, our method is based on parallel prediction of masksand class labels, which is simpler and more flexible.Most recently, Li et al . [26] combined the segment pro-posal system in [8] and object detection system in [11] for“fully convolutional instance segmentation” (FCIS). Thecommon idea in [8, 11, 26] is to predict a set of position-sensitive output channels fully convolutionally. Thesechannels simultaneously address object classes, boxes, andmasks, making the system fast. But FCIS exhibits system-atic errors on overlapping instances and creates spuriousedges (Figure 6), showing that it is challenged by the fun-damental difficulties of segmenting instances.2nother family of solutions [23, 4, 3, 29] to instance seg-mentation are driven by the success of semantic segmen-tation. Starting from per-pixel classification results ( e.g .,FCN outputs), these methods attempt to cut the pixels ofthe same category into different instances. In contrast to the segmentation-first strategy of these methods, Mask R-CNNis based on an instance-first strategy. We expect a deeper in-corporation of both strategies will be studied in the future.
3. Mask R-CNN
Mask R-CNN is conceptually simple: Faster R-CNN hastwo outputs for each candidate object, a class label and abounding-box offset; to this we add a third branch that out-puts the object mask. Mask R-CNN is thus a natural and in-tuitive idea. But the additional mask output is distinct fromthe class and box outputs, requiring extraction of much finer spatial layout of an object. Next, we introduce the key ele-ments of Mask R-CNN, including pixel-to-pixel alignment,which is the main missing piece of Fast/Faster R-CNN.
Faster R-CNN:
We begin by briefly reviewing the FasterR-CNN detector [36]. Faster R-CNN consists of two stages.The first stage, called a Region Proposal Network (RPN),proposes candidate object bounding boxes. The secondstage, which is in essence Fast R-CNN [12], extracts fea-tures using RoIPool from each candidate box and performsclassification and bounding-box regression. The featuresused by both stages can be shared for faster inference. Werefer readers to [21] for latest, comprehensive comparisonsbetween Faster R-CNN and other frameworks.
Mask R-CNN:
Mask R-CNN adopts the same two-stageprocedure, with an identical first stage (which is RPN). Inthe second stage, in parallel to predicting the class and boxoffset, Mask R-CNN also outputs a binary mask for eachRoI. This is in contrast to most recent systems, where clas-sification depends on mask predictions ( e.g . [33, 10, 26]).Our approach follows the spirit of Fast R-CNN [12] thatapplies bounding-box classification and regression in par-allel (which turned out to largely simplify the multi-stagepipeline of original R-CNN [13]).Formally, during training, we define a multi-task loss oneach sampled RoI as L = L cls + L box + L mask . The clas-sification loss L cls and bounding-box loss L box are identi-cal as those defined in [12]. The mask branch has a Km -dimensional output for each RoI, which encodes K binarymasks of resolution m × m , one for each of the K classes.To this we apply a per-pixel sigmoid, and define L mask asthe average binary cross-entropy loss. For an RoI associatedwith ground-truth class k , L mask is only defined on the k -thmask (other mask outputs do not contribute to the loss).Our definition of L mask allows the network to generatemasks for every class without competition among classes;we rely on the dedicated classification branch to predict the Figure 3.
RoIAlign:
The dashed grid rep-resents a feature map, the solid lines an RoI(with 2 × class label used to select the output mask. This decouples mask and class prediction. This is different from commonpractice when applying FCNs [30] to semantic segmenta-tion, which typically uses a per-pixel softmax and a multino-mial cross-entropy loss. In that case, masks across classescompete; in our case, with a per-pixel sigmoid and a binary loss, they do not. We show by experiments that this formu-lation is key for good instance segmentation results. Mask Representation:
A mask encodes an input object’s spatial layout. Thus, unlike class labels or box offsetsthat are inevitably collapsed into short output vectors byfully-connected ( fc ) layers, extracting the spatial structureof masks can be addressed naturally by the pixel-to-pixelcorrespondence provided by convolutions.Specifically, we predict an m × m mask from each RoIusing an FCN [30]. This allows each layer in the maskbranch to maintain the explicit m × m object spatial lay-out without collapsing it into a vector representation thatlacks spatial dimensions. Unlike previous methods that re-sort to fc layers for mask prediction [33, 34, 10], our fullyconvolutional representation requires fewer parameters, andis more accurate as demonstrated by experiments.This pixel-to-pixel behavior requires our RoI features,which themselves are small feature maps, to be well alignedto faithfully preserve the explicit per-pixel spatial corre-spondence. This motivated us to develop the following RoIAlign layer that plays a key role in mask prediction.
RoIAlign:
RoIPool [12] is a standard operation for extract-ing a small feature map ( e.g ., 7 ×
7) from each RoI. RoIPoolfirst quantizes a floating-number RoI to the discrete granu-larity of the feature map, this quantized RoI is then subdi-vided into spatial bins which are themselves quantized, andfinally feature values covered by each bin are aggregated(usually by max pooling). Quantization is performed, e.g .,on a continuous coordinate x by computing [ x/ , where16 is a feature map stride and [ · ] is rounding; likewise, quan-tization is performed when dividing into bins ( e.g ., 7 × RoIAlign layer that re-moves the harsh quantization of RoIPool, properly aligning the extracted features with the input. Our proposed changeis simple: we avoid any quantization of the RoI boundaries3r bins ( i.e ., we use x/ instead of [ x/ ). We use bi-linear interpolation [22] to compute the exact values of theinput features at four regularly sampled locations in eachRoI bin, and aggregate the result (using max or average),see Figure 3 for details. We note that the results are not sen-sitive to the exact sampling locations, or how many pointsare sampled, as long as no quantization is performed.RoIAlign leads to large improvements as we show in § Network Architecture:
To demonstrate the generality ofour approach, we instantiate Mask R-CNN with multiplearchitectures. For clarity, we differentiate between: (i) theconvolutional backbone architecture used for feature ex-traction over an entire image, and (ii) the network head for bounding-box recognition (classification and regression)and mask prediction that is applied separately to each RoI.We denote the backbone architecture using the nomen-clature network-depth-features . We evaluate ResNet [19]and ResNeXt [45] networks of depth 50 or 101 layers. Theoriginal implementation of Faster R-CNN with ResNets[19] extracted features from the final convolutional layerof the 4-th stage, which we call C4. This backbone withResNet-50, for example, is denoted by ResNet-50-C4. Thisis a common choice used in [19, 10, 21, 39].We also explore another more effective backbone re-cently proposed by Lin et al . [27], called a Feature Pyra-mid Network (FPN). FPN uses a top-down architecture withlateral connections to build an in-network feature pyramidfrom a single-scale input. Faster R-CNN with an FPN back-bone extracts RoI features from different levels of the fea-ture pyramid according to their scale, but otherwise therest of the approach is similar to vanilla ResNet. Using aResNet-FPN backbone for feature extraction with Mask R-CNN gives excellent gains in both accuracy and speed. Forfurther details on FPN, we refer readers to [27].For the network head we closely follow architecturespresented in previous work to which we add a fully con-volutional mask prediction branch. Specifically, we ex-tend the Faster R-CNN box heads from the ResNet [19]and FPN [27] papers. Details are shown in Figure 4. Thehead on the ResNet-C4 backbone includes the 5-th stage ofResNet (namely, the 9-layer ‘res5’ [19]), which is compute-intensive. For FPN, the backbone already includes res5 andthus allows for a more efficient head that uses fewer filters.We note that our mask branches have a straightforwardstructure. More complex designs have the potential to im-prove performance but are not the focus of this work. ave RoIRoI 14×14×2567×7×256 14×14×2561024 28×28×2561024mask14×14×256 classbox2048RoI res57×7×1024 7×7×2048 ×4 classbox14×14×80 mask28×28×80
Faster R-CNNw/ ResNet [19] Faster R-CNNw/ FPN [27]
Figure 4.
Head Architecture : We extend two existing Faster R-CNN heads [19, 27]. Left/Right panels show the heads for theResNet C4 and FPN backbones, from [19] and [27], respectively,to which a mask branch is added. Numbers denote spatial resolu-tion and channels. Arrows denote either conv, deconv, or fc layersas can be inferred from context (conv preserves spatial dimensionwhile deconv increases it). All convs are 3 ×
3, except the outputconv which is 1 ×
1, deconvs are 2 × Left : ‘res5’ denotes ResNet’s fifthstage, which for simplicity we altered so that the first conv oper-ates on a 7 × ×
14 / stride 2 as in[19]).
Right : ‘ ×
4’ denotes a stack of four consecutive convs.
We set hyper-parameters following existing Fast/FasterR-CNN work [12, 36, 27]. Although these decisions weremade for object detection in original papers [12, 36, 27], wefound our instance segmentation system is robust to them.
Training:
As in Fast R-CNN, an RoI is considered positiveif it has IoU with a ground-truth box of at least 0.5 andnegative otherwise. The mask loss L mask is defined only onpositive RoIs. The mask target is the intersection betweenan RoI and its associated ground-truth mask.We adopt image-centric training [12]. Images are resizedsuch that their scale (shorter edge) is 800 pixels [27]. Eachmini-batch has 2 images per GPU and each image has N sampled RoIs, with a ratio of 1:3 of positive to negatives[12]. N is 64 for the C4 backbone (as in [12, 36]) and 512for FPN (as in [27]). We train on 8 GPUs (so effective mini-batch size is 16) for 160k iterations, with a learning rate of0.02 which is decreased by 10 at the 120k iteration. Weuse a weight decay of 0.0001 and momentum of 0.9. WithResNeXt [45], we train with 1 image per GPU and the samenumber of iterations, with a starting learning rate of 0.01.The RPN anchors span 5 scales and 3 aspect ratios, fol-lowing [27]. For convenient ablation, RPN is trained sep-arately and does not share features with Mask R-CNN, un-less specified. For every entry in this paper, RPN and MaskR-CNN have the same backbones and so they are shareable. Inference:
At test time, the proposal number is 300 for theC4 backbone (as in [36]) and 1000 for FPN (as in [27]). Werun the box prediction branch on these proposals, followedby non-maximum suppression [14]. The mask branch isthen applied to the highest scoring 100 detection boxes. Al-though this differs from the parallel computation used intraining, it speeds up inference and improves accuracy (dueto the use of fewer, more accurate RoIs). The mask branch4 orse1.00horse1.00horse1.00 bus1.00 bus1.00car.98truck.88 car.93car.78 car.98car.91car.96car.99 car.94car.99 car.98truck.86car.99 car.95car1.00 car.93car.98 car.95 car.97car.87car.99 car.82car.78car.93car.95car.97 person.99traffic light.73 person1.00 person.99person.95person.93person.93person1.00person.98 skateboard.82suitcase1.00 suitcase.99suitcase.96suitcase1.00suitcase.93 suitcase.98suitcase.88suitcase.72stop sign.88person1.00 person1.00person1.00person1.00 person.99person.99bench.76 skateboard.91skateboard.83handbag.81 surfboard1.00 person1.00person1.00 surfboard1.00person1.00 person.98surfboard1.00person1.00surfboard.98 surfboard1.00person.91 person.74person1.00person1.00person1.00 person1.00person1.00person1.00person.98person.99 person1.00person.99 umbrella1.00person.95 umbrella.99umbrella.97umbrella.97 umbrella.96umbrella1.00backpack.96 umbrella.98backpack.95 person.80 backpack.98bicycle.93umbrella.89 person.89 handbag.97handbag.85 person1.00person1.00person1.00person1.00 person1.00person1.00motorcycle.72kite.89 person.99kite.95person.99person1.00 person.81person.72kite.93 person.89kite1.00 person.98person1.00 kite.84kite.97 person.80handbag.80person.99kite.82 person.98person.96kite.98 person.99 person.82kite.81person.95 person.84kite.98kite.72kite.99 kite.84 kite.99person.94 person.72person.98 kite.95person.98person.77 kite.73person.78 person.71person.87 kite.88kite.88person.94 kite.86 kite.89zebra.99 zebra1.00zebra1.00 zebra.99 zebra1.00zebra.96zebra.74 zebra.96zebra.99zebra.90 zebra.88 zebra.76 dining table.91dining table.78chair.97person.99 person.86chair.94 chair.98person.95 chair.95person.97 chair.92 chair.99 person.97person.99person.94person.99 person.87person.99chair.83person.94 person.99person.98chair.87chair.95 person.97 person.96chair.99person.86 person.89chair.89 wine glass.93person.98 person.88person.97person.88 person.88person.91 chair.96person.95 person.77person.92 wine glass.94cup.83 wine glass.94wine glass.83cup.91chair.85 dining table.96wine glass.91person.96cup.98 person.83 dining table.75cup.96person.72wine glass.80chair.98 person.81 person.82dining table.81chair.85chair.78 cup.75person.77cup.71 wine glass.80cup.79cup.93 cup.71person.99person.99 person1.00person1.00frisbee1.00person.80 person.82elephant1.00elephant1.00elephant1.00 elephant.97elephant.99 person1.00 person1.00dining table.95person1.00 person.88wine glass1.00 bottle.97wine glass1.00wine glass.99tv.98 tv.84 person1.00bench.97 person.98person1.00 person1.00handbag.73person.86potted plant.92bird.93 person.76 person.98person.78person.78backpack.88handbag.91cell phone.77clock.73person.99person1.00 person.98person1.00 person1.00 person1.00person.99person.99 person.99person1.00person1.00 person.98 person.99handbag.88person1.00person.98person.92 handbag.99 person.97person.95 handbag.88traffic light.99person.95person.87 person.95traffic light.87traffic light.71person.80 person.95person.95person.73person.74tie.85car.99car.86car.97 car1.00car.95 car.97 traffic light1.00traffic light.99 car.99person.99 car.95 car.97car.98car.98car.91 car1.00car.96car.96 bicycle.86car.97 car.97 car.97car.94car.95 car.94car.81person.87 parking meter.98car.89 donut1.00donut.90donut.88 donut.81donut.95donut.96 donut1.00donut.98donut.99donut.94donut.97donut.99 donut.98donut1.00donut.95 donut1.00donut.98donut.98donut.99donut.96donut.89 donut.96donut.95donut.98 donut.89donut.93donut.95donut.90 donut.89donut.89 donut.89donut.86donut.86 person1.00 person1.00person1.00person1.00 person1.00person1.00 person1.00dog1.00 baseball bat.99baseball bat.85baseball bat.98 truck.92 truck.99truck.96truck.99truck.97bus.99truck.93bus.90 person1.00person1.00horse.77 horse.99cow.93 person.96 person1.00person.99horse.97person.98person.97 person.98person.96 person1.00tennis racket1.00 chair.73person.90person.77 person.97person.81person.87person.71person.96 person.99 person.98person.94 chair.97 chair.80chair.71chair.94chair.92chair.99chair.93chair.99 chair.91chair.81chair.98chair.83chair.81chair.81chair.93sports ball.99person1.00 couch.82 person1.00person.99person1.00person1.00person1.00 person.99skateboard.99 person.90person.98person.99person.91person.99person1.00 person.80skateboard.98
Figure 5. More results of
Mask R-CNN on COCO test images, using ResNet-101-FPN and running at 5 fps, with 35.7 mask AP (Table 1). backbone AP AP AP AP S AP M AP L MNC [10] ResNet-101-C4 24.6 44.3 24.8 4.7 25.9 43.6FCIS [26] +OHEM ResNet-101-C5-dilated 29.2 49.5 - 7.1 31.3 50.0FCIS+++ [26] +OHEM ResNet-101-C5-dilated 33.6 54.5 - - - -
Mask R-CNN
ResNet-101-C4 33.1 54.9 34.8 12.1 35.6 51.1
Mask R-CNN
ResNet-101-FPN 35.7 58.0 37.8 15.5 38.1 52.4
Mask R-CNN
ResNeXt-101-FPN
Table 1.
Instance segmentation mask
AP on COCO test-dev . MNC [10] and FCIS [26] are the winners of the COCO 2015 and 2016segmentation challenges, respectively. Without bells and whistles, Mask R-CNN outperforms the more complex FCIS+++, which includesmulti-scale train/test, horizontal flip test, and OHEM [38]. All entries are single-model results. can predict K masks per RoI, but we only use the k -th mask,where k is the predicted class by the classification branch.The m × m floating-number mask output is then resized tothe RoI size, and binarized at a threshold of 0.5.Note that since we only compute masks on the top 100detection boxes, Mask R-CNN adds a small overhead to itsFaster R-CNN counterpart ( e.g ., ∼
20% on typical models).
4. Experiments: Instance Segmentation
We perform a thorough comparison of Mask R-CNN tothe state of the art along with comprehensive ablations onthe COCO dataset [28]. We report the standard COCO met-rics including AP (averaged over IoU thresholds), AP ,AP , and AP S , AP M , AP L (AP at different scales). Un-less noted, AP is evaluating using mask IoU. As in previouswork [5, 27], we train using the union of 80k train imagesand a 35k subset of val images ( trainval35k ), and re-port ablations on the remaining 5k val images ( minival ).We also report results on test-dev [28].
We compare Mask R-CNN to the state-of-the-art meth-ods in instance segmentation in Table 1. All instantia-tions of our model outperform baseline variants of pre-vious state-of-the-art models. This includes MNC [10]and FCIS [26], the winners of the COCO 2015 and 2016segmentation challenges, respectively. Without bells andwhistles, Mask R-CNN with ResNet-101-FPN backboneoutperforms FCIS+++ [26], which includes multi-scaletrain/test, horizontal flip test, and online hard example min-ing (OHEM) [38]. While outside the scope of this work, weexpect many such improvements to be applicable to ours.Mask R-CNN outputs are visualized in Figures 2 and 5.Mask R-CNN achieves good results even under challeng-ing conditions. In Figure 6 we compare our Mask R-CNNbaseline and FCIS+++ [26]. FCIS+++ exhibits systematicartifacts on overlapping instances, suggesting that it is chal-lenged by the fundamental difficulty of instance segmenta-tion. Mask R-CNN shows no such artifacts.5 erson1.00 person1.00person1.00 person1.00umbrella1.00umbrella.99 car.99car.93 giraffe1.00 giraffe1.00person1.00 person1.00person1.00 person1.00person.95 sports ball1.00sports ball.98 person1.00 person1.00person1.00tie.95 tie1.00 F C I S M a s k R - CNN train1.00train.99train.80person1.00 person1.00person1.00 person1.00person1.00person1.00skateboard.98person.99 person.99 skateboard.99handbag.93
Figure 6. FCIS+++ [26] (top) vs . Mask R-CNN (bottom, ResNet-101-FPN). FCIS exhibits systematic artifacts on overlapping objects. net-depth-features AP AP AP ResNet-50-C4
ResNet-101-C4
ResNet-50-FPN
ResNet-101-FPN
ResNeXt-101-FPN (a)
Backbone Architecture : Better back-bones bring expected gains: deeper networksdo better, FPN outperforms C4 features, andResNeXt improves on ResNet. AP AP AP softmax sigmoid +5.5 +7.1 +6.4 (b) Multinomial vs . Independent Masks (ResNet-50-C4): Decoupling via per-class binary masks (sigmoid) gives largegains over multinomial masks (softmax). align? bilinear? agg.
AP AP AP RoIPool [12] max 26.9 48.8 26.4
RoIWarp [10] (cid:88) max 27.2 49.2 27.1 (cid:88) ave 27.1 48.9 27.1
RoIAlign (cid:88) (cid:88) max (cid:88) (cid:88) ave (c)
RoIAlign (ResNet-50-C4): Mask results with various RoIlayers. Our RoIAlign layer improves AP by ∼ by ∼ AP AP bb AP bb AP bb RoIPool
RoIAlign +7.3 + 5.3 +10.5 +5.8 +2.6 +9.5 (d)
RoIAlign (ResNet-50- C5 , stride 32 ): Mask-level and box-levelAP using large-stride features. Misalignments are more severe thanwith stride-16 features (Table 2c), resulting in big accuracy gaps. mask branch AP AP AP MLP fc: 1024 → → · → → → · FCN conv: 256 → → → → → (e) Mask Branch (ResNet-50-FPN): Fully convolutional networks (FCN) vs .multi-layer perceptrons (MLP, fully-connected) for mask prediction. FCNs im-prove results as they take advantage of explicitly encoding spatial layout. Table 2.
Ablations . We train on trainval35k , test on minival , and report mask
AP unless otherwise noted.
We run a number of ablations to analyze Mask R-CNN.Results are shown in Table 2 and discussed in detail next.
Architecture:
Table 2a shows Mask R-CNN with variousbackbones. It benefits from deeper networks (50 vs . 101)and advanced designs including FPN and ResNeXt. Wenote that not all frameworks automatically benefit fromdeeper or advanced networks (see benchmarking in [21]). Multinomial vs . Independent Masks: Mask R-CNN de-couples mask and class prediction: as the existing boxbranch predicts the class label, we generate a mask for eachclass without competition among classes (by a per-pixel sig-moid and a binary loss). In Table 2b, we compare this tousing a per-pixel softmax and a multinomial loss (as com-monly used in FCN [30]). This alternative couples the tasksof mask and class prediction, and results in a severe lossin mask AP (5.5 points). This suggests that once the in-stance has been classified as a whole (by the box branch),it is sufficient to predict a binary mask without concern forthe categories, which makes the model easier to train.
Class-Specific vs . Class-Agnostic Masks: Our default in-stantiation predicts class-specific masks, i.e ., one m × m mask per class. Interestingly, Mask R-CNN with class-agnostic masks ( i.e ., predicting a single m × m output re-gardless of class) is nearly as effective: it has 29.7 mask AP vs . 30.3 for the class-specific counterpart on ResNet-50-C4.This further highlights the division of labor in our approachwhich largely decouples classification and segmentation. RoIAlign:
An evaluation of our proposed
RoIAlign layer isshown in Table 2c. For this experiment we use the ResNet-50-C4 backbone, which has stride 16. RoIAlign improvesAP by about 3 points over RoIPool, with much of the gaincoming at high IoU (AP ). RoIAlign is insensitive tomax/average pool; we use average in the rest of the paper.Additionally, we compare with RoIWarp proposed inMNC [10] that also adopt bilinear sampling. As discussedin §
3, RoIWarp still quantizes the RoI, losing alignmentwith the input. As can be seen in Table 2c, RoIWarp per-forms on par with RoIPool and much worse than RoIAlign.This highlights that proper alignment is key.We also evaluate RoIAlign with a
ResNet-50-C5 back-bone, which has an even larger stride of 32 pixels. We usethe same head as in Figure 4 (right), as the res5 head is notapplicable. Table 2d shows that RoIAlign improves maskAP by a massive 7.3 points, and mask AP by 10.5 points6 ackbone AP bb AP bb AP bb AP bb S AP bb M AP bb L Faster R-CNN+++ [19] ResNet-101-C4 34.9 55.7 37.4 15.6 38.7 50.9Faster R-CNN w FPN [27] ResNet-101-FPN 36.2 59.1 39.0 18.2 39.0 48.2Faster R-CNN by G-RMI [21] Inception-ResNet-v2 [41] 34.7 55.5 36.7 13.5 38.1 52.0Faster R-CNN w TDM [39] Inception-ResNet-v2-TDM 36.8 57.7 39.2 16.2 39.8
Faster R-CNN, RoIAlign ResNet-101-FPN 37.3 59.6 40.3 19.8 40.2 48.8
Mask R-CNN
ResNet-101-FPN 38.2 60.3 41.7 20.1 41.1 50.2
Mask R-CNN
ResNeXt-101-FPN
Table 3.
Object detection single-model results (bounding box AP), vs . state-of-the-art on test-dev . Mask R-CNN using ResNet-101-FPN outperforms the base variants of all previous state-of-the-art models (the mask output is ignored in these experiments). The gains ofMask R-CNN over [27] come from using RoIAlign (+1.1 AP bb ), multitask training (+0.9 AP bb ), and ResNeXt-101 (+1.6 AP bb ). (
50% relative improvement ). Moreover, we note that withRoIAlign, using stride-32
C5 features (30.9 AP) is more ac-curate than using stride-16 C4 features (30.3 AP, Table 2c).RoIAlign largely resolves the long-standing challenge ofusing large-stride features for detection and segmentation.Finally, RoIAlign shows a gain of 1.5 mask AP and 0.5box AP when used with FPN, which has finer multi-levelstrides. For keypoint detection that requires finer alignment,RoIAlign shows large gains even with FPN (Table 6).
Mask Branch:
Segmentation is a pixel-to-pixel task andwe exploit the spatial layout of masks by using an FCN.In Table 2e, we compare multi-layer perceptrons (MLP)and FCNs, using a ResNet-50-FPN backbone. Using FCNsgives a 2.1 mask AP gain over MLPs. We note that wechoose this backbone so that the conv layers of the FCNhead are not pre-trained, for a fair comparison with MLP.
We compare Mask R-CNN to the state-of-the-art COCO bounding-box object detection in Table 3. For this result,even though the full Mask R-CNN model is trained, onlythe classification and box outputs are used at inference (themask output is ignored). Mask R-CNN using ResNet-101-FPN outperforms the base variants of all previous state-of-the-art models, including the single-model variant of G-RMI [21], the winner of the COCO 2016 Detection Chal-lenge. Using ResNeXt-101-FPN, Mask R-CNN further im-proves results, with a margin of 3.0 points box AP overthe best previous single model entry from [39] (which usedInception-ResNet-v2-TDM).As a further comparison, we trained a version of MaskR-CNN but without the mask branch, denoted by “FasterR-CNN, RoIAlign” in Table 3. This model performs betterthan the model presented in [27] due to RoIAlign. On theother hand, it is 0.9 points box AP lower than Mask R-CNN.This gap of Mask R-CNN on box detection is therefore duesolely to the benefits of multi-task training.Lastly, we note that Mask R-CNN attains a small gapbetween its mask and box AP: e.g ., 2.7 points between 37.1(mask, Table 1) and 39.8 (box, Table 3). This indicates thatour approach largely closes the gap between object detec-tion and the more challenging instance segmentation task.
Inference:
We train a ResNet-101-FPN model that sharesfeatures between the RPN and Mask R-CNN stages, follow-ing the 4-step training of Faster R-CNN [36]. This modelruns at 195ms per image on an Nvidia Tesla M40 GPU (plus15ms CPU time resizing the outputs to the original resolu-tion), and achieves statistically the same mask AP as theunshared one. We also report that the ResNet-101-C4 vari-ant takes ∼ e.g ., by varying image sizes andproposal numbers, which is beyond the scope of this paper. Training:
Mask R-CNN is also fast to train. Training withResNet-50-FPN on COCO trainval35k takes 32 hoursin our synchronized 8-GPU implementation (0.72s per 16-image mini-batch), and 44 hours with ResNet-101-FPN. Infact, fast prototyping can be completed in less than one day when training on the train set. We hope such rapid train-ing will remove a major hurdle in this area and encouragemore people to perform research on this challenging topic.
5. Mask R-CNN for Human Pose Estimation
Our framework can easily be extended to human poseestimation. We model a keypoint’s location as a one-hotmask, and adopt Mask R-CNN to predict K masks, one foreach of K keypoint types ( e.g ., left shoulder, right elbow).This task helps demonstrate the flexibility of Mask R-CNN.We note that minimal domain knowledge for human poseis exploited by our system, as the experiments are mainly todemonstrate the generality of the Mask R-CNN framework.We expect that domain knowledge ( e.g ., modeling struc-tures [6]) will be complementary to our simple approach. Implementation Details:
We make minor modifications tothe segmentation system when adapting it for keypoints.For each of the K keypoints of an instance, the trainingtarget is a one-hot m × m binary mask where only a single pixel is labeled as foreground. During training, for each vis-ible ground-truth keypoint, we minimize the cross-entropyloss over an m -way softmax output (which encourages a7 igure 7. Keypoint detection results on COCO test using Mask R-CNN (ResNet-50-FPN), with person segmentation masks predictedfrom the same model. This model has a keypoint AP of 63.1 and runs at 5 fps. AP kp AP kp AP kp AP kp M AP kp L CMU-Pose+++ [6] 61.8 84.9 67.5 57.1 68.2G-RMI [32] † Mask R-CNN , keypoint-only 62.7 87.0 68.4 57.4 71.1
Mask R-CNN , keypoint & mask
Table 4.
Keypoint detection
AP on COCO test-dev . Ours is asingle model (ResNet-50-FPN) that runs at 5 fps. CMU-Pose+++[6] is the 2016 competition winner that uses multi-scale testing,post-processing with CPM [44], and filtering with an object detec-tor, adding a cumulative ∼ † : G-RMI was trained on COCO plus MPII [1] (25k im-ages), using two models (Inception-ResNet-v2 for bounding boxdetection and ResNet-101 for keypoints). single point to be detected). We note that as in instance seg-mentation, the K keypoints are still treated independently.We adopt the ResNet-FPN variant, and the keypoint headarchitecture is similar to that in Figure 4 (right). The key-point head consists of a stack of eight 3 × × bilinear upscaling,producing an output resolution of 56 ×
56. We found thata relatively high resolution output (compared to masks) isrequired for keypoint-level localization accuracy.Models are trained on all COCO trainval35k im-ages that contain annotated keypoints. To reduce overfit-ting, as this training set is smaller, we train using imagescales randomly sampled from [640, 800] pixels; inferenceis on a single scale of 800 pixels. We train for 90k iterations,starting from a learning rate of 0.02 and reducing it by 10 at60k and 80k iterations. We use bounding-box NMS with athreshold of 0.5. Other details are identical as in § Main Results and Ablations:
We evaluate the person key-point AP (AP kp ) and experiment with a ResNet-50-FPNbackbone; more backbones will be studied in the appendix.Table 4 shows that our result (62.7 AP kp ) is 0.9 points higherthan the COCO 2016 keypoint detection winner [6] thatuses a multi-stage processing pipeline (see caption of Ta-ble 4). Our method is considerably simpler and faster.More importantly, we have a unified model that can si- AP bb person AP mask person AP kp Faster R-CNN 52.5 - -Mask R-CNN, mask-only -Mask R-CNN, keypoint-only 50.7 - 64.2Mask R-CNN, keypoint & mask 52.0 45.1
Table 5.
Multi-task learning of box, mask, and keypoint about the person category, evaluated on minival . All entries are trainedon the same data for fair comparisons. The backbone is ResNet-50-FPN. The entries with 64.2 and 64.7 AP on minival have test-dev
AP of 62.7 and 63.1, respectively (see Table 4). AP kp AP kp AP kp AP kp M AP kp L RoIPool
RoIAlign
Table 6.
RoIAlign vs . RoIPool for keypoint detection on minival . The backbone is ResNet-50-FPN. multaneously predict boxes, segments, and keypoints whilerunning at 5 fps. Adding a segment branch (for the per-son category) improves the AP kp to 63.1 (Table 4) on test-dev . More ablations of multi-task learning on minival are in Table 5. Adding the mask branch to thebox-only ( i.e ., Faster R-CNN) or keypoint-only versionsconsistently improves these tasks. However, adding thekeypoint branch reduces the box/mask AP slightly, suggest-ing that while keypoint detection benefits from multitasktraining, it does not in turn help the other tasks. Neverthe-less, learning all three tasks jointly enables a unified systemto efficiently predict all outputs simultaneously (Figure 7).We also investigate the effect of RoIAlign on keypointdetection (Table 6). Though this ResNet-50-FPN backbonehas finer strides ( e.g ., 4 pixels on the finest level), RoIAlignstill shows significant improvement over RoIPool and in-creases AP kp by 4.4 points. This is because keypoint detec-tions are more sensitive to localization accuracy. This againindicates that alignment is essential for pixel-level localiza-tion, including masks and keypoints.Given the effectiveness of Mask R-CNN for extractingobject bounding boxes, masks, and keypoints, we expect itbe an effective framework for other instance-level tasks.8 raining data AP [ val ] AP AP person rider car truck bus train mcycle bicycleInstanceCut [23] fine + coarse fine fine - 17.4 36.7 14.6 12.9 35.7 16.0 23.2 19.0 10.3 7.8DIN [3] fine + coarse - 20.0 38.8 16.5 16.7 25.7 20.6 30.0 23.4 17.1 10.1SGN [29] fine + coarse fine fine + COCO Table 7. Results on Cityscapes val (‘AP [ val ]’ column) and test (remaining columns) sets. Our method uses ResNet-50-FPN.
Appendix A: Experiments on Cityscapes
We further report instance segmentation results on theCityscapes [7] dataset. This dataset has fine annota-tions for 2975 train, 500 val, and 1525 test images. It has20k coarse training images without instance annotations,which we do not use. All images are 2048 × fine training set are: person rider car truck bus train mcycle bicycle17.9k 1.8k 26.9k 0.5k 0.4k 0.2k 0.7k 3.7k Instance segmentation performance on this task is measuredby the COCO-style mask AP (averaged over IoU thresh-olds); AP ( i.e ., mask AP at an IoU of 0.5) is also reported. Implementation:
We apply our Mask R-CNN models withthe ResNet-FPN-50 backbone; we found the 101-layercounterpart performs similarly due to the small dataset size.We train with image scale (shorter side) randomly sampledfrom [800, 1024], which reduces overfitting; inference is ona single scale of 1024 pixels. We use a mini-batch size of1 image per GPU (so 8 on 8 GPUs) and train the modelfor 24k iterations, starting from a learning rate of 0.01 andreducing it to 0.001 at 18k iterations. It takes ∼ Results:
Table 7 compares our results to the state of theart on the val and test sets.
Without using the coarse training set, our method achieves 26.2 AP on test , whichis over 30% relative improvement over the previous best en-try (DIN [3]), and is also better than the concurrent work ofSGN’s 25.0 [29]. Both DIN and SGN use fine + coarse data. Compared to the best entry using fine data only(17.4 AP), we achieve a ∼
50% improvement.For the person and car categories, the Cityscapes datasetexhibits a large number of within -category overlapping in-stances (on average 6 people and 9 cars per image). Weargue that within-category overlap is a core difficulty of in-stance segmentation. Our method shows massive improve-ment on these two categories over the other best entries (rel-ative ∼
40% improvement on person from 21.8 to 30.5 and ∼
20% improvement on car from 39.4 to 46.9), even thoughour method does not exploit the coarse data.A main challenge of the Cityscapes dataset is trainingmodels in a low-data regime, particularly for the categoriesof truck , bus , and train , which have about 200-500 train- car:1.00car:0.98car:0.98 car:0.95car:0.81 car:0.52person:1.00person:1.00 person:1.00person:1.00 person:1.00person:1.00person:1.00 person:1.00person:1.00person:1.00 person:1.00 person:1.00person:1.00 person:1.00 person:0.99person:0.99 person:0.99person:0.99 person:0.98person:0.98person:0.98person:0.98person:0.94person:0.94 person:0.82person:0.82person:0.79 person:0.73person:0.67person:0.66person:0.59 truck:0.66bus:1.00 bus:0.95rider:0.59 bicycle:0.83 bicycle:0.56car:1.00 car:1.00 car:1.00 car:1.00car:1.00car:1.00 car:1.00 car:1.00 car:1.00car:0.99car:0.95 car:0.95car:0.95car:0.69car:0.68car:0.68 car:0.64car:0.57 car:0.52 person:1.00person:0.99person:0.99person:0.99person:0.99person:0.98 person:0.98person:0.98person:0.97person:0.93person:0.92 person:0.91person:0.86person:0.84person:0.82 person:0.73person:0.72person:0.72person:0.72person:0.63 rider:0.68car:1.00car:1.00 car:1.00car:1.00car:1.00 car:1.00 car:1.00car:1.00car:1.00 car:1.00car:1.00 car:1.00car:1.00car:1.00car:1.00 car:1.00car:1.00car:0.98 car:0.97car:0.88 car:0.76car:0.72car:0.72 car:0.65 car:0.50person:1.00 person:1.00person:0.98person:0.93person:0.85 person:0.78person:0.73 person:0.58person:1.00 person:1.00person:1.00 person:1.00person:1.00 person:1.00person:1.00person:1.00 person:1.00person:1.00 person:1.00 person:1.00person:1.00person:1.00person:1.00person:1.00 person:1.00person:1.00 person:1.00person:1.00 person:1.00person:1.00 person:0.99person:0.99 person:0.98 person:0.97 person:0.96person:0.92person:0.91 person:0.70 person:0.59 bicycle:0.99 bicycle:0.97car:1.00 car:1.00car:0.99 car:0.89person:1.00 person:1.00person:1.00 person:1.00 person:1.00 person:0.96person:0.93 person:0.89person:0.88person:0.75 rider:0.94car:1.00car:1.00 car:1.00car:1.00car:1.00 car:1.00car:1.00 car:0.99car:0.89 car:0.67 person:1.00person:1.00person:1.00person:1.00person:0.82bus:0.75 Figure 8. Mask R-CNN results on Cityscapes test (32.0 AP).The bottom-right image shows a failure prediction. ing samples each. To partially remedy this issue, we furtherreport a result using COCO pre-training. To do this, we ini-tialize the corresponding 7 categories in Cityscapes from apre-trained COCO Mask R-CNN model ( rider being ran-domly initialized). We fine-tune this model for 4k iterationsin which the learning rate is reduced at 3k iterations, whichtakes ∼ test , almost a 6 point improvement over the fine -only counterpart. This indicates the important rolethe amount of training data plays. It also suggests thatmethods on Cityscapes might be influenced by their low-shot learning performance. We show that using COCO pre-training is an effective strategy on this dataset.Finally, we observed a bias between the val and test AP, as is also observed from the results of [23, 4, 29]. Wefound that this bias is mainly caused by the truck , bus ,and train categories, with the fine -only model having val / test AP of 28.8/22.8, 53.5/32.2, and 33.0/18.6, re-spectively. This suggests that there is a domain shift onthese categories, which also have little training data. COCOpre-training helps to improve results the most on these cat-egories; however, the domain shift persists with 38.0/30.1,57.5/40.9, and 41.2/30.9 val / test AP, respectively. Notethat for the person and car categories we do not see anysuch bias ( val / test AP are within ± point).Example results on Cityscapes are shown in Figure 8.9 escription backbone AP AP AP AP bb AP bb AP bb original baseline X-101-FPN 36.7 59.5 38.9 39.6 61.5 43.2 + updated baseline X-101-FPN 37.0 59.7 39.0 40.5 63.0 43.7 + e2e training X-101-FPN 37.6 60.4 39.9 41.7 64.1 45.2 + ImageNet-5k X-101-FPN 38.6 61.7 40.9 42.7 65.1 46.6 + train-time augm. X-101-FPN 39.2 62.5 41.6 43.5 65.9 47.2 + deeper X-152-FPN 39.7 63.2 42.2 44.1 66.4 48.4 + Non-local [43] X-152-FPN-NL + test-time augm. X-152-FPN-NL Table 8.
Enhanced detection results of Mask R-CNN on COCO minival . Each row adds an extra component to the above row.We denote ResNeXt model by ‘X’ for notational brevity.
Appendix B: Enhanced Results on COCO
As a general framework, Mask R-CNN is compat-ible with complementary techniques developed for de-tection/segmentation, including improvements made toFast/Faster R-CNN and FCNs. In this appendix we de-scribe some techniques that improve over our original re-sults. Thanks to its generality and flexibility, Mask R-CNNwas used as the framework by the three winning teams inthe COCO 2017 instance segmentation competition, whichall significantly outperformed the previous state of the art.
Instance Segmentation and Object Detection
We report some enhanced results of Mask R-CNN in Ta-ble 8. Overall, the improvements increase mask AP 5.1points (from 36.7 to 41.8) and box AP 7.7 points (from 39.6to 47.3). Each model improvement increases both mask APand box AP consistently, showing good generalization ofthe Mask R-CNN framework. We detail the improvementsnext. These results, along with future updates, can be repro-duced by our released code at https://github.com/facebookresearch/Detectron , and can serve ashigher baselines for future research.
Updated baseline:
We start with an updated baselinewith a different set of hyper-parameters. We lengthen thetraining to 180k iterations, in which the learning rate is re-duced by 10 at 120k and 160k iterations. We also changethe NMS threshold to 0.5 (from a default value of 0.3). Theupdated baseline has 37.0 mask AP and 40.5 box AP.
End-to-end training:
All previous results used stage-wise training, i.e ., training RPN as the first stage and MaskR-CNN as the second. Following [37], we evaluate end-to-end (‘e2e’) training that jointly trains RPN and Mask R-CNN. We adopt the ‘approximate’ version in [37] that onlycomputes partial gradients in the RoIAlign layer by ignor-ing the gradient w.r.t. RoI coordinates. Table 8 shows thate2e training improves mask AP by 0.6 and box AP by 1.2.
ImageNet-5k pre-training:
Following [45], we experi-ment with models pre-trained on a 5k-class subset of Ima-geNet (in contrast to the standard 1k-class subset). This 5 × increase in pre-training data improves both mask and box 1AP. As a reference, [40] used ∼ × more images (300M)and reported a 2-3 box AP improvement on their baselines. description backbone AP kp AP kp AP kp AP kp M AP kp L original baseline R-50-FPN 64.2 86.6 69.7 58.7 73.0 + updated baseline R-50-FPN 65.1 86.6 70.9 59.9 73.6 + deeper R-101-FPN 66.1 87.7 71.7 60.5 75.0 + ResNeXt X-101-FPN 67.3 88.0 73.3 62.2 75.6 + data distillation [35] X-101-FPN + test-time augm. X-101-FPN Table 9.
Enhanced keypoint results of Mask R-CNN on COCO minival . Each row adds an extra component to the above row.Here we use only keypoint annotations but no mask annotations.We denote ResNet by ‘R’ and ResNeXt by ‘X’ for brevity.
Train-time augmentation:
Scale augmentation at traintime further improves results. During training, we randomlysample a scale from [640, 800] pixels and we increase thenumber of iterations to 260k (with the learning rate reducedby 10 at 200k and 240k iterations). Train-time augmenta-tion improves mask AP by 0.6 and box AP by 0.8.
Model architecture:
By upgrading the 101-layerResNeXt to its 152-layer counterpart [19], we observe anincrease of 0.5 mask AP and 0.6 box AP. This shows adeeper model can still improve results on COCO.Using the recently proposed non-local (NL) model [43],we achieve 40.3 mask AP and 45.0 box AP. This result iswithout test-time augmentation, and the method runs at 3fpson an Nvidia Tesla P100 GPU at test time.
Test-time augmentation:
We combine the model resultsevaluated using scales of [400, 1200] pixels with a step of100 and on their horizontal flips. This gives us a single-model result of 41.8 mask AP and 47.3 box AP.The above result is the foundation of our submission tothe COCO 2017 competition (which also used an ensemble,not discussed here). The first three winning teams for theinstance segmentation task were all reportedly based on anextension of the Mask R-CNN framework.
Keypoint Detection
We report enhanced results of keypoint detection in Ta-ble 9. As an updated baseline, we extend the training sched-ule to 130k iterations in which the learning rate is reducedby 10 at 100k and 120k iterations. This improves AP kp byabout 1 point. Replacing ResNet-50 with ResNet-101 andResNeXt-101 increases AP kp to 66.1 and 67.3, respectively.With a recent method called data distillation [35], we areable to exploit the additional 120k unlabeled images pro-vided by COCO. In brief, data distillation is a self-trainingstrategy that uses a model trained on labeled data to pre-dict annotations on unlabeled images, and in turn updatesthe model with these new annotations. Mask R-CNN pro-vides an effective framework for such a self-training strat-egy. With data distillation, Mask R-CNN AP kp improve by1.8 points to 69.1. We observe that Mask R-CNN can ben-efit from extra data, even if that data is unlabeled .By using the same test-time augmentation as used forinstance segmentation, we further boost AP kp to 70.4.10 cknowledgements: We would like to acknowledge IlijaRadosavovic for contributions to code release and enhancedresults, and the Caffe2 team for engineering support.
References [1] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2Dhuman pose estimation: New benchmark and state of the artanalysis. In
CVPR , 2014. 8[2] P. Arbel´aez, J. Pont-Tuset, J. T. Barron, F. Marques, andJ. Malik. Multiscale combinatorial grouping. In
CVPR ,2014. 2[3] A. Arnab and P. H. Torr. Pixelwise instance segmentationwith a dynamically instantiated network. In
CVPR , 2017. 3,9[4] M. Bai and R. Urtasun. Deep watershed transform for in-stance segmentation. In
CVPR , 2017. 3, 9[5] S. Bell, C. L. Zitnick, K. Bala, and R. Girshick. Inside-outside net: Detecting objects in context with skip poolingand recurrent neural networks. In
CVPR , 2016. 5[6] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In
CVPR ,2017. 7, 8[7] M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler,R. Benenson, U. Franke, S. Roth, and B. Schiele. TheCityscapes dataset for semantic urban scene understanding.In
CVPR , 2016. 9[8] J. Dai, K. He, Y. Li, S. Ren, and J. Sun. Instance-sensitivefully convolutional networks. In
ECCV , 2016. 2[9] J. Dai, K. He, and J. Sun. Convolutional feature masking forjoint object and stuff segmentation. In
CVPR , 2015. 2[10] J. Dai, K. He, and J. Sun. Instance-aware semantic segmen-tation via multi-task network cascades. In
CVPR , 2016. 2, 3,4, 5, 6[11] J. Dai, Y. Li, K. He, and J. Sun. R-FCN: Object detection viaregion-based fully convolutional networks. In
NIPS , 2016. 2[12] R. Girshick. Fast R-CNN. In
ICCV , 2015. 1, 2, 3, 4, 6[13] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich fea-ture hierarchies for accurate object detection and semanticsegmentation. In
CVPR , 2014. 2, 3[14] R. Girshick, F. Iandola, T. Darrell, and J. Malik. Deformablepart models are convolutional neural networks. In
CVPR ,2015. 4[15] B. Hariharan, P. Arbel´aez, R. Girshick, and J. Malik. Simul-taneous detection and segmentation. In
ECCV . 2014. 2[16] B. Hariharan, P. Arbel´aez, R. Girshick, and J. Malik. Hyper-columns for object segmentation and fine-grained localiza-tion. In
CVPR , 2015. 2[17] Z. Hayder, X. He, and M. Salzmann. Shape-aware instancesegmentation. In
CVPR , 2017. 9[18] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid poolingin deep convolutional networks for visual recognition. In
ECCV . 2014. 1, 2[19] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learningfor image recognition. In
CVPR , 2016. 2, 4, 7, 10[20] J. Hosang, R. Benenson, P. Doll´ar, and B. Schiele. Whatmakes for effective detection proposals?
PAMI , 2015. 2 [21] J. Huang, V. Rathod, C. Sun, M. Zhu, A. Korattikara,A. Fathi, I. Fischer, Z. Wojna, Y. Song, S. Guadarrama, et al.Speed/accuracy trade-offs for modern convolutional objectdetectors. In
CVPR , 2017. 2, 3, 4, 6, 7[22] M. Jaderberg, K. Simonyan, A. Zisserman, andK. Kavukcuoglu. Spatial transformer networks. In
NIPS , 2015. 4[23] A. Kirillov, E. Levinkov, B. Andres, B. Savchynskyy, andC. Rother. Instancecut: from edges to instances with multi-cut. In
CVPR , 2017. 3, 9[24] A. Krizhevsky, I. Sutskever, and G. Hinton. ImageNet clas-sification with deep convolutional neural networks. In
NIPS ,2012. 2[25] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E.Howard, W. Hubbard, and L. D. Jackel. Backpropagationapplied to handwritten zip code recognition.
Neural compu-tation , 1989. 2[26] Y. Li, H. Qi, J. Dai, X. Ji, and Y. Wei. Fully convolutionalinstance-aware semantic segmentation. In
CVPR , 2017. 2,3, 5, 6[27] T.-Y. Lin, P. Doll´ar, R. Girshick, K. He, B. Hariharan, andS. Belongie. Feature pyramid networks for object detection.In
CVPR , 2017. 2, 4, 5, 7[28] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ra-manan, P. Doll´ar, and C. L. Zitnick. Microsoft COCO: Com-mon objects in context. In
ECCV , 2014. 2, 5[29] S. Liu, J. Jia, S. Fidler, and R. Urtasun. SGN: Sequen-tial grouping networks for instance segmentation. In
ICCV ,2017. 3, 9[30] J. Long, E. Shelhamer, and T. Darrell. Fully convolutionalnetworks for semantic segmentation. In
CVPR , 2015. 1, 3, 6[31] V. Nair and G. E. Hinton. Rectified linear units improve re-stricted boltzmann machines. In
ICML , 2010. 4[32] G. Papandreou, T. Zhu, N. Kanazawa, A. Toshev, J. Tomp-son, C. Bregler, and K. Murphy. Towards accurate multi-person pose estimation in the wild. In
CVPR , 2017. 8[33] P. O. Pinheiro, R. Collobert, and P. Dollar. Learning to seg-ment object candidates. In
NIPS , 2015. 2, 3[34] P. O. Pinheiro, T.-Y. Lin, R. Collobert, and P. Doll´ar. Learn-ing to refine object segments. In
ECCV , 2016. 2, 3[35] I. Radosavovic, P. Doll´ar, R. Girshick, G. Gkioxari, andK. He. Data distillation: Towards omni-supervised learning. arXiv:1712.04440 , 2017. 10[36] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: To-wards real-time object detection with region proposal net-works. In
NIPS , 2015. 1, 2, 3, 4, 7[37] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: To-wards real-time object detection with region proposal net-works. In
TPAMI , 2017. 10[38] A. Shrivastava, A. Gupta, and R. Girshick. Training region-based object detectors with online hard example mining. In
CVPR , 2016. 2, 5[39] A. Shrivastava, R. Sukthankar, J. Malik, and A. Gupta. Be-yond skip connections: Top-down modulation for object de-tection. arXiv:1612.06851 , 2016. 4, 7[40] C. Sun, A. Shrivastava, S. Singh, and A. Gupta. Revisitingunreasonable effectiveness of data in deep learning era. In
ICCV , 2017. 10
41] C. Szegedy, S. Ioffe, and V. Vanhoucke. Inception-v4,inception-resnet and the impact of residual connections onlearning. In
ICLR Workshop , 2016. 7[42] J. R. Uijlings, K. E. van de Sande, T. Gevers, and A. W.Smeulders. Selective search for object recognition.
IJCV ,2013. 2[43] X. Wang, R. Girshick, A. Gupta, and K. He. Non-local neuralnetworks. arXiv:1711.07971 , 2017. 10[44] S.-E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Con-volutional pose machines. In
CVPR , 2016. 8[45] S. Xie, R. Girshick, P. Doll´ar, Z. Tu, and K. He. Aggregatedresidual transformations for deep neural networks. In
CVPR ,2017. 4, 10,2017. 4, 10