# Bridging Precision and Confidence:
A Train-Time Loss for Calibrating Object Detection

Muhammad Akhtar Munir1,2 Muhammad Haris Khan1 Salman Khan1,3 Fahad Shahbaz
Khan1,4
1Mohamed bin Zayed University of AI 2Information Technology University
3Australian National University 4Linköping University

###### Abstract

Deep neural networks (DNNs) have enabled astounding progress in several
vision-based problems. Despite showing high predictive accuracy, recently,
several works have revealed that they tend to provide overconfident
predictions and thus are poorly calibrated. The majority of the works
addressing the miscalibration of DNNs fall under the scope of classification
and consider only in-domain predictions. However, there is little to no
progress in studying the calibration of DNN-based object detection models,
which are central to many vision-based safety-critical applications. In this
paper, inspired by the train-time calibration methods, we propose a novel
auxiliary loss formulation that explicitly aims to align the class confidence
of bounding boxes with the accurateness of predictions (i.e. precision). Since
the original formulation of our loss depends on the counts of true positives
and false positives in a minibatch, we develop a differentiable proxy of our
loss that can be used during training with other application-specific loss
functions. We perform extensive experiments on challenging in-domain and out-
domain scenarios with six benchmark datasets including MS-COCO, Cityscapes,
Sim10k, and BDD100k. Our results reveal that our train-time loss surpasses
strong calibration baselines in reducing calibration error for both in and
out-domain scenarios. Our source code and pre-trained models are available at
https://github.com/akhtarvision/bpc_calibration

Figure 1: Comparison in terms of Detection Expected Calibration Error (D-ECE)
on in-domain Cityscapes (CS) and out-domain FoggyCS datasets. (a) Detection
model trained with our proposed BPC loss provides the lowest D-ECE (lower is
better). (b) Post-hoc and train-time calibration methods for classification:
MDCA [11] and MbLS[25] are sub-optimal for object detection. In contrast, BPC
loss better calibrates in-domain and out-domain detections.

##  1 Introduction

Deep neural networks (DNNs) have shown remarkable results in various
mainstream computer vision tasks, including image classification [33, 10, 5],
object detection [29, 36, 39], and semantic segmentation [2, 34]. However,
some recent works [9, 26] show that these deep models have the tendency to
provide overconfident predictions. This greatly limits the overall trust in
their predictions, especially when they are part of the decision-making system
in safety-critical applications [8, 6, 32]. For instance, a decision system in
an AI-powered healthcare diagnostic application can safely reject predictions
with low confidence, however, if it mistakenly skips reviewing an incorrect
prediction with high confidence, it can lead to serious consequences.

An important underlying reason behind the miscalibration of DNNs is training
with zero-entropy supervision signal which makes them overconfident, and thus
inadvertently miscalibrated. There have been few attempts towards improving
the model calibration. A prominent technique is based on a post-processing
step that transforms the outputs of a trained model with parameter(s) learned
on a held-out validation set [9, 14, 15, 28, 19]. Although simple to
implement, these methods are architecture and data-dependent [25], and further
requires a separate held-out validation set which is not readily available in
many real-world applications. An alternative approach is a train-time
calibration method which tends to involve all model parameters during
training. Existing train-time calibration methods [11, 25, 22, 18] propose an
auxiliary loss term that can be used in conjunction with an application-
specific loss function (e.g., Cross Entropy or Focal loss [26]). Recently,
[11] propose a differentiable auxiliary loss formulation to calibrate the
class confidence of both the predicted label along with non-predicted labels.

Figure 2: Main architecture: Our BPC loss function is integrated with object
detection architecture and the detector predicts well-calibrated probabilities
for accurate predictions (shown in Green), while lowering the probabilities of
inaccurate prediction (shown in dashed Red). On the other hand, an
uncalibrated model predicts scores, lower for accurate predictions and higher
for inaccurate predictions. Blue color shows the ground truth boxes present
for corresponding detections. Best viewed in color.

Almost all work towards improving model calibration target the task of
classification [11, 25, 22, 9, 20]. However, the calibration of object
detection models has not been actively explored. Similar to classification
models, object detection models also occupy an important position in many
safety-critical applications. For instance, they form an integral part of the
perception component of self-driving vehicles. Furthermore, the majority of
efforts tackling model calibration focus on calibrating in-domain predictions.
A deployed deep learning-based model can encounter samples from a distribution
that is radically different from the training distribution. Therefore, a real-
world model should be well-calibrated for both in-domain and out-domain
predictions. So, in essence, well-calibrated object detectors, particularly
under distribution shifts, not only contribute to algorithmic advancements but
are of great importance to many vision-based safety-critical applications.

In this paper, we study the calibration of object detection models for both
in-domain and out-domain predictions. We observe that the recent state-of-the-
art object detectors are rather miscalibrated when compared to their
predictive accuracy (Fig. 1). To this end, inspired by the train-time
calibration approaches [11, 25, 18], we propose a novel train-time auxiliary
loss formulation (Fig. 2), which explicitly attempts to bridge the model’s
precision with the predicted class confidence (BPC). It leverages the count of
true positives and false positives in a minibatch, which are then employed to
construct a penalty for miscalibrated predictions. We develop a differentiable
proxy to the actual loss formulation that is based on counts. Our loss
function is designed to be used with other application-specific loss
functions. We perform extensive experiments on both in-domain and out-domain
scenarios, including the large-scale MS-COCO benchmark. Results reveal that
our train-time auxiliary loss is capable of significantly improving the
calibration of a state-of-the-art vision-transformer based object detector
under both in-domain and out-domain scenarios.

##  2 Related Work

Most of the work for calibrating DNNs can be categorized as: post-hoc and
train-time methods. Post-hoc methods require hold-out validation set and
involve a few parameters, whereas train-time methods do not require validation
data and involve all model parameters. We briefly discuss these methods and
other works below.

Post-hoc methods: A simple and classic approach to improving model calibration
is temperature scaling (TS) [9], which is an extension of Platt scaling [28]
from binary to multi-class settings. TS uses a parameter to modulate the
logits of a trained model, whereby this parameter is estimated using hold-out
data. This lowers the predicted confidence to achieve calibration. A more
general form of TS is matrix scaling for the transformation of logits. This
matrix is learned in a similar way using hold-out validation set. Besides
involving limited parameters, the majority of post-hoc methods are limited to
calibrating in-domain predictions [27]. Further, these post-hoc calibration
methods are prone to performing poorly for dense prediction tasks [11]. To
improve post-hoc calibration under out-domain scenarios, [37] transforms the
validation set prior to performing the post-hoc approach. In [4], a regression
model is used to predict temperature parameter. Post-hoc calibration methods
are simple and effective, however, they require hold-out validation data, and
are dependent on architecture [25].

Train-time calibration methods: Models trained with zero-entropy supervision
tend to give over-confident predictions. An example is negative log-likelihood
(NLL), which is a widely-used task-specific loss. A model trained with NLL
provides predictions that deviate from the accuracy, leaving the model poorly
calibrated [9]. Train-time calibration methods are typically based on
auxiliary loss functions, which are used in-tandem with task-specific losses.
In [22], an auxiliary loss term DCA is proposed to calibrate the model. It is
combined with a task-specific loss to penalize when it reduces but the
accuracy remains unchanged. Likewise, [20] proposed an auxiliary loss function
that is based on a reproducing kernel in a Hilbert space [7]. [18] calibrated
uncertainty based on the relationship between accuracy and uncertainty.
Recently in [11], proposed a loss known as the multi-class difference of
confidence and accuracy which aims to calibrate the predicted confidence of
all classes. Building on the label smoothing (LS) work [35], [25], introduced
a margin constraint logit distances to achieve implicit model calibration.

Other methods: Model calibration with OOD detection in [12] suggested that the
ReLU activation function causes the model to provide overconfident predictions
for input samples that lie away from the training samples. To circumvent this,
a model is forced to output low scores for samples distant from training data
by leveraging data augmentation using adversarial training. In [17], OOD
inputs are detected with spectral analysis over early layers in convolutional
neural networks (CNNs), thereby achieving model calibration.

All post-hoc and train-time losses target the calibration of classification
models, and there is almost no attention given to the calibration of object
detection models. To this end, we explore the space of calibrating modern DNN-
based object detectors. We propose a new train-time calibration method based
on a new auxiliary loss function (BPC). It is differentiable, operates over
mini-batches, and effectively calibrates modern object detectors for in-domain
and out-domain detections.

##  3 Method

###  3.1 What is calibration?

A model is well-calibrated when the predicted confidence is aligned with the
likelihood of the sample being correct. For example, a prediction of a
calibrated model with confidence $s$ aligns with the occurrence of a sample
with the same $s$. A model is overconfident when it satisfies the condition of
correctness with $<s\%$, and underconfident when $>s\%$. Many recent works
addressing model calibration target the task of classification. In the
following, we briefly define calibration for classification and object
detection.

Classification: Given a dataset $\mathcal{D}$ defined with the joint
distribution $\mathcal{D}(\mathcal{X},\mathcal{Y})$ such that $N$ number of
images belonging to $C$ ground truth classes are available. Let
$\mathcal{D}=\\{(\mathbf{x}_{n},y_{n})_{n=1}^{N}\\}$, where
$\mathbf{x}_{n}\in\mathbb{R}^{H\times W\times d}$ (an input image with height
$H$, width $W$, and number of channels $d$). For each image, we have a
corresponding ground truth class label $y_{n}\in\mathcal{Y}=\\{1,2,...,C\\}$.
Let $\mathcal{G}_{cls}$ be a classification model that predicts a label
$\bar{y}$ with confidence score $\bar{s}$. Following [9], we define a perfect
classification calibration as:
$\mathbb{P}(\bar{y}=y|\bar{s}=s)=s,~{}\text{s.t., }s\in[0,1]$. According to
this expression, accuracy and confidence must align for all confidence levels.

