# Tensor Factorization for Leveraging Cross-Modal Knowledge in Data-
Constrained Infrared Object Detection

Manish Sharma1∗ Moitreya Chatterjee2 Kuan-Chuan Peng2 Suhas Lohit2 Michael
Jones2
1Rochester Institute of Technology, NY 14623, USA
2Mitsubishi Electric Research Laboratories, Cambridge, MA 02139, USA
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Equal Contributions. Work done while interning at MERL.

###### Abstract

While state-of-the-art object detection methods have reached some level of
maturity for regular RGB images, there is still some distance to be covered
before these methods perform comparably on Infrared (IR) images. The primary
bottleneck towards accomplishing this goal is the lack of sufficient labeled
training data in the IR modality, owing to the cost of acquiring such data.
Realizing that object detection methods for the RGB modality are quite robust
(at least for some commonplace classes, like person, car, etc.), thanks to the
giant training sets that exist, in this work we seek to leverage cues from the
RGB modality to scale object detectors to the IR modality, while preserving
model performance in the RGB modality. At the core of our method, is a novel
tensor decomposition method called _TensorFact_ which splits the convolution
kernels of a layer of a Convolutional Neural Network (CNN) into low-rank
factor matrices, with fewer parameters than the original CNN. We first pre-
train these factor matrices on the RGB modality, for which plenty of training
data are assumed to exist and then augment only a few trainable parameters for
training on the IR modality – to avoid over-fitting, while encouraging them to
capture complementary cues from those trained only on the RGB modality. We
validate our approach empirically by first assessing how well our _TensorFact_
decomposed network performs at the task of detecting objects in RGB images
vis-á-vis the original network and then look at how well it adapts to IR
images of the FLIR ADAS v1 dataset. For the latter, we train models under
scenarios that pose challenges stemming from data paucity. From the
experiments, we observe that: (i) _TensorFact_ shows performance gains on RGB
images; (ii) further, this pre-trained model, when fine-tuned, outperforms a
standard state-of-the-art object detector on the FLIR ADAS v1 dataset by about
$4\%$ in terms of mAP 50 score.

##  1 Introduction

Figure 1: Qualitative comparison of object detections by a state-of-the-art
object detector (denoted as baseline) [51] and our TensorFact method on IR
images. The orange, cyan, green boxes denote bicycle, person, and car classes
respectively, while the associated numbers denote the confidence score of the
prediction. The visualizations show that our proposed approach is better at
capturing more objects, especially those that are of a smaller size, with
higher precision.

The success of deep neural networks in core computer vision tasks, such as
image denoising [42], image classification [44], object detection [8, 40],
_etc_. can at least in part be attributed to the availability of large-scale
labeled training data [46], which allows these models (with lots of
parameters) to avoid over-fitting [11]. This has resulted in wide-ranging
applicability of these methods in tasks such as pedestrian detection in
vehicles [35], face detection [48], vehicle counting [57], _etc_.

One key element that made such large-scale data available, is the ubiquity of
good quality RGB cameras, which come at throwaway prices. This coupled with
the popularity of online platforms for sharing content widely, including
social media sites such as YouTube or Meta, meant that sharing such images at
a large-scale became commonplace.

However, from the standpoint of certain applications, such as autonomous
driving, regular RGB images fall short on some important counts. For instance,
while RGB images can provide clear visualization of the surroundings during
the day, at night, RGB images are only useful if there is sufficient street
lighting, _etc_. In scenarios where the ambient light is insufficient, passive
thermal Infrared (IR) cameras come in handy for tasks such as pedestrian
detection, as thermal IR sensors capture scenes at wavelengths beyond the
visible spectrum and are sensitive to warm objects, such as the human body
[4]. Nonetheless, one catch that remains is that IR cameras are not as cheap
as their RGB counterparts and are thus not as ubiquitous. This poses a major
hurdle in acquiring the profuse amounts of images needed to train deep
networks that could operate on IR images at performance levels similar to
their RGB counterparts. In such conditions, an overparameterized model results
in overfitting, which has an impact on model generalisation and performance.
Therefore, a reduction in the number of parameters may be needed for improved
performance. Low-rank factorization methods are among the most popular methods
towards this end and are utilized for different deep learning applications
[41, 22, 23].

While the success of deep neural networks today spans several computer vision
tasks, the task of object detection is of particular interest in this paper.
The task entails localizing the pixels which an object occupies in an image as
well as labeling the cluster of pixels with the class to which the said object
belongs. Solving this task is crucial, since it permits acquiring a greater
understanding of what an image contains and is often a first step towards
understanding the scene [32]. Given the importance of IR images, as a modality
for the task of scene understanding, designing effective object detection
models that work on such data becomes critical. Nonetheless, the paucity of
sufficient training data (_i.e_., datasets with lots of IR images) continues
to present a challenge to this end.

In this work, we leverage the observation that while sufficient training data
in the IR modality may be difficult to find, such data for the RGB modality is
easily available. The key idea in our approach then, is to train an object
detection model in the RGB modality and to then transfer the common cross-
modal cues to the IR modality where only a few parameters can be trained to
capture the complementary cues necessary for successfully detecting objects in
the IR image space. Concretely, we devise a novel method called _TensorFact_ ,
which splits the convolution kernel weights of a CNN layer into low-rank
factor matrices, with fewer trainable parameters. These factor matrices can be
trained to capture the common cues for detecting objects, across modalities,
by leveraging the RGB data. These weights can then be augmented with only a
few, new learnable parameters to capture the cues specific to the IR modality.
This design allows us to train only the relatively small number of IR
modality-specific weights when training with IR images, allowing us to prevent
over-fitting. Note that naïvely applying domain adaptation methods [1] to
transfer from RGB to IR modality fails because here the modality itself
switches between the source (RGB) and the target (IR) which represents a big
shift in the data distribution.

We conduct experiments on the FLIR ADAS v1 dataset [49] of IR images to
empirically validate the efficacy of our method. To derive the common object
detection cues from RGB images, we use the FLIR Aligned RGB [13] images. Our
experiments show that _TensorFact_ decomposition assists with achieving better
object detection performance both on RGB and IR images, even when the latter
has few training samples. In particular, in the IR dataset (FLIR ADAS v1), our
method outperforms a competing state-of-the-art object detection model [51] by
$4\%$ on mAP 50, underscoring the efficacy of our method. Figure 1 contrasts
detections obtained by our method in comparison to a recent state-of-the-art
detection baseline, YOLOv7 [51], on the FLIR ADAS v1 dataset. From the figure,
we see that our approach is more capable of detecting objects of different
sizes, compared to the state-of-the-art approach.

We summarize below the core contributions of our work.

  * •

We present _TensorFact_ , a novel tensor decomposition-based method that can
leverage both modality-specific and cross-modal cues for effective object
detection in the IR modality, where acquiring sufficient training data is a
challenge.

  * •

Our experiments reveal that our proposed method outperforms competing
approaches at the task of object detection in a data sparse IR modality, with
only 62 training images, by $4\%$ on mAP 50.

  * •

Our formulation also offers a supplementary contribution to the RGB modality,
yielding a compressed neural network that improves object detection in this
modality.

##  2 Related works

In this section, we discuss relevant prior works to our paper and present the
distinction between these approaches and our method.

Object detection approaches in IR images: The journey of object detection in
RGB images, using deep learning, has come a long way [38, 36, 41, 51]. The
inception of a two-stage object detection process involving proposal
generation and object class prediction, initiated by the work of Girshick _et
al_. [16] for RGB images, laid the foundation for the field. However, the
computational intensity of the process necessitated faster successors [15, 38,
50, 18, 47]. However, porting these approaches to the realm of IR image object
detection, has posed certain challenges. The study by Ghose _et al_. [14] and
Devagupta _et al_. [7] sought to enhance infrared image features using
saliency maps and multimodal Faster R-CNN, respectively. These efforts,
however, encountered challenges such as slow inference speed, non end-to-end
multitask training, and a lack of general applicability across different
datasets.

To overcome the limitations of two-stage detectors, the work by Redmon and
Farhadi [36] introduced a one-stage detector, YOLO, which considered each
image cell as a proposal for object detection and achieved end-to-end real-
time detection. YOLO’s evolution into YOLOv3 [37], YOLOv4 [3], and its
subsequent variants, as documented by Kristo _et al_. [26], has accelerated
the detection of objects both in RGB and IR images, though issues of omission
of small-scale objects and low detection accuracy persist.

Innovative modifications like the SE block in SE-YOLO [27] and the attention
module, CIoU loss, improved Soft-NMS, and depthwise separable convolution in
YOLO-ACN [31] were proposed to improve detection accuracy, but they still
grapple with challenges like large parameter sizes and applicability to
embedded settings.

Other one-stage models have been explored, including ThermalDet [5] and TIRNet
[6], each of which offers different solutions to the aforesaid problems but
falls short when tested in real-world, non-curated datasets. Song _et al_.
[45] proposed a multispectral feature fusion network based on YOLOv3, showing
promise for smaller-sized images.

The YOLO series has shown considerable potential for IR object detection and
several variants to it have been proposed. This includes the network of
Shuigen _et al_. [43], an attention mechanism-infused YOLOv3 [14], and a
YOLOv3 enhanced with a category balance loss term [30]. Further refinements in
object detection have been achieved by using the SAF architecture [34] and the
YOLO-FIRI model [29], which incorporate optimization parameters, introduce
dilated convolutional block attention modules, and enable the detection of
smaller IR targets. Zhao _et al_. [58] and Du _et al_. [10] have contributed
to the field by improving the fusion method of YOLOv3 and leveraging YOLOv4 to
enhance IR target features, respectively, paving a promising path for future
IR object detection research. While we consider these models for designing the
backbone of our proposed approach but none of them provide a way to mitigate
the data paucity issue in the IR modality which we address front and center.

