Panoptic Segmentation
- Publication
- CVPR 2019Conference
- First submitted to arXiv
- arXiv:1801.00868
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{segmentationpanopticsegmentation2018,
title = {{Panoptic Segmentation}},
author = {Alexander Kirillov and Kaiming He and Ross Girshick and Carsten Rother and Piotr Dollár},
year = {2018},
eprint = {1801.00868},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1801.00868}
}
Open the Cityscapes website and you'll find two leaderboards hanging under the same set of street photos. One is called semantic segmentation, and it compares how accurately each pixel's class is guessed; the other is called instance segmentation, and it compares whether every car and every pedestrian has been singled out and cut out cleanly.
The two boards use the same photos and the same annotations, yet score them in completely different ways. The first uses mIoU, the second AP. The winning methods look completely different as well.
In early 2018, Alexander Kirillov, Kaiming He, Ross Girshick and Piotr Dollár of FAIR, together with Carsten Rother of Heidelberg University, wrote this paper proposing to merge the two tasks into one, which they named panoptic segmentation. The paper proposes no new model at all; its main contributions are a task format and an evaluation metric.
Defining the Problem
Computer vision long ago split what's in an image into two kinds. One is things, objects you can count one by one, such as people, cars and dogs; the other is stuff, regions with no fixed shape that can't be counted, such as sky, grass and road. Back in 2001, Edward Adelson of MIT warned that everyone was too focused on things, and that systems recognizing stuff deserved study too.
This split directly decided how the tasks were divided.
The task that studies stuff is semantic segmentation, which gives every pixel a class; even with three people in the frame, they're all labeled "person," with no telling who is who. The tasks that study things are object detection and instance segmentation, which give each object its own box or mask plus a confidence score, evaluated with AP.
Once the tasks were split, the methods went their separate ways too. Semantic segmentation was almost all FCN plus atrous convolution, while instance segmentation was the R-CNN family of region proposals plus region features. Both sides advanced quickly, but nobody cared whether their outputs would clash when put together.
Looking back at the pre-deep-learning era, the authors point out that plenty of people actually worked on joint tasks, under names like scene parsing, image parsing or holistic scene understanding. That research never caught on, and the authors' guess is that it lacked a consistent definition and metric. Each paper had its own output format, and stuff and things were scored with separate metrics, so results couldn't be compared with one another.
So the question this paper takes on is how to define a task that covers both stuff and things, with a simple output format and a single score that evaluates every class.
Solving the Problem
Two Labels per Pixel
First, the task format. Given semantic classes, the model has to output a pair of labels for every pixel in the image. is the class, and is the instance ID.
The set of classes is further split into two disjoint subsets, stuff and things. If is stuff, is meaningless, and all the sky pixels in an image count as a single region. If is a thing, only pixels with the same class and the same ID belong to the same object, for example "car, number 3." Pixels that are ambiguous or belong to no class can be labeled void.
Which classes count as stuff and which as things is up to the dataset's designers; the paper doesn't choose for anyone.

Compare (b) and (c) in Figure 1. Semantic segmentation paints every car the same color; instance segmentation separates the cars, but the background is a sheet of black. (d) wants both, with classes for the road and buildings and every car separated as well.
Compared with the two existing tasks, this format differs in three ways:
- It's a strict generalization of the semantic segmentation format. If a dataset has no instance labels, or all its classes are stuff, the two formats are exactly the same (the metrics still differ).
- It doesn't allow overlap. Instance segmentation lets two masks cover the same pixel; in panoptic segmentation, each pixel can have only one class and one ID.
- It doesn't require confidence scores. Instance segmentation's AP can only be computed by ranking predictions by score; panoptic segmentation, like semantic segmentation, hands in just one map.
The third point has a useful side effect. Human annotators don't put confidence scores on their annotations, so for instance segmentation it's hard to measure "how well humans do." In panoptic segmentation, human annotations and model outputs share the same format, so comparing two annotators' results against each other gives a human score directly, which the experiments later make use of. The authors also admit that confidence scores are useful for downstream systems, and models can still output them in specific scenarios.
The authors stress that panoptic segmentation isn't multi-task learning. A multi-task model can have its semantic segmentation head say a spot is road while its instance segmentation head says it's a car, with both answers standing side by side; panoptic segmentation requires a single, self-consistent answer for the whole image.
Matching Rule: IoU Must Be Over One Half
With the format set, the next step is scoring. The authors first lay out three requirements: treat all classes equally, make the score interpretable, and keep the definition and implementation simple.
The first step of scoring is matching predicted regions to annotated regions. The authors rule that two regions can be matched only if their IoU is strictly greater than 0.5.
The benefit of this threshold is that the matching is unique, which the paper states as a theorem: each annotated region can be matched to at most one predicted region, and vice versa.
The proof takes only a few lines. Let be an annotated region and , two predicted regions. Since panoptic segmentation has no overlap, . And since the union is at least as large as :
The two predicted regions don't overlap each other, so their intersections with can't add up to more than itself, which gives:
The two IoUs add up to at most 1, so at most one of them can be greater than 0.5.
So as long as the threshold is 0.5 or higher, there's no bipartite matching problem to solve; greedy and optimal methods give the same set of matches. Instance segmentation can't do this, because its predictions can overlap, and two masks may both have a high IoU with the same annotation.