Object Detection: For object detection, the localization of an object is an
integral component along with the class label. Therefore, bounding box
($\mathbf{b}$) annotations are also available with corresponding class labels.
Specifically, for each object, let $\mathbf{b}\in\mathbb{R}^{4}$ and $y$
correspond to its class label. Given the object detector $\mathcal{G}_{det}$,
model predicts a bounding box $\mathbf{\bar{b}}$ and label $\bar{y}$ with
confidence score $\bar{s}$. Following [21], we can define the perfect
calibration in object detection as: $\mathbb{P}(K=1|\bar{s}=s)=s,~{}\forall
s\in[0,1]$ 111Note that, this definition of calibration for object detectors
is extendable to include box properties.. Where $K=1$ denotes an accurate
detection in which both the class prediction matches with the ground truth
class and the IoU (between the predicted and the ground truth box) is greater
than a certain threshold i.e.
$\mathbbm{1}[IoU(\mathbf{\bar{b}},\mathbf{b})\geq\rho]\mathbbm{1}[\bar{y}=y]$.

###  3.2 Measuring Calibration

Classification: Expected calibration error (ECE) is a widely used metric to
quantify the miscalibration of a classification model. It measures the
expected deviation of accuracy from the confidence for all confidence levels
[9].

$\mathbb{E}_{\bar{s}}\Big{[}|\mathbb{P}(\bar{y}=y|\bar{s}=s)-s|\Big{]}$ (1)

As the confidence score is a continuous random variable, the confidence levels
are divided into $L$ equally-spaced bins. The approximation of ECE is computed
as:

$\mathbf{ECE}=\sum_{l=1}^{L}\frac{|B(l)|}{|\mathcal{D}|}\left|\mathrm{acc}(l)-\mathrm{conf}(l)\right|$
(2)

where $|\mathcal{D}|$ is the total number of samples, $B(l)$ is the set of
samples in the $l^{th}$ bin. Further, $\mathrm{acc}(l)$ and $\mathrm{conf}(l)$
denote the average accuracy and average confidence over samples in the
$l^{th}$ bin, respectively.

Object detection: Similar to ECE for classification, we can define the
detection expected calibration error (D-ECE) as the expected deviation of
precision from the confidence for all confidence levels [21]:

$\mathbb{E}_{\bar{s}}\Big{[}|\mathbb{P}(K=1|\bar{s}=s)-s|\Big{]}$ (3)

As confidence is a continuous variable, similar to eq.(2), we can approximate
D-ECE:

$\mathbf{D\text{-}ECE}=\sum_{l=1}^{L}\frac{|B(l)|}{|\mathcal{D}|}\left|\mathrm{prec}(l)-\mathrm{conf}(l)\right|$
(4)

where $\mathrm{prec}(l)$ denotes the precision in $l^{th}$ bin. Different from
Eq. (2), here, $B(l)$ is the set of object instances in $l^{th}$ bin and
$|\mathcal{D}|$ is the total number of object instances.

Figure 3: Left: We divide the confidence and precision space into four groups
for categorizing accurate and inaccurate predictions over the minibatch
according to their predicting confidence. Right: Compared to baseline, our BPC
loss function has increased the joint count of accurate/confident and
inaccurate/not-confident detections, while at the same time, it has decreased
the joint count of accurate/not-confident and inaccurate/confident detections.
Further, when compared to the baseline, the ratio between the latter and the
former (defined in Eq. (9)) is smaller.

###  3.3 BPC: Train-time Calibration Loss for Detection

Motivation: DNNs-based object detectors are trained with the objective to
predict with high confidence, leaving them miscalibrated for both in-domain
and out-of-domain detections. The rationale behind this behavior is the lack
of direct supervision for the model to promote higher confidence for accurate
predictions and lower confidence for inaccurate predictions. Motivated by this
observation, we leverage the statistics associated with high-scoring and low-
scoring box predictions to calibrate the detection model. We utilize the true
positives and false positives to span the precision and confidence space in
order to maximize the probability scores for accurate predictions and minimize
the same for inaccurate predictions. Specifically, we discretize the
confidence and precision space into four partitions for categorizing the
accurate and inaccurate detections (Fig. 3). This lets us develop a simple
auxiliary objective, which attempts to distribute the detections according to
their respective confidences.

Formulation: We propose a train-time method for calibrating object detectors,
at the core of which is a simple auxiliary loss function. It is
differentiable, operates on minibatches, and is formulated to be used with
other task-specific detection losses.

Inspired by the train-time calibration loss for classification [18], we
formulate a loss function specific to object detection. We divide the
confidence and precision space into four partitions and categorize the true
positive (TP) and false positive (FP) detections over a minibatch. The four
partitions for TP and FP are: (1) accurate and confident (AC) (2) accurate and
not confident (AN) (3) inaccurate and confident (IC) and (4) inaccurate and
not confident (IN). Let $\text{t}_{AC}$, $\text{t}_{AN}$, $\text{t}_{IC}$ and
$\text{t}_{IN}$ represent the number of detections in AC, AN, IC, and IN,
respectively. In principle, we need accurate detections to be more confident
and inaccurate ones to be less confident, so we define the following objective
that should be maximized:

$\displaystyle\text{PC}=\frac{\text{t}_{AC}+\text{t}_{IN}}{\text{t}_{AC}+\text{t}_{IN}+\text{t}_{AN}+\text{t}_{IC}}$
(5)

In object detection, the obtained predictions are either accurate or
inaccurate. Given the predicted class label, bounding boxes, $\mathbbm{1}$ as
an indicator function, and $th$ is the threshold on score, we define the
following:

$\displaystyle\text{t}_{AC}=\sum_{i}\mathbbm{1}[IoU(\mathbf{\bar{b}}_{i},\mathbf{b}_{i})\geq\rho]\mathbbm{1}[\bar{y}_{i}=y_{i}]~{}\mid~{}\bar{s}_{i}\geq
th$ (6)
$\displaystyle\text{t}_{AN}=\sum_{i}\mathbbm{1}[IoU(\mathbf{\bar{b}}_{i},\mathbf{b}_{i})\geq\rho]\mathbbm{1}[\bar{y}_{i}=y_{i}]~{}\mid~{}\bar{s}_{i}<th$
(7)

$\text{t}_{IC}$ & $\text{t}_{IN}$:  The remaining detections after populating
$\text{t}_{AC}$ and $\text{t}_{AN}$ are false positives (inaccurate). Similar
to Eq. (6) and Eq. (7), we categorize them based on their confidence scores.

In our loss formulation, we consider precision since it includes true
positives and false positives, for which we have confidence scores. Whereas
false negatives cannot be considered as they do not have confidence scores
because of no detections. Since Eq. (5) is not differentiable owing to the
indicator functions for $\text{t}_{AC}$, $\text{t}_{AN}$, $\text{t}_{IC}$ and
$\text{t}_{IN}$, we formulate its differentiable version to approximate these
quantities. Let $t_{AC}$, $t_{AN}$, $t_{IC}$ and $t_{IN}$ be the
approximations to $\text{t}_{AC}$, $\text{t}_{AN}$, $\text{t}_{IC}$ and
$\text{t}_{IN}$, respectively. We express the differentiable formulation as:

$\displaystyle t_{AC}$
$\displaystyle=\sum_{i\in\Big{(}\begin{subarray}{c}K_{i}=1~{}\&\\\
\bar{s}_{i}\geq th\end{subarray}\Big{)}}\bar{s}_{i}\odot\tanh(\bar{s}_{i})$
$\displaystyle t_{AN}$
$\displaystyle=\sum_{i\in\Big{(}\begin{subarray}{c}K_{i}=1~{}\&\\\
\bar{s}_{i}<th\end{subarray}\Big{)}}\bar{s}_{i}\odot(1-\tanh(\bar{s}_{i}))$
$\displaystyle t_{IC}$
$\displaystyle=\sum_{i\in\Big{(}\begin{subarray}{c}K_{i}=0~{}\&\\\
\bar{s}_{i}\geq
th\end{subarray}\Big{)}}(1-\bar{s}_{i})\odot\tanh(\bar{s}_{i})$ $\displaystyle
t_{IN}$ $\displaystyle=\sum_{i\in\Big{(}\begin{subarray}{c}K_{i}=0~{}\&\\\
\bar{s}_{i}<th\end{subarray}\Big{)}}(1-\bar{s}_{i})\odot(1-\tanh(\bar{s}_{i}))$

This is based on the rationale that when a detection is accurate, the
confidence score satisfies to $\bar{s}$ $\rightarrow$ 1, and otherwise
$\bar{s}$ $\rightarrow$ 0\. Where $\tanh$ denotes the hyperbolic tangent
function that modulates the penalization to the confidence score. The $\tanh$
function tapers off the confidence values in cases where the prediction is
accurate so emphasize less on easy cases (well-calibrated) and focus more on
the hard cases (not well-calibrated). Now we define the differentiable
surrogate approximation to our auxiliary loss function:

$\displaystyle\mathcal{L}_{BPC}=-\log\Bigg{(}\frac{t_{AC}+t_{IN}}{t_{AC}+t_{IN}+t_{AN}+t_{IC}}\Bigg{)}$
(8)

This above relation Eq.(8) can be simplified as to minimize the following:

$\displaystyle\mathcal{L}_{BPC}=\log\Bigg{(}1+\frac{t_{AN}+t_{IC}}{t_{AC}+t_{IN}}\Bigg{)}$
(9)

We note that, the calibration loss $\mathcal{L}_{BPC}$ is model-agnostic and
differentiable. and can be integrated with task specific losses of modern
object detection methods. Let $\mathcal{L}_{det}$ be the object detection loss
that contains classification (_e.g_. Focal Loss) and localization (_e.g_.
Generalized IoU & L1) losses, we can add our $\mathcal{L}_{BPC}$ to it and
obtain the total loss as:

$\displaystyle\mathcal{L}_{total}=\mathcal{L}_{det}+\mathcal{L}_{BPC}$ (10)

Since accurate predictions should have high confidence scores, our train-time
loss attempts to align higher accuracy with higher confidence scores and vice
versa. As shown in Fig. 3, compared to baseline, it increases the joint count
of accurate/confident and inaccurate/not-confident detections, while at the
same time, it decreases the joint count of accurate/not-confident and
inaccurate/confident detections. Further, when compared to the baseline, the
ratio between the latter and the former (defined in Eq. (9)) is decreased.

Methods Scenarios | In-Domain (COCO) | Out-Domain (CorCOCO)
---|---|---
| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
Baseline [39] | 12.8 | 44.0 | 62.9 | 10.8 | 23.9 | 35.8
TS (post-hoc) [9] | 14.2 | 44.0 | 62.9 | 12.3 | 23.9 | 35.8
MDCA [11] | 12.2 | 44.0 | 62.9 | 11.1 | 23.5 | 35.3
MbLS [25] | 15.7 | 44.4 | 63.4 | 12.4 | 23.5 | 35.3
BPC (Ours) | 10.3 | 43.7 | 62.8 | 9.4 | 23.2 | 34.9
Table 1: Calibration performance on COCO in-domain and out-domain scenarios.
Results show that our proposed BPC improves calibration of object detection as
compared to baseline, other train time losses and post-hoc methods. AP box and
<EMAIL_ADDRESS>are also reported in the table.

##  4 Experiments & Results

Datasets: For both in-domain and out-domain scenarios, we perform experiments
on various object detection datasets, including large-scale ones. MS-COCO [24]
contains 118K images for training as train2017, 41K as test2017, and 5K images
as val2017, that are used for evaluation. It consists of 80 object categories
in real world images. CorCOCO is a corrupted version of MS-COCO val2017
dataset for evaluations in out-domain scenarios. It incorporates random
corruptions out of specified settings in [13], with arbitrary severity levels.
Cityscapes [3] is an urban driving scene dataset consisting of 8 categories:
person, rider, car, truck, bus, train, motorbike, and bicycle. It contains
2975 training images and 500 validation images used for evaluation. Foggy
Cityscapes [30] consists of images simulating foggy weather on Cityscapes, and
its validation set with severe level of fog is used for evaluation for out-
domain scenario. Sim10k [16] is a dataset of synthetic images containing car
category. It contains 10K images from which we split 8K as training set and 1K
is used for evaluation. BDD100k [38] consists of 70K training images, 20K test
images and 10K validation images. We only consider daylight subset of
validation set for the evaluation of out-domain scenario which counts to 5.2K
images. This dataset contains class categories similar to Cityscapes.

Datasets (post-hoc): We use validation sets based on three in-domain scenarios
for temperature scaling as a post-hoc method. We opt Object365 [31] validation
dataset in case of MS-COCO with similar categories, subset of BDD100k train
set for Cityscapes and for Sim10k, its validation split.

Implementation Details: We use a SoTA detector Deformable-DETR (D-DETR) as a
baseline and integrate our loss function with it. D-DETR uses focal loss [23]
for classification and generalized IOU & L1 losses [1] for localization.
Default settings are used and more details can be seen in [39]. In addition to
the comparison of our proposed train-time loss with post-hoc method [9], we
also compare calibration performance with recent calibration losses, MDCA [11]
and MbLS [25]. D-DETR is trained with respective train-time losses and in-
domain datasets.

Evaluation: For both in-domain and out-domain, we report detection expected
calibration error (D-ECE) [21] as object detection calibration measure along
with mean average precision of detectors.

Figure 4: Our BPC loss reduces D-ECE for MS-COCO in-domain and Cor-COCO out-domain. We note that the classification calibration losses are sub-optimal for detection calibration and BPC loss improves calibration over post-hoc and train-time losses. Methods Scenarios | In-Domain (Cityscapes) | Out-Domain (Foggy Cityscapes) | Out-Domain (BDD100k)
---|---|---|---
| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
Baseline [39] | 13.8 | 26.8 | 49.5 | 19.5 | 17.3 | 29.3 | 11.7 | 10.2 | 21.9
TS (post-hoc) [9] | 12.6 | 26.8 | 49.5 | 14.6 | 17.3 | 29.3 | 24.5 | 10.2 | 21.9
MDCA [11] | 13.4 | 27.5 | 49.5 | 17.1 | 17.7 | 30.3 | 14.2 | 10.7 | 22.7
MbLS [25] | 12.1 | 27.3 | 49.7 | 20.0 | 17.1 | 29.1 | 11.6 | 10.5 | 22.7
BPC (Ours) | 9.9 | 26.8 | 48.7 | 12.5 | 17.7 | 30.2 | 10.6 | 11.0 | 23.6
Table 2: Calibration results with baseline, train-time losses and post-hoc methods are reported. BPC shows improvement in detection calibration for all the scenarios of in-domain (Cityscapes) and out-domain (Foggy Cityscapes & BDD100k). AP box and<EMAIL_ADDRESS>are also reported for each scenario. Methods Scenarios | InDomain (Sim10k) | OutDomain (BDD100k)
---|---|---
|  D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>|  D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
Baseline [39] | 10.3 | 65.9 | 90.7 | 7.3 | 23.5 | 46.6
TS (post-hoc) [9] | 15.7 | 65.9 | 90.7 | 10.5 | 23.5 | 46.6
MDCA [11] | 10.0 | 64.8 | 90.3 | 8.8 | 22.7 | 45.7
MbLS [25] | 22.5 | 63.8 | 90.5 | 16.8 | 23.4 | 47.4
BPC (Ours) | 6.1 | 65.4 | 90.5 | 6.3 | 23.4 | 45.6
Table 3: Calibration performance with our proposed BPC loss is improved over
baseline, train-time losses and post-hoc methods for both in-domain (Sim10k)
and out-domain (BDD100k). Car class is considered in this scenario for
evaluations. AP box and<EMAIL_ADDRESS>are also reported.

###  4.1 Results

We have performed extensive experiments with post-hoc method and recent train-
time losses over various in-domain and out-domain scenarios. For post-hoc
method, we need validation set and for temperature scaling (TS) we optimize
calibration parameter $T$. We compare all of these methods with our proposed
loss function, specifically designed for object detectors. Our results show
significant improvement over calibration scores (lower the better), while
having comparable performance in detection accuracy.

Real and Corrupted domains: To see the effectiveness of our loss, we perform
experiments with a large-scale benchmark dataset, MS-COCO. We show our results
for in-domain and out-domain scenarios, note that a corrupted version of the
MS-COCO (CorCOCO) validation set is used for out-domain evaluation. In Tab. 1,
the post-hoc based TS method fails to improve calibration in both domains,
that usually considered to be a good performer in the in-domain. Results show
train time losses that are designed for classification-based model
calibration, are also not ideal for the calibration of object detectors. We
report D-ECE, and our proposed loss function shows improvement in calibration
scores for both in-domain ($\rightarrow$COCO, 2.5%$\downarrow$) and out-domain
($\rightarrow$CorCOCO, 1.4%$\downarrow$) scenarios from the baseline (Fig. 4).
In comparison with MbLS, our loss improves calibration scores of
5.4%$\downarrow$ and 3.0%$\downarrow$ for in-domain and out-domain
respectively.

Weather domains: We consider weather shift scenario for evaluation in both
domains. For in-domain Cityscapes (CS) and out-domain Foggy CS, we see in Tab.
2 our loss shows improvement over post-hoc, for both in-domain
($\rightarrow$CS, 2.7%$\downarrow$) and out-domain ($\rightarrow$Foggy CS,
2.1%$\downarrow$). Also, we show improvement as compared to train-time losses,
notably ($\rightarrow$Foggy CS, 7.5%$\downarrow$) over MbLS.

Scene domains: To have CS as in-domain in scene shift, BDD100k is evaluated as
an out-domain scenario. Both belong to urban driving scenes but there is a
large scene deviation among them. We show results in this scenario in Tab. 2
and find that TS performs the worst, followed by classification-based train
time losses (Fig. 5). We outperform TS in out-domain ($\rightarrow$BDD100k,
13.9%$\downarrow$) and the recent MDCA ($\rightarrow$BDD100k,
3.6%$\downarrow$) approach.

Synthetic and Real domains: Sim10k is a synthetic dataset and considered as
in-domain, while BDD100k as a daylight subset is considered as out-domain. We
extract the car category from the BDD100k evaluation set and report the
results. Our loss shows improved calibration scores for in-domain
($\rightarrow$Sim10k, 3.9%$\downarrow$) and out-domain ($\rightarrow$BDD100k,
2.5%$\downarrow$) scenarios over the MDCA loss (Fig. 6). Also we show
calibration improvement of 16.4%$\downarrow$ and 10.5%$\downarrow$ over MbLS
for in-domain and out-domain respectively (Tab. 3).