Domain adaptation methods: The community has explored domain adaptation
methods to overcome the challenges associated with less training data in
certain domains. Towards this end, several works have been proposed [17, 54,
39, 56, 53], which include those that progressively transition from one domain
to another [21], or transition through multiple levels of granularity [59], or
use semi-supervised [52, 9] or unsupervised learning [55, 28] techniques for
the same. Nonetheless, these approaches tackle scenarios which represent
reasonably minor shifts in the domain of the input data, say from clear RGB
images to foggy RGB images [12] and so on. However, our task, deals with much
larger-scale shifts in the type of input, in particular from RGB to IR
modalities. The change is so stark that certain objects are visible in a given
modality, only under specific scenarios. For instance, warm-bodied, dimly lit
objects are visible only in the IR images but are very difficult to see in RGB
images. This prevents us from trivially adapting these approaches for our
task. While some more recent methods have looked into domain adaptation
techniques for IR detection tasks, these are fairly limited in scope [24, 20]
and focus mostly on detecting people, not other classes. Importantly, none of
these approaches simulate the training data paucity scenario, for the IR
modality, something we consider in this work.

##  3 Proposed approach

In this work, we propose _TensorFact_ – a novel tensor decomposition-based
method designed to tackle the paucity of labeled training data in the IR
modality. It effectively leverages knowledge learned from the RGB modality,
where training data is abundant, and efficiently transfers this knowledge to
the IR modality, overcoming the data scarcity challenge. Initially, we learn
two trainable low-rank factor-matrices, the product of which yields the
weights for each layer of the CNN and task them with detecting objects in the
source RGB modality. This representation cuts down on the number of learnable
parameters in the network and facilitates the training of a more generalizable
network (due to less over-fitting) on the RGB modality. Following this, in
order to facilitate object detection in the IR modality, we enhance the
network’s capability by a minor expansion of the number of trainable
parameters. This is achieved by increasing the number of the columns/rows of
the factor matrices. The factor matrices that emerge from the increased
columns/rows effectively serve as a parallel trainable branch, enabling the
network to leverage the complementary information gleaned from the RGB
modality for object detection in the IR modality. In this way, _TensorFact_
affords us a practical solution to the challenge of limited training data in
the IR modality, demonstrating how robust and transferable features can be
effectively extracted and utilized across different modalities.

###  3.1 Notation

In this paper, we utilize the following conventions: lowercase letters such as
$x$ denotes scalar variables, vectors are symbolized by boldface lowercase
letters like $\mathbf{x}$, and matrices are depicted by boldface uppercase
letters such as $\mathbf{X}$. Tensors, on the other hand, are indicated by
calligraphic uppercase letters (for instance, $\pazocal{X}$). $\mathbb{R}$
denotes the set of real numbers. To illustrate a component of a vector,
matrix, or tensor, we adopt the $[\cdot]_{i}$ notation, where $i$ represents a
set of indices for that component.

Figure 2: Decomposed convolutional layer.

###  3.2 Decomposed convolution layer

The weights of a convolutional layer in a CNN, denoted by
$\pazocal{K}\in\mathbb{R}^{T\times S\times D_{2}\times D_{1}}$, is a $4$-way
tensor, where $D_{1}$ and $D_{2}$ represent the width and height,
respectively, of the spatial window of the convolution kernels, while $S$ and
$T$ denote the number of input channels of the input to the layer and the
number of kernels learned in the layer. The number of trainable parameters in
a standard convolutional layer is then given by $P=TSD_{2}D_{1}$.

For a decomposed convolutional layer, we commence with two trainable factors
$\mathbf{A}\in\mathbb{R}^{TS\times r}$ and $\mathbf{B}\in\mathbb{R}^{r\times
D_{2}D_{1}}$ with $r$ serving as their inner dimension, as shown in Figure 2,
denoting the rank of the original weight matrix (prior to decomposition).
These combine to form the intermediate matrix
$\mathbf{M}=\mathbf{A}\mathbf{B}$, as follows:

$[\mathbf{M}]_{p,q}=\sum_{c=1}^{r}[\mathbf{A}]_{p,c}[\mathbf{B}]_{c,q},$ (1)

where, $p=1,\ldots,TS$ and $q=1,\ldots,D_{2}D_{1}$. This matrix $\mathbf{M}$,
operates on the input to the layer. The convolutional filter $\pazocal{K}$, is
derived from $\mathbf{M}$ as:

$[\pazocal{K}]_{t,s,d_{2},d_{1}}=[\mathbf{M}]_{(t-1)S+s,(d_{2}-1)D_{1}+d_{1}},$
(2)

where, $t=1,\ldots,T$, $s=1,\ldots,S$, $d_{2}=1,\ldots,D_{2}$, and
$d_{1}=1,\ldots,D_{1}$. Therefore, the number of trainable parameters in the
decomposed convolutional layer formulation, $P_{fac}$, is a function of $r$,
resulting in $P_{fac}=r(TS+D_{2}D_{1})$ trainable parameters. The value of $r$
can be altered to adapt to the necessary CNN complexity but typically
$r\leq\text{rank}(\mathbf{M})$. Since CNNs are known to be over-parameterized
[11], one could choose $r$ such that the number of learnable parameters is
fewer than that in $\mathbf{M}$, to avoid the risk of over-fitting.

###  3.3 Capacity augmentation

To augment the network capacity to accommodate the new modality, we increase
$r$ by $\Delta{r}$ (where $\Delta{r}>0$) for both matrices $\mathbf{A}$ and
$\mathbf{B}$, thereby producing
$\mathbf{A^{\prime}}\in\mathbb{R}^{TS\times(r+\Delta{r})}$ and
$\mathbf{B^{\prime}}\in\mathbb{R}^{(r+\Delta{r})\times D_{2}D_{1}}$ with
$r+\Delta{r}$ serving as their new inner dimension. Now, $\mathbf{A^{\prime}}$
and $\mathbf{B^{\prime}}$ can be interpreted as
$\mathbf{A^{\prime}}=\begin{bmatrix}\mathbf{A}\
||\Delta{\mathbf{A}}\end{bmatrix}$ and
$\mathbf{B^{\prime}}=\begin{bmatrix}\mathbf{B}\
||\Delta{\mathbf{B}}\end{bmatrix}^{T}$ such that
$\Delta{\mathbf{A}}\in\mathbb{R}^{TS\times\Delta{r}}$ and
$\Delta{\mathbf{B}}\in\mathbb{R}^{\Delta{r}\times D_{2}D_{1}}$ and $||$
denotes concatenation. Subsequently, $\mathbf{A^{\prime}}$ and
$\mathbf{B^{\prime}}$ merge to form
$\mathbf{M^{\prime}}=\mathbf{A^{\prime}}\mathbf{B^{\prime}}=\mathbf{M}+\Delta{\mathbf{M}}$,
where $\Delta{\mathbf{M}}=\Delta{\mathbf{A}}\Delta{\mathbf{B}}$, as shown in
Figure 3. Similar to Equation 2, $\Delta{\pazocal{K}}\in\mathbb{R}^{T\times
S\times D_{2}\times D_{1}}$ can be derived from $\Delta{\mathbf{M}}$. Hence,
increasing $r$ by $\Delta{r}$ results in a parallel architectural branch, as
depicted in Figure 4. Therefore, the increase in the number of trainable
parameters in a decomposed convolutional layer after capacity augmentation is
given by $\Delta{P_{fac}}=\Delta{r}(TS+D_{2}D_{1})$. We seek to augment as few
parameters as possible to ensure the detection network does not suffer from
challenges related to over-fitting in the new modality. In particular, we
ensure that the total number of network parameters (considering those trained
using only RGB and the augmented set) of our proposed framework, is less than
the original unfactorized network.

Figure 3: Decomposed convolutional layer with capacity augmentation.

###  3.4 Training

For an object detector CNN with $L$ convolutional layers, let $\mathbf{A}_{l}$
and $\mathbf{B}_{l}$ represent the left and right factor matrices,
respectively, for the $l^{th}$ decomposed convolutional layer, with $r_{l}$
representing their inner-dimension and $l=1,\ldots,L$. When training for the
data-rich source RGB modality, the network weights for the decomposed
convolutional layers are SVD-initialized, leading to orthogonal column and row
vectors in $\mathbf{A}_{l}$ and $\mathbf{B}_{l}$, respectively, with
$r_{l}=\lfloor\alpha r_{l}^{max}\rfloor$. Here,
$r_{l}^{max}=\min(TS,D_{2}D_{1})_{l}$ and $\alpha\in(0,1)$ controls the number
of the trainable parameters across layers. With $\alpha\leq 1$, the training
process is straightforward and similar to a typical object detector network,
leading to the learning of both generic and modality-specific features for the
RGB data.

Next, to train for the data-scarce IR modality, we augment the network
capacity by increasing the value of $\alpha$, which introduces new trainable
parameters and creates a parallel path for each decomposed convolutional
layer. During this training phase, we freeze the trainable parameters learned
during the training of the RGB modality, thereby architecturally promoting the
learning of complementary features for the IR modality branch. Akin to skip-
connections in ResNets [19], which permits the learning of residual mapping,
our proposed method leverages cross-modal cues and promotes the learning of
features specific to the IR modality that were not learned during RGB modality
training. As the factor matrices trained on the RGB data capture several cues
essential for object detection, only a small percentage of augmented capacity
is required for capturing the facets of object detection in the IR modality.
This is an essential requirement to train the model without over-fitting in a
data-scarce modality. Additionally, to explicitly capture complementary cues
between the RGB and IR modalities, we maximize the $L_{2}$ or $L_{1}$
distances between the feature activation maps that are output from each branch
(RGB and IR) of a layer and have it as an additional term in the training
objective for the task. This can be implemented by the following loss $L_{c}$:

$L_{c}=-||\pazocal{K}*\pazocal{X}-\Delta{\pazocal{K}}*\pazocal{X}||_{p},$ (3)

where $p=\\{1,2\\}$ and $*$ denotes convolution. Note that the dimensions of
$\pazocal{K}$ and $\Delta{\pazocal{K}}$ are the same. The final loss function
$L_{f}$ of _TensorFact_ can be written as follows:

$L_{f}=L_{d}+\omega_{c}L_{c},$ (4)

where $L_{d}$ is the object detection loss used in YOLOv7 [51], and
$\omega_{c}$ is the weight of $L_{c}$. We minimize this loss using the ADAM
optimizer [25].

Figure 4: The flow of data in our proposed  _TensorFact_ approach in every
layer. The input $\pazocal{X}$ convolves with $\pazocal{K}$ (top branch) and
$\Delta{\pazocal{K}}$ (bottom branch) and results in output $\pazocal{Y}$
after summation.