Figure 2 looks only at the "person" class. There are three people in the annotation and three in the prediction. The beige and orange pairs have IoU above 0.5 and are matched as TPs. Part of the brown person in the annotation has been swallowed by the predictions and the rest has no counterpart, so it becomes an FN (a miss). The yellow "person" on the right is actually a dog in the annotation; it matches no one and becomes an FP (a false alarm).
Incidentally, the dog class picks up an FN of its own in the same image, while grass and sky each get matched as a TP. Every class is counted on its own.
How PQ Is Computed
After matching, each class's predictions and annotations fall into three piles: TPs are the matched pairs, FPs are the unmatched predictions, and FNs are the unmatched annotations. Panoptic quality (PQ) is defined as:
The numerator is the sum of the IoUs of all matched pairs. With no FPs or FNs, PQ is simply the average IoU of the matched regions. Each unmatched region adds 0.5 to the denominator and pulls the score down.
Take Figure 2's "person" class through it. The figure doesn't give IoUs, so assume 0.8 for the beige pair and 0.9 for the orange pair:
Multiply and divide the fraction by , and PQ splits into the product of two terms:
SQ (segmentation quality) is the average IoU of the matched regions and says how accurately things are cut; RQ (recognition quality) is just the F1 score familiar from detection and says how completely things are found. In the example above, SQ is and RQ is . This person class's problem isn't the cutting; it missed one and reported one extra.
Splitting PQ into two terms makes results easy to read, but the authors caution that the two aren't independent, since SQ is computed only over regions that were matched. A model that keeps only its few most confident regions will have a nice-looking SQ, while its RQ drops.
PQ is first computed per class and then averaged over all classes, so classes that happen to have many regions can't dominate it. Within a class, every region counts the same regardless of size; a bus filling half the image and a tiny bus in the distance are each just a 1 in the denominator.
Void and Group Annotations
Real datasets bring two more complications.
The first is void, which may be pixels that belong to no class or places that can't be made out clearly. The authors don't evaluate model outputs on void. During matching, the pixels of a predicted region that fall on void are removed first and not counted in the IoU; after matching, an unmatched predicted region that lies more than half on void doesn't count as an FP either.
The second is group annotations. When Cityscapes and COCO run into a crowd of same-class objects packed so tightly that no one can tell them apart, they label the whole thing as one "group of people." Such regions don't take part in matching, and an unmatched prediction that falls mostly inside a same-class group doesn't count as an FP.
How It Differs From mIoU and AP
Semantic segmentation's IoU works at the pixel level, counting how many pixels are right. It ignores individuals completely; treat two cars stuck together as one, and the score doesn't change. Watch the terms here. SQ is also an average of IoUs, but it's "the average IoU of matched regions," a different thing from semantic segmentation's per-class pixel IoU.
Instance segmentation's AP needs a confidence score on every prediction, ranked by score to draw a precision–recall curve. Semantic segmentation has no confidence scores, so AP can't be computed for it at all.
Nor is PQ a weighted combination of mIoU and AP. Stuff and things use the same formula; the only difference is that stuff has just one region per class per image.
Discussion
Three Datasets
The authors found three public datasets that have both dense semantic annotations and instance annotations.
| Dataset | Images | Classes | Coverage |
|---|---|---|---|
| Cityscapes | 5,000 | 19, of which 8 things | 97% |
| ADE20k | 25k+ | 100 things + 50 stuff | 89% |
| Mapillary Vistas | 25k | 37 things + 28 stuff | 98% |
All three datasets convert directly to the panoptic format without re-annotation. COCO's instance masks overlap, so the authors additionally collected the front-to-back order of every overlapping pair of objects before converting it to a non-overlapping format; that's where COCO panoptic later came from. COCO and Mapillary Vistas both opened panoptic segmentation tracks in their ECCV 2018 challenges.
How Well Do Humans Score?
The creators of the three datasets provided doubly annotated images: 30 for Cityscapes, 64 for ADE20k and 46 for Vistas. For Cityscapes and Vistas, two different annotators each labeled the images once; for ADE20k, the same experienced annotator relabeled the same images six months later. Treat one copy as the annotation and the other as the prediction, and PQ can be computed; PQ is also symmetric between the two, so it doesn't matter which plays the annotation.
The results are 69.7 for Cityscapes, 67.1 for ADE20k and 57.5 for Vistas. Broken down, SQ is around 80 on all three, while RQ ranges from 71 to 82.
Humans don't score 100 either. The authors note specifically that this is agreement between annotators, not an upper bound on human performance; the three datasets differ in class count, coverage and scene complexity, so the numbers can't be used to compare which dataset has better quality.

