Segmentation Transformer: Object-Contextual Representations for Semantic Segmentation

Yuhui Yuan, Xiaokang Chen, Xilin Chen, Jingdong Wang

Introduction

Semantic segmentation is a problem of assigning a class label to each pixel for an image. It is a fundamental topic in computer vision and is critical for various practical tasks such as autonomous driving. Deep convolutional networks since FCN have been the dominant solutions. Various studies have been conducted, including high-resolution representation learning , contextual aggregation that is the interest of this paper, and so on.

The context of one position typically refers to a set of positions, e.g., the surrounding pixels. The early study is mainly about the spatial scale of contexts, i.e., the spatial scope. Representative works, such as ASPP and PPM , exploit multi-scale contexts. Recently, several works, such as DANet , CFNet and OCNet , consider the relations between a position and its contextual positions, and aggregate the representations of the contextual positions with higher weights for similar representations.

We propose to investigate the contextual representation scheme along the line of exploring the relation between a position and its context. The motivation is that the class label assigned to one pixel is the category of the object We use “object” to represent both “things” and “stuff” following . that the pixel belongs to. We aim to augment the representation of one pixel by exploiting the representation of the object region of the corresponding class. The empirical study, shown in Fig. 1, verifies that such a representation augmentation scheme, when the ground-truth object region is given, dramatically improves the segmentation quality See Section 3.4 for more details..

Our approach consists of three main steps. First, we divide the contextual pixels into a set of soft object regions with each corresponding to a class, i.e., a coarse soft segmentation computed from a deep network (e.g., ResNet or HRNet ). Such division is learned under the supervision of the ground-truth segmentation. Second, we estimate the representation for each object region by aggregating the representations of the pixels in the corresponding object region. Last, we augment the representation of each pixel with the object-contextual representation (OCR). The OCR is the weighted aggregation of all the object region representations with the weights calculated according to the relations between pixels and object regions.

The proposed OCR approach differs from the conventional multi-scale context schemes. Our OCR differentiates the same-object-class contextual pixels from the different-object-class contextual pixels, while the multi-scale context schemes, such as ASPP and PPM , do not, and only differentiate the pixels with different spatial positions. Fig. 2 provides an example to illustrate the differences between our OCR context and the multi-scale context. On the other hand, our OCR approach is also different from the previous relational context schemes . Our approach structures the contextual pixels into object regions and exploits the relations between pixels and object regions. In contrast, the previous relational context schemes consider the contextual pixels separately and only exploit the relations between pixels and contextual pixels or predict the relations only from pixels without considering the regions .

We evaluate our approach on various challenging semantic segmentation benchmarks. Our approach outperforms the multi-scale context schemes, e.g., PSPNet, DeepLabv3, and the recent relational context schemes, e.g., DANet, and the efficiency is also improved. Our approach achieves competitive performance on five benchmarks: 84.5%84.5\% on Cityscapes test, 45.66%45.66\% on ADE20K val, 56.65%56.65\% on LIP val, 56.2%56.2\% on PASCAL-Context test and 40.5%40.5\% on COCO-Stuff test. Besides, we extend our approach to Panoptic-FPN and verify the effectiveness of our OCR on the COCO panoptic segmentation task, e.g., Panoptic-FPN + OCR achieves 44.2%44.2\% on COCO val.

Related Work

Multi-scale context. PSPNet performs regular convolutions on pyramid pooling representations to capture the multi-scale context. The DeepLab series adopt parallel dilated convolutions with different dilation rates (each rate captures the context of a different scale). The recent works propose various extensions, e.g., DenseASPP densifies the dilated rates to cover larger scale ranges. Some other studies construct the encoder-decoder structures to exploit the multi-resolution features as the multi-scale context.

Relational context. DANet , CFNet and OCNet augment the representation for each pixel by aggregating the representations of the contextual pixels, where the context consists of all the pixels. Different from the global context , these works consider the relation (or similarity) between the pixels, which is based on the self-attention scheme , and perform a weighted aggregation with the similarities as the weights.

Double Attention and its related work and ACFNet group the pixels into a set of regions, and then augment the pixel representations by aggregating the region representations with the consideration of their context relations predicted by using the pixel representation.

Our approach is a relational context approach and is related to Double Attention and ACFNet. The differences lie in the region formation and the pixel-region relation computation. Our approach learns the regions with the supervision of the ground-truth segmentation. In contrast, the regions in previous approaches except ACFNet are formed unsupervisedly. On the other hand, the relation between a pixel and a region is computed by considering both the pixel and region representations, while the relation in previous works is only computed from the pixel representation.