##  4 Experiments

In this section we layout the empirical evaluation that we conducted to
validate the efficacy of our proposed approach.

Figure 5: Comparison of object detection results between the state-of-the-art
YOLOv7 [51] and our proposed approach. We show the ground truth (left column),
baseline (middle column), and proposed method’s ($\alpha=0.1$, right column)
detections as rectangular bounding boxes. We show detections on two different
images from the FLIR ADAS v1 IR validation dataset, one in each row. The
orange, cyan, green boxes denote bicycle, person, and car classes
respectively, while the associated numbers denote the confidence score of the
prediction.  Figure 6: Comparison of object detection results for the proposed
method without (left column) and with (right column) $L_{1}$ regularization.
The orange, cyan, green boxes denote bicycle, person, and car classes
respectively, while the associated numbers denote the confidence score of the
prediction. We obtain better object detections using the $L_{1}$
regularization, as compared to the vanilla model, as manifested by the higher
confidence scores for the predicted bounding boxes.

###  4.1 Experimental setup

Datasets: In our object detection experiments, we make use of two datasets:
FLIR Aligned [13] and FLIR ADAS v1 [49]. The FLIR Aligned dataset contains RGB
images, with ground-truth comprising bounding-box coordinates around objects
in the image as well as class labels. This dataset includes $4129$ images for
training and $1013$ images for validation, and features three classes: person,
bicycle, and car, with the distribution of instances provided in Table 1.

The FLIR ADAS v1 dataset is a dataset of IR images. The ground-truth for this
dataset, includes bounding-box coordinates around objects in the image and
their class labels, from among: person, bicycle, and car. The dataset includes
$7859$ images for training and $1360$ images for validation. However, for fair
comparative studies, we split the training set into train and validation
splits in an 80:20 train-validation ratio to create new, randomly selected
train and validation sets consisting of $6287$ and $1572$ images,
respectively. To mimic a data-scarce environment, we use randomly selected
$62$ images ($1\%$ of images) from the training set. Table 2 details the
distribution of the FLIR ADAS v1 IR dataset classes, as used in our
experiment.

Class | Training Instances | Validation Instances
---|---|---
Person | $8987$ | $4107$
Bicycle | $2566$ | $360$
Car | $20608$ | $4124$
Table 1: Distribution of class instances for training and validation sets for FLIR Aligned RGB dataset [13]. Class | Training Instances | Validation Instances
---|---|---
Person | $161$ | $4611$
Bicycle | $24$ | $842$
Car | $351$ | $8472$
Table 2: Distribution of class instances for training ($1\%$) and validation
sets for FLIR ADAS v1 IR dataset [49].

Baseline network and evaluation metrics: We use YOLOv7 [51], a state-of-the-
art object detector with over 37M trainable parameters as our baseline
network. To determine appropriate anchor box sizes for the detector, we use
K-Means++ method [2].

In evaluating the performance of our object detection model, we employed the
Mean Average Precision (mAP), a widely-used and robust metric in the field.
mAP considers both precision and recall, ensuring a balance between detecting
as many objects as possible and minimizing false positives. This is achieved
by generating Precision-Recall (PR) curves for each object class in two
different settings. In the first, the Intersection Over Union (IoU) between
predicted and ground truth bounding boxes is set to larger than 0.5, for it to
be counted as a true positive prediction, while in the second setting,
multiple evaluations are performed with increasing thresholds from 0.5 to 0.95
in increments of 0.05. The Average Precision (AP) is then calculated as the
area under each PR curve for every class, under each of these settings. We
then take the mean of these APs, across the different classes, to get the mAP.
The IoU threshold of 0.5, is used for the mAP 50 metric, while the range of
IoU thresholds from 0.5 to 0.95 (in steps of 0.05) is used for the mAP 50-95
metric.

Implementation details: We train all models for $200$ epochs, with mini-batch
size of $40$ images, where the gradients are accumulated over $2$ mini-batch
iterations prior to parameter update. We use the ADAM optimizer [25] with a
learning rate of $10^{-5}$ when training on the RGB modality and $10^{-3}$
when training on the IR modality. We use “reduce on plateau" as the learning
rate scheduler, that reduces learning rate by a factor of $0.1$ if the
validation loss does not improve over $10$ epochs. Rather than initializing
the RGB network from scratch, we initialize it with the pre-trained weights
for detecting objects in the MS-COCO dataset [33]. When explicitly encouraging
complementarity between the RGB and IR branches, we set the weight
$\omega_{c}=0.01$ in Eq. 4 such that both terms have comparable range.

###  4.2 Results and analysis

Model | # Parameters$\downarrow$ | Compression ($\%$)$\uparrow$ | mAP 50$\uparrow$ | mAP 50-95$\uparrow$
---|---|---|---|---
Baseline | 37,205,480 | 0 | $0.6826$ | 0.3173
_TensorFact_ ($\alpha=0.9$) | 35,400,800 | $4.8506$ | 0.6948 | $0.3162$
_TensorFact_ ($\alpha=0.8$) | 33,594,257 | 9.7062 | $0.6879$ | $0.3168$

Table 3: Results for FLIR Aligned RGB validation dataset.

Model | # Trainable Params$\downarrow$ | Compression ($\%$)$\uparrow$ | mAP 50$\uparrow$ | mAP 50-95$\uparrow$
---|---|---|---|---
Baseline | 37,205,480 | 0 | $0.5849$ | $0.2807$
_TensorFact_ ($\alpha=0.1$) | 1,856,343 | 95.01 | $0.6205$ | 0.2807
_TensorFact_ ($\alpha=0.2$) | 3,662,886 | $90.16$ | 0.6213 | $0.2794$

Table 4: Results for FLIR ADAS v1 IR validation dataset.

In Table 3, we present the evaluation results of the proposed and baseline
methods for the FLIR Aligned RGB validation dataset for the task of object
detection in RGB images. From the table, we observe that our proposed method
demonstrates comparable, if not superior, performance to the baseline model in
terms of both mAP 50 and mAP 50-95 evaluation metrics, across varying values
of $\alpha$. Interestingly, while reduction in the value of $\alpha$ leads to
significant compression in the model’s size, our proposed method successfully
maintains, and in certain instances enhances, model performance. We
hypothesize that this is because the decrease of the trainable parameters
reduces the chance of over-fitting.

Table 4 presents the comparison results between the baseline and the proposed
_TensorFact_ method on the FLIR ADAS v1 IR validation dataset. For the
proposed _TensorFact_ method, we employ two different $\alpha$ configurations,
$0.1$ and $0.2$, such that the ratios $\\{\Delta
r_{l}\mathrel{\mathop{\mathchar 58\relax}}r_{l}\\}_{l=1}^{L}$ are
$1\mathrel{\mathop{\mathchar 58\relax}}9$ and $1\mathrel{\mathop{\mathchar
58\relax}}4$, respectively, for $l=1,2,\ldots,L$. We observe that both
proposed model configurations outperform the baseline on the mAP 50 evaluation
metric, with only a few additional trainable parameters in the IR branch.
These results underscore the potential of our proposed method to efficiently
learn and generalize with significantly fewer trainable parameters in a data-
scarce environment like the IR modality, while leveraging cross-modal cues
from the data-rich RGB modality.

Lastly, in Table 5, we present results for augmenting the training objective
with an explicit complementarity criterion, for $\alpha=0.1$ on the FLIR ADAS
v1 IR validation dataset to determine the impact of regularization to promote
learning of complementary features for the IR modality beyond the pre-trained
RGB modality. We observe that both $L_{1}$ and $L_{2}$ regularization methods
show slight improvements in detection performance compared to the model
without explicit regularization.

Regularization | mAP 50$\uparrow$ | mAP 50-95$\uparrow$
---|---|---
none | $0.6205$ | $0.2807$
$L_{1}$ | 0.6234 | 0.2823
$L_{2}$ | $0.6222$ | $0.2815$
Table 5: Results for _TensorFact_ with explicit complementarity regularization
for $\alpha=0.1$ on FLIR ADAS v1 IR validation dataset.

Qualitative results: In Figure 5, we compare the object detection results
using the ground truth (left column), baseline (middle column), and proposed
methods ($\alpha=0.1$, right column). The results are displayed vertically for
two different images from the FLIR ADAS v1 IR validation dataset. We observe
that the baseline method fails to detect small, distant objects and objects
with backgrounds of similar texture as the foreground, whereas the proposed
method accurately detects them. This shows that the proposed method is more
robust against false negatives relative to the baseline. Next, in Figure 6, we
compare the object detection results for the proposed method without (left
column) and with (right column) $L_{1}$ regularization and observe that this
explicit regularization leads to more confident bounding box detections.

##  5 Conclusions

In this work, we proposed _TensorFact_ – a novel approach for object detection
to be able to capture cross-modal cues so as to generalize better to
modalities with scarce training data. _TensorFact_ benefits from pre-training
on modalities where plenty of training data is available (such as RGB),
mitigating the challenges posed by the target modality (such as IR). In our
formulation, at first, the data-rich RGB modality is used to learn the common
cross-modal cues using low-rank tensor factorization of the network weights.
We then use the IR modality training data to only learn the cues complementary
to the RGB modality (either explicitly or implicitly), thereby requiring fewer
trainable parameters. We empirically validate the efficacy of our method on
the task of object detection in IR images by pre-training our network on RGB
object detection datasets and show that _TensorFact_ yields performance boosts
for object detection, in both RGB and IR images without an increase in the
total number of network parameters.