The top left is a typical segmentation error. Both annotators recognize the car, but one of them cuts it into two cars. In PQ, the extra piece is at least one FP; if neither piece reaches an IoU of 0.5 with the whole car, the car also goes unmatched, adding an FN on top. The right side shows classification errors. Whether carpeted ground is floor or rug makes even people hesitate; the yellow region behind the car in the bottom row is a tram, easily mistaken for a building in the dim frame.
Split the objects by size into small (the smallest 25%), medium and large (the largest 25%), and the difference shows. RQ for large objects is above 80 on all three datasets, while RQ for small objects drops to 51.5 (Cityscapes), 64.2 (ADE20k) and 51.5 (Vistas). SQ for small objects still holds at 67.8, 78.0 and 70.1.
In other words, the human problem with small things is "not seeing them"; once they're seen, they're actually cut fairly well.
Stuff and things scores are also fairly close. Cityscapes PQ is 71.3 on stuff and 67.4 on things; ADE20k, 70.3 and 65.9; Vistas has a larger gap, 62.6 and 53.4. When the authors sorted the per-class PQ, stuff and things were spread fairly evenly through the ranking, which they use to argue that PQ favors neither side.
Is the 0.5 Threshold Reasonable?
The threshold is 0.5 to make matching unique, but is it too strict? The authors ran experiments on human annotations. First, with no threshold, using maximum-weight bipartite matching (maximizing the total IoU of the matched pairs), fewer than 16% of the matches had IoU below 0.5.
Then they recomputed PQ with the threshold changed to 0.25 and 0.75:

Loosening from 0.5 to 0.25 adds only 1 to 3 points of PQ; tightening to 0.75 costs 5.5 to 10.5 points. The authors also inspected the low-IoU matches and found that many of them paired up the wrong objects altogether. Since loosening brings almost no benefit and 0.5 guarantees unique matching, the authors made it the default.
The two in front of FP and FN in RQ can be adjusted too. The authors generalize them as :
The smaller , the lighter the penalty for unmatched regions. With Cityscapes's human annotations, lowering from 1 to raises RQ from 72.5 to 89.2, while SQ is unaffected. The paper uses throughout, which is F1.
How Well Do Machines Score?
Finally, the models. In early 2018 there were no models that could output panoptic segmentation directly, so the authors took the strongest semantic and instance segmentation results of the time and stitched them into panoptic segmentation with a post-processing step:
- Cityscapes: outputs of PSPNet (semantic) and Mask R-CNN (instance) on the validation set.
- ADE20k: outputs of the winners of the semantic and instance tracks of the Places 2017 challenge, on 1,000 test images.
- Vistas: outputs of the LSUN'17 challenge winner on 1,000 test images.
The authors also point out that these "baselines" are actually very strong, and later papers can pick simpler baselines to compare against.
Instance segmentation outputs overlap, so that has to be dealt with first. The authors use an NMS-like procedure: sort by confidence score, remove low-scoring predictions, then go through the rest one by one, starting from the most confident. Each prediction first loses the pixels already taken by earlier ones; if enough of it remains it's kept, and if too little remains it's dropped entirely. All these thresholds are grid-searched to maximize PQ.
Removing the overlaps hurts AP. On Cityscapes, Mask R-CNN pretrained on COCO drops from 36.4 to 33.1 AP, because detectors normally pick up points from several overlapping hypotheses. Still, methods with higher AP also have higher PQ, so the two rank methods the same way.
On the semantic segmentation side, there's an example that shows PQ's character well. Two entries on ADE20k have mIoU of 32.3 and 30.6, only 1.7 apart, but stuff PQ of 27.4 and 19.3, 8 points apart. On inspection, the authors found that the latter (G-RMI) hallucinates many small patches in the image, labeled with classes that aren't in the image at all.
Run PQ's rules on it and you can see why. For mIoU, these small patches get only a few pixels wrong; for PQ, every small patch is an FP, and since its class doesn't exist in this image's annotation at all, that FP only enlarges the denominator, with nothing in the numerator to make up for it.
Last, the two sides are stitched together. Pixels where stuff and things conflict all go to things. Since the things part is unaffected, things PQ stays the same and stuff PQ drops slightly, from 66.6 to 66.4 on Cityscapes and from 27.4 to 24.5 on ADE20k.
Here is the human–machine comparison (from the paper's Table 6; human scores are bootstrap estimates from the doubly annotated images, which are not the images the machines were evaluated on, so the comparison is only rough):
| Dataset | PQ | SQ | RQ | |
|---|---|---|---|---|
| Cityscapes | Human | 69.6 | 84.1 | 82.0 |
| Machine | 61.2 | 80.9 | 74.4 | |
| ADE20k | Human | 67.6 | 85.7 | 78.6 |
| Machine | 35.6 | 74.4 | 43.2 | |
| Vistas | Human | 57.7 | 79.7 | 71.6 |
| Machine | 38.3 | 73.6 | 47.7 |
The SQ gap is between 3 and 11 points; the RQ gap is much larger, with humans at 78.6 and machines at 43.2 on ADE20k. The models cut reasonably well; the main problem is failing to find everything and recognize it correctly. ADE20k has 150 classes, and with that many classes, recognition becomes the bottleneck.
Controversies Around PQ
PQ quickly became the standard metric for panoptic segmentation, and criticism soon followed.
The most common complaint concerns stuff. Seamless Scene Segmentation (Porzi et al.), at CVPR the same year, points out that PQ treats stuff and things identically and requires IoU above 0.5 for all of them, which amounts to treating all the same-class stuff in an image as one giant object. They gave a Cityscapes example where a pole has IoU 0.49, a traffic light 0.46 and the sidewalk 0.62; the three look about equally wrong, yet the first two score 0 in PQ while the sidewalk contributes 0.62.
This is a cliff created by the threshold. When a stuff region's IoU drops from 0.51 to 0.49, the denominator grows by 1 either way (at 0.51 it's one TP; at 0.49 it becomes one FP plus one FN, half each), but the numerator goes straight from 0.51 to 0. Porzi et al. proposed PQ†, which keeps PQ for things and, for stuff, matches whenever IoU is greater than 0 and takes the average IoU directly.
Another criticism comes from Google's DeeperLab (Yang et al.). They argue that PQ, by weighting every region equally, overemphasizes small objects and also leans toward things; for applications like self-driving cars, getting a large region wrong matters more than getting a small sign in the distance wrong. They proposed area-weighted Parsing Covering as a complement.
There's also an example from outside the field. A 2023 paper in Scientific Reports (Foucart et al.) argues that nucleus segmentation in pathology images shouldn't use PQ. Nuclei are tiny, so a few pixels of boundary difference can push IoU over or under 0.5, and since this setting has no stuff, PQ effectively just measures detection. This isn't the original paper's fault. PQ was designed for street and everyday scenes, and when it moves to fields dominated by small objects, the 0.5 threshold needs another look.
Conclusion
This paper has no model; its contribution lies entirely in definitions. It unifies every pixel's output into "class + ID," buys unique matching with IoU above 0.5, and evaluates stuff and things with a single formula. The human-consistency experiments give the new task a reference point, and they also show that its hardest part is recognition rather than segmentation.
What came next largely followed the hopes at the end of the paper. A year later, Kirillov, Girshick, He and Dollár proposed the end-to-end Panoptic FPN; models like DETR, MaskFormer and Mask2Former then made panoptic segmentation one of their main evaluation tasks.
When you come across a PQ number in those papers, remember to glance at SQ and RQ as well. Low RQ means objects are missed or misrecognized; only low SQ means the boundaries are cut poorly, and the two call for entirely different fixes. PQ also ignores how predictions are ranked, so a model that's strong on PQ won't necessarily have a good-looking instance segmentation AP; that's exactly why the Mask2Former paper insisted on reporting results on all three tasks.
Data dominated by small objects calls for care, such as cell nuclei, cars in aerial images or distant traffic signs. A few pixels of boundary error are enough to push IoU below 0.5, and when PQ drops, sometimes it's just that 0.5 threshold acting up.