Figure 5: After integrating our BPC loss the calibration performance is
improved in Cityscapes (CS) and CS to BDD100k.

Qualitative Figures: We show qualitative detection results in Fig. 7. Detector
trained with our loss forces the accurate predictions to be more confident
whereas inaccurate predictions to be less confident.

Reliability Diagrams: We show reliability diagrams to see the behaviour of
calibration in Fig. 8. A perfect calibration is achieved if the confidence is
exactly same as precision.

Method | In-Domain
---|---
|  D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
BPC (th=0.4) | 9.7 | 50.2 | 80.5
BPC (th=0.5) | 9.1 | 50.1 | 80.2
BPC (th=0.6) | 11.2 | 50.9 | 81.4
Table 4: Impact of probability thresholds on BPC loss. We perform experiments using train and test subsets of Sim10k train set for ablation study. Method | In-Domain
---|---
|  D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
BPC (BS=1) | 10.5 | 50.3 | 79.6
BPC (BS=2) | 9.1 | 50.1 | 80.2
BPC (BS=3) | 8.9 | 48.6 | 78.7
BPC (BS=4) | 10.2 | 47.3 | 78.3
Table 5: Impact of batch sizes on BPC loss. We observe little degradation in detection accuracy by varying batch size (BS) and observe calibration performance is not much sensitive. Figure 6: Our BPC loss reduces D-ECE in Sim10k and BDD100k as in-domain and out-domain scenarios, respectively. Method | In-Domain
---|---
|  D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
BPC (seed=30) | 9.0 | 49.2 | 79.7
BPC (seed=42) | 9.1 | 50.1 | 80.2
BPC (seed=60) | 8.6 | 51.0 | 80.5
Table 6: Impact of different seeds on BPC loss. We observe changing seeds for
initialization has little effect on calibration performance. Figure 7:
Baseline [39] vs. BPC (Ours): Qualitative results on MS-COCO dataset (In-
Domain). Detector trained with our loss forces the accurate predictions to be
more confident whereas inaccurate predictions to be less confident. Detection
threshold is set to 0.3. Green boxes are accurate predictions with respective
confidence scores. Red (dashed) boxes are inaccurate predictions with
corresponding scores. Blue shows the ground truth boxes present for
corresponding detections. Figure 8: Reliability Diagrams: MS-COCO (In-Domain)
and MS-COCO (Out-Domain). Top: Baseline [39] trained as D-DETR and Bottom:
D-DETR trained with our proposed BPC loss.

###  4.2 Ablation & Analysis

We perform ablation studies on score threshold, batch sizes and random
initialization. For this purpose, we select the subsets of Sim10k training set
as train and validation to empirically find score threshold hyper-parameter.
With similar data splits, we show impact of batch sizes and random weight
initialization on our loss.

Score Threshold: We study the impact of score threshold that is used for
penalizing the probabilities of instances present in the batch. Varying the
score threshold shows some degradation in detection performance for in-domain
but calibration still stands out the best and we find our approach is not much
sensitive to it. We empirically find in Tab. 4 that $th=0.5$ improves
calibration.

Batch Size: We observe in Tab. 5 the impact of batch sizes on our proposed
loss function. We see that increasing batch size has little effect on the
detection accuracy and calibration performance is not sensitive for given
scenario. To get the best for both metrics and without sacrificing the drop in
detection performance, we opt for batch size 2 for all experiments.

Random Weight Initialization: Impact of different seeds with calibration loss
is studied by setting different initialization points for experiments. This
shows that calibration is not much influenced by random initialization (Tab.
6). We set seed 42 as default in our experiments.

##  5 Conclusion

In this paper, we presented a new train-time calibration method for object
detection which is based on an auxiliary loss function (BPC). It utilizes true
positive and false positive statistics to maximize the confidence scores for
accurate predictions and minimize the scores for inaccurate predictions. We
perform extensive experiments on several in-domain and out-domain scenarios,
including large-scale detection dataset, to show the effectiveness of our loss
function for calibrating object detectors. Results show that our method
outperforms several train-time calibration methods in terms of improving the
calibration of both in-domain and out-domain predictions while also preserving
the detection accuracy.