## References

  * [1] Sk Miraj Ahmed, Suhas Lohit, Kuan-Chuan Peng, Michael J Jones, and Amit K Roy-Chowdhury.  Cross-modal knowledge transfer without task-relevant source data.  In European Conference on Computer Vision, pages 111–127. Springer, 2022.
  * [2] David Arthur and Sergei Vassilvitskii.  K-means++ the advantages of careful seeding.  In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, pages 1027–1035, 2007.
  * [3] Alexey Bochkovskiy, Chien-Yao Wang, and Hong-Yuan Mark Liao.  YOLOv4: Optimal speed and accuracy of object detection.  arXiv preprint arXiv:2004.10934, 2020.
  * [4] Angela L Campbell, Rajesh R Naik, Laura Sowards, and Morley O Stone.  Biological infrared imaging and sensing.  Micron, 33(2):211–225, 2002.
  * [5] Yu Cao, Tong Zhou, Xinhua Zhu, and Yan Su.  Every feature counts: An improved one-stage detector in thermal imagery.  In 2019 IEEE 5th International Conference on Computer and Communications (ICCC), pages 1965–1969. IEEE, 2019.
  * [6] Xuerui Dai, Xue Yuan, and Xueye Wei.  TIRNet: Object detection in thermal infrared images for autonomous driving.  Applied Intelligence, 51:1244–1261, 2021.
  * [7] Chaitanya Devaguptapu, Ninad Akolekar, Manuj M Sharma, and Vineeth N Balasubramanian.  Borrow from anywhere: Pseudo multi-modal object detection in thermal imagery.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019.
  * [8] Mayur Dhanaraj, Manish Sharma, Tiyasa Sarkar, Srivallabha Karnam, Dimitris G Chachlakis, Raymond Ptucha, Panos P Markopoulos, and Eli Saber.  Vehicle detection from multi-modal aerial imagery using YOLOv3 with mid-level fusion.  In Big data II: learning, analytics, and applications, volume 11395, pages 22–32. SPIE, 2020.
  * [9] Jeff Donahue, Judy Hoffman, Erik Rodner, Kate Saenko, and Trevor Darrell.  Semi-supervised domain adaptation with instance constraints.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 668–675, 2013.
  * [10] Shuangjiang Du, Baofu Zhang, Pin Zhang, Peng Xiang, and Hong Xue.  FA-YOLO: An improved YOLO model for infrared occlusion object detection under confusing background.  Wireless Communications and Mobile Computing, 2021:1–10, 2021.
  * [11] Abhimanyu Dubey, Moitreya Chatterjee, and Narendra Ahuja.  Coreset-based neural network compression.  In Proceedings of the European Conference on Computer Vision (ECCV), pages 454–470, 2018.
  * [12] Özgür Erkent and Christian Laugier.  Semantic segmentation with unsupervised domain adaptation under varying weather conditions for autonomous vehicles.  IEEE Robotics and Automation Letters, 5(2):3580–3587, 2020.
  * [13] FLIR aligned.  FLIR Aligned Dataset, 2020.  Accessed: August 20, 2022.
  * [14] Debasmita Ghose, Shasvat M Desai, Sneha Bhattacharya, Deep Chakraborty, Madalina Fiterau, and Tauhidur Rahman.  Pedestrian detection in thermal images using saliency maps.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019.
  * [15] Ross Girshick.  Fast R-CNN.  In Proceedings of the IEEE international conference on computer vision, pages 1440–1448, 2015.
  * [16] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik.  Rich feature hierarchies for accurate object detection and semantic segmentation.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580–587, 2014.
  * [17] Dayan Guan, Jiaxing Huang, Aoran Xiao, Shijian Lu, and Yanpeng Cao.  Uncertainty-aware unsupervised domain adaptation in object detection.  IEEE Transactions on Multimedia, 24:2502–2514, 2021.
  * [18] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick.  Mask R-CNN.  In Proceedings of the IEEE international conference on computer vision, pages 2961–2969, 2017.
  * [19] 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.
  * [20] Christian Herrmann, Miriam Ruf, and Jürgen Beyerer.  CNN-based thermal infrared person detection by domain adaptation.  In Autonomous Systems: Sensors, Vehicles, Security, and the Internet of Everything, volume 10643, pages 38–43. SPIE, 2018.
  * [21] Han-Kai Hsu, Chun-Han Yao, Yi-Hsuan Tsai, Wei-Chih Hung, Hung-Yu Tseng, Maneesh Singh, and Ming-Hsuan Yang.  Progressive domain adaptation for object detection.  In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 749–757, 2020.
  * [22] Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al.  LoRA: Low-rank adaptation of large language models.  In International Conference on Learning Representations, 2021.
  * [23] Siddhartha Rao Kamalakara, Acyr Locatelli, Bharat Venkitesh, Jimmy Ba, Yarin Gal, and Aidan N Gomez.  Exploring low rank training of deep neural networks.  arXiv preprint arXiv:2209.13569, 2022.
  * [24] My Kieu, Andrew D Bagdanov, Marco Bertini, and Alberto Del Bimbo.  Task-conditioned domain adaptation for pedestrian detection in thermal imagery.  In European Conference on Computer Vision, pages 546–562. Springer, 2020.
  * [25] Diederik P Kingma and Jimmy Ba.  Adam: A method for stochastic optimization.  arXiv preprint arXiv:1412.6980, 2014.
  * [26] Mate Krišto, Marina Ivasic-Kos, and Miran Pobar.  Thermal object detection in difficult weather conditions using YOLO.  IEEE access, 8:125459–125476, 2020.
  * [27] M e Li, Tao Zhang, and W Cui.  Research of infrared small pedestrian target detection based on YOLOv3.  Infrared Technol, 42:176–181, 2020.
  * [28] Shuai Li, Jianqiang Huang, Xian-Sheng Hua, and Lei Zhang.  Category dictionary guided unsupervised domain adaptation for object detection.  In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 1949–1957, 2021.
  * [29] Shasha Li, Yongjun Li, Yao Li, Mengjun Li, and Xiaorong Xu.  YOLO-FIRI: Improved YOLOv5 for infrared image object detection.  IEEE access, 9:141861–141875, 2021.
  * [30] Wei Li.  Infrared image pedestrian detection via yolo-v3.  In 2021 IEEE 5th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), volume 5, pages 1052–1055. IEEE, 2021\.
  * [31] Yongjun Li, Shasha Li, Haohao Du, Lijia Chen, Dongming Zhang, and Yao Li.  YOLO-ACN: Focusing on small target and occluded object detection.  IEEE access, 8:227288–227303, 2020.
  * [32] Yikang Li, Wanli Ouyang, Bolei Zhou, Kun Wang, and Xiaogang Wang.  Scene graph generation from objects, phrases and region captions.  In Proceedings of the IEEE international conference on computer vision, pages 1261–1270, 2017.
  * [33] 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 Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13, pages 740–755. Springer, 2014.
  * [34] Samah AF Manssor, Shaoyuan Sun, Mohammed Abdalmajed, and Shima Ali.  Real-time human detection in thermal infrared imaging at night using enhanced Tiny-yolov3 network.  Journal of Real-Time Image Processing, pages 1–14, 2022.
  * [35] Wanli Ouyang and Xiaogang Wang.  Joint deep learning for pedestrian detection.  In Proceedings of the IEEE international conference on computer vision, pages 2056–2063, 2013.
  * [36] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi.  You only look once: Unified, real-time object detection.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779–788, 2016.
  * [37] Joseph Redmon and Ali Farhadi.  YOLOv3: An incremental improvement.  arXiv preprint arXiv:1804.02767, 2018.
  * [38] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun.  Faster R-CNN: Towards real-time object detection with region proposal networks.  Advances in neural information processing systems, 28, 2015.
  * [39] Adrian Lopez Rodriguez and Krystian Mikolajczyk.  Domain adaptation for object detection via style consistency.  arXiv preprint arXiv:1911.10033, 2019.
  * [40] Manish Sharma, Mayur Dhanaraj, Srivallabha Karnam, Dimitris G Chachlakis, Raymond Ptucha, Panos P Markopoulos, and Eli Saber.  YOLOrs: Object detection in multimodal remote sensing imagery.  IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 14:1497–1508, 2020.
  * [41] Manish Sharma, Panos P Markopoulos, and Eli Saber.  Yolors-lite: A lightweight cnn for real-time object detection in remote-sensing.  In 2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS, pages 2604–2607. IEEE, 2021.
  * [42] Manish Sharma, Panos P Markopoulos, Eli Saber, M Salman Asif, and Ashley Prater-Bennette.  Convolutional auto-encoder with tensor-train factorization.  In Proceedings of the IEEE/CVF international conference on computer vision, pages 198–206, 2021.
  * [43] Wei Shuigen, Wang Chengwei, Chen Zhen, Z Congxuan, and Z Xiaoyu.  Infrared dim target detection based on human visual mechanism.  Acta Photonica Sinica, 50(1):0110001, 2021.
  * [44] Saurav Singh, Manish Sharma, Jamison Heard, Jesse D Lew, Eli Saber, and Panos P Markopoulos.  Multimodal aerial view object classification with disjoint unimodal feature extraction and fully-connected-layer fusion.  In Big Data V: Learning, Analytics, and Applications, volume 12522, page 1252206. SPIE, 2023.
  * [45] Xiaoru Song, Song Gao, and Chaobo Chen.  A multispectral feature fusion network for robust pedestrian detection.  Alexandria Engineering Journal, 60(1):73–85, 2021.
  * [46] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta.  Revisiting unreasonable effectiveness of data in deep learning era.  In Proceedings of the IEEE international conference on computer vision, pages 843–852, 2017.
  * [47] Peize Sun, Rufeng Zhang, Yi Jiang, Tao Kong, Chenfeng Xu, Wei Zhan, Masayoshi Tomizuka, Lei Li, Zehuan Yuan, Changhu Wang, et al.  Sparse R-CNN: End-to-end object detection with learnable proposals.  In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 14454–14463, 2021.
  * [48] Yi Sun, Ding Liang, Xiaogang Wang, and Xiaoou Tang.  DeepID3: Face recognition with very deep neural networks.  arXiv preprint arXiv:1502.00873, 2015.
  * [49] Teledyne Technologies Incorporated.  FLIR ADAS v1 Dataset, 2020.  Accessed: August 20, 2022.
  * [50] Evgeniya Ustinova and Victor Lempitsky.  Learning deep embeddings with histogram loss.  Advances in neural information processing systems, 29, 2016.
  * [51] Chien-Yao Wang, Alexey Bochkovskiy, and Hong-Yuan Mark Liao.  YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7464–7475, 2023.
  * [52] Yan Wang, Junbo Yin, Wei Li, Pascal Frossard, Ruigang Yang, and Jianbing Shen.  SSDA3D: Semi-supervised domain adaptation for 3D object detection from point cloud.  In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 2707–2715, 2023.
  * [53] Xing Wei, Shaofan Liu, Yaoci Xiang, Zhangling Duan, Chong Zhao, and Yang Lu.  Incremental learning based multi-domain adaptation for object detection.  Knowledge-Based Systems, 210:106420, 2020.
  * [54] Xingxu Yao, Sicheng Zhao, Pengfei Xu, and Jufeng Yang.  Multi-source domain adaptation for object detection.  In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3273–3282, 2021.
  * [55] Fuxun Yu, Di Wang, Yinpeng Chen, Nikolaos Karianakis, Tong Shen, Pei Yu, Dimitrios Lymberopoulos, Sidi Lu, Weisong Shi, and Xiang Chen.  Unsupervised domain adaptation for object detection via cross-domain semi-supervised learning.  arXiv preprint arXiv:1911.07158, 2019.
  * [56] Dan Zhang, Mao Ye, Yiguang Liu, Lin Xiong, and Lihua Zhou.  Multi-source unsupervised domain adaptation for object detection.  Information Fusion, 78:138–148, 2022.
  * [57] Shanghang Zhang, Guanhang Wu, Joao P Costeira, and José MF Moura.  FCN-rLSTM: Deep spatio-temporal neural networks for vehicle counting in city cameras.  In Proceedings of the IEEE international conference on computer vision, pages 3667–3676, 2017.
  * [58] Xiaofeng Zhao, Yebin Xu, Fei Wu, Wei Cai, and Zhili Zhang.  IYOLO: Multi-scale infrared target detection method based on bidirectional feature fusion.  In Journal of Physics: Conference Series, volume 1873, page 012020\. IOP Publishing, 2021.
  * [59] Wenzhang Zhou, Dawei Du, Libo Zhang, Tiejian Luo, and Yanjun Wu.  Multi-granularity alignment domain adaptation for object detection.  In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9581–9590, 2022.