Coarse-to-fine segmentation. Various coarse-to-fine segmentation schemes have been developed to gradually refine the segmentation maps from coarse to fine. For example, regards the coarse segmentation map as an additional representation and combines it with the original image or other representations for computing a fine segmentation map.

Our approach in some sense can also be regarded as a coarse-to-fine scheme. The difference lies in that we use the coarse segmentation map for generating a contextual representation instead of directly used as an extra representation. We compare our approach with the conventional coarse-to-fine schemes in the supplementary material.

Region-wise segmentation. There exist many region-wise segmentation methods that organize the pixels into a set of regions (usually super-pixels), and then classify each region to get the image segmentation result. Our approach does not classify each region for segmentation and instead uses the region to learn a better representation for the pixel, which leads to better pixel labeling.

Approach

Semantic segmentation is a problem of assigning one label lil_{i} to each pixel pip_{i} of an image I\mathsf{I}, where lil_{i} is one of KK different classes.

Multi-scale context. The ASPP module captures the multi-scale context information by performing several parallel dilated convolutions with different dilation rates :

Here, ps=pi+dΔt\mathbf{p}_{s}=\mathbf{p}_{i}+d\Delta_{t} is the ssth sampled position for the dilation convolution with the dilation rate dd (e.g., d=12,24,36d=12,24,36 in DeepLabv3 ) at the position pi\mathbf{p}_{i}. tt is the position index for a convolution, e.g., {Δt=(Δw,Δh)Δw=1,0,1,Δh=1,0,1}\{\Delta_{t}=(\Delta_{w},\Delta_{h})|\Delta_{w}=-1,0,1,\Delta_{h}=-1,0,1\} for a 3×33\times 3 convolution. xs\mathbf{x}_{s} is the representation at ps\mathbf{p}_{s}. yid\mathbf{y}_{i}^{d} is the output representation at pi\mathbf{p}_{i} for the ddth dilated convolution. Ktd\mathbf{K}^{d}_{t} is the kernel parameter at position tt for for the ddth dilated convolution. The output multi-scale contextual representation is the concatenation of the representations output by the parallel dilated convolutions.

The multi-scale context scheme based on dilated convolutions captures the contexts of multiple scales without losing the resolution. The pyramid pooling module in PSPNet performs regular convolutions on representations of different scales, and also captures the contexts of multiple scales but loses the resolution for large scale contexts.

Relational context. The relational context scheme computes the context for each pixel by considering the relations:

where I\mathcal{I} refers to the set of pixels in the image, wisw_{is} is the relation between xi\mathbf{x}_{i} and xs\mathbf{x}_{s}, and may be predicted only from xi\mathbf{x}_{i} or computed from xi\mathbf{x}_{i} and xs\mathbf{x}_{s}. δ()\delta(\cdot) and ρ()\rho(\cdot) are two different transform functions as done in self-attention . The global context scheme is a special case of relational context with wis=1Iw_{is}=\frac{1}{|\mathcal{I}|}.

2 Formulation

The class label lil_{i} for pixel pip_{i} is essentially the label of the object that pixel pip_{i} lies in. Motivated by this, we present an object-contextual representation approach, characterizing each pixel by exploiting the corresponding object representation.

The proposed object-contextual representation scheme (1) structurizes all the pixels in image I\mathsf{I} into KK soft object regions, (2) represents each object region as fk\mathbf{f}_{k} by aggregating the representations of all the pixels in the kkth object region, and (3) augments the representation for each pixel by aggregating the KK object region representations with consideration of its relations with all the object regions:

where fk\mathbf{f}_{k} is the representation of the kkth object region, wikw_{ik} is the relation between the iith pixel and the kkth object region. δ()\delta(\cdot) and ρ()\rho(\cdot) are transformation functions.

Soft object regions. We partition the image I\mathsf{I} into KK soft object regions {M1,M2,,MK}\{\mathbf{M}_{1},\mathbf{M}_{2},\dots,\mathbf{M}_{K}\}. Each object region Mk\mathbf{M}_{k} corresponds to the class kk, and is represented by a 22D map (or coarse segmentation map), where each entry indicates the degree that the corresponding pixel belongs to the class kk.

We compute the KK object regions from an intermediate representation output from a backbone (e.g., ResNet or HRNet). During training, we learn the object region generator under the supervision from the ground-truth segmentation using the cross-entropy loss.