## References

  * [1] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko.  End-to-end object detection with transformers.  In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision – ECCV, 2020.
  * [2] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille.  Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs.  IEEE transactions on pattern analysis and machine intelligence, 40(4):834–848, 2018.
  * [3] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele.  The cityscapes dataset for semantic urban scene understanding.  In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
  * [4] Zhipeng Ding, Xu Han, Peirong Liu, and Marc Niethammer.  Local temperature scaling for probability calibration.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6889–6899, 2021.
  * [5] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby.  An image is worth 16x16 words: Transformers for image recognition at scale.  In International Conference on Learning Representations, 2021.
  * [6] Michael W Dusenberry, Dustin Tran, Edward Choi, Jonas Kemp, Jeremy Nixon, Ghassen Jerfel, Katherine Heller, and Andrew M Dai.  Analyzing the role of model uncertainty for electronic health records.  In Proceedings of the ACM Conference on Health, Inference, and Learning, pages 204–213, 2020.
  * [7] Arthur Gretton.  Introduction to rkhs, and some simple kernel algorithms.  Adv. Top. Mach. Learn. Lecture Conducted from University College London, 16:5–3, 2013.
  * [8] Sorin Grigorescu, Bogdan Trasnea, Tiberiu Cocias, and Gigel Macesanu.  A survey of deep learning techniques for autonomous driving.  Journal of Field Robotics, 37(3):362–386, 2020.
  * [9] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger.  On calibration of modern neural networks.  In International Conference on Machine Learning, pages 1321–1330. PMLR, 2017.
  * [10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.  Deep residual learning for image recognition.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
  * [11] Ramya Hebbalaguppe, Jatin Prakash, Neelabh Madan, and Chetan Arora.  A stitch in time saves nine: A train-time regularizing loss for improved neural network calibration.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 16081–16090, June 2022.
  * [12] Matthias Hein, Maksym Andriushchenko, and Julian Bitterwolf.  Why relu networks yield high-confidence predictions far away from the training data and how to mitigate the problem.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 41–50, 2019.
  * [13] Dan Hendrycks and Thomas Dietterich.  Benchmarking neural network robustness to common corruptions and perturbations.  International Conference on Learning Representations (ICLR), 2019\.
  * [14] Mobarakol Islam, Lalithkumar Seenivasan, Hongliang Ren, and Ben Glocker.  Class-distribution-aware calibration for long-tailed visual recognition.  arXiv preprint arXiv:2109.05263, 2021.
  * [15] Byeongmoon Ji, Hyemin Jung, Jihyeun Yoon, Kyungyul Kim, and Younghak Shin.  Bin-wise temperature scaling (bts): Improvement in confidence calibration performance through simple scaling techniques.  2019 IEEE/CVF International Conference on Computer Vision Workshop (ICCVW), pages 4190–4196, 2019.
  * [16] Matthew Johnson-Roberson, Charles Barto, Rounak Mehta, Sharath Nittur Sridhar, Karl Rosaen, and Ram Vasudevan.  Driving in the matrix: Can virtual worlds replace human-generated annotations for real world tasks?  In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 746–753. IEEE, 2017.
  * [17] Davood Karimi and Ali Gholipour.  Improving calibration and out-of-distribution detection in deep models for medical image segmentation.  IEEE Transactions on Artificial Intelligence, 2022.
  * [18] Ranganath Krishnan and Omesh Tickoo.  Improving model calibration with accuracy versus uncertainty optimization.  Advances in Neural Information Processing Systems, 2020.
  * [19] Meelis Kull, Telmo Silva Filho, and Peter Flach.  Beta calibration: a well-founded and easily implemented improvement on logistic calibration for binary classifiers.  In Artificial Intelligence and Statistics, pages 623–631. PMLR, 2017.
  * [20] Aviral Kumar, Sunita Sarawagi, and Ujjwal Jain.  Trainable calibration measures for neural networks from kernel mean embeddings.  In International Conference on Machine Learning, pages 2805–2814. PMLR, 2018.
  * [21] Fabian Kuppers, Jan Kronenberger, Amirhossein Shantia, and Anselm Haselhoff.  Multivariate confidence calibration for object detection.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 326–327, 2020.
  * [22] Gongbo Liang, Yu Zhang, Xiaoqin Wang, and Nathan Jacobs.  Improved trainable calibration method for neural networks on medical imaging classification.  In British Machine Vision Conference (BMVC), 2020.
  * [23] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár.  Focal loss for dense object detection.  In Proceedings of the IEEE international conference on computer vision, pages 2980–2988, 2017.
  * [24] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick.  Microsoft coco: Common objects in context.  In European conference on computer vision, pages 740–755. Springer, 2014.
  * [25] Bingyuan Liu, Ismail Ben Ayed, Adrian Galdran, and Jose Dolz.  The devil is in the margin: Margin-based label smoothing for network calibration.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 80–88, June 2022.
  * [26] Jishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz, Philip Torr, and Puneet Dokania.  Calibrating deep neural networks using focal loss.  Advances in Neural Information Processing Systems, 33:15288–15299, 2020.
  * [27] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sebastian Nowozin, Joshua Dillon, Balaji Lakshminarayanan, and Jasper Snoek.  Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift.  Advances in neural information processing systems, 32, 2019.
  * [28] John Platt et al.  Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods.  Advances in large margin classifiers, 10(3):61–74, 1999.
  * [29] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun.  Faster r-cnn: Towards real-time object detection with region proposal networks.  In Advances in neural information processing systems, pages 91–99, 2015.
  * [30] Christos Sakaridis, Dengxin Dai, and Luc Van Gool.  Semantic foggy scene understanding with synthetic data.  International Journal of Computer Vision, 126(9):973–992, 2018\.
  * [31] Shuai Shao, Zeming Li, Tianyuan Zhang, Chao Peng, Gang Yu, Xiangyu Zhang, Jing Li, and Jian Sun.  Objects365: A large-scale, high-quality dataset for object detection.  In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 8429–8438, 2019.
  * [32] Monika Sharma, Oindrila Saha, Anand Sriraman, Ramya Hebbalaguppe, Lovekesh Vig, and Shirish Karande.  Crowdsourcing for chromosome segmentation and deep classification.  In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 34–41, 2017.
  * [33] Karen Simonyan and Andrew Zisserman.  Very deep convolutional networks for large-scale image recognition.  arXiv preprint arXiv:1409.1556, 2014.
  * [34] Robin Strudel, Ricardo Garcia, Ivan Laptev, and Cordelia Schmid.  Segmenter: Transformer for semantic segmentation.  In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pages 7242–7252, 2021.
  * [35] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna.  Rethinking the inception architecture for computer vision.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016.
  * [36] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He.  Fcos: Fully convolutional one-stage object detection.  In Proceedings of the IEEE international conference on computer vision, pages 9627–9636, 2019.
  * [37] Christian Tomani, Sebastian Gruber, Muhammed Ebrar Erdem, Daniel Cremers, and Florian Buettner.  Post-hoc uncertainty calibration for domain drift scenarios.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10124–10132, 2021.
  * [38] Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darrell.  Bdd100k: A diverse driving dataset for heterogeneous multitask learning.  In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 2636–2645, 2020.
  * [39] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai.  Deformable {detr}: Deformable transformers for end-to-end object detection.  In International Conference on Learning Representations, 2021.

## Supplementary Material: Bridging Precision and Confidence: A Train-Time
Loss for Calibrating Object Detection

## A. Overview

In this supplementary material, we provide the following items:

  1. A.1

Further implementation details.

  2. A.2

Additional experimental results.

  3. A.3

More qualitative results.

  4. A.4

Architecture Irrelevant: BPC with One-stage.

  5. A.5

Formulation for Semantic Segmentation.

  6. A.6

Error bars: Mean & Std. Dev.

  7. A.7

More results on Common Corruptions.

### A.1 Further Implementation Details

We choose Deformable-DETR (D-DETR) for our experiments. Our BPC loss is an
auxiliary loss that jointly trains with the object detection losses to achieve
better calibration. For our experiments, we use multi-gpu settings (4 GPUs)
for training.

We provide further details on experimental settings for PascalVOC to
watercolor1k, clipart1k, and comic1k domain shifts. We utilize train set of
PascalVOC 2007 and 2012 for training and validation set of PascalVOC 2012 is
used for evaluation purpose. For post-hoc method, it needs a hold-out
validation set, and PascalVOC 2007 test set is used for that purpose.
PascalVOC contains 20 categories of real images. Other out-domain datasets
contain evaluation images, and respective 1k test set images are used for
watercolor1k and comic1k, while whole 1k images of clipart1k are used for
evaluation. Clipart1k also contains 20 categories, whereas 6 common categories
are evaluated in watercolor1k and comic1k. We report calibration error (D-ECE)
and mean average precision for reporting results.

Methods Scenario | In-Domain (PascalVOC)
---|---
| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
Baseline [39] | 11.8 | 49.7 | 73.8
TS (post-hoc) [9] | 13.0 | 49.7 | 73.8
MDCA [11] | 12.8 | 48.9 | 73.2
MbLS [25] | 20.9 | 49.7 | 73.6
BPC (Ours) | 11.2 | 49.6 | 74.0
Table 7: Calibration results with baseline, train-time losses and post-hoc methods are reported. BPC shows improvement in detection calibration for in-domain scenario. AP box and<EMAIL_ADDRESS>are also reported. Methods Scenarios | Out-Domain (watercolor1k) | Out-Domain (clipart1k) | Out-Domain (comic1k)
---|---|---|---
| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>| D-ECE $\downarrow$ | AP box |<EMAIL_ADDRESS>
Baseline [39] | 11.1 | 15.9 | 31.8 | 11.0 | 9.0 | 17.9 | 14.4 | 5.6 | 11.1
TS (post-hoc) [9] | 19.3 | 15.9 | 31.8 | 19.2 | 9.0 | 17.9 | 22.0 | 5.6 | 11.1
MDCA [11] | 9.8 | 17.5 | 34.8 | 10.5 | 9.3 | 17.8 | 15.3 | 4.9 | 8.8
MbLS [25] | 16.3 | 16.8 | 34.5 | 12.3 | 9.2 | 17.9 | 17.7 | 5.5 | 10.4
BPC (Ours) | 9.3 | 16.5 | 34.1 | 10.8 | 10.2 | 19.1 | 12.1 | 6.1 | 11.7
Table 8: Comparison of calibration performance with the baseline, train-time
losses and post-hoc methods. Our BPC shows improvement over almost all
competing approaches in three challenging out-domain scenarios i.e. from
PASCALVOC to watercolor1k, clipart1k & comic1k. AP box and<EMAIL_ADDRESS>are also
reported for each scenario. Figure 9: Baseline [39] vs. BPC (Ours):
Qualitative results on CorCOCO dataset (Out-Domain of MS-COCO). Detector
trained with our loss forces the accurate predictions to be more confident
whereas inaccurate predictions to be less confident. Detection threshold is
set to 0.3. Green boxes are accurate predictions with their respective
confidence scores. Red (dashed) boxes are inaccurate predictions with
corresponding scores. Blue shows the ground truth boxes for corresponding
detections. Figure 10: Baseline [39] vs. BPC (Ours): Qualitative results on
CorCOCO dataset (Out-Domain of MS-COCO). Detector trained with our loss forces
the accurate predictions to be more confident whereas inaccurate predictions
to be less confident. Detection threshold is set to 0.3. Green boxes are
accurate predictions with their respective confidence scores. Red (dashed)
boxes are inaccurate predictions with corresponding scores. Blue shows the
ground truth boxes for corresponding detections.

### A.2 Additional Experimental Results

PascalVOC: We compare the performance of our calibration loss with recent
calibration methods, post-hoc calibration method, and the baseline on
PASCALVOC to watercolor1k, clipart1k, and comic1k domain shifts. In Tab. 7, we
present the results on PascalVOC, and our BPC loss reduces the D-ECE by
9.7%$\downarrow$ over MbLS [25] and 1.6%$\downarrow$ over MDCA [25].

Watercolor1k: In Tab. 8, our BPC loss improves the calibration performance
without losing significant detection accuracy. Our loss shows calibration
improvement of 7.0%$\downarrow$ over MbLS [25] and 10.0%$\downarrow$ over
post-hoc method.

Clipart1k: Tab. 8 shows that our BPC loss comparatively improves the
calibration performance without losing detection accuracy. Our loss shows
calibration improvement of 1.5%$\downarrow$ over MbLS [25] and
8.4%$\downarrow$ over post-hoc method.

Comic1k: Our BPC loss improves the calibration performance along with the
detection accuracy. In Tab. 8, our loss shows calibration improvement of
5.6%$\downarrow$ over MbLS [25] and 3.2%$\downarrow$ over MDCA [11].

### A.3 More Qualitative Results

We show more qualitative calibration results on CorCOCO (corrupted version of
MS-COCO 2017 validation set) in Figs. 9 and 10. Detector trained with our loss
forces the accurate predictions to be more confident whereas inaccurate
predictions to be less confident.

Method | In-Domain (COCO) | Out-Domain (CorCOCO)
---|---|---
|  D-ECE $\downarrow$ | AP box | mAP |  D-ECE $\downarrow$ | AP box | mAP
One-stage (FCOS) | 22.0 | 38.7 | 57.2 | 24.7 | 20.4 | 32.1
BPC (Ours) | 20.9 | 38.4 | 56.9 | 23.5 | 20.3 | 32.0
Table 9: Calibration results on One-Stage object detector (FCOS).

### A.4 Architecture Irrelevant: BPC with One-stage

In Tab. 9, we show results with a one-stage detector (FCOS [36] with
ResNet-50). Our BPC loss improves calibration in both in-domain (COCO) and
out-domain (CorCOCO).

Figure 11: BPC loss for Semantic Segmentation task. 3 classes as box colors
(green, red & grey). Black text in box (confident) and yellow (not-confident)
predictions.

### A.5 Formulation for Semantic Segmentation

Our loss BPC is extensible for semantic segmentation. We provide a sketch
formulation to extend BPC loss for semantic segmentation (Fig. 11).

### A.6 Error bars: Mean & Std. Deviation

Fig. 12(b) plots the mean and std.dev D-ECE for BPC and baseline in CS (in-
domain) and Foggy-CS (out-domain).

Figure 12: (a) Calibration performance on COCO corruptions. (b) Error bars on
CS/Foggy-CS dataset.

.

### A.7 More results on Common Corruptions

We corrupt COCO evaluation set (val2017) after sampling 5 different
corruptions with a fixed severity level of 2 from Common Corruptions [13].
Fig. 12(a) shows that our BPC loss can improve the calibration performance on
all five corruptions.


# A Schwarz-Type Lemma for Squeezing Function on Planar Domains

Ahmed Yekta Ökten  Department of Mathematics, Middle East Technical
University, 06800 Ankara, Turkey<EMAIL_ADDRESS>
###### Abstract.

With an easy application of maximum principle, we establish a Schwarz-type
lemma for squeezing function on finitely connected planar domains that
directly yields the explicit formula for squeezing function on doubly
connected domains obtained in [14] by Ng, Tang and Tsai.

###### Key words and phrases:

##  1\. Introduction

Let $\Omega$ be a domain in $\mathbb{C}^{n}$ such that the set of univalent
maps from $\Omega$ into the unit ball $\mathbb{B}^{n}\subset\mathbb{C}^{n}$ is
non-empty. Denote the set of such maps as $\mathscr{U}(\Omega)$, let
$\mathnormal{dist}(.,.)$ denote the Euclidean distance. Then the squeezing
function of $\Omega$, $S_{\Omega}:\Omega\longrightarrow(0,1]$ is defined as
follows

$S_{\Omega}(z)=\sup_{\begin{subarray}{c}f\in\mathscr{U}(\Omega)\\\
f(z)=0\end{subarray}}\\{r\in(0,1]|r\mathbb{B}^{n}\subset f(\Omega)\\}\\\
=\sup_{\begin{subarray}{c}f\in\mathscr{U}(\Omega)\\\
f(z)=0\end{subarray}}\mathnormal{dist}(0,\partial f(\Omega)).$

Squeezing function, which is a biholomorphic invariant, arose from the study
of invariant metrics on Teichmüller Spaces of Riemann Surfaces, see [11, 12].
Properties of squeezing function have been investigated by many authors and
many interesting applications are demonstrated. [17, 2, 1], provides an
introduction to the topic, whereas the references [3, 5, 4, 6, 7, 13, 15, 18]
are suggested for further study.
We follow the terminology of Solynin. By squeezing problem on $\Omega$ we mean
the problem of determining $S_{\Omega}$ explicitly. A domain $\Omega$ is said
to be extremal for the squeezing problem for $0\in\Omega$ if
$S_{\Omega}(0)=\mathnormal{dist}(0,\partial\Omega)$ and a map
$f\in\mathscr{U}(\Omega)$ is said to be extremal for squeezing problem for
$z\in\Omega$ if $f(z)=0$ and $S_{\Omega}(z)=\mathnormal{dist}(0,\partial
f(\Omega))$. A standard normal families argument shows that the supremum in
the definition of squeezing function is achieved, in other words there exists
an extremal map and extremal domain for all squeezing problems.
Let $\Delta_{r}\subset\mathbb{C}$ denote the disc of radius $r$ centered at
origin. For convenience we denote $\Delta:=\Delta_{1}$. A domain
$D\subset\Delta$ is said to be a circular slit disc if the connected
components of $\Delta\setminus D$ consists of closed proper arcs of circles
centered at the origin. Circular slit discs are canonical type of domains in
the sense that for every point in any finitely connected planar domain whose
boundary doesn’t contain any isolated points, in this case we say that domain
has non-degenerate boundary, we can find a conformal map that takes the point
to the origin and maps the domain onto a circular slit disc.
Determining the squeezing function explicitly is a hard problem, even in the
case of planar domains. Recently, a non-trivial example is been given in [14]
where the authors used Löwner’s differential equation in order to obtained the
explicit formulation of squeezing functions of doubly connected domains. On
[8] and [16], the same result is proven with different techniques and it is
also established that circular slit maps are the only extremal maps for
squeezing problems on doubly connected domains. Considering domains with non-
degenerate boundary components is sufficient to establish the squeezing
problem on doubly connected domains, as there are no conformal maps from
$\mathbb{C}^{*}:=\mathbb{C}\setminus\\{0\\}$ into $\Delta$ and the squeezing
function of $\Delta^{*}:=\Delta\setminus\\{0\\}$ is easily calculated on [2].

######  Theorem 1.1 (Ng,Tang,Tsai).

Let $\Omega$ be a doubly connected domain with non-degenerate boundary
components. Let $z\in\Omega$. Let $C^{1}(z,\Omega)$, $C^{2}(z,\Omega)$ be the
circular slit discs where $z$ is mapped to $0$, inner boundary and outer
boundary corresponds to $\partial\Delta$ respectively. Let $r^{1}(z,\Omega)$,
$r^{2}(z,\Omega)$ denote the radius of slits in $C^{1}(z,\Omega)$,
$C^{2}(z,\Omega)$ respectively. Then

$S_{\Omega}(z)=\max\\{r^{1}(z,\Omega),r^{2}(z,\Omega)\\}.$

In particular, squeezing function on the annulus
$\mathbb{A}_{r}=\Delta/\overline{\Delta_{r}}$ is given explicitly as

$S_{\mathbb{A}_{r}}(z)=\max\\{|z|,\frac{\sqrt{r}}{|z|}\\}.$

Moreover, up to rotation, either one or both of those circular slit discs are
unique extremal domains for this problem.

Now, let $\Omega$ be a planar domain of connectivity $n>2$ with non-degenerate
boundary and $z\in\Omega$. Also let $\\{\Gamma_{i}\\}_{i\in\\{1,2...n\\}}$ be
the set of boundary components of $\Omega$. We have exactly $n$ conformal
maps, $\\{\psi_{i,z}\\}_{i\in\\{1,2...n\\}}$ that satisfy ${\psi_{i}}(z)=0$,
normalized so that ${\psi_{i}}^{\prime}(z)>0$ and
${\psi_{i}}(\Gamma_{i})=\partial\Delta$ in the sense of boundary
correspondence. Chapter 5 of [9] provides more information about these
canonical conformal maps. Now, denote ${\psi_{i}}(\Omega)=C_{i}(z,\Omega)$
where $C_{i}$ is a circular slit disc. Denote the slits of $C_{i}(z,\Omega)$
as $s^{i}_{j}(z,\Omega)={\psi_{i,z}}(\Gamma_{j})$,$i\neq j$ and let
$r^{i}_{j}(z,\Omega)=\mathnormal{dist}(0,s^{i}_{j}(z,\Omega))$. The work of
Ng, Tang and Tsai led them to conjecture that circular slit maps are extremal
mappings for the squeezing problems on higher connected domains as well. More
explicitly, they conjectured that in the case given above the following
equality holds.

$S_{\Omega}(z)=\max_{i}{\min_{i\neq j}{r^{i}_{j}(z,\Omega)}}.$

This conjecture has been disproven by Gumenyuk and Roth in [8] where they
proved that $\forall n>2$ there exists an $n$-connected domain $\Omega$ and
$\exists z\in\Omega$ such that $S_{\Omega}(z)>\max_{i}{\min_{i\neq
j}{r^{i}_{j}(z,\Omega)}}$ . Very recently, Solynin[16] showed that $\forall
n>2$ there exists a circular slit disc of connectivity $n$ that is the
extremal domain for the squeezing problem at $0$.
In this short paper, with an easy application of maximum principle we obtain
Theorem 1.2 given below for squeezing function on multiply connected planar
domains with non-degenerate boundary. We note that when the inequality is
considered for doubly connected domains it directly yields Theorem 1.1.

######  Theorem 1.2.

Let $\Omega$ be a $n$-connected domain with non-degenerate boundary and
$z\in\Omega$. With the notation above, squeezing function of $\Omega$
satisfies the following inequality.

$\max_{i}{\min_{i\neq j}{r^{i}_{j}(z,\Omega)}}\leq
S_{\Omega}(z)\leq\max_{i}{\max_{i\neq j}{r^{i}_{j}(z,\Omega)}}.$

##  2\. Preliminaries on Circular Slit Maps

Circular slit maps are canonical maps for multiply connected domains with non-
degenerate boundary. If $\Omega$ is a finitely connected domain with boundary
components $\Gamma_{i}$, for ${i\in\\{1,2...n\\}}$ where each $\Gamma_{j}$
doesn’t reduce to a point, we can find conformal maps $\psi_{j,z}$ taking
$z\in\Omega$ to $0$, $\Omega$ onto a circular slit disc and $\Gamma_{j}$ onto
$\partial\Delta$ in the sense of boundary correspondence [9]
,moreover if $\psi:C_{1}\longrightarrow C_{2}$ is a conformal map between two
circular slit discs, fixing $0$, taking $\partial\Delta$ onto itself then
$\psi$ must be a rotation [14]. Therefore, if $\Omega$ is an $n$-connected
domain with non-degenerate boundary, $\forall z\in\Omega$, up to rotation, we
can find exactly $n$-canonical conformal maps, taking $\Omega$ onto a circular
slit disc.
Moreover, circular slit mappings are extremal in the following sense.

######  Proposition 2.1 ([8],Proposition 2.3).

Let $D\subset\Delta$ be a finitely connected domain with outer boundary
$\partial\Delta$ and let $\varphi$ be the conformal mapping of D onto a
circularly slit disk normalized by $\varphi(0)=0$, $\varphi^{\prime}(0)>0$ and
$\varphi(\partial\Delta)=\partial\Delta$. Then $\varphi^{\prime}(0)\geq 1$ and
$\varphi^{\prime}(0)=1$ if and only if $D$ is a circular slit disc, in that
case $\varphi={id}_{D}$.

Schottky-Klein prime function on the annulus $\mathbb{A}_{r}$ is defined as
follows.

$\omega(z,y)=(z-y){\displaystyle\prod_{n=1}^{\infty}\dfrac{(z-r^{2n}y)(y-r^{2n}z)}{(z-r^{2n}z)(y-r^{2n}y)}}.$

Moreover, it satisfies the following properties.

$\overline{\omega(\overline{z}^{-1},\overline{y}^{-1})}=\dfrac{-\omega(z,y)}{zy}.$
$\omega(r^{-2}z,y)=\dfrac{rz\omega(z,y)}{y}.$

Following proposition states that we can write circular slit maps of annuli in
terms of Schottky-Klein prime function.

######  Proposition 2.2 ([14],Theorem 4).

Let $y\in\mathbb{A}_{r}$, define

$f(z,y)=\dfrac{\omega(z,y)}{|y|\omega(z,\overline{y}^{-1})}.$

Then $f(.,y)$ is a circular slit map taking $\mathbb{A}_{r}$ onto a circular
slit disc, $f(\partial\Delta)=\partial\Delta$ and $y\in\mathbb{A}_{r}$ is
mapped to $0$.

######  Remark 2.3.

Schottky-Klein prime function allows us to compute the radius of the slit in
the image. We do not repeat the calculation in [14] and leave it to the
interested reader to verify that the radius of the slit of
$f(\mathbb{A}_{r},y)$ is equal to $|y|$ by using (5) and (6).

##  3\. Main Result

Following proposition simplifies the squeezing problem in one dimension by
showing that for the case of planar domains, only extremal domains are domains
whose complement in the unit disc is relavitely compact. We include the proof
to emphesize that domains which are not bounded by $\partial\Delta$ cannot be
extremal. [14]

######  Proposition 3.1 ([2],Proposition 6.1).

Let $\Omega$ be an $n$-connected planar domain with non-degenerate boundary.
Let as above Let $\tilde{\mathscr{U}}(\Omega)\subset\mathscr{U}(\Omega)$ be
the set of injective holomorphic maps from $\Omega$ into $\Delta$ such that
the complement of image of $\Omega$ is relatively compact in the unit disc.

$S_{\Omega}(z)=\sup_{\begin{subarray}{c}f\in\tilde{\mathscr{U}}(\Omega)\\\
f(z)=0\end{subarray}}\mathnormal{dist}(0,\partial f(\Omega)).$

###### Proof.

Let $f:\Omega\longrightarrow\Delta$ be a conformal map such that $f(z)=0$ and
$\Delta\setminus f(\Omega)$ is not relatively compact. Let
$f(\Omega)^{\prime}$ be the union of $f(\Omega)$ with compact components of
its complement. Observe that $\Omega^{\prime}$ is simply connected. Now let
$g:\Omega^{\prime}\longrightarrow\Delta$ be the Riemann mapping function
fixing $0$. Consider the function $g\circ f\in\tilde{\mathscr{U}}(\Omega)$. We
will show that $\mathnormal{dist}(0,\partial
f(\Omega))<\mathnormal{dist}(0,\partial g(f(\Omega)))$.
Let $\mathnormal{C}_{D}(.,.)$ denote the Carathédory distance on the bounded
domain $D$ and for $r\in(0,\infty)$ define $t(r)=\tanh(r/2)$. $t$ is a
strictly increasing function and it’s well known that for $z\in\Delta$
$\mathnormal{dist}(0,z)=|z|=t(\mathnormal{C}_{\Delta}(0,z))$. By conformal
invariance and monotonicity of Carathedory metric we have

$\ \mathnormal{C}_{\Delta}(0,\Delta\setminus
g(f(\Omega)))=\mathnormal{C}_{f(\Omega)^{\prime}}(0,f(\Omega)^{\prime}\setminus
f(\Omega))>\mathnormal{C}_{\Delta}(0,f(\Omega)^{\prime}\setminus f(\Omega)).$

We note that inequality in the right hand side of (7) is indeed strict since
about $0$, due to Schwarz lemma, the infinitesimal version of Carathédory
metric of $f(\Omega)^{\prime}$ is strictly greater than the infinitesimal
version of Carathédory metric of $\Delta$. As the function $t$ is strictly
increasing we obtain

$\mathnormal{dist}(0,\partial
g(f(\Omega)))=t(\mathnormal{C}_{\Delta}(0,\Delta\setminus
g(f(\Omega))))>t(\mathnormal{C}_{\Delta}(0,f(\Omega)^{\prime}\setminus
f(\Omega)))=\mathnormal{dist}(0,f(\Omega)).$

This shows that any extremal map must belong to the family
$\tilde{\mathscr{U}}(\Omega)$ and

$S_{\Omega}(z)=\sup_{\begin{subarray}{c}f\in\tilde{\mathscr{U}}(\Omega)\\\
f(z)=0\end{subarray}}\mathnormal{dist}(0,\partial f(\Omega)).$

∎

We set our notation. Throughout this section $\Omega$ is an $n$-connected
planar domain with non-degenerate smooth boundary. Now for $i\in\\{1,2...n\\}$
let
$\tilde{\mathscr{{\mathscr{U}}}}_{\Gamma_{i}}(\Omega)\subset\mathscr{U}(\Omega)$
be the subset containing the maps that map $\Gamma_{i}$ onto $\partial\Delta$
in the sense of boundary correspondence. The squeezing function of $\Omega$
towards the boundary component $\Gamma_{i}$, $S_{\Omega,\Gamma_{i}}$ is
defined as follows

$S_{\Omega,\Gamma_{i}}(z)=\displaystyle{\sup_{\begin{subarray}{c}f\in\tilde{\mathscr{{\mathscr{U}}}}_{\Gamma_{i}}(\Omega)\\\
f(z)=0\end{subarray}}\mathnormal{dist}(0,\partial f(\Omega))}.$

We clarify the notion of boundary correspondence. Let $f:D_{1}\longrightarrow
D_{2}$ be a conformal map between two planar domains,
$\Gamma_{1}$,$\Gamma_{2}$ be boundary components of $D_{1},D_{2}$
respectively. When we write $f(\Gamma_{1})=\Gamma_{2}$ we mean the following.
If $\\{z_{i}\\}$ is a sequence in $D_{1}$ converging to $\Gamma_{1}$, every
limit point of the sequence $\\{f(z_{i})\\}$ belongs to $\Gamma_{2}$.
We have to ensure boundary continuity of holomorphic maps to apply the maximum
principle. We will use the following theorem of Carathédory, as the author
remarks after its proof, Theorem 5.1.1 of [10] extends to finitely connected
domains bounded by Jordan curves. Hence we obtain the following lemma.

######  Lemma 3.2 (Carathédory’s Theorem).

Let $\Omega_{1},\Omega_{2}$ be planar domains bounded by finitely many Jordan
curves. If $f:\Omega_{1}\longrightarrow\Omega_{2}$ is a conformal map, then
$f$ extends continuously and injectively to a map from
$\partial\overline{\Omega_{1}}$ onto $\partial\overline{\Omega_{2}}$. That is
there is a continuous
$\tilde{f}:\overline{\Omega_{1}}\longrightarrow\overline{\Omega_{2}}$ such
that $\tilde{f}|_{\Omega_{1}}=f$

We now state the lemma that leads to our main result.

######  Lemma 3.3.

With above notation

$\displaystyle{\min_{j\neq i}}r^{i}_{j}(z,\Omega)\leq
S_{\Omega,i}(z)\leq\displaystyle{\max_{j\neq i}}r^{i}_{j}(z,\Omega).$

###### Proof.

Left hand side of the inequality follows trially by observing that the
circular slit maps are candidates for squeezing problem with respect to the
boundary component $\partial\Delta$.
For the right hand side, without loss of generality we assume that $\Omega$ is
the extremal domain for the squeezing problem for $0\in\Omega$ with respect to
$\Gamma_{i}$. Due to the discussion on the proof of Proposition 3.1 outer
boundary of $\Omega$ must correspond to $\partial\Delta$. We’ll show that
$\mathnormal{dist}(0,\partial\Omega)$ must be less than or equal to
$\max_{j\neq i}r^{i}_{j}(z,\Omega)$. Let $\psi$ be the conformal map of
$\Omega$ onto a circular slit disc $C:=C_{i}(z,\Omega)$ fixing $0$ and
$\partial\Delta$. Without loss of generality assume that
${\psi}^{\prime}(z)>0$. Consider the function $g:=\dfrac{id}{{\psi}^{-1}}$ on
$C$. As ${\psi}^{-1}(z)=(\psi^{-1})^{\prime}(0)z+\mathscr{O}(z^{2})$ about $0$
we have that

$\displaystyle{\lim_{z\to 0}g(z)}=\displaystyle{\lim_{z\to
0}\dfrac{z}{{\psi}^{-1}(z)}=\dfrac{1}{({\psi}^{-1})^{\prime}(0)}}={\psi}^{\prime}(0).$

As $g$ is bounded near $0$ it extends to $C$ analytically. With an abuse of
notation, from now on we will use $g$ to denote its analytic extension.
Due to Proposition 2.1. ${\psi}^{\prime}(0)\geq 1$, therefore we must have
that $g(0)\geq 1$. If $g(0)=1$ then the mapping $\psi$ is identity. As
$\Omega$ is a circular slit disc we have that

$S_{\Omega,i}(0)=\min_{j\neq i}r^{i}_{j}(0,\Omega)\leq\max_{j\neq
i}r^{i}_{j}(0,\Omega).$

Now suppose $g(0)>1$. In this case $\Omega$ is not a circular slit disc. We
will show that $\mathnormal{dist}(0,\partial\Omega)\leq\max_{j\neq
i}r^{i}_{j}(0,\Omega)$.
For $k\in\mathbb{N}$ let $\varepsilon>0$ be small enough so that the curves
$\gamma_{j,k}:=\\{z\in
C|\mathnormal{dist}(0,\Gamma_{j})=\frac{\varepsilon}{k+1}\\}$ are disjoint
Jordan curves in $\Omega$. As ${\psi}^{-1}$ is injective, their images are
Jordan curves as well. Let $C_{k}$ be the domain bounded by $\partial\Delta$
and $\gamma_{j,k}$ for $k\in\mathbb{N}$ and $j\neq i,j\in\\{1,2...n\\}$. Due
to Carathedory’s theorem $(\psi)^{-1}$ extends continuously to
$\overline{C_{k}}$, then so does $g$. Maximum principle asserts that

$\sup_{\overline{C_{k}}}|g|=\sup_{\partial C_{k}}|g|.$

As $g(0)>1$ we must have $\exists z_{k}\in\partial C_{k}$ with $|g(z_{k})|>1$.
Noting that $\displaystyle{\lim_{x\longrightarrow z}|g(x)|}=1$ for all
$z\in\partial\Delta$ we can see that $\\{z_{k}\\}\in\partial
C_{k}\setminus\partial\Delta$. Moreover

$1<|g(z_{k})|\leq\dfrac{\max_{\partial
C_{k}\setminus\partial\Delta}|z|}{|{\psi}^{-1}(z_{k})|}.$

From (10) we can directly see that

$|{\psi}^{-1}(z_{k})|<\max_{\partial
C_{k}\setminus\partial\Delta}|z|=\dfrac{\varepsilon}{k+1}+\max_{j\neq
i}r^{i}_{j}(0,\Omega).$

It is clear from the definition of $C_{k}$ that any convergent subsequence of
$\\{z_{k}\\}$ must converge to $\partial C$. From (11) we obtain

$\displaystyle{\limsup|{\psi}^{-1}(z_{k})|}\leq\displaystyle{\lim_{k\to\infty}(\dfrac{\varepsilon}{k+1}+\max_{j\neq
i}r^{i}_{j}(0,\Omega))}=\max_{j\neq i}r^{i}_{j}(0,\Omega).$

By passing to a subsequence if necessary, we assume that $\\{z_{k}\\}$ is
convergent. Then the set of limit points of $\\{{\psi}^{-1}(z_{k})\\}$ must
belong to $\overline{\Delta_{\max_{j\neq i}r^{i}_{j}(0,\Omega)}}$. This shows
that $\mathnormal{dist}(0,\partial\Omega)\leq\max_{j\neq
i}r^{i}_{j}(0,\Omega)$, we obtain the following inequality, establishing the
lemma

$S_{\Omega,i}(0)\leq\max_{j\neq i}r^{i}_{j}(0,\Omega).$

∎

######  Remark 3.4.

If $\min_{j\neq i}r^{i}_{j}(0,\Omega)\neq\max_{j\neq i}r^{i}_{j}(0,\Omega)$
then the inequality on the right hand side of (9) is strict. To see this
suppose that $\min_{j\neq i}r^{i}_{j}(0,\Omega)\neq\max_{j\neq
i}r^{i}_{j}(0,\Omega)$ and $\Omega$ is the extremal domain for the squeezing
problem for $0\in\Omega$ towards the boundary component
$\Gamma_{i}=\partial\Delta$. If $\Omega$ is the circular slit disc, then
clearly the inequality is strict. If not then at $0$, norm of the derivative
of the circular slit mapping $\psi$ fixing $\partial\Delta$ is strictly less
then $1$. As in the proof of lemma, suppose that

$\left\lvert\frac{1}{{{\psi}^{-1}}^{\prime}(0)}\right\rvert=\alpha>1$

Defining $g(z)=\dfrac{2z}{(\alpha+1){\psi}^{-1}(z)}$ and applying the same
argument in the proof of the previous lemma shows that

$\mathnormal{dist}(0,\partial\Omega)\leq(\dfrac{2}{\alpha+1})\max_{j\neq
i}r^{i}_{j}(0,\Omega)<\max_{j\neq i}r^{i}_{j}(0,\Omega)$

######  Remark 3.5.

If $\Omega$ is a circular slit disc with slits lying on the same circle, the
method in the previous proof shows that $\Omega$ is an extremal domain for
squeezing problem for $0\in\Omega$ towards the boundary component
$\partial\Delta$. Following the argument in the last remark we can see that
there are not any other extremal domains, excluding rotations of $\Omega$ of
course, therefore we recover Lemma 1 in [16].

Proof of Theorem 1.2
It is clear that if $f\in\tilde{\mathscr{U}}(\Omega)$ then $f$ must belong to
some $\tilde{\mathscr{{\mathscr{U}}}}_{\Gamma_{i}}(\Omega)$. In other words,
we have that

$\tilde{\mathscr{U}}(\Omega)=\displaystyle{\bigcup_{i\in\\{1,2...n\\}}\tilde{\mathscr{{\mathscr{U}}}}_{\Gamma_{i}}(\Omega)}.$

It follows that $S_{\Omega}(z)=\max_{i}S_{\Omega,i}(z)$. Therefore, by Lemma
3.3, we have

$S_{\Omega}(z)=\max_{i}S_{\Omega,i}(z)\leq\max_{i}\max_{j\neq
i}r^{i}_{j}(z,\Omega).$

Left hand side of the inequality follows trivially from Lemma 3.3. $\square$

Proof of Theorem 1.1
As doubly connected domains with non-degenerate boundary are biholomorphic to
annuli, we will discuss the case for the annulus $\mathbb{A}_{r}$. Set
$\Gamma_{1}=\partial\Delta$ and $\Gamma_{2}=\partial\Delta_{r}$. Remark 2.3
shows that $\forall z\in\mathbb{A}_{r}$, $r^{1}_{2}(z,\mathbb{A}_{r})=|z|$. To
get $r^{2}_{1}(z,\mathbb{A}_{r})$ we apply $f(z)=\dfrac{\sqrt{r}}{z}\in
Aut(\mathbb{A}_{r})$. As $z$ is mapped to $\dfrac{\sqrt{r}}{z}$ and
$\Gamma_{2}$ is mapped to $\Gamma_{1}$, it again follows from Remark 2.3 that
$r^{2}_{1}(z,\mathbb{A}_{r})=\left\lvert\dfrac{\sqrt{r}}{z}\right\rvert$. Then
we obtain

$S_{\mathbb{A}_{r}}(z)=\max\\{r^{1}_{2}(z,\mathbb{A}_{r}),r^{2}_{1}(z,\mathbb{A}_{r}\\}=\max\\{|z|,\left\lvert\dfrac{\sqrt{r}}{z}\right\rvert\\}.$

Remark 3.5, shows that the circularly slit discs considered are the only
possible extremal domains for this problem, proving the uniqueness part as
well. $\square$

## References

  * [1] Deng, F., Guan, Q., and Zhang, L. (2016). Properties of squeezing functions and global transformations of bounded domains. Transactions of the American Mathematical Society, 368(4), 2679-2696.
  * [2] Deng, F., Guan, Q., and Zhang, L. (2012). Some properties of squeezing functions on bounded domains. Pacific Journal of Mathematics, 257(2), 319-341.
  * [3] Deng, F., and Zhang, X. J. (2019). Fridman’s invariant, squeezing functions, and exhausting domains. Acta Mathematica Sinica, English Series, 35(10), 1723-1728.
  * [4] Fornæss, J. E., and Rong, F. (2018). Estimate of the squeezing function for a class of bounded domains. Mathematische Annalen, 371(3), 1087-1094.
  * [5] Diederich, K., Fornæss, J. E., and Wold, E. F. (2016). A characterization of the ball in $\mathbb{C}^{n}$. International Journal of Mathematics, 27(09), 1650078.
  * [6] Fornæss, J. E., and Shcherbina, N. (2018). A domain with non-plurisubharmonic squeezing function. The Journal of Geometric Analysis, 28(1), 13-21.
  * [7] Fornæss, J. E., and Wold, E. F. (2015). An estimate for the squeezing function and estimates of invariant metrics. In Complex analysis and geometry (pp. 135-147). Springer, Tokyo.
  * [8] Gumenyuk, P., and Roth, O. (2020). On the squeezing function for finitely connected planar domains. arXiv preprint arXiv:2011.13734.
  * [9] Jenkins, J. A. (2013). Univalent functions and conformal mapping (Vol. 18). Springer-Verlag.
  * [10] Krantz, S. G., and Epstein, C. L. (2006). Geometric function theory: explorations in complex analysis. Springer Science and Business Media.
  * [11] Liu, K., Sun, X., and Yau, S. T. (2004). Canonical metrics on the moduli space of Riemann surfaces. I. J. Differential Geom, 68(3), 571-637.
  * [12] Liu, K., Sun, X., and Yau, S. T. (2005). Canonical metrics on the moduli space of Riemann surfaces II. Journal of Differential Geometry, 69(1), 163-216.
  * [13] Ng, T. W., Tang, C. C., and Tsai, J. (2020). Fridman Function, Injectivity Radius Function and Squeezing Function. arXiv preprint arXiv:2012.13159.
  * [14] Ng, T. W., Tang, C. C., and Tsai, J. (2020). The squeezing function on doubly-connected domains via the Loewner differential equation. Mathematische Annalen, 1-26.
  * [15] Rong, F., and Yang, S. (2020). On the comparison of the Fridman invariant and the squeezing function. Complex Variables and Elliptic Equations, 1-6.
  * [16] Solynin, A. Y. (2021). A note on the squeezing function. arXiv preprint arXiv:2101.03361.
  * [17] Yeung, S. K. (2009). Geometry of domains with the uniform squeezing property. Advances in Mathematics, 221(2), 547-569.
  * [18] Zimmer, A. (2018). A gap theorem for the complex geometry of convex domains. Transactions of the American Mathematical Society, 370(10), 7489-7509.