We now prove <ref> by induction on $h$. If $h=1$, then <ref> follows from <ref> as $\Sigma_1=\Sigma_1^+$ by definition. Suppose then $h\geq 1$. We want to show that $\bigsqcup_{i=1}^{h+1} P_i=\bigsqcup_{\gamma\in\Sigma_{h+1}}\{\m F_\gamma(X,Y)\}$.
But $\Sigma_{h+1}=\Sigma_{h+1}^+\sqcup\tilde\Sigma_{h}$, so, by <ref> and inductive hypothesis, it suffices to show that

\[\bigsqcup_{\gamma\in\tilde\Sigma_{h}}\{\m F_\gamma(X,Y)\}=\bigsqcup_{\gamma\in\Sigma_{h}}\{\m F_\gamma(X,Y)\}.\]

But this easily follows from the definition of $\tilde\Sigma_{h}$ since $\m F_{\tilde\alpha}=\m F_\alpha$ for any $\alpha\in\Sigma_{\singpointnt_h,h}$ (Notation <ref>).

To prove <ref>, first note that from <ref>, for any $h\leq n$ the indexed set $P_h$ is non-empty. Then <ref> is implied by <ref> if for any $f_\ell\in P_n$, the polynomial $f|_\ell(X)=f_\ell(X,0)$ has no non-zero multiple roots. But this follows from <ref> since $\bar C_\alpha$ is regular for any $\alpha\in\Sigma_n$, and so $f|_\gamma$ has no multiple roots in $\bar k^\times$ for any $\gamma\in\Sigma_h^+$ as $D_\gamma=k[X_{j_\gamma}^{\pm 1}]$ in this case (Lemma <ref>). As already observed, this concludes the proof of Theorem <ref>.

§ SUPERELLIPTIC EQUATIONS

Let $k$ be a perfect field and let $\bar k$ be an algebraic closure of $k$. Denote by $G_k$ the absolute Galois group of $k$. As application of the construction presented in the previous sections, we consider a curve $C_{0,k}$ in $\G_{m,k}^2$ defined by an equation

\[y^s=h(x),\]

for some polynomial $h\in k[x]$ and some $s\in\Z_+$ not divisible by $\mathrm{char}(k)$. By convention the polynomial $f(x,y)$ defining $C_{0,k}$ will be $y^s-h(x)$.
Denote by $C_0$ the curve $C_{0,k}\times_{k}\bar k$.
Note that $C_0$ is smooth, but may be not connected, e.g. when $h(x)$ is an $s$-th power.

\[h(x)=\sum_{i=m_0}^d c_i x^i,\qquad c_i\in k,\]

where $c_{m_0}$ and $c_d$ are non-zero.
We want to study a Baker's resolution of $C_0$

\[\dots\stackrel{s_{n+1}}{\twoheadrightarrow}C_{n+1}\stackrel{s_n}{\twoheadrightarrow}C_{n}\stackrel{s_{n-1}}{\twoheadrightarrow}\dots\stackrel{s_1}{\twoheadrightarrow}C_1\]

as in Theorem <ref>, where the Galois-invariant sets $\singpointnt_n$ which the birational morphisms $s_n$ resolve are as large as possible, i.e. $\singpointnt_n=\bigsqcup_{\alpha\in\Sigma_n}\Sing(\bar C_\alpha)$. For the purpose of the construction of the Baker's resolution $x_1=x$.

The Newton polygon $\Delta$ of $f$ always has at least two edges: $\ell_1$ with endpoints $(m_0,0)$, $(0,s)$ and normal vector $\gcd(m_0,s)^{-1}(s,m_0)$, and $\ell_2$ with endpoints $(d,0)$, $(0,s)$ and normal vector $\gcd(d,s)^{-1}(-s,-d)$. If $h$ is a monomial then $\Delta$ is a segment, otherwise $\Delta$ is a triangle. In the latter case, the third edge $\ell$ has endpoints $(m_0,0), (d,0)$ and normal vector $(0,1)$. Construct the completion $C_1$ of $C_0$ with respect to $\Delta$, as described in <ref>. For any $i=1,2$ let $v_i\neq(0,1)$ be the normal vector of $\ell_i$ and set $\alpha_i=(v_i,())\in\Sigma_1$. From Proposition <ref> it follows that

\[f|_{\alpha_i}= X_1^\ast\cdot (a_l X_1^l+a_0),\qquad l\in\Z_+,\,\,\,a_0,a_l\in k^\times,\]

where $\mathrm{char}(k)\nmid l$. In fact, if $i=1$ then $l=\gcd(m_0,s)$, $a_l=-c_{m_0}$, $a_0=1$, while if $i=2$ then $l=\gcd(d,s)$, $a_l=1$, $a_0=-c_d$. In particular, $f|_{\alpha_i}$ has no multiple roots in $\bar k^\times$.

Suppose now that $h$ is not a monomial. Let $v=(0,1)$ be the normal vector of $\ell$ and let $\alpha=(v,())$ be the corresponding element of $\Sigma_1$. Consider $\m F_\alpha\in\bar k[X_1,Y]$. Note that since $v=(0,1)$, we can choose $M_\alpha=\lb\begin{smallmatrix}\!1\!&0\!\\\!0\!&1\!\end{smallmatrix}\rb$ and so $\m F_\alpha=f(X_1,Y)$. In particular, $f|_\alpha=f(X_1,0)=-h(X_1)$. Since $D_\alpha=\bar k[X_1^{\pm 1}]$, the singular points of $\bar C_\alpha$ correspond to the non-zero multiple roots of $f|_\alpha$, or, equivalently, to the non-zero multiple roots of $h$. Hence $\singpointnt_1$ is the set of those points. If $\singpointnt_1=\varnothing$, then $C_1$ is (outer) regular. We deduce the following lemma.

If $h$ has no multiple root in $\bar k^\times$, then $C_1$ is an outer regular (generalised) Baker's model of the smooth completion of $C_0$.

Suppose $\singpointnt_1\neq\varnothing$. Construct the morphism $s_1:C_2\rightarrow C_1$ resolving $\singpointnt_1$.
Let $v$ and $\alpha$ as above. Rename the variable $Y$ of $\m F_\alpha$ to $\tilde Y$, so that $\m F_\alpha\in \bar k[X_1,\tilde Y]$. Let $p\in\singpointnt_1$ and let $r\in\bar k^\times$ be the multiple root of $h$ corresponding to $p$.
One has $\bar{\m G}_p=X_1-r$. Note that $\bar{\m G}_p$ does not divide $\m F_\alpha$, so choose $\tilde{\m G}_p=\bar{\m G}_p$.
\[\m F_{\alpha,p}(\tilde X_2,\tilde Y)=\m F_\alpha(\tilde X_2+r,\tilde Y)=f(\tilde X_2+r,\tilde Y)=\tilde Y^s-h(\tilde X_2+r).\]

It follows that the Newton polygon $\Delta_{\alpha,p}$ of $\m F_{\alpha,p}$ has a unique edge $\ell_r$ with normal vector in $\Z_+^2$. Denoting by $m_r$ the multiplicity of the root $r$ of $h$, the endpoints of $\ell_r$ are $(m_r,0)$, $(0,s)$ and $\beta_r=\gcd(m_r,s)^{-1}(s,m_r)$ is its normal vector.
Let $\gamma_r=\beta_r\circ_{g_p}\alpha$, where $g_p$ is the polynomial related to $\tilde{\m G}_p$ by $M_\alpha$. Define $h_r(x)=h(x)/(x-r)^{m_r}\in\bar k[x]$. Then Proposition <ref> implies

\[f|_{\gamma_r}(X_2)=X_2^\ast\cdot(-a_rX_2^{\gcd(m_r,s)}+1),\]

where $a_r=h_r(r)$. In particular, since $\mathrm{char}(k)\nmid s$, the polynomial $f|_{\gamma_r}$ has no multiple root in $\bar k^\times$. Therefore $\bar C_{\gamma_r}$ is regular for any non-zero multiple root $r$ of $h$. Moreover, $\bar C_{\tilde\alpha}$ is also regular as $\bar C_{\tilde\alpha}\simeq \bar C_\alpha\setminus \singpointnt_1$. Recall the notation $\tilde\Sigma_1=\hat\Sigma_1\cup\{\tilde\alpha\}$, where $\hat\Sigma_1=\Sigma_1\setminus\{\alpha\}$. Since

\[\Sigma_2=\{\gamma_r\mid r\,\,\text{multiple root of }h\}\cup\tilde\Sigma_1\]