Object region representations. We aggregate the representations of all the pixels weighted by their degrees belonging to the kkth object region, forming the kkth object region representation:

Object contextual representations. We compute the relation between each pixel and each object region as below:

Augmented representations. The final representation for pixel pip_{i} is updated as the aggregation of two parts, (1) the original representation xi\mathbf{x}_{i}, and (2) the object contextual representation yi\mathbf{y}_{i}:

Comments: Some recent studies, e.g., Double Attention and ACFNet , can be formulated similarly to Equation 3, but differ from our approach in some aspects. For example, the region formed in Double Attention do not correspond to an object class, and the relation in ACFNet is computed only from the pixel representation w/o using the object region representation.

3 Segmentation Transformer: Rephrasing the OCR Method

We rephrase the OCR pipeline using the Transformer language and illustrate the Transformer encoder-decoder architecture in Figure 4. The aforementioned OCR pipeline consists of three steps: soft object region extraction, object region representation computation, and object-contextual representation computation for each position, and mainly explores the decoder and encoder cross-attention modules.

The attention output for each query qi\mathbf{q}_{i} is the aggregation of values weighted by attention weights:

Decoder cross-attention. The decoder cross-attention module has two roles: soft object region extraction and object region representation computation.

Encoder cross-attention. The encoder cross-attention module (with the subsequent FFN) serves as the role of aggregating the object region representations as shown in Equation 3. The queries are image features at each position, and the keys and values are the decoder outputs. Equation 5 computes the weights in a way the same as the attention computation manner Equation 7, and the contextual aggregation Equation 3 is the same as Equation 8 and ρ()\rho(\cdot) corresponds to the FFN\operatorname{FFN} operator.

Connection to class embedding and class attention . The category queries are close to the class embedding in Vision Transformer (ViT) and in Class-Attention in Image Transformers (CaiT) . We have an embedding for each class other than an integrated embedding for all the classes. The decoder cross attention in segmentation transformer is similar to class attention in CaiT .

The encoder and decoder architecture is close to self-attention in ViT over both the class embedding and image features. If the two cross-attentions and the two self-attentions are conducted simultaneously (depicted in Figure 5), it is equivalent to a single self-attention. It is interesting to learn the attention parameters for category queries at the ImageNet pre-training stage.

Connection to OCNet and interlaced self-attention . The OCNet exploits the self-attention (i.e., only the encoder self-attention unit is included in Figure 4, and the encoder cross-attention unit and the decoder are not included). The self-attention unit is accelerated by an interlaced self-attention unit, consisting of local self-attention and global self-attention that can be simplified as self-attention over the pooled features over the local windowsThe local and/or global self-attention units in interlaced self-attention could be applied to Vision Transformer for acceleration.. As an alternative scheme, the category queries in Figure 4 could be replaced by regularly-sampled or adaptively-pooled image features other than learned as model parameters.

4 Architecture

Backbone. We use the dilated ResNet-101101 (with output stride 88) or HRNet-W4848 (with output stride 44) as the backbone. For dilated ResNet-101101, there are two representations input to the OCR module. The first representation from Stage 33 is for predicting coarse segmentation (object regions). The other representation from Stage 44 goes through a 3×33\times 3 convolution (512512 output channels), and then is fed into the OCR module. For HRNet-W4848, we only use the final representation as the input to the OCR module.

5 Empirical Analysis

We conduct the empirical analysis experiments using the dilated ResNet-101101 as the backbone on Cityscapes val.

Object region supervision. We study the influence of the object region supervision. We modify our approach through removing the supervision (i.e., loss) on the soft object regions (within the pink dashed box in Fig. 3), and adding another auxiliary loss in the stage-33 of ResNet-101101. We keep all the other settings the same and report the results in the left-most 22 columns of Table 1. We can see that the supervision for forming the object regions is crucial for the performance.

Pixel-region relations. We compare our approach with other two mechanisms that do not use the region representation for estimating the pixel-region relations: (i) Double-Attention uses the pixel representation to predict the relation; (ii) ACFNet directly uses one intermediate segmentation map to indicate the relations. We use DA scheme and ACF scheme to represent the above two mechanisms. We implement both methods by ourselves and only use the dilated ResNet-101101 as the backbone without using multi-scale contexts (the results of ACFNet is improved by using ASPP )

The comparison in Table 1 shows that our approach gets superior performance. The reason is that we exploit the pixel representation as well as the region representation for computing the relations. The region representation is able to characterize the object in the specific image, and thus the relation is more accurate for the specific image than that only using the pixel representation.

Ground-truth OCR. We study the segmentation performance using the ground-truth segmentation to form the object regions and the pixel-region relations, called GT-OCR, to justify our motivation. (i) Object region formation using the ground-truth: set the confidence of pixel ii belonging to kkth object region mki=1m_{ki}=1 if the ground-truth label likl_{i}\equiv k and mki=0m_{ki}=0 otherwise. (ii) Pixel-region relation computation using the ground-truth: set the pixel-region relation wik=1w_{ik}=1 if the ground-truth label likl_{i}\equiv k and wik=0w_{ik}=0 otherwise. We have illustrated the detailed results of GT-OCR on four different benchmarks in Fig. 1.

Experiments: Semantic Segmentation

Cityscapes. The Cityscapes dataset is tasked for urban scene understanding. There are totally 3030 classes and only 1919 classes are used for parsing evaluation. The dataset contains 55K high quality pixel-level finely annotated images and 2020K coarsely annotated images. The finely annotated 55K images are divided into 2,975/500/1,5252,975/500/1,525 images for training, validation and testing.

ADE20K. The ADE2020K dataset is used in ImageNet scene parsing challenge 2016. There are 150150 classes and diverse scenes with 1,0381,038 image-level labels. The dataset is divided into 2020K/22K/33K images for training, validation and testing.

LIP. The LIP dataset is used in the LIP challenge 2016 for single human parsing task. There are about 5050K images with 2020 classes (1919 semantic human part classes and 11 background class). The training, validation, and test sets consist of 3030K, 1010K, 1010K images respectively.

PASCAL-Context. The PASCAL-Context dataset is a challenging scene parsing dataset that contains 5959 semantic classes and 11 background class. The training set and test set consist of 4,9984,998 and 5,1055,105 images respectively.

COCO-Stuff. The COCO-Stuff dataset is a challenging scene parsing dataset that contains 171171 semantic classes. The training set and test set consist of 99K and 11K images respectively.

2 Implementation Details

Training setting. We initialize the backbones using the model pre-trained on ImageNet and the OCR module randomly. We perform the polynomial learning rate policy with factor (1(iteritermax)0.9)(1-(\frac{iter}{iter_{max}})^{0.9}), the weight on the final loss as 11, the weight on the loss used to supervise the object region estimation (or auxiliary loss) as 0.40.4. We use InPlace-ABNsync to synchronize the mean and standard-deviation of BN across multiple GPUs. For the data augmentation, we perform random flipping horizontally, random scaling in the range of [0.5,2][0.5,2] and random brightness jittering within the range of $$. We perform the same training settings for the reproduced approaches, e.g., PPM, ASPP, to ensure the fairness. We follow the previous works for setting up the training for the benchmark datasets.

\Box Cityscapes: We set the initial learning rate as 0.010.01, weight decay as 0.00050.0005, crop size as 769×769769\times 769 and batch size as 88 by default. For the experiments evaluated on val/test set, we set training iterations as 4040K/100100K on train/train+val set separately. For the experiments augmented with extra data: (i) w/ coarse, we first train our model on train + val for 100100K iterations with initial learning rate as 0.010.01, then we fine-tune the model on coarse set for 5050K iterations and continue fine-tune our model on train+val for 2020K iterations with the same initial learning rate 0.0010.001. (ii) w/ coarse + Mapillary , we first pre-train our model on the Mapillary train set for 500500K iterations with batch size 1616 and initial learning rate 0.010.01 (achieves 50.8%50.8\% on Mapillary val), then we fine-tune the model on Cityscapes following the order of train + val (100100K iterations) \to coarse (5050K iterations) \to train + val (2020K iterations), we set the initial learning rate as 0.0010.001 and the batch size as 88 during the above three fine-tuning stages on Cityscapes.

\Box ADE20K: We set the initial learning rate as 0.020.02, weight decay as 0.00010.0001, crop size as 520×520520\times 520, batch size as 1616 and and training iterations as 150150K if not specified.

\Box LIP: We set the initial learning rate as 0.0070.007, weight decay as 0.00050.0005, crop size as 473×473473\times 473, batch size as 3232 and training iterations as 100100K if not specified.

\Box PASCAL-Context: We set the initial learning rate as 0.0010.001, weight decay as 0.00010.0001, crop size as 520×520520\times 520, batch size as 1616 and training iterations as 3030K if not specified.

\Box COCO-Stuff: We set the initial learning rate as 0.0010.001, weight decay as 0.00010.0001, crop size as 520×520520\times 520, batch size as 1616 and training iterations as 6060K if not specified.