the schemes $\bar C_\gamma$ are regular for all $\gamma\in\Sigma_2$. We obtain the following result.

If $h$ has multiple roots in $\bar k^\times$, then $C_1$ is singular, but $C_2$ is an outer regular generalised Baker's model of the smooth completion of $C_0$.

Note that $C_2=\bigcup_{\gamma\in\Sigma_2} C_\gamma$ since $C_0\subseteq C_\gamma$ for any $\gamma\in\Sigma_2$.

We want to give an explicit description of the curve $C_{2,k}=C_2/G_k$, when $h$ has multiple roots in $\bar k^\times$. First note that for any $\gamma\in\tilde\Sigma_1$ the polynomials defining the curves $C_\gamma$ have coefficients in $k$. Therefore $G_k\subseteq\mathrm{Aut}(C_\gamma)$ for all $\gamma\in\tilde\Sigma_1$ and the charts $C_\gamma/G_k$ of $C_{2,k}$ easily follows. It remains to describe the curve $\big(\bigcup_{\sigma\in G_k}C_{\gamma_{\sigma(r)}}\big)/G_k$ for any non-zero multiple root $r$ of $h$.

Let $g\in k[x]$ be the minimal polynomial of a multiple root $r\in\bar k^\times$ of $h$. Let $m_r$, $h_r$, $\beta_r$, $\gamma_r$ as above. Set $s_r=\gcd(m_r,s)$. Note that $\ord_g(h)=m_r$. If $\lb\begin{smallmatrix}\!\delta_1\!&\delta_2\!\\\!\beta_1\!&\beta_2\!\end{smallmatrix}\rb$ is the matrix attached to $\beta_r$ used for the construction of $C_{\gamma_r}$ then

\[\O_{C_{\gamma_r}}(C_{\gamma_r})=\sfrac{\bar k[X_1^{\pm 1},X_2^{\pm 1},Y]}{(1-X_2^{s_r}\cdot h_r(X_1), X_2^{\delta_1}Y^{\beta_1}-X_1+r)}.\]

Define $g_r, h_g\in \bar k[x]$ by $g_r(x)=g(x)/(x-r)$, $h_g(x)=h(x)/g(x)^{m_r}$.

Note that $g_r(X_1)$ is invertible in $\O_{C_{\gamma_r}}(C_{\gamma_r})$.
Consider the homomorphism

\[\phi_r:\sfrac{\bar k[X_1^{\pm 1},X_2^{\pm 1},Y]}{(1-X_2^{s_r}\cdot h_g(X_1), X_2^{\delta_1}Y^{\beta_1}-g(X_1))}\longrightarrow
\sfrac{\bar k[X_1^{\pm 1},X_2^{\pm 1},Y]}{(1-X_2^{s_r}\cdot h_r(X_1), X_2^{\delta_1}Y^{\beta_1}-X_1+r)},\]

taking $X_1\mapsto X_1$, $X_2\mapsto X_2\cdot g_r(X_1)^{\beta_2}$, $Y\mapsto Y\cdot g_r(X_1)^{-\delta_2}$. Let $A_g:=\mathrm{Dom}(\phi_r)$. Note that $\Spec A_g=C_{\gamma_g}$, where $\gamma_g=\beta_r\circ_{g}\alpha\in\Omega$. Then $\phi_r$ induces an open immersion $\iota_r:C_{\gamma_r}\hookrightarrow C_{\gamma_g}$.
The glueing of the open immersions $\iota_{\sigma(r)}$, for $\sigma\in G_k$, gives an isomorphism

\[\big(\textstyle\bigcup_{\sigma\in G_k}C_{\gamma_{\sigma(r)}}\big)\simeq C_{\gamma_g},\]

commuting with the Galois action. Since $C_{\gamma_g}$ is defined by polynomials with coefficients in $k$, the quotient $C_{\gamma_g}/G_k$ is easy to describe, as required.

§ EXAMPLE

Let $C_{0.\F_2}:f=0\subset \G_{m,\F_2}^2$ with $f=x_1^4+1+y^2+y^3$. Note that $C_{0,\F_2}$ is smooth. Write $C_0=C_{0,\F_2}\times_{\F_2}\bar \F_2$, where $\bar \F_2$ is an algebraic closure of $\F_2$.

§.§ Construction of $C_1$

The Newton polygon $\Delta$ of $f$ is

\[\begin{tikzpicture}[scale=0.5]
\draw[->] (-0.6,0) -- (4.6,0) node[right] {$x_1$};
\draw[->] (0,-0.6) -- (0,3.6) node[above] {$y$};
\tkzDefPoint(4,0){A}
\tkzDefPoint(0,2){B}
\tkzDefPoint(0,3){C}
\tkzDefPoint(0,0){O}
\tkzLabelPoint[below](A){$(4,0)$}
\tkzLabelPoint[left](C){$(0,3)$}
\foreach \n in {O,A,B,C}
\node at (\n)[circle,fill,inner sep=1.5pt]{};
\draw (A) -- (O) node [midway,below, fill=none] {$\ell_3$};
\draw (O) -- (C) node [midway,left, fill=none] {$\ell_1$};
\draw (C) -- (A) node [midway,right, above, fill=none] {$\ell_2$};
\end{tikzpicture}\]

We want to construct the completion $C_1$ of $C_0$ with respect to $\Delta$ as explained in <ref>.
For any edge $\ell_i$ of $\Delta$ let $\beta_i$ be the normal vector of $\ell_i$. Then $\beta_1=(1,0)$, $\beta_2=(-3,-4)$, $\beta_3=(0,1)$. Let $\alpha_i=(\beta_i,())\in\Sigma_1$ for $i=1,2,3$. Then $\Sigma_1=\{\alpha_1,\alpha_2,\alpha_3\}$ and

\[C_1=C_{\alpha_1}\cup C_{\alpha_2}\cup C_{\alpha_3},\]

where we omitted $C_0$ as $C_0\subset C_\alpha$ for every $\alpha\in\Sigma_1$.
From Proposition <ref>

the polynomials
$f|_{\alpha_1}$ and $f|_{\alpha_2}$ are separable (up to a power of $X_1$)
and so
the corresponding curves $C_{\alpha_1}$ and $C_{\alpha_2}$ are regular.
On the other hand, $1\in \F_2$ is a non-zero multiple root of $f|_{\alpha_3}$, so $C_{\alpha_3}$ may be singular.
Let us compute the defining polynomial $\m{F}_{\alpha_3}$.
The identity matrix $I\in\SL_2(\Z)$ is attached to $\beta_3$, so we fix $M_{\alpha_3}=I$. Via $I$ we get

\[\m{F}_{\alpha_3}=X_1^4+1+Y^2+Y^3.\]

Then $C_{\alpha_3}=\Spec \bar\F_2[X_1^{\pm1},Y]/(\m{F}_{\alpha_3})$ is singular.
Thus $C_1$ is not smooth, having $1$ singular point, visible on $C_{\alpha_3}$.

§.§ Construction of $C_2$

Rename the variable $Y$ of $C_{\alpha_3}$ to $\tilde Y$. Let $p$ be the singular point of $C_{\alpha_3}$. Then $\bar{\m G}_{p}=X_1+1$. Choose $\tilde{\m G}_{p}=\bar{\m G}_{p}$.
We will construct the morphism $s_1:C_2\rightarrow C_1$ resolving the set $\singpointnt_1=\{p\}$. Note that $\singpointnt_1=\bigsqcup_{\alpha\in\Sigma_1}\Sing(\bar C_\alpha)$.
Let $\alpha=\alpha_3$ and $\beta=\beta_3$.

\[\tilde{\m{G}}_{p}\lb(x_1,y)\bullet M_{\alpha}^{-1}\rb=x_1+1,\]

so $g_p=x_1+1\in \F_2[x_1,y]$ is the polynomial related to $\tilde{\m G}_{p}$ by $M_\alpha$. Define $g_2=g_p$ and $f_2=x_2-g_2$. Note that since $\singpointnt_1$ consists of a single point, we have $\tilde{\m G}_{\singpointnt_1}=\tilde{\m G}_p$ and $g_{\singpointnt_1}=g_p$. Then $\alpha_p=\tilde\alpha$. Compute $\ord_{\beta}(g_p)=0$ and $\tilde\alpha=\alpha_p=(0,1)\circ_{g_{\singpointnt_1}}\alpha=((0,0,1),(g_2))$. Then

\[C_{\tilde\alpha}=C_{\alpha_p}=\Spec\frac{\bar \F_2[X_1^{\pm 1},\tilde X_2^{\pm 1},\tilde Y]}{(\m{F}_{\alpha_3}, \tilde X_2+X_1+1)}.\]

The normal form of $\m{F}_{\alpha_3}$ by $\tilde X_2-\m{G}$ with respect to the lexicographic order given by $X_1>\tilde X_2>\tilde Y$ is

\[\m{F}_{\alpha,p}=\m F_\alpha\big(\tilde X_2+1,\tilde Y\big)=\tilde X_2^4+\tilde Y^2+\tilde Y^3.\]

The Newton polygon of $\m{F}_{\alpha,p}$ is

\[\begin{tikzpicture}[scale=0.5]
\draw[->] (-0.6,0) -- (4.6,0) node[right] {$\tilde X_2$};
\draw[->] (0,-0.6) -- (0,3.6) node[above] {$\tilde Y$};
\tkzDefPoint(4,0){A}
\tkzDefPoint(0,2){B}
\tkzDefPoint(0,3){C}
\tkzLabelPoint[below](A){$(4,0)$}
\tkzLabelPoint[below left](B){$(0,2)$}
\tkzLabelPoint[right](C){$(0,3)$}
\foreach \n in {A,B,C}
\node at (\n)[circle,fill,inner sep=1.5pt]{};
\draw (A) -- (B) node [midway,below, fill=none] {$\ell_4$};
\draw (B) -- (C);
\draw (C) -- (A);
\end{tikzpicture}\]

There is only $1$ edge, denoted $\ell_4$, with normal vector in $\Z_+^2$. The normal vector of $\ell_4$ is $\beta_4=(1,2)$. It follows that $v_4=\beta_4\circ_{g_p}\beta=(0,1,2)$. Hence $\gamma_4=\beta_4\circ_{g_p}\alpha=(v_4,(g_2))$ is the corresponding element of $\Sigma_p$.
Then $\Sigma_2=\{\alpha_1,\alpha_2,\tilde\alpha_3,\gamma_4\}$.