3 Comparison with Existing Context Schemes

We conduct the experiments using the dilated ResNet-101101 as the backbone and use the same training/testing settings to ensure the fairness.

Multi-scale contexts. We compare our OCR with the multi-scale context schemes including PPM and ASPP on three benchmarks including Cityscapes test, ADE2020K val and LIP val in Table 4. Our reproduced PPM/ASPP outperforms the originally reported numbers in . From Table 4, it can be seen that our OCR outperforms both multi-scale context schemes by a large margin. For example, the absolute gains of OCR over PPM (ASPP) for the four comparisons are 1.5% (0.8%), 0.8% (0.7%), 0.78% (0.68%), 0.84% (0.5%). To the best of our knowledge, these improvements are already significant considering that the baselines (with dilated ResNet-101101) are already strong and the complexity of our OCR is much smaller.

Relational contexts. We compare our OCR with various relational context schemes including Self-Attention , Criss-Cross attention (CC-Attention), DANet and Double Attention on the same three benchmarks including Cityscapes test, ADE2020K val and LIP val. For the reproduced Double Attention, we fine-tune the number of the regions (as it is very sensitive to the hyper-parameter choice) and we choose 6464 with the best performance. More detailed analysis and comparisons are illustrated in the supplementary material. According to the results in Table 4, it can be seen that our OCR outperforms these relational context schemes under the fair comparisons. Notably, the complexity of our OCR is much smaller than most of the other methods.

Complexity. We compare the efficiency of our OCR with the efficiencies of the multi-scale context schemes and the relational context schemes. We measure the increased parameters, GPU memory, computation complexity (measured by the number of FLOPs) and inference time that are introduced by the context modules, and do not count the complexity from the backbones. The comparison in Table 4 shows the superiority of the proposed OCR scheme.

\Box Parameters: Most relational context schemes require less parameters compared with the multi-scale context schemes. For example, our OCR only requires 1/2 and 2/3 of the parameters of PPM and ASPP separately.

\Box Memory: Both our OCR and Double Attention require much less GPU memory compared with the other approaches (e.g., DANet, PPM). For example, our GPU memory consumption is 1/4, 1/10, 1/2, 1/10 of the memory consumption of PPM, DANet, CC-Attention and Self-Attention separately.

\Box FLOPs: Our OCR only requires 1/2, 7/10, 3/10, 2/5 and 1/2 of the FLOPs based on PPM, ASPP, DANet, CC-Attention and Self-Attention separately.

\Box Running time: The runtime of OCR is very small: only 1/2, 1/2, 1/3, 1/3 and 1/2 of the runtime with PPM, ASPP, DANet, CC-Attention and Self-Attention separately.

In general, our OCR is a much better choice if we consider the balance between performance, memory complexity, GFLOPs and running time.

4 Comparison with the State-of-the-Art

Considering that different approaches perform improvements on different baselines to achieve the best performance, we categorize the existing works to two groups according to the baselines that they apply: (i) simple baseline: dilated ResNet-101101 with stride 88; (ii) advanced baseline: PSPNet, DeepLabv3, multi-grid (MG), encoder-decoder structures that achieve higher resolution outputs with stride 44 or stronger backbones such as WideResNet-3838, Xception-7171 and HRNet.

For fair comparison with the two groups fairly, we perform our OCR on a simple baseline (dilated ResNet-101101 with stride 88) and an advanced baseline (HRNet-W4848 with stride 44). Notably, our improvement with HRNet-W4848 (over ResNet-101101) is comparable with the gain of the other work based on advanced baseline methods. For example, DGCNet gains 0.7%0.7\% with Multi-grid while OCR gains 0.6%0.6\% with stronger backbone on Cityscapes test. We summarize all the results in Table 5 and illustrate the comparison details on each benchmark separately as follows.

Cityscapes. Compared with the methods based on the simple baseline on Cityscape test w/o using the coarse data, our approach achieves the best performance 81.8%81.8\%, which is already comparable with some methods based on the advanced baselines, e.g, DANet, ACFNet. Our approach achieves better performance 82.4%82.4\% through exploiting the coarsely annotated images for training.

For comparison with the approaches based on the advanced baselines, we perform our OCR on the HRNet-W48, and pre-train our model on the Mapillary dataset . Our approach achieves 84.2%84.2\% on Cityscapes test. We further apply a novel post-processing scheme SegFix to refine the boundary quality, which brings 0.3%0.3\%\uparrow improvement. Our final submission “HRNet + OCR + SegFix” achieves 84.5%84.5\%, which ranks the \nth1 place on the Cityscapes leaderboard by the time of our submission. In fact, we perform PPM and ASPP on HRNet-W4848 separately and empirically find that directly applying either PPM or ASPP does not improve the performance and even degrades the performance, while our OCR consistently improves the performance.