To check whether $C_{\gamma_4}$ is regular, compute $\m{F}_{\gamma_4}$. The matrix $M_{\beta_4}=\left(\begin{smallmatrix}\!1\!&1\!\\\!1\!&2\!\end{smallmatrix}\right)$, attached to $\beta_4$, defines the change of variables $\tilde X_2=X_2Y$, $\tilde Y=X_2Y^2$, from which we get

\begin{align*}
&\tilde X_2-\tilde{\m{G}}_p=\m{F}_2,&&\m{F}_2=X_2Y+X_1+1,&
\end{align*}

where $\m F_2$ is the generator of the ideal $\got a_{\gamma_4}$. Therefore the curve

\[C_{\gamma_4}=\Spec \frac{\bar \F_2[X_1^{\pm 1},X_2^{\pm 1},Y]}{(\m{F}_{\gamma_4})+\got a_{\gamma_4}}\]

is singular, and so is the projective curve $C_2=C_{\alpha_1}\cup C_{\alpha_2}\cup C_{\tilde\alpha_3} \cup C_{\gamma_4}$. In the union we omitted $C_0$, as $C_0\subset C_{\alpha_1}$.

§.§ Construction of $C_3$

Let $q$ be the singular point of $C_{\gamma_4}$.
We now construct the morphism $s_2:C_3\rightarrow C_2$ resolving $\singpointnt_2=\{q\}$. Let $\gamma=\gamma_4$. Rename the variable $Y$ of $C_{\gamma}$ to $\tilde Y$.
Choose $\tilde{\m{G}}_q=\bar{\m{G}}_q=X_2+1$. By definition

\[M_{\gamma}=((1)\oplus M_{\beta_4})\cdot M_{\alpha_p}=\left(\begin{smallmatrix}1&0&0\\0&1&1\\0&1&2\end{smallmatrix}\right)\cdot \left(\begin{smallmatrix}1&0&0\\0&1&0\\0&0&1\end{smallmatrix}\right)=\left(\begin{smallmatrix}1&0&0\\0&1&1\\0&1&2\end{smallmatrix}\right),\quad M_\gamma^{-1}=\left(\begin{smallmatrix}1&0&0\\0&2&-1\\0&-1&1\end{smallmatrix}\right).\]

Then $g_q=x_2^2+y\in \F_2[x_1,x_2,y]$ is the polynomial related to $\tilde{\m G}_q$ by $M_\gamma$, as

\[\tilde{\m{G}}_q\lb(x_1,x_2,y)\bullet M_{\gamma}^{-1}\rb=x_2^2y^{-1}+1.\]

Let $g_3=(x_1+1)^2+y$ be the Laurent polynomial in $k[x_1^{\pm 1}, y^{\pm 1}]$ congruent to $g_q$ modulo $f_2$. Compute $\ord_{v_4}(g_q)=2$. Then
\[\tilde\gamma=\gamma_q=(0,1)\circ_{g_q}\gamma=((0,1,2,2),(g_2,g_3)).\]

The normal form of $\m{F}_{\gamma}$ by $\tilde X_3-\tilde{\m{G}}_q$ with respect to the lexicographic order given by $X_2>\tilde X_3>\tilde Y$ is
\[\m{F}_{\gamma,q}=\tilde X_3^2+(\tilde X_3+1)\tilde Y^2.\]
The Newton polygon of $\m{F}_{\gamma,q}$ is

\[\begin{tikzpicture}[scale=0.5]
\draw[->] (-0.6,0) -- (2.6,0) node[right] {$\tilde X_3$};
\draw[->] (0,-0.6) -- (0,2.6) node[above] {$\tilde Y$};
\tkzDefPoint(2,0){A}
\tkzDefPoint(0,2){B}
\tkzDefPoint(1,2){C}
\tkzLabelPoint[below](A){$(2,0)$}
\tkzLabelPoint[left](B){$(0,2)$}
\tkzLabelPoint[right](C){$(1,2)$}
\foreach \n in {A,B,C}
\node at (\n)[circle,fill,inner sep=1.5pt]{};
\draw (A) -- (B) node [midway,below, fill=none] {$\ell_5$};
\draw (B) -- (C);
\draw (C) -- (A);
\end{tikzpicture}\]

There is only $1$ edge, denoted $\ell_5$, with normal vector in $\Z_+^2$. The normal vector of $\ell_5$ is $\beta_5=(1,1)$ and so the corresponding element of $\Sigma_q$ is
\[\gamma_5=\beta_5\circ_{g_q}\gamma=((0,1,3,2),(g_2,g_3)).\]

Hence $\Sigma_3=\{\alpha_1,\alpha_2,\tilde\alpha_3,\tilde\gamma_4,\gamma_5\}$.

The matrix $M_{\beta_5}=\left(\begin{smallmatrix}\!1\!&0\!\\\!1\!&1\!\end{smallmatrix}\right)$, attached to $\beta_5$, defines the change of variables $\tilde X_3=X_3Y$, $\tilde Y=Y$ from which we get

\begin{align*}
&\tilde X_3-\tilde{\m{G}}_q=\m{F}_3&&\m{F}_3=X_3Y+X_2+1,&
\end{align*}

and $\m F_2=X_2Y+X_1+1$ is the image of the generator of $\got a_\gamma$ under $M_{\beta_5}$.
Then $\got a_{\gamma_5}=(\m F_2,\m F_3)$ and

\[C_{\gamma_5}=\Spec \frac{\bar \F_2[X_1^{\pm 1},X_2^{\pm 1},X_3^{\pm 1},Y]}{(\m{F}_{\gamma_5})+\got a_{\gamma_5}}\]

is regular (even if $f|_{\gamma_5}$ is not separable).
Therefore the curve

\[C_3=C_{\alpha_2}\cup C_{\alpha_3}\cup C_{\tilde\alpha_3} \cup C_{\tilde\gamma_4} \cup C_{\gamma_5}\]

is regular as well, and is a generalised Baker's model of the smooth completion of $C_0$. It is not outer regular, since $\bar C_{\gamma_5}$ has a singular point. One more step is therefore necessary (and sufficient by Proposition <ref>) to construct an outer regular generalised Baker's model. Note that in the description of $C_3$ we omitted $C_0$, as $C_0\subset C_{\alpha_1}$. Finally, the polynomials defining the charts $C_\gamma$, $\gamma\in\Sigma_3$ have coefficients in $\F_2$, so the construction of the generalised Baker's model $C_3/G_{\F_2}$ of the smooth completion of $C_{0,\F_2}$ easily follows.

§ BIRATIONAL SMOOTH HYPERSURFACE OF A VARIETY

Let $k$ be a perfect field. Recall that an algebraic variety $Z$ over $k$, denoted $Z/k$, is a scheme $Z\rightarrow \Spec k$ of finite type.

Let $Z/k$ be a geometrically reduced algebraic variety, pure of dimension $n$. Suppose either $n>0$ or $k$ infinite. Then there exists a separable polynomial $f\in k(x_1,\dots,x_n)[y]$, such that $k(Z)=k(x_1,\dots,x_n)[y]/(f)$.
Let $Z_1,\dots, Z_m$ be the irreducible components of $Z$. From <cit.>, <cit.> it follows that $k(Z)\simeq \bigoplus_{i=1}^mk(Z_i)$. Let $i=1,\dots,m$. As $Z$ is pure, $\dim Z_i=\dim Z=n$. Since $Z_i$ is geometrically reduced and integral, it follows from <cit.> that the field of functions $k(Z_i)$ is a finite separable extension of a purely trascendental extension $k(x_1,\dots,x_n)$.
Hence there exists a monic irreducible separable polynomial $f_i\in k(x_1,\dots,x_n)[y]$ such that
\[k(Z_i)\simeq k(x_1,\dots,x_n)[y]/(f_i).\]

We want to show that we can inductively choose the polynomials $f_i$ above such that $\gcd(f_i,f_j)=1$ for all $j<i$. Suppose we have fixed $f_1,\dots,f_{i-1}$ for some $i\geq 1$, and let $g_i\in k(x_1,\dots,x_n)[y]$ be any monic irreducible polynomial such that $k(Z_i)\simeq k(x_1,\dots,x_n)[y]/(g_i)$. Since $k(x_1,\dots,x_n)$ is infinite, there exists $c\in k(x_1,\dots,x_n)$ such that $\tau_c g_i\neq f_j$ for any $j<i$, where $\tau_c g_i$ is the polynomial defined by $\tau_c g_i(y)=g_i(y-c)$. But $\tau_c g_i$ and $f_j$ are irreducible monic polynomials, so $\gcd(\tau_c g_i,f_j)=1$. Moreover, $\tau_c g_i$ is separable and

\[k(x_1,\dots,x_n)[y]/(g_i)\simeq k(x_1,\dots,x_n)[y]/(\tau_c g_i)\]

via the map taking $y\mapsto y-c$. Then choose $f_i=\tau_cg_i$.

Thus assume $\gcd(f_i, f_j)=1$ for any $i,j=1,\dots,m$. From the Chinese Remainder Theorem it follows that

\[k(Z)\simeq \bigoplus_{i=1}^mk(Z_i)\simeq \bigoplus_{i=1}^m\frac{k(x_1,\dots,x_n)[y]}{(f_i)}\simeq \frac{k(x_1,\dots,x_n)[y]}{(f)},\]

where $f=\prod_{i=1}^mf_i$.

The following result is a variant of <cit.>.

Let $Z/k$ be a geometrically reduced, separated algebraic variety, pure of dimension $n$. Suppose either $n>0$ or $k$ infinite. Then there exists a smooth affine hypersurface $V$ in $\A_k^{n+1}$ birational to $Z$.
Lemma <ref> shows that there exists a separable polynomial $f\in k(x_1,\dots,x_n)[y]$ such that $k(Z)\simeq k(x_1,\dots,x_n)[y]/(f)$. Rescaling $f$ by an element of $k(x_1,\dots,x_n)$ if necessary, we can assume that $f$ is a polynomial in $k[x_1,\dots,x_n,y]$ with no irreducible factors in $k[x_1,\dots,x_n]$. Hence the total quotient ring of $k[x_1,\dots,x_n,y]/(f)$ is $k(x_1,\dots,x_n)[y]/(f)$.
It follows that there exists a birational map $Z\-->Z_0$, where $Z_0$ is the affine hypersurface defined by $f(x_1,\dots,x_n,y)=0$.
Let $A=k[x_1,\dots,x_n,y]/(f)$ be the coordinate ring of $Z_0$.
If $Z_0$ is smooth then we are done. Suppose $Z_0$ is not smooth. Then there exists $h\in J\cap k[x_1,\dots,x_n]$, where $J\subset k[x_1,\dots,x_n,y]$ is the ideal defining the singular locus of $Z_0$.

The rest of the proof follows the spirit of <cit.>. Expand $f=\sum_{i=0}^dc_iy^i$, where $c_i\in k[x_1,\dots,x_n]$, and $c_0\neq 0$. Via the change of variable $(hc_0^2)y'=y$ we get $f=\sum_{i=0}^d c_i(hc_0^2)^i(y')^i$. Dividing by $c_0$, we define $f'=1+\sum_{i=1}^d c_ic_0^{i-1}(hc_0y')^i$ and $Z_0'=\Spec k[x_1,\dots,x_n,y']/(f')$. Then via the homomorphism $y\mapsto (hc_0^2)y'$ we see that $Z_0'$ is isomorphic to the smooth dense open subvariety $D(hc_0)$ of $Z_0$. Thus $Z_0'$ is a smooth affine hypersurface in $\A_k^{n+1}$ birational to $Z$.

If a smooth affine curve $C_0/k$ is birational to a smooth projective curve $C/k$, then $C$ is isomorphic to the smooth completion of $C_0$. Equivalently, there exists an open immersion with dense image $C_0\hookrightarrow C$.
Since $C$ is complete and $C_0$ is smooth and separated (as affine), the birational map $C_0\--> C$ uniquely extends to a separated birational morphism $\iota: C_0\rightarrow C$. Denoting by $\tilde C$ the smooth completion of $C_0$ note that $\iota$ decomposes into the canonical open immersion $C_0\hookrightarrow \tilde C$ and the morphism $\tilde\iota:\tilde C\rightarrow C$ extending the rational map given by $\iota$. Therefore it suffices to prove that $\tilde\iota$ is an isomorphism.

First note that $\tilde \iota$ is proper by <cit.> since $\tilde C$ and $C$ are complete. Furthermore, both $\tilde C$ and $C$ are smooth, so they are geometrically reduced and have irreducible connected components. For any connected component $\tilde U$ of $\tilde C$ there is a connected component $U$ of $C$ such that $\tilde \iota$ restricts to a morphism $\iota_U:\tilde U\rightarrow U$. Note that $\iota_U$ is a proper birational morphism, as $\tilde U$ is a closed subscheme of $\tilde C$ and $\tilde\iota$ is proper birational. Since both $\tilde U$ and $U$ are integral and smooth of dimension $1$, and so normal, <cit.> implies that $\iota_{U}:\tilde U\rightarrow U$ is an isomorphism. It follows that $\tilde \iota: \tilde C\rightarrow C$ is an isomorphism.

Every smooth projective curve $C/k$ has a dense affine open which is isomorphic to a smooth plane curve.
From Theorem <ref> there exists a smooth affine plane curve $C_0$ birational to $C$. Then Lemma <ref> concludes the proof.

§ EXISTENCE OF A BAKER'S MODEL

Let $k$ be a perfect field. We say that a curve $C/k$ is nice if it is geometrically connected, smooth and projective over $k$.

In this appendix we slightly extend some results in <cit.> for studying the existence of a Baker's model of a nice curve.
Define the index of a nice curve $C/k$ to be the smallest extension degree of a field $K/k$ such that $C(K)\neq \varnothing$.

Let $C$ be a nice curve of genus $1$. Then $C$ admits a Baker's model if and only if $C$ has index at most $3$.
Suppose $C$ has index at most $3$. Then by <cit.> the curve $C$ is nondegenerate. Hence $C$ has an outer regular Baker's model.

Suppose now that $C$ admits a Baker's model. Then there exists a smooth curve $C_0\hookrightarrow C$ defined in $\G_{m,k}^2$ by $f\in k[x^{\pm 1},y^{\pm 1}]$ such that the completion $C_1$ of $C_0$ with respect to the Newton polygon $\Delta$ of $f$ is regular. We follow the spirit of the proof of <cit.>. Since the arithmetic genus of $C$ is $1$ there is exactly $1$ interior integer point of $\Delta$. There are $16$ equivalence classes of integral polytopes with this condition (see <cit.>). Then without loss of generality we can assume $\Delta$ is in this list. Note that there is an edge $\ell\subseteq\partial\Delta$ such that $\#(\ell\cap\Z^2)\leq 4$. Let $v$ be the normal vector of $\ell$ and $\alpha=(v,())\in\Sigma_1$. Then $f|_{\alpha}$ has at most $3$ roots in $\bar k^\times$ by Proposition <ref>. Therefore the splitting field $K$ of $f|_{\alpha}$ has degree $\leq 3$ over $k$. Furthermore, by definition $C_1$ has at least one point defined over $K$ visible on $C_\alpha$. Thus $C_1$, and so $C$, has index at most $3$.

The lemma above implies that there are nice curves which does not have a Baker's model. Indeed, if $k$ is a number field, <cit.> proves there exist nice curves of genus $1$ of any index.

Let $C$ be a nice curve of genus $g\leq 3$. If $k$ is finite or $C(k)\neq\varnothing$ then $C$ admits a Baker's model.
The first theorem in <cit.> and <cit.> show $C$ is nondegenerate except when $C$ is birational to a curve $C_0$ given in $\G_{m,k}^2$ by

\begin{align*}
f^{(2)}&=(x+y)^4+(xy)^2+xy(x+y+1)+(x+y+1)^2,& &\text{with }k=\F_2,\text{ or}\\
f^{(3)}&=(x^2+1)^2+y-y^3, & &\text{with }k=\F_3.
\end{align*}

Recall that if $C$ is nondegenerate then it has an outer regular Baker's model. Therefore it suffices to show that in the two exceptional cases above the completion $C_1$ of the curve $C_0$ with respect to its Newton polygon is smooth.
We use the notation of <ref>.

Suppose $k=\F_2$ and $C_0: f^{(2)}=0$ over $\G_{m,\F_2}^2$. Note that $C_0$ is smooth. Denote $f=f^{(2)}$. The Newton polygon $\Delta$ of $f$ is

\[\begin{tikzpicture}[scale=0.4]
\draw[->] (-0.6,0) -- (4.6,0) node[right] {$x$};
\draw[->] (0,-0.6) -- (0,4.6) node[above] {$y$};
\tkzDefPoint(4,0){A}
\tkzDefPoint(0,4){B}
\tkzDefPoint(2,2){C}
\tkzDefPoint(2,1){D}
\tkzDefPoint(1,2){E}
\tkzDefPoint(1,1){F}
\tkzDefPoint(2,0){G}
\tkzDefPoint(0,2){H}
\tkzDefPoint(0,0){O}
\tkzLabelPoint[below](A){$(4,0)$}
\tkzLabelPoint[left](B){$(0,4)$}
\foreach \n in {O,A,B,C,D,E,F,G,H}
\node at (\n)[circle,fill,inner sep=1.5pt]{};
\draw (A) -- (O) node [midway,below, fill=none] {$\ell_1$};
\draw (O) -- (B) node [midway,left, fill=none] {$\ell_2$};
\draw (B) -- (A) node [midway,right, above, fill=none] {$\ell_3$};
\end{tikzpicture}\]

where the normal vectors of the edges $\ell_1$, $\ell_2$, $\ell_3$ of $\Delta$ are respectively $\beta_1=(0,1)$, $\beta_2=(1,0)$, $\beta_3=(-1,-1)$. Then by fixing $\delta_{\beta_1}=(1,0)$, $\delta_{\beta_2}=(-1,-1)$, $\delta_{\beta_3}=(0,1)$ we have

\[
\]

for every $i=1,2,3$. Note that the points on $Y=0$ are regular points of $C_{\ell_i}$. Thus $C_{\ell}$ is smooth for any edge $\ell$ of $\Delta$ and so $C_1$ is smooth.

Suppose $k=\F_3$ and $C_0: f^{(3)}=0$ over $\G_{m,\F_3}^2$. Note that $C_0$ is smooth. Denote $f=f^{(3)}$. The Newton polygon $\Delta$ of $f$ is

\[\begin{tikzpicture}[scale=0.4]
\draw[->] (-0.6,0) -- (4.6,0) node[right] {$x$};
\draw[->] (0,-0.6) -- (0,3.6) node[above] {$y$};
\tkzDefPoint(4,0){A}
\tkzDefPoint(0,3){B}
\tkzDefPoint(2,0){C}
\tkzDefPoint(0,1){D}
\tkzDefPoint(0,0){O}
\tkzLabelPoint[below](A){$(4,0)$}
\tkzLabelPoint[left](B){$(0,4)$}
\foreach \n in {O,A,B,C,D}
\node at (\n)[circle,fill,inner sep=1.5pt]{};
\draw (A) -- (O) node [midway,below, fill=none] {$\ell_1$};
\draw (O) -- (B) node [midway,left, fill=none] {$\ell_2$};
\draw (B) -- (A) node [midway,right, above, fill=none] {$\ell_3$};
\end{tikzpicture}\]

where the normal vectors of the edges $\ell_1$, $\ell_2$, $\ell_3$ of $\Delta$ are respectively $\beta_1=(0,1)$, $\beta_2=(1,0)$, $\beta_3=(-3,-4)$. We can choose $\delta_{\beta_1}=(1,0)$ so that

\[
\]

The points on $Y=0$ are regular points of $C_{\ell_1}$ and so $C_{\ell_1}$ is smooth. Furthermore, up to a power of $X$ the polynomials $f|_{\ell_2}$ and $f|_{\ell_3}$ equal $X^3+X^2-1$ and $-X+1$ respectively. It follows that the charts $C_{\ell_2}$ and $C_{\ell_3}$ of $C_1$ are regular. Thus $C_1$ is smooth.