Notably, the very recent work sets a new state-of-the-art performance 85.4%85.4\% on Cityscapes leaderboard via combining our “HRNet + OCR” and a new hierarchical multi-scale attention mechanism.

ADE20K. From Table 5, it can be seen that our OCR achieves competitive performance (45.28%45.28\% and 45.66%45.66\%) compared with most of the previous approaches based on both simple baselines and advanced baselines. For example, the ACFNet exploits both the multi-scale context and relational context to achieve higher performance. The very recent ACNet achieves the best performance through combining richer local and global contexts.

LIP. Our approach achieves the best performance 55.60%55.60\% on LIP val based on the simple baselines. Applying the stronger backbone HRNetV2-W4848 further improves the performance to 56.65%56.65\%, which outperforms the previous approaches. The very recent work CNIF achieves the best performance (56.93%56.93\%) through injecting the hierarchical structure knowledge of human parts. Our approach potentially benefit from such hierarchical structural knowledge. All the results are based on only flip testing without multi-scale testingOnly few methods adopt multi-scale testing. For example, CNIF gets the improved performance from 56.93%56.93\% to 57.74%57.74\%..

PASCAL-Context. We evaluate the performance over 5959 categories following . It can be seen that our approach outperforms both the previous best methods based on simple baselines and the previous best methods based on advanced baselines. The HRNet-W4848 + OCR approach achieves the best performance 56.2%56.2\%, significantly outperforming the second best, e.g., ACPNet (54.7%54.7\%) and ACNet (54.1%54.1\%).

COCO-Stuff. It can be seen that our approach achieves the best performance, 39.5%39.5\% based ResNet-101101 and 40.5%40.5\% based on HRNetV2-4848.

Qualitative Results. We illustrate the qualitative results in the supplementary material due to the limited pages.

Experiments: Panoptic Segmentation

To verify the generalization ability of our method, we apply OCR scheme on the more challenging panoptic segmentation task , which unifies both the instance segmentation task and the semantic segmentation task.

Dataset. We choose the COCO dataset to study the effectiveness of our method on panoptic segmentation. We follow the previous work and uses all 2017 COCO images with 80 thing and 53 stuff classes annotated.

Training Details. We follow the default training setup of “COCO Panoptic Segmentation Baselines with Panoptic FPN (3×3\times learning schedule)” https://github.com/facebookresearch/detectron2/blob/master/MODEL_ZOO.md in Detectron2 . The reproduced Panoptic FPN reaches higher performance than the original numbers in the paper (Panoptic FPN w/ ResNet-50, PQ: 39.2%39.2\% / Panoptic FPN w/ ResNet-101, PQ: 40.3%40.3\%) and we choose the higher reproduced results as our baseline.

In our implementation, we use the original prediction from the semantic segmentation head (within Panoptic-FPN) to compute the soft object regions and then we use a OCR head to predict a refined semantic segmentation map. We set the loss weights on both the original semantic segmentation head and the OCR head as 0.250.25. All the other training settings are kept the same for fair comparison. We directly use the same OCR implementation (for the semantic segmentation task) without any tuning.

Results. In Table 6, we can see that OCR improves the PQ performance of Panoptic-FPN (ResNet-101101) from 43.0%43.0\% to 44.2%44.2\%, where the main improvements come from better segmentation quality on the stuff region measured by mIoU and PQSt. Specifically, our OCR improves the mIoU and PQSt of Panoptic-FPN (ResNet-101101) by 1.0%1.0\% and 2.3%2.3\% separately. In general, the performance of “Panoptic-FPN + OCR” is very competitive compared to various recent methods . We also report the results of Panoptic-FPN with PPM and ASPP to illustrate the advantages of our OCR in the supplementary material.

Conclusions

In this work, we present an object-contextual representation approach for semantic segmentation. The main reason for the success is that the label of a pixel is the label of the object that the pixel lies in and the pixel representation is strengthened by characterizing each pixel with the corresponding object region representation. We empirically show that our approach brings consistent improvements on various benchmarks.

Acknowledgement This work is partially supported by Natural Science Foundation of China under contract No. 61390511, and Frontier Science Key Research Project CAS No. QYZDJ-SSW-JSC009.

References