\section{Introduction}
\IEEEPARstart{S}{cene} perception is an essential aspect of autonomous driving and robot navigation. Robust perception of the objects in the surrounding environment relies on various onboard sensors installed on the mobile platform. Light Detection and Ranging (LiDAR) sensors can obtain the spatial measurement of the scene with a wide range and high accuracy. But LiDAR sensors have a low resolution, especially on the horizontal orientation, and lack color and texture information. Camera sensors can provide high-resolution RGB images but are sensitive to illumination changes and have no distance information. The combination of LiDAR and camera sensors can make up for each others' shortcomings. The effective fusion of these two sensors is critical to the 3D object detection \cite{chen2017multi, ku2018joint, qi2018frustum, xu2018pointfusion}, and semantic mapping tasks \cite{jeong2018multimodal, yue2020collaborative, li2020building}. As an essential process to LiDAR-camera fusion, extrinsic calibration should be applied to estimate the rigid body transformation between LiDAR and the camera accurately.

\begin{figure}[thpb]
    \centering
    \includegraphics[width=8.5cm]{images/1.png}
    \caption{Examples of our proposed CFNet. (First Row) The 2D instance centroid (2D-IC) extracted from images. (Second Row) The 3D instance centroid (3D-IC) extracted from LiDAR point clouds. (Third Row) The initial calibration parameters provided by semantic initialization (registration of 2D-IC and 3D-IC). (Fourth Row) The final calibration parameters predicted by CFNet. (Bottom Row) Three-dimensional map generated by fusing the sensors using calibration values provided by our approach.}
    \label{CFNet show}
\end{figure}

Early LiDAR-camera calibration methods relied on specific calibration targets, such as a checkerboard or self-made objects. The matching relationship between 2D feature points (camera images) and 3D feature points (LiDAR point clouds) is obtained by manual labeling or automatic labeling, which is then used to calculate the extrinsic parameters. During the operation of an autonomous driving vehicle, the change of the operating environment (such as vibration, etc.) will introduce uncontrollable deviation to the extrinsic parameters. A series of targetless and online self-calibration algorithms were proposed to solve this problem, effectively improving adaptability. These online calibration methods mainly utilize the intensity of image and point clouds and the edge correlation to calculate the extrinsic calibration parameters. Such techniques rely on accurate initial extrinsic parameters or additional motion information (hand-eye calibration initialization). Besides, the features used to construct the penalty function of calibration parameters are usually set manually, highly dependent on the scene, and cannot work in the absence of features.

Recently, some approaches have attempted to apply deep learning to predict the relative transformation between LiDAR and the camera. The calibration errors of these methods are still significant compared with the traditional methods. Thus, these learning-based calibration methods can not meet the calibration requirements. Besides, in practical application, when sensor parameters change, many training data are needed to fine-tune the network model, which dramatically limits the algorithm's generalization.

In this paper, we propose an automatic online LiDAR-camera self-calibration method CFNet. Without the need for specific calibration scenes, calibration targets, and the initial calibration parameters, CFNet is fully automatic. We define a calibration flow to represent the deviation between the positions of initial projected points and the ground truth. The predicted calibration flow is utilized to rectify the initial projected points for accurate 2D-3D correspondences construction. The EPnP algorithm \cite{lepetit2009epnp} is adopted to calculate the final extrinsic parameters within RANSAC scheme \cite{fischler1981random}. To make CFNet fully automatic, we also propose a semantic initialization algorithm. More specifically, we showcase the contribution of CFNet as follows:
\begin{enumerate}
    \item To the best of our Knowledge, CFNet is the first LiDAR-camera extrinsic calibration approach that combines the deep learning and geometry method. Compared with the direct prediction of calibration parameters, CFNet has a stronger generalization.
    \item We define a calibration flow to predict the deviation between the positions of initial projected points and the ground truth. The calibration flow can shift the initial projection to the right positions construct accurate 2D-3D correspondences.
    \item We introduce the 2D/3D instance centroid (IC) to estimate the initial extrinsic parameters. With this semantic initialization procedure, CFNet can execute LiDAR-camera calibration automatically.
    \item The source code is publicly available.
\end{enumerate}

\section{Related Work}
According to whether requiring specific calibration targets, the LiDAR-camera extrinsic calibration algorithms can be categorized into target-based and targetless. Target-based methods usually require calibration targets in an empty scene and estimate the extrinsic parameters by extracting the features from the targets. Targetless approaches extract hand-crafted feature points from the environment to construct a penalty function for the calibration parameters. Given an accurate initial value, the optimal extrinsic parameters are obtained by optimizing the penalty function. Deep learning-based approaches are proposed in recent years. These methods use the convolutional neural networks (CNNs) to replace the traditional feature extraction, feature matching, and initialization for extrinsic parameters prediction.

\subsection{Target-based Approach}
The checkerboards are mainly used to calibrate cameras and are also suitable for the LiDAR-camera calibration \cite{zhang2004extrinsic, kassir2010reliable, an2020geometric, zhou2012extrinsic, kim2020extrinsic}. The checkboard's pose in camera coordinate was calculated by triangulating the checkerboard's corner points extracted from the image. In the LiDAR point clouds, the checkerboard was identified by the segmentation method and establish the correlation between the plane points of LiDAR and the camera. With multiple checkerboards \cite{geiger2012automatic}, an error function containing correlation constraints of multiple plane points can be established. To ensure the algorithm's robustness, the checkerboards need to be evenly distributed in the sensor's field of view (Angle and position). Verma \emph{et al.} \cite{verma2019automatic} extracted the central coordinates and the corresponding plane normal vector of the checkerboard as matching features. A genetic algorithm (GA) \cite{mitchell1998introduction} was applied to acquire a globally optimal calibration result.

A systematic range of reflection bias is often observed in the LiDAR scanning results on the checkerboards, which will lead to measurement errors and affect the final calibration results. Park \emph{et al.} \cite{park2014calibration} used a monochromatic board as the calibration target instead of the checkerboard to deal with this issue. Dhall \emph{et al.} \cite{dhall2017lidar} added the ArUco markers on the plate as the calibration target. Benefit from the ArUco markers, the LiDAR-camera calibration task was transformed into a 3D-3D ICP problem. Guindel \emph{et al.} \cite{guindel2017automatic} designed a custom-made calibration target that hollows out four circles on a rectangular board. The stereo camera and LiDAR detected the circles and fit the central coordinates of the four circles respectively for the estimation of rigid body transformation. Beltr{\'a}n \emph{et al.} \cite{beltran2021automatic} pasted the ArUco markers on the calibration plate proposed in \cite{guindel2017automatic}, which makes the new calibration target has the ability to calibrate LiDAR and monocular cameras. The LiDAR's resolution is much lower than that of the camera, so the calibration methods based on the detection of the plane edge are restricted by the accuracy of LiDAR edge extraction.

Besides planar calibration targets, spherical targets are also appropriate for LiDAR-camera calibration \cite{kummerle2018automatic, kummerle2020unified, toth2020automatic}. Compared with planar targets, the advantage of the spherical target is that the camera can automatically detect the outline without depending on the camera's angle of view and placement. Besides, sampling points of spherical objects can be detected conveniently on the LiDAR point cloud \cite{toth2020automatic}.

\subsection{Targetless Approach}
During the long-life operation of robots, the extrinsic parameters inevitably deviate to some extent. To ensure a long-term stable operation, the robot needs to have the ability to detect the deviation and rectify the bias of the extrinsic parameters. Online calibration algorithms without specific calibration targets can effectively solve this problem.

Depth discontinuous points in the LiDAR point clouds are corresponding to the edge points in the image. When project the LiDAR point clouds to the image plane given correct extrinsic parameters, the 3D points with depth discontinuity will be more likely to be projected onto the edge of the image \cite{castorena2016autocalibration}. In this hypothesis, Levinson \emph{et al.} \cite{levinson2013automatic} proposed an online self-calibration method that contains an online deviation detection module and rectification module. \cite{pandey2012automatic} introduced the information theory into the calibration task. The rigid body transformation parameters are estimated by analyzing the statistical correlation between LiDAR and camera measurements. Mutual information (MI) was selected as the measurement metric of statistical correlation. Besides the 3D LiDAR point clouds and RGB images, the reflection intensity of LiDAR is also used to construct the MI objective function. Taylor \emph{et al.} \cite{taylor2013automatic} leveraged a new measurement parameter, Gradient Orientation Measure (GOM), to describe the gradient-related of LiDAT point clouds and images.

The above methods do not need calibration targets and are entirely data-driven calibration algorithms. Nevertheless, an appropriate initial calibration value is indispensable. A significant deviation between the initial value and the ground truth will bring about a wrong correlation. Therefore, these methods can only be used for fine-tuning calibration parameters. \cite{ishikawa2018lidar} transformed the LiDAR-camera calibration into an extended problem of solving a hand-eye calibration problem. Hand-eye calibration can provide initial extrinsic parameters, but it depends heavily on visual odometry and LiDAR odometry accuracy \cite{taylor2016motion}. \cite{shi2019extrinsic, zhen2019joint, park2020spatiotemporal} combined the LiDAR-camera calibration with sensor fusion localization and mapping to establish a joint optimization function.
The odometry and extrinsic parameters are optimized simultaneously for stable mapping.

\subsection{Deep Learning Approach}
It is inspiring to note that deep learning technology has made a breakthrough in many fields such as classification, object detection, semantic segmentation, and object tracking. Some attempts apply deep neural networks to the multi-sensors calibration tasks. At present, the research in this field is still in the preliminary stage. To our knowledge,  RegNet \cite{schneider2017regnet} was the first deep learning method that transformed the feature extraction, feature matching, and global regression into real-time CNNs to deduce the 6-DOF of extrinsic parameters between LiDAR and camera. RegNet ignores the geometry nature of $SE(3)$ using the quaternion distance as training loss. CalibNet \cite{iyer2018calibnet} proposed a 3D spatial transformer layer (3D STL) to deal with this problem. The output of the 3D STL is used to re-project the LiDAR point clouds to formulate a geometric loss. An end-to-end training is performed by maximizing the geometric and photometric consistency between the input image and the point cloud. The above deep learning calibration methods ignore the tolerance within the error bounds. RGGNet \cite{yuan2020rggnet} utilized the Riemannian geometry and deep generative model to build a tolerance-aware loss function.

Semantic information is introduced for obtaining an ideal initial extrinsic parameter. SOIC \cite{wang2020soic} exploited semantic information to calibrate and transforms the initialization problem into the Perspective-n-Points (PnP) problem of the semantic centroid. Due to the 3D semantic centroid of the point cloud and the 2D semantic centroid of the image cannot match accurately, a matching constraint cost function based on the semantic elements of the image and the LiDAR point cloud is also proposed. The optimal calibration parameter is obtained by minimizing the cost function. Zhu \emph{et al.} \cite{zhu2020online} proposed an online calibration system that automatically calculates the optimal rigid-body motion transformation between two sensors by maximizing the mutual information of their perceived data without adjusting the environment Settings. By formulating the calibration as an optimization problem with semantic features, the temporally synchronized LiDAR and camera are registered in real-time.

\section{Method}
In this section, we first describe the definition of the calibration flow. We then present our proposed calibration method CFNet, including the network architecture, loss functions, semantic initialization, and the training details.

\begin{figure*}[thpb]
    \centering
    \includegraphics[width=17cm]{images/2.png}
    \caption{The workflow of our proposed CFNet, an automatic online extrinsic calibration method that estimates the transformation parameters between 3D LiDAR and 2D camera.}
    \label{CFNet workflow}
\end{figure*}

\subsection{Calibration Flow}
Given initial LiDAR-Camera extrinsic parameters ${T}_{init}$ and the camera intrinsic matrix $K$, each LiDAR 3D point cloud $P_{i}^{L}={{[\begin{matrix}
   X_{i}^{L} & Y_{i}^{L} & Z_{i}^{L} \end{matrix}]}^{T}}\in {{\mathbb{R}}^{3}}$ is projected onto the image plane with corresponding 2D pixel coordinate $p_{i}^{init}={{\left[ \begin{matrix}
   u_{i}^{init} & v_{i}^{init} \end{matrix} \right]}^{T}}\in {{\mathbb{R}}^{2}}$
. This projection process is expressed as follows:
\begin{equation}
    \begin{aligned}
      Z_{i}^{init}\cdot \hat{p}_{i}^{init} & =Z_{i}^{init}\left[ \begin{matrix}
       u_{i}^{init}  \\
       v_{i}^{init}  \\
       1  \\
    \end{matrix} \right] =K\left[ {{R}_{init}}|{{t}_{init}} \right]\hat{P}_{i}^{L} \\
     & =K\left[ {{R}_{init}}|{{t}_{init}} \right]\left[ \begin{matrix}
       X_{i}^{L}  \\
       Y_{i}^{L}  \\
       Z_{i}^{L}  \\
       1  \\
    \end{matrix} \right] \\
    \end{aligned}
\end{equation}

\begin{equation}
    {{T}_{init}}=\left[ \begin{matrix}
    {{R}_{init}} & {{t}_{init}}  \\
    0 & 1  \\
    \end{matrix} \right]
\end{equation}

where $\hat{P}_{i}^{L}$ is the homogeneous coordinates of $P_{i}^{L}$, $\hat{p}_{i}^{init}$ is the homogeneous coordinates of $p_{i}^{init}$. The projected LiDAR-image ${{D}_{init}}$ is acquired by z-buffer approach, each pixel $(u_{i}^{init},v_{i}^{init})$ in the image reserves the depth value $Z_{i}^{init}$.
\begin{equation}
    {{D}_{init}}\left( u_{i}^{init},v_{i}^{init} \right)=Z_{i}^{init},i\in {{VI}_{init}}
\end{equation}

where ${VI}_{init}$ is the valid index of the initial 2D-3D correspondences, which fulfils $0<u_{i}^{init}<W,0<v_{i}^{init}<H$, $W$ and $H$ are width and height of the RGB image. If the pixel in ${{D}_{init}}$ does not have any matched LiDAR point cloud, we set this pixel value to 0. Similarly, we obtain the ground truth projected coordinate by projecting each 3D LiDAR point cloud with extrinsic ground truth ${T}_{gt}$ and camera intrinsic $K$.
\begin{equation}
    \begin{aligned}
    Z_{i}^{gt}\cdot \hat{p}_{i}^{gt} & =Z_{i}^{gt}\left[ \begin{matrix}
       u_{i}^{gt}  \\
       v_{i}^{gt}  \\
       1  \\
    \end{matrix} \right]=K\left[ {{R}_{gt}}|{{t}_{gt}} \right]\hat{P}_{i}^{L} \\
     & =K\left[ {{R}_{gt}}|{{t}_{gt}} \right]\left[ \begin{matrix}
       X_{i}^{L}  \\
       Y_{i}^{L}  \\
       Z_{i}^{L}  \\
       1  \\
    \end{matrix} \right] \\
    \end{aligned}
\end{equation}

\begin{equation}
    {{T}_{gt}}=\left[ \begin{matrix}
    {{R}_{gt}} & {{t}_{gt}}  \\
    0 & 1  \\
    \end{matrix} \right]
\end{equation}

where $\hat{p}_{i}^{gt}$ is the homogeneous coordinates of $p_{i}^{gt}={{\left[ \begin{matrix}
u_{i}^{gt} & v_{i}^{gt} \end{matrix} \right]}^{T}}\in {{\mathbb{R}}^{2}}$. Each pixel $(u_{i}^{gt},v_{i}^{gt})$ in the ground truth LiDAR-image ${D}_{gt}$ reserves the depth value $Z_{i}^{gt}$.
\begin{equation}
    {{D}_{gt}}\left( u_{i}^{gt},v_{i}^{gt} \right)=Z_{i}^{gt},i\in {{VI}_{gt}}
\end{equation}

where ${VI}_{gt}$ is the valid index of the ground truth 2D-3D correspondences, which fulfills $0<u_{i}^{gt}<W,0<v_{i}^{gt}<H$, $W$ and $H$ are width and height of the RGB image. If the pixel in ${{D}_{gt}}$ does not have any matched LiDAR point cloud, we set this pixel value to zero.

We define the deviation between the initial projected 2D coordinate $p_{i}^{init}$ and the ground truth $p_{i}^{gt}$ as the Calibration Flow. The Calibration Flow is similar to the optical flow, which includes two channels and represents the deviation of $p_{i}^{init}$ and $p_{i}^{gt}$ on the direction of $x$ and $y$ respectively. The ground truth calibration flow $F_{gt}^{calib}$ is calculated as follows, and the invalid pixels are set to zero.
\begin{equation}\label{cf_gt}
    \begin{aligned}
      & F_{gt}^{calib}\left( u_{i}^{init},v_{i}^{init} \right)=\left[ \begin{matrix}
       u_{i}^{gt}-u_{i}^{init} & v_{i}^{gt}-v_{i}^{gt}  \\
    \end{matrix} \right], \\
     & i\in \left( V{{I}_{init}}\cdot V{{I}_{gt}} \right) \\
    \end{aligned}
\end{equation}

\subsection{Network Architecture}
We propose CFNet to predict the calibration flow, which is utilized to correct the initial projected 2D coordinate in the image plane. After coordinate shift using calibration flow, the accurate correspondences between 3D LiDAR point cloud and 2D projected point are constructed. As shown in Figure \ref{CFNet Architecture}, the architecture of CFNet is based on the PWC-Net \cite{sun2018pwc}, which is specifically designed for predicting the optical flow between adjacent frames. Unlike the original PWC-Net, we use a modified ResNet-18 architecture \cite{he2016deep} with the activation function leaky RELU in the Encoder Net.  The Encoder Net has two branches: the RGB branch and the Depth brach. Since the inputs of the two branches are heterogeneous images (RGB image and LiDAR point cloud), the weights are not shared between the two branch networks. Besides, since the LiDAR-image has only one channel, the number of input channels in the first convolution layer is 1, and the number of filters in all convolution layers is half of that in the RGB branch. The CFNet predicts an image $F_{pred}^{calib}$ with two channels, which represents the deviation of pixels between the initial projection $p_{i}^{init}$ and the ground truth $p_{i}^{gt}$.

\begin{figure*}[thpb]
    \centering
    \includegraphics[width=16cm]{images/3.png}
    \caption{The Architecture of our proposed calibration network CFNet.}
    \label{CFNet Architecture}
\end{figure*}

\subsection{Loss Function}
We use two types of loss terms during training: the calibration flow photometric loss ${L}_{cf}$ and the calibration flow smooth loss ${L}_{s}$.

(1) Calibration Flow Photometric Loss:
After obtaining the predicted calibration flow, we inspect the sparse pixel-wise error between the predicted calibration flow $F_{pred}^{calib}$ and the ground truth calibration flow $F_{gt}^{calib}$ on valid pixels. We use the $L1$ norm for this photometric loss, and the error term is defined as,
\begin{equation}
    {{L}_{cf}}=\frac{\sum\limits_{u,v}{{{\left\| F_{gt}^{calib}(u,v)-F_{pred}^{calib}(u,v) \right\|}_{1}}\cdot M(u,v)}}{\sum\limits_{u,v}{M(u,v)}}
\end{equation}

\begin{equation}
    M(u_{i}^{init},v_{i}^{init})=\left\{ \begin{array}{l}
    1 \quad i\in \left( {{VI}_{init}}\cdot V{{VI}_{gt}} \right)  \\
    0 \quad otherwise
    \end{array} \right.
\end{equation}

where $M$ is the mask of valid pixels in $F_{gt}^{calib}$.

(2) Calibration Flow Smoothness Loss:
The smoothness loss ${{L}_{s}}$ of the calibration flow is different from the optical flow. For dense optical flow, the correspondence flow maps are encouraged to be locally smooth, making the values of adjacent pixels close. Our proposed calibration flow is sparse, and most of the pixels are invalid. Thus, the function of the smoothness loss ${{L}_{s}}$ is to enforce the displacement of pixels without a ground truth to be similar to the ones in the neighboring pixels.
\begin{equation}
    {{L}_{s}}=\frac{\sum\limits_{u,v}{{{D}_{s}}(u,v)\cdot (1-M(u,v))}}{\sum\limits_{u,v}{(1-M(u,v))}}
\end{equation}

\begin{equation}
    \begin{aligned}
    {{D}_{s}}(u,v) & =\rho (F_{pred}^{calib}(u,v)-F_{pred}^{calib}(u+1,v)) \\
                   & +\rho (F_{pred}^{calib}(u,v)-F_{pred}^{calib}(u,v+1))
    \end{aligned}
\end{equation}

where $\rho $ is the generalized Charbonnier function $\rho (x)=({{x}^{2}}+{{\varepsilon }^{2}}),\varepsilon ={{10}^{-9}},\alpha =0.25$, as in \cite{jason2016back}.

\subsection{Calibration Inference}
We make shift correction on the initial 2D projection point $p_{i}^{init}$ using calibration flow. The shift correction process is shown as follows,
\begin{equation}
    \begin{aligned}
        p_{i}^{rect} & =p_{i}^{init}+F_{pred}^{calib}(u_{i}^{init},v_{i}^{init}) \\
        & = \left[ \begin{matrix} u_{i}^{init} & v_{i}^{init} \end{matrix} \right]+F_{pred}^{calib}(u_{i}^{init},v_{i}^{init}),i\in V{{I}_{rect}}
    \end{aligned}
\end{equation}

\begin{equation}
    P_{i}^{L}=[\begin{matrix}
    X_{i}^{L} & Y_{i}^{L} & Z_{i}^{L}  \\
    \end{matrix}],i\in V{{I}_{rect}}
\end{equation}

where $p_{i}^{rect}=\left[ \begin{matrix} u_{i}^{rect} & v_{i}^{rect} \end{matrix} \right]\in {{\mathbb{R}}^{2}}$ is the rectified 2D coordinate of the valid projected LiDAR point cloud $P_{i}^{L}$, $V{{I}_{rect}}$ is the valid index of the 2D-3D correspondences which fulfil $0<u_{j}^{rect}<W,0<v_{j}^{rect}<H,0<u_{j}^{init}<W,0<v_{j}^{init}<H$. After acquiring a number of valid 2D-3D correspondences, we transfer the LiDAR-Camera extrinsic calibration task to a PnP problem. We use the EPnP algorithm within RANSAC scheme to solve this, with a maximum of 10 iterations, 5 times repeats, and an inlier threshold value of 1 pixel.

Similar to LCCNet, we employ a multi-range iterative refinement method to improve the calibration accuracy further. We train five models with different initial error ranges $\Delta T$, $\left[ -x,x \right],x=\left\{ 1.5m,1.0m,0.5m,0.2m,0.1m \right\}$ for translation and $\left[ -y,y \right],y=\left\{ 20{}^\circ ,10{}^\circ ,5{}^\circ ,2{}^\circ ,1{}^\circ  \right\}$ for rotation. The calibration iterative refinement process is shown in Algorithm 1. The inputs are camera frame $I$, LiDAR point clouds $\left\{ P_{i}^{L} \right\}$, camera intrinsic $K$ as well as initial calibration parameters ${T}_{init}$. After processing the sensors data, we project the LiDAR point clouds $\left\{ P_{i}^{L} \right\}$ to image plane to generate the sparse depth image ${D}_{init}$ and the projected 2D points $\{p_{i}^{init}\}$. Due to the input size of the Network is $\text{320}\times \text{960}$, we need to crop the original RGB image and the depth image simultaneously. To ensure the cropped depth image contains as many points as possible, we calculate the centroid of $\{p_{i}^{init}\}$ to get the location of the crop window. Then, we use the output of ${{N}_{1}}(\pm 1.5m,\pm 20{}^\circ )$ to rectify the coordinate of each initial projected point. The rectified 2D projected points and the corresponding valid LiDAR point clouds construct new 2D-3D correspondences. By applying the EPnP algorithm within the RANSAC scheme, we calculate the extrinsic parameters ${T}_{pred}$ and set it to ${T}_{1}$. We regard the transformation ${T}_{1}$ as new initial extrinsic parameters ${T}_{init}$ to re-project the LiDAR point clouds and generate depth image, which is the input of ${{N}_{2}}(\pm 1.0m,\pm 10{}^\circ )$. The number of accurate 2D-3D correspondences in the current iteration is much more than the last iteration in theory. The above process is repeated five times, iteratively improving the extrinsic calibration accuracy. The final calibration result is represented by ${{\widehat{T}}_{LC}}={{T}_{5}}$.

\begin{algorithm}[t]
\setstretch{1.35}
\caption{Extrinsic Calibration Iterative Refinement}
\hspace*{0.02in} {\bf Input:}
$I$, $\{P_{i}^{L}\}$, $K$, ${T}_{init}$, ${N}_{valid}$ \\
\hspace*{0.02in} {\bf Output:}
${{\widehat{T}}_{LC}}$
\begin{algorithmic}[]
\For{$k=1$ to 5}
    \State ${{D}_{init}},\{p_{i}^{init}\}={{f}_{proj}}(\{P_{i}^{L}\},K,{{T}_{init}})$
    \State Crop $I$ and ${D}_{init}$ to $320\times 960$ adaptively
    \State $F_{pred}^{calib}={{N}_{i}}({{I}^{crop}},D_{init}^{crop})$
    \State $P_{i}^{rect}=P_{i}^{init}+F_{pred}^{calib}(u_{i}^{init},v_{i}^{init}),i\in {{VI}_{rect}}$
    \If{${{VI}_{rect}}>{N}_{valid}$}
        \State Construct matches $\left\{ p_{i}^{rect},P_{i}^{L} \right\},i\in {{VI}_{rect}}$
        \State Calculate ${{T}_{pred}}$ by EPnP within RANSAC scheme
        \State ${{T}_{init}}={{T}_{pred}},{{T}_{i}}={{T}_{pred}}$
    \Else
        \State \textbf{break}
    \EndIf
\EndFor
\State ${{\widehat{T}}_{LC}}={{T}_{5}}$
\end{algorithmic}
\end{algorithm}

The method we proposed above only uses one frame of RGB image LiDAR point cloud to predict the extrinsic calibration parameters. In practical applications, inaccurate calibration flow will result in false calibration parameters. If we analyze the results over a sequence using the median value as the reference, the abnormal values that are significantly different from the reference can be eliminated.

\subsection{Semantic Initializtion}
Currently, most online calibration methods require an initialization process to provide a coarse value for optimizing the objective function. Manual measurement and hand-eye calibration are the two most commonly used initialization methods. However, the manual way is labor-intensive, and the hand-eye calibration method relies on accurate motion information. Inspired by SOIC \cite{wang2020soic}, we also try to use the semantic information to calculate the initial calibration parameters.

In SOIC, 2D Semantic Centroid (2D-SC) and 3D Semantic Centroid (3D-SC) are calculated using semantic segmentation of image and LiDAR point cloud. These two kinds of centroids are used to construct 2D-3D correspondences. Thus, the initialization problem of the LiDAR-Camera calibration is transformed into a PnP problem. Since the PnP algorithm needs at least three matching points, there must be three categories of objects in the current frame. SOIC chooses pedestrians, cars, and bicycles as the segmentation objects. However, in most cases, it is not easy to obtain all three categories of targets simultaneously. To solve this problem, we use instance segmentation to calculate the Instance Centroid (IC). Different from semantic segmentation, instance segmentation can distinguish different objects with the same category. Thus, we can obtain more 2D-3D correspondences than SOIC. An example of the 2D-IC and the 3D-IC is shown in Figure \ref{IC}.

We choose six categories as the valid instance: person, rider, car, truck, bus, and motorcycle. Given a frame of LiDAR point clouds ${{P}^{L}}$ that includes $N_{ins}^{L}$ valid instances, we define the 3D-IC of an instance $s\in \{1,2,\ldots ,N_{ins}^{L}\}$ as,
\begin{equation}
    IC_{s}^{L}=\frac{\sum\limits_{i=1}^{N_{s}^{L}}{P_{s,i}^{L}}}{N_{s}^{L}}
\end{equation}

\begin{equation}
    P_{s}^{L}=\{P_{s,1}^{L},P_{s,2}^{L},\ldots ,P_{s,N_{s}^{L}}^{L}|P_{s,i}^{L}\in {{P}^{L}},\ell _{i}^{P}=s\}
\end{equation}

where $P_{s}^{L}$ is the set of points with label $s$, $N_{s}^{L}$ is the total number of the points set, $\ell _{i}^{P}$ is the instance label that the 3D point $P_{s,i}^{L}$ belongs to. The definition of the 2D-IC is similar to the 3D-IC,
\begin{equation}
    IC_{s}^{I}=\frac{\sum\limits_{i=1}^{N_{s}^{I}}{p_{s,i}^{I}}}{N_{s}^{I}}
\end{equation}

\begin{equation}
    p_{s}^{I}=\{p_{s,1}^{I},p_{s,2}^{I},\ldots ,p_{s,N_{s}^{I}}^{I}|p_{s,i}^{I}\in I,\ell _{i}^{I}=s\}
\end{equation}

where $P_{s}^{I}$ is the set of pixels with label $s$, $N_{s}^{I}$ is the total number of the pixels set, $\ell _{i}^{I}$ is the instance label that the 2D pixel $p_{s,i}^{I}$ belongs to.

In most cases, the number of 2D instances (image) and 3D instances (point clouds) is different. The accurate matching relationship between the same instance is also unknown. We can match the 2D-IC and 3D-IC by sorting each instance with the help of the IC's location (point clouds: Y, image: u) and the number of instance's pixels or points. If the number of the 2D-3D correspondence $3\le {{N}_{2D-3D}}<5$, we adopt the P3P algorithm and EPnP algorithm within the RANSAC scheme when ${{N}_{2D-3D}}\ge 5$.

\begin{figure}[thpb]
    \centering
        \subfigure[]{\includegraphics[width=4.2cm]{images/4_a.png}}
        \subfigure[]{\includegraphics[width=4.2cm]{images/4_b.png}} \\
        \subfigure[]{\includegraphics[width=4.2cm]{images/4_c.png}}
        \subfigure[]{\includegraphics[width=4.2cm]{images/4_d.png}}
    \caption{(a) and (c) are RGB image and the corresponding 3D point cloud acquired by the camera and LiDAR. (b) and (d) are instance segmentation results of (a) and (c). Blue, red, green represents three different valid instances. Three black circles in (b) and (d) indicate instance centroids (IC) of each instance.}
    \label{IC}
\end{figure}

\section{Experiments and Discussion}\label{exp and dis}
\subsection{Dataset Preparation}\label{data pre}
We evaluate our approach on the KITTI benchmark dataset \cite{geiger2012we}, including RGB images and Velodyne point clouds recordings collected from different scenes. The timestamps of LiDAR and camera are synchronized, so the images and point clouds in each sequence correspond. To train our proposed calibration flow prediction network CFNet, we need to ensure the input, output, and corresponding calibration flow ground truth. We define the extrinsic parameters ground truth ${T}_{gt}$ between LiDAR and camera as the transformation matrix from the camera coordinate to the LiDAR coordinate. By adding a random variable $\Delta T$, we can obtain the initial calibration parameters ${{T}_{init}}=\Delta T\cdot {{T}_{gt}}$. The LiDAR point cloud is projected onto the image plane with initial extrinsic parameters ${T}_{init}$ and the camera intrinsic matrix $K$ to generate the LiDAR-image ${D}_{init}$. The network takes an RGB image $I$, and the corresponding projected LiDAR-image ${D}_{init}$ as input. The calibration flow ground truth can be provided by Eq. \ref{cf_gt}.

We use the odometry recordings from the KITTI dataset, specifically the left color image and Velodyne point clouds recordings. We use the sequence 06 to 21 for training and validation (29416 frames), sequence 01 to 05 for evaluation/test (4854 frames). The initial calibration off-range $\Delta T$ is $(\pm 1.5m,\pm 20{}^\circ )$. To compare with other learning-based (CNN-based) methods, we design four different test datasets on the raw recordings of the KITTI dataset. Each test dataset is independent of the training dataset with the following test name configurations:

\textbf{T1:} 0028 drive in $2009\_09\_30$ sequence, with initial off-range as $(\pm 1.5m,\pm 20{}^\circ )$.

\textbf{T2:} 0005/0070 drive in $2009\_09\_26$ sequence, with initial off-range as $(\pm 0.2m,\pm 15{}^\circ )$.

\textbf{T3:} 0005/0070 drive in $2009\_09\_26$ sequence, with initial off-range as $(\pm 0.2m,\pm 10{}^\circ )$.

\textbf{T4:} 0027 drive in $2009\_10\_03$ sequence, with initial off-range as $(\pm 0.3m,\pm 2{}^\circ )$.

Due to the image dimension in the KITTI benchmark is different (range from $\text{1224}\times \text{370}$ to $\text{1242}\times \text{376}$), pre-process is required to transform them to consistent size. To fulfill the input size of the network, that the input width and height is multiple of 32, we randomly crop the original image to  $\text{960}\times \text{320}$. We generate the sparse LiDAR-image by projecting the LiDAR point cloud onto the original image plane and then crop the original RGB image and the sparse LiDAR-image simultaneously. We can obtain the input data of the network without changing the camera intrinsic parameters. Besides, because the crop process is random, we can increase training data with this operation. Data augmentation is performed on the cropped input data. We add color augmentations with $50$ chance, where we perform random brightness, contrast, saturation, and hue shifts by sampling from uniform distributions in the ranges of $[0.7,1.3]$ for brightness, contrast, and saturation, $\left[ 1-0.3/3.14,1+0.3/3.14 \right]$ for hue shifts.

\subsection{Training Details}\label{training details}
For training the network, we use Adam Optimizer with an initial learning rate of $1{{e}^{-3}}$. We train our proposed calibration network on four Nvidia Titan RTX GPU with batch size 100 and total epochs 80. For the multi-range network, it is not necessary to retrain each network from scratch. Instead, a large-range model can be regarded as the pre-trained model for small-range training to speed up the training process. The training epoch of the model with the largest range is set to 80, while the others are set to 50.

KITTI360 datasets are utilized as an additional dataset to test our proposed LiDAR-Camera calibration algorithm CFNet. The models trained on KITTI odometry training datasets are regarded as the pre-trained models. We only use sequences 0000, 0002, and 0003 for training and validation during training to fine-tune the CFNet models. Other sequences are selected as test datasets.

\subsection{Evaluation Metrics}\label{metrics}
We analyze the calibration results according to the rotation and the translation errors of the predicted extrinsic parameters. The translation error is evaluated by the Euclidian distance between the translation vectors. The absolute translation error is expressed as follows:

\begin{equation}
    {{E}_{t}}={{\left\| {{t}_{pred}}-{{t}_{gt}} \right\|}_{2}}
\end{equation}
where ${{\left\| \cdot  \right\|}_{2}}$ denotes the 2-norm of a vector. Besides, we also test the absolute error of the translation vector in $X,Y,Z$ directions respectively, ${T}_{X}, {T}_{Y}, {T}_{Z}$, and the mean value $\overline{t}=\left( {{E}_{X}}+{{E}_{Y}}+{{E}_{Z}} \right)/3$.

The rotation part is represented by quaternions that are transformed from the rotation matrix $R$. Since quaternion represents direction, we use quaternion angle distance to represent the difference between quaternions. The angle error of quaternion can be expressed as follows:
\begin{equation}
    {{E}_{R}}={{D}_{a}}({{q}_{gt}}*inv({{q}_{pred}}))
\end{equation}

\begin{equation}
    {{D}_{a}}(m)=atan2(\sqrt{b_{m}^{2}+c_{m}^{2}+d_{m}^{2}},\left| {{a}_{m}} \right|)
\end{equation}

\begin{equation}
    atan2(y,x)=\left\{\begin{array}{*{35}{l}}
    arctan(\tfrac{y}{x}) & x>0 \\
    arctan(\tfrac{y}{x})+\pi & x<0,y\ge 0 \\
    arctan(\tfrac{y}{x})-\pi & x<0,y<0 \\
    \frac{\pi }{2} & x=0,y>0 \\
    -\frac{\pi }{2} & x=0,y<0 \\
    undefined & x=0,y=0 \\
    \end{array} \right.
\end{equation}

where ${q}_{gt}$ is the ground truth quaternion , ${q}_{pred}$ is the predicted quaternion, $\left\{ {{a}_{m}},{{b}_{m}},{{c}_{m}},{{d}_{m}} \right\}$ is four components of the quaternion $m$, $*$ represents the quaternion multiplication, $inv$ represents the inverse of a quaternion. For a quaternion $m={{a}_{m}}+{{b}_{m}}i+{{c}_{m}}j+{{d}_{m}}k$, its inverse quaternion is expressed as:
\begin{equation}
    \begin{aligned}
      inv(m)=\frac{\overline{m}}{{{m}^{2}}} & =\frac{{{a}_{m}}-{{b}_{m}}i-{{c}_{m}}j-{{d}_{m}}k}{{{\left\| m \right\|}^{2}}} \\
      & =\frac{{{a}_{m}}-{{b}_{m}}i-{{c}_{m}}j-{{d}_{m}}k}{a_{m}^{2}+b_{m}^{2}+c_{m}^{2}+d_{m}^{2}} \\
    \end{aligned}
\end{equation}

where $\overline{m}$ is the conjugate of the quaternion $m$, $\left\| m \right\|$ is the length of quaternion. To test the angle error of the extrinsic rotation matrix on three degrees, we need to transform the rotation matrix to Euler angles and compute the angle error on Roll ${E}_{Roll}$, Pitch ${E}_{Pitch}$, Yaw ${E}_{Yaw}$, and the mean value $\overline{R}=\left( {{E}_{Roll}}+{{E}_{Pitch}}+{{E}_{Yaw}} \right)/3$.
\begin{equation}
    R_{pred}^{-1}\cdot {{R}_{gt}}=\left[ \begin{matrix}
    {{r}_{11}} & {{r}_{12}} & {{r}_{13}}  \\
    {{r}_{21}} & {{r}_{22}} & {{r}_{23}}  \\
    {{r}_{31}} & {{r}_{32}} & {{r}_{33}}  \\
    \end{matrix} \right]
\end{equation}

\begin{equation}
    \begin{aligned}
     & {{E}_{Yaw}}={{\theta }_{z}}=atan2({{r}_{21}},{{r}_{11}}) \\
     & {{E}_{Pitch}}={{\theta }_{y}}=atan2(-{{r}_{31}},\sqrt{r_{31}^{2}+r_{33}^{2}}) \\
     & {{E}_{Roll}}={{\theta }_{x}}=atan2({{r}_{32}},{{r}_{33}}) \\
    \end{aligned}
\end{equation}

Besides, we apply another two $se(3)$ error based evaluation metrics mentioned in \cite{yuan2020rggnet}: Mean $se(3)$ error (MSEE) and Mean re-calibration rate (MRR).

\subsection{Results and discussion}\label{results}
The evaluation results on the KITTI odometry dataset are shown in Table \ref{Results_odom}. It can be seen that in all of these test sequences, the mean translation error ${E}_{t}<2cm$ and the mean rotation error ${E}_{R}<0.13{}^\circ$. Figure \ref{Figure_odom} shows two examples of CFNet predictions. We can see that the reference objects in the projected depth image and RGB image align accurately after re-calibration. In all of these test sequences, the calibration error of sequence 01 is the largest. The main reason is that this sequence is collected from a high-way scene, which is not included in the training dataset.

\begin{figure}[thpb]
    \centering
    \includegraphics[width=8.5cm]{images/5.png}
    \caption{Examples of CFNet predictions on the KITTI odometry test datsets. Reference objects for calibration are shown in the red bounding boxes}
    \label{Figure_odom}
\end{figure}

Table \ref{Results_odom_init} and Table \ref{Comparison_odom_init} illustrate the calibration results with the semantic initialization. Compared to random initial calibration parameters, the semantic method can provide better initial parameters. Therefore, the final calibration error is much smaller. Furthermore, the semantic initialization procedure is automatic, and the basic requirement is the number of the valid instance correspondences in the scene ${{N}_{2D-3D}}\ge 3$. As shown in Table \ref{Comparison_odom_init}, the translation error of semantic initialization is much bigger than the rotation error. Our proposed CFNet can also predict accurate calibration parameters, even if the initial parameters provided by semantic initialization have a big deviation from the ground truth.

Figure \ref{Figure_odom_init} shows some examples of CFNet predictions with semantic initialization. There are many occlusions between the detected instances in the first column, so the 2D-3D instance matching is not accurate, and the predicted initial calibration parameters have a large deviation. Instance occlusion in the second column image is better than that in the first column image, so the initial error is much smaller. The 2D and 3D instances detected in the third column are complete without any occlusion, so the initial calibration parameters are very accurate, and the deviation from the ground truth is tiny. In the last column, we find a mismatch between the 2D and 3D instances (represented by an arrow), but we can still get an excellent initial calibration value. CFNet can re-calibrate accurately no matter the initial calibration error is large or small by using semantic initialization.

\begin{table*}[]
\caption{The results of the KITTI odometry test sequences with initial off-range as $(\pm 1.5m,\pm 20{}^\circ )$}
\label{Results_odom}
\begin{center}
\begin{tabular}{cccccccccc}
\toprule
\multicolumn{2}{c}{\multirow{2}{*}{Sequence}} & \multicolumn{4}{c}{Translation   (cm)}                   & \multicolumn{4}{c}{Rotation (${}^\circ   $)}                                                 \\
\multicolumn{2}{c}{}                          & ${{E}_{t}}$    & ${{E}_{X}}$ & ${{E}_{Y}}$ & ${{E}_{Z}}$ & ${{E}_{R}}$                  & ${{E}_{Roll}}$                  & ${{E}_{Pitch}}$           & ${{E}_{Yaw}}$ \\
\midrule
\multirow{3}{*}{01}          & Mean           & 1.994 & 1.006       & 1.220       & 1.538       & 0.129 & 0.049                   & 0.078                    & 0.047                  \\
                             & Median         & 1.830          & 1.046       & 1.068       & 1.619       & 0.120          & 0.041                   & 0.069                    & 0.032                  \\
                             & Std.           & 1.027          & 0.440       & 0.462       & 0.850       & 0.065          & 0.028                   & 0.080                    & 0.028                  \\
\multirow{3}{*}{02}          & Mean           & 1.773          & 0.134       & 1.334       & 0.365       & 0.094          & 0.073                   & 0.085                    & 0.054                  \\
                             & Median         & 1.573          & 0.115       & 1.561       & 0.367       & 0.086          & 0.093                   & 0.085                    & 0.067                  \\
                             & Std.           & 1.051          & 0.067       & 0.421       & 0.153       & 0.050          & 0.043                   & 0.074                    & 0.030                  \\
\multirow{3}{*}{03}          & Mean           & 1.935          & 0.527       & 0.948       & 0.776       & 0.115          & 0.078                   & 0.125                    & 0.074                  \\
                             & Median         & 1.807          & 0.512       & 0.830       & 0.696       & 0.106          & 0.081                   & 0.106                    & 0.074                  \\
                             & Std.           & 1.411          & 0.496       & 0.212       & 0.184       & 0.057          & 0.060                   & 0.058                    & 0.044                  \\
\multirow{3}{*}{04}          & Mean           & 1.748          & 0.927       & 0.675       & 0.552       & 0.075          & 0.031                   & 0.030                    & 0.019                  \\
                             & Median         & 1.585          & 1.128       & 0.494       & 0.381       & 0.073          & 0.027                   & 0.026                    & 0.016                  \\
                             & Std.           & 0.958          & 0.787       & 0.549       & 0.460       & 0.030          & 0.015                   & 0.022                    & 0.012                  \\
\multirow{3}{*}{05}          & Mean           & 1.766          & 0.723       & 0.410       & 0.848       & 0.121          & 0.010                   & 0.017                    & 0.015                  \\
                             & Median         & 1.606          & 0.038       & 0.490       & 0.489       & 0.112          & 0.010                   & 0.021                    & 0.015                  \\
                             & Std.           & 0.925          & 1.219       & 0.363       & 0.924       & 0.062          & 0.007                   & 0.011                    & 0.009         \\
\bottomrule
\end{tabular}
\end{center}
\end{table*}

\begin{table*}[]
\caption{The results of the KITTI odometry test sequences with semantic initialization}
\label{Results_odom_init}
\begin{center}
\begin{tabular}{cccccccccc}
\toprule
\multicolumn{2}{c}{\multirow{2}{*}{Sequence}} & \multicolumn{4}{c}{Translation   (cm)}                & \multicolumn{4}{c}{Rotation (${}^\circ   $)}                   \\
\multicolumn{2}{c}{}                          & ${{E}_{t}}$ & ${{E}_{X}}$ & ${{E}_{Y}}$ & ${{E}_{Z}}$ & ${{E}_{R}}$ & ${{E}_{Roll}}$ & ${{E}_{Pitch}}$ & ${{E}_{Yaw}}$ \\
\midrule
\multirow{3}{*}{02}          & Mean           & 1.724       & 0.687       & 0.217       & 0.538       & 0.171       & 0.064          & 0.030           & 0.084         \\
                             & Median         & 1.692       & 0.211       & 0.179       & 0.522       & 0.147       & 0.090          & 0.023           & 0.076         \\
                             & Std.           & 0.758       & 0.995       & 0.144       & 0.451       & 0.101       & 0.050          & 0.016           & 0.015         \\
\multirow{3}{*}{03}          & Mean           & 1.835       & 1.459       & 0.654       & 0.638       & 0.133       & 0.056          & 0.044           & 0.043         \\
                             & Median         & 1.930       & 1.575       & 0.648       & 0.804       & 0.110       & 0.044          & 0.034           & 0.018         \\
                             & Std.           & 0.668       & 0.853       & 0.853       & 0.360       & 0.081       & 0.037          & 0.038           & 0.060         \\
\multirow{3}{*}{05}          & Mean           & 1.711       & 0.928       & 0.523       & 0.657       & 0.123       & 0.084          & 0.090           & 0.044         \\
                             & Median         & 1.772       & 1.243       & 0.165       & 0.423       & 0.113       & 0.071          & 0.050           & 0.034         \\
                             & Std.           & 0.748       & 0.575       & 0.657       & 0.701       & 0.054       & 0.070          & 0.088           & 0.045      \\
\bottomrule
\end{tabular}
\end{center}
\end{table*}

\begin{table*}[]
\caption{The Comparison results of semantic initialization and CFNet prediction}
\label{Comparison_odom_init}
\begin{center}
\begin{tabular}{ccccccccc}
\toprule
\multirow{3}{*}{Sequence} & \multicolumn{4}{c}{Semantic   Initialization}                                           & \multicolumn{4}{c}{CFNet}                                                               \\
                          & \multicolumn{2}{c}{Translation   (cm)} & \multicolumn{2}{c}{Rotation   (${}^\circ   $)} & \multicolumn{2}{c}{Translation   (cm)} & \multicolumn{2}{c}{Rotation   (${}^\circ   $)} \\
\midrule
                          & ${{E}_{t}}$      & $\overline{t}$\tnote{a}      & ${{E}_{R}}$          & $\overline{R}$\tnote{b}          & ${{E}_{t}}$      & $\overline{t}$\tnote{a}      & ${{E}_{R}}$          & $\overline{R}$\tnote{b}          \\
02                        & 60.405           & 50.568              & 1.753                & 0.960                   & 1.724            & 0.481               & 0.171                & 0.059                   \\
03                        & 19.148           & 11.257              & 0.301                & 0.159                   & 1.835            & 0.917               & 0.133                & 0.048                   \\
05                        & 9.092            & 7.438               & 1.728                & 0.168                   & 1.711            & 0.702               & 0.123                & 0.073           \\
\bottomrule
\end{tabular}
\end{center}
\end{table*}

\begin{figure}[thpb]
    \centering
    \includegraphics[width=8.5cm]{images/6.png}
    \caption{Examples of CFNet predictions with semantic initialization.(First Row) 2D-IC. (Second Row) 3D-IC. (Third Row) Semantic Initialization. (Fourth Row) CFNet Prediction. (Fifth Row) Ground Truth. (Bottom Row) Rectified calibrated point cloud with RGB color.}
    \label{Figure_odom_init}
\end{figure}

The calibration results on the KITTI raw recordings are shown in Table \ref{raw_T1} and Table \ref{raw_T234}. As shown in Table \ref{raw_T1}, the CFNet achieves a mean translation error of 0.995cm (X, Y, Z: 1.025cm, 0.919cm, 1.042cm) and a mean angle error of $0.087{}^\circ$(Roll, Pitch, Yaw: $0.059{}^\circ ,\text{ }0.110{}^\circ ,\text{ }0.092{}^\circ $). It is obvious that the CFNet is far superior to RegNet and CalibNet. Although the mis-calibration range of the CalibNet $(\pm 0.2m,\pm 20{}^\circ )$ is smaller than CFNet $(\pm 1.5m,\pm 20{}^\circ )$, the calibration performance of CFNet is much better than CalibNet.

The comparison results on the test datasets T2, T3, and T4 shown in Table \ref{raw_T234} also illustrate the superior of the CFNet. Compared to the translation errors and the rotation errors utilized in the above experiments, $se3$ error \cite{yuan2020rggnet} is a more direct evaluation metric. The off-range of the test dataset T3 is a litter smaller than that in dataset T2. The metric MSEE for $\beta$-RegNet and RGGNet is smaller in T3 than in T2. Nevertheless, the MSEE is the same for CFNet in these two test datasets, which proves that CFNet is more robust than $\beta$-RegNet and RGGNet with different off-range settings. In test dataset T4, the performance of $\beta$-RegNet degrades heavily, and RGGNet needs to re-train on an additional dataset by adding a small number of data from $2009\_10\_03$ sequence to achieve a good calibration result $0.010\left( 83.22\% \right)$. CFNet does not need any additional training dataset and re-train process. The calibration results $0.001\left( 98.08\% \right)$ demonstrates that CFNet has good generalization capability. Thus, FNet outperforms all of the learning-based calibration algorithms, RegNet, CalibNet, RGGNet, and even the motion-based calibration method. We can also see that, compared to the motion-based algorithm \cite{taylor2016motion}, our proposed method is more generalized, without the requirements of hand-crafted features or the extra IMU sensor. Furthermore, the semantic initialization process does not require motion information which is vital to the hand-eye calibration.

\begin{table*}[]
\caption{The comparison results on the T1 test dataset}
\label{raw_T1}
\begin{center}
\begin{tabular}{cccccccccc}
\toprule
\multirow{3}{*}{Methods} & \multirow{3}{*}{Mis-calibration Range} & \multicolumn{8}{c}{T1}                                                                                \\
                         &                                        & \multicolumn{4}{c}{Translation (cm)}                     & \multicolumn{4}{c}{Rotation (${}^\circ $)}                        \\
                         &                                        & ${{E}_{X}}$ & ${{E}_{Y}}$ & ${{E}_{Z}}$ & $\overline{t}$\tnote{a} & ${{E}_{Roll}}$ & ${{E}_{Pitch}}$ & ${{E}_{Yaw}}$ & $\overline{R}$\tnote{b} \\
\midrule
RegNet \cite{schneider2017regnet}                   & $(\pm 1.5m,\pm 20{}^\circ )$           & 7           & 7           & 4           & 6              & 0.24           & 0.25            & 0.36          & 0.28           \\
CalibNet \cite{iyer2018calibnet}                 & $(\pm 0.2m,\pm 20{}^\circ )$           & 4.2         & 1.6         & 7.22        & 4.34           & 0.15           & 0.9             & 0.18          & 0.41           \\
CFNet                    & $(\pm 1.5m,\pm 20{}^\circ )$           & \textbf{1.025}       & \textbf{0.919}       & \textbf{1.042}       & \textbf{0.995}          & \textbf{0.059}          & \textbf{0.110}           & \textbf{0.092}         & \textbf{0.087}  \\
\bottomrule
\end{tabular}
\end{center}
\end{table*}

\begin{table*}[]
\caption{The comparison results on the T2, T3, and T4 test dataset}
\label{raw_T234}
\begin{center}
\begin{threeparttable}
\begin{tabular}{cccc}
\toprule
MSEE(MRR)      & T2             & T3             & T4             \\
\midrule
TAYLOR \cite{taylor2016motion}         & *              & *              & 0.010($\dagger$)       \\
CalibNet \cite{iyer2018calibnet}       & -              & 0.022(-)       & *              \\
$\beta$-RegNet \cite{yuan2020rggnet} & 0.048(53.23\%) & 0.046(34.14\%) & 0.092(-1.89\%) \\
RGGNet \cite{yuan2020rggnet}         & 0.021(78.40\%) & 0.017(72.64\%) & 0.010(83.22\%) \\
CFNet          & \textbf{0.003(96.74\%)} & \textbf{0.003(94.53\%)} & \textbf{0.001(98.08\%)} \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[] * means the author does not provide the result in the paper.
\item[] - shows that the calibration algorithm fails.
\item[] $\dagger$ represents that the calibration algorithm does not have this metrics.
\end{tablenotes}
\end{threeparttable}
\end{center}
\end{table*}

We also test the performance of CFNet on the KITTI360 benchmark dataset. The results are shown in Table \ref{KITTI360} and Figure \ref{Figure_360_init}. Despite re-training on a tiny sub dataset with one epoch, excellent results are obtained in the test sequences. Therefore, when the sensor parameters change, such as the camera focal length or the LiDAR-Camera extrinsic parameters, an excellent prediction model can be obtained with simple re-training.

\begin{table*}[]
\caption{The calibration results on KITTI360 test dataset}
\label{KITTI360}
\begin{center}
\begin{tabular}{ccccc}
\toprule
\multirow{3}{*}{Sequence} & \multicolumn{4}{c}{CFNet}                                                             \\
                          & \multicolumn{2}{c}{Translation   (cm)} & \multicolumn{2}{c}{Rotation (${}^\circ   $)} \\
                          & ${{E}_{t}}$      & $\overline{t}$      & ${{E}_{R}}$         & $\overline{R}$         \\
\midrule
0003                      & 1.941            & 0.656               & 0.137               & 0.031                  \\
0004                      & 2.296            & 0.661               & 0.335               & 0.159                  \\
0005                      & 2.099            & 0.594               & 0.260               & 0.095                  \\
0006                      & 2.341            & 0.790               & 0.224               & 0.081                  \\
0007                      & 2.881            & 1.207               & 0.280               & 0.119                  \\
0009                      & 2.179            & 1.025               & 0.171               & 0.075                  \\
0010                      & 2.485            & 0.999               & 0.211               & 0.073             \\
\bottomrule
\end{tabular}
\end{center}
\end{table*}

\begin{figure}[thpb]
    \centering
    \includegraphics[width=8.5cm]{images/7.png}
    \caption{Examples of CFNet predictions with semantic initialization on the KITTI360 datasets.(First Row) 2D-IC. (Second Row) 3D-IC. (Third Row) Semantic Initialization. (Forth Row) CFNet Prediction. (Fifth Row) Ground Truth.}
    \label{Figure_360_init}
\end{figure}

\begin{figure*}[thpb]
    \centering
        \subfigure[$2013\_05\_28\_drive\_0005\_sync$]{\includegraphics[width=8.5cm]{images/8_a.png}}
        \subfigure[$2013\_05\_28\_drive\_0010\_sync$]{\includegraphics[width=8.5cm]{images/8_b.png}}
    \caption{Examples of the reconstructed 3D color map on the KITTI360 datasets with the prediciton of CFNet.}
    \label{Map_360}
\end{figure*}

\section{Conclusion}
In this paper, we presented a novel online LiDAR-camera extrinsic calibration algorithm. To represent the deviation from the initial projection of LiDAR point clouds to the ground truth, we define an image called calibration flow. Inspired by the optical flow network, we design a deep calibration flow network CFNet. The initial projected points are rectified by the prediction of CFNet to construct accurate 2D-3D correspondences. EPnP algorithm within the RANSAC scheme is utilized to estimate the extrinsic parameters with iterative refinement. Our experiments demonstrate the superiority of CFNet. The additional experiments on the KITTI360 datasets illustrate the generalization of our method.

Moreover, we propose a semantic initialization algorithm based on the instance centroids. Unlike existing initialization techniques, we do not rely on motion information or manual measurement. This initialization procedure is effective when the scene contains enough valid instances.

\bibliographystyle{IEEEtran}


\section{Introduction}
The concept of a gyrogroup was originally posed by Ungar in \cite{UA1988,UA}. It is obvious that a group is a gyrogroup that every groupoid automorphism is an identity mapping. Then, in 2017, Atiponrat \cite{AW} equipped the gyrogroup with a topology and gave the definition of a topological gyrogroup. At the same time, she gave some examples of topological gyrogroups, such as M\"{o}bius gyrogroups  equipped with standard topology. Moreover, she posed an open problem whether the first-countability and metrizability are equivalent in topological gyrogroups. Afterwards, Cai, Lin and He in \cite{CZ} gave a positive answer about this problem, since all topological gyrogroups are rectifiable spaces. In fact, this kind of spaces has been studied for many years, see \cite{AW1,AW2020,BL3,FM2,LF,LF1,LF3,UA,WAS2020}. However, they all did not research the quotient spaces of topological gyrogroups. Until in \cite{BL,BL1,BL2,BLX}, Bao and Lin started to investigate the quotient spaces of strongly topological gyrogroups and achieved some good results. For example, if $H$ is an admissible $L$-subgyrogroup of a strongly topological gyrogroup $G$, then the left coset space $G/H$ is submetrizable. More important, they constructed a strongly topological gyrogroup with an infinite $L$-subgyrogroup. By the same construction, we can obtain a topological gyrogroup with an infinite $L$-subgyrogroup. Therefore, it is meaningful to research the quotient spaces of a topological gyrogroup when the left coset is an $L$-subgyrogroup. In particular, we will investigate what properties of topological groups still hold in topological gyrogroups.

This paper is aims to research topological gyrogroups with $\omega^{\omega}$-base, Fr\'echet-Urysohn properties and weakly three-space properties. We prove that a topological gyrogroup $G$ is metrizable iff $G$ has an $\omega^{\omega}$-base and $G$ is Fr\'echet-Urysohn. Moreover, in topological gyrogroups, every (countably, sequentially) compact subset being strictly (strongly) Fr\'echet-Urysohn and having an $\omega^{\omega}$-base are all weakly three-space properties with $H$ a closed $L$-subgyrogroup. More precisely, if $H$ is a closed $L$-subgyrogroup of a topological gyrogroup $G$ with the first-countablility of every (countably, sequentially) compact subset of $H$, and if every (countably, sequentially) compact subset of $G/H$ is strictly (strongly) Fr\'echet-Urysohn, respectively, then every (countably, sequentially) compact subset of $G$ is strictly (strongly) Fr\'echet-Urysohn. Finally, if a topological gyrogroup $G$ has a closed first-countable $L$-subgyrogroup $H$ with the quotient space $G/H$ having an $\omega^{\omega}$-base, then $G$ has an $\omega^{\omega}$-base.

\section{Preliminaries}

In this paper, we assume that all topological spaces are Hausdorff, $\mathbb{N}$ denote the set of all positive integers and $\omega$ denote the first infinite ordinal. The readers see \cite{AA,E,UA} for more notation and terminology. Next we recall some definitions and facts.

\begin{definition}\cite{UA}
Assume that $(G, \oplus)$ is a groupoid. We call $(G,\oplus)$ a {\it gyrogroup}, if the following conditions are satisfied:

\smallskip
(G1) For every $a\in G$, there is a unique identity element $0\in G$ with $0\oplus a=a=a\oplus0$;

\smallskip
(G2) for every $x\in G$, we can find a unique inverse element $\ominus x\in G$ with $\ominus x \oplus x=0=x\oplus (\ominus x)$;

\smallskip
(G3) for every $x, y\in G$, we can find $\mbox{gyr}[x, y]\in \mbox{Aut}(G, \oplus)$ with $x\oplus (y\oplus z)=(x\oplus y)\oplus \mbox{gyr}[x, y](z)$ for arbitrary $z\in G$, and

\smallskip
(G4) for every $x, y\in G$, $\mbox{gyr}[x\oplus y, y]=\mbox{gyr}[x, y]$.
\end{definition}

Notice that a group is a gyrogroup naturally only if the $\mbox{gyr}[x,y]$ is the identity mapping.

\begin{definition}\cite{ST}
Assume that $(G,\oplus)$ is a gyrogroup. We call a nonempty subset $H$ of $G$ a {\it subgyrogroup}, if the restriction of $gyr[a,b]$ to $H$ is an automorphism of $H$ for every $a,b\in H$ and $H$ forms a gyrogroup under the operation inherited from $G$. Denote it by $H\leq G$.

\smallskip
Moreover, we call $H$ an {\it $L$-subgyrogroup}, if $H$ is a subgyrogoup and satisfies $gyr[a, h](H)=H$ for each $a\in G$ and $h\in H$. Denote it by $H\leq_{L} G$.
\end{definition}

\begin{lemma}\cite{UA}\label{a}
Assume that $(G, \oplus)$ is a gyrogroup. For every $x, y, z\in G$,

\begin{enumerate}
\smallskip
\item $(\ominus x)\oplus (x\oplus y)=y$. \ \ \ (left cancellation law)

\smallskip
\item $(x\oplus (\ominus y))\oplus gyr[x, \ominus y](y)=x$. \ \ \ (right cancellation law)

\smallskip
\item $(x\oplus gyr[x, y](\ominus y))\oplus y=x$.

\smallskip
\item $gyr[x, y](z)=\ominus (x\oplus y)\oplus (x\oplus (y\oplus z))$.
\end{enumerate}
\end{lemma}

\begin{definition}\cite{AW}
Call $(G, \tau, \oplus)$ a {\it topological gyrogroup} if it satisfies the followings:

\smallskip
(1) $(G, \tau)$ is a topological space.

\smallskip
(2) $(G, \oplus)$ is a gyrogroup.

\smallskip
(3) The binary operation $\oplus: G\times G\rightarrow G$ is jointly continuous, where $G\times G$ is equipped with the product topology, and the inverse operation $\ominus (\cdot): G\rightarrow G$, i.e. $x\rightarrow \ominus x$, is also continuous.
\end{definition}

$\mathbf{Remark}$ Obviously, every topological group is a topological gyrogroup. However, every topological gyrogroup whose gyrations are not identically equal to the identity is not a topological group. Moreover, it was given an example in \cite{AW} to show that there exists a topological gyrogroup but not a topological group, such as the Einstein gyrogroup equipped with the standard topology.

\begin{definition}\cite{BT,LPT,GK}
Let $X$ be a topological space and $x\in X$. We say that $x$ has a {\it neighborhood $\omega^{\omega}$-base} or a {\it local $\mathfrak{G}$-base} if there is a base $\{U_{\alpha}(x):\alpha \in \mathbb{N}^{\mathbb{N}}\}$ of neighborhoods at $x$ with $U_{\beta}(x)\subset U_{\alpha}(x)$ for every $\alpha \leq \beta$ in $\mathbb{N}^{\mathbb{N}}$, where $\mathbb{N}^{\mathbb{N}}$ consisted by all functions from $\mathbb{N}$ to $\mathbb{N}$ equipped with the natural partial order, ie., $f\leq g$ iff $f(n)\leq g(n)$ for every $n\in \mathbb{N}$. We say that $X$ has an {\it $\omega^{\omega}$-base} or a {\it $\mathfrak{G}$-base} if $X$ has a neighborhood $\omega^{\omega}$-base or a local $\mathfrak{G}$-base at each point of $X$.
\end{definition}

\begin{definition}\cite{FS}
If $X$ is a topological space and $A\subset X$, we call $A$ {\it sequentially closed} if there is not sequence of points of $A$ converging to a point not in $A$. Call $X$ {\it sequential} if all sequentially closed subsets of $X$ are closed.
\end{definition}

\begin{definition}\cite{FS}
A topological space $X$ is called {\it Fr\'echet-Urysohn at a point $x\in X$} if there exists a sequence $\{x_{n}\}_{n\in \mathbb{N}}$ in $A$ with $\{x_{n}\}_{n\in \mathbb{N}}$ converging to $x$ for each $A\subset X$ satisfying $x\in \overline{A}\subset X$. We call $X$ {\it Fr\'echet-Urysohn} if it is Fr\'echet-Urysohn at every point.
\end{definition}

\begin{definition} \cite{GJ,SF}
A topological space $X$ is called {\it strictly (strongly) Fr\'echet-Urysohn at a point $x\in X$} if whenever $\{A_{n}\}_{n\in \mathbb{N}}$ is a sequence (decreasing sequence) of subsets in $X$ and $x\in \bigcap _{n\in \mathbb{N}}\overline{A_{n}}$, we can find $x_{n}\in A_{n}$ for all $n\in \mathbb{N}$ with the sequence $\{x_{n}\}_{n\in \mathbb{N}}$ converging to $x$. We call $X$ {\it strictly (strongly) Fr\'echet-Urysohn} if it is strictly (strongly) Fr\'echet-Urysohn at every point.
\end{definition}

\section{$\omega^{\omega}$-base and Fr\'echet-Urysohn property in topological gyrogroups.}

In this section, ones research topological gyrogroups with $\omega^{\omega}$-base and Fr\'echet-Urysohn property. It is shown that if a topological gyrogroup $G$ is first-countable, then it has an $\omega^{\omega}$-base. If a topological gyrogroup $G$ has an $\omega^{\omega}$-base and is Fr\'echet-Urysohn, then it is metrizable. Therefore, we deduce that a topological gyrogroup $G$ is metrizable iff having an $\omega^{\omega}$-base and being Fr\'echet-Urysohn are both satisfied by $G$.

\bigskip
Suppose that a topological gyrogroup $G$ has an $\omega^{\omega}$-base $\{U_{\alpha}:\alpha \in \mathbb{N}^{\mathbb{N}}\}$. Set $$I_{k}(\alpha)=\{\beta \in \mathbb{N}^{\mathbb{N}}:\beta _{i}=\alpha _{i} ~for~i=1,...,k\}, ~~and~~D_{k}(\alpha)=\bigcap_{\beta \in I_{k}(\alpha)}U_{\beta},$$ where $\alpha =(\alpha _{i})_{i\in \mathbb{N}}\in \mathbb{N}^{\mathbb{N}}$ and $k\in \mathbb{N}$. Then $\{D_{k}(\alpha)\}_{k\in \mathbb{N}}$ is an increasing subset sequence of $G$ and contains the identity element $0$.

\begin{definition}\cite{CZ1}
We call a topological space $X$ {\it strong $\alpha_{4}$-space} if an arbitrary subset $\{x_{p,q}:p,q\in \mathbb{N}\}$ of $X$ is such that $lim_{q\rightarrow \infty}x_{p,q}=x\in X$ for each $p\in \mathbb{N}$, we can find strictly increasing natural number sequences $\{l_{k}\}_{k\in \mathbb{N}}$ and $\{m_{k}\}_{k\in \mathbb{N}}$ such that $lim _{k\rightarrow \infty}x_{l_{k},m_{k}}=x$.
\end{definition}

\begin{lemma}\label{fyl1}
Every first-countable topological gyrogroup has an $\omega^{\omega}$-base.
\end{lemma}

\begin{proof}
Let $G$ be a first-countable topological gyrogroup, and $\{V_{n}\}_{n\in \mathbb{N}}$ a decreasing base at the identity element $0$.  Put $W_{\alpha}=V_{\alpha_{1}}$ for each $\alpha \in \mathbb{N}^{\mathbb{N}}$. We have that $\{W_{\alpha}\}_{\alpha \in \mathbb{N}^{\mathbb{N}}}$ is an $\omega^{\omega}$-base in $G$.
\end{proof}

\begin{lemma}\cite{LF1}
If a topological gyrogroup $G$ is Fr\'echet-Urysohn, then it is a strong $\alpha_{4}$-space.
\end{lemma}

\begin{lemma}\cite{GKL}\label{GKL1}
Suppose $\alpha =(\alpha _{i})_{i\in \mathbb{N}}\in \mathbb{N}^{\mathbb{N}}$ and $\beta _{k}=(\beta ^{k}_{i})_{i\in \mathbb{N}}\in I_{k}(\alpha)$ for all $k\in \mathbb{N}$. Then we can find $\gamma \in \mathbb{N}^{\mathbb{N}}$ with $\alpha \leq \gamma$ and $\beta _{k}\leq \gamma$ for arbitrary $k\in \mathbb{N}$.
\end{lemma}

\begin{theorem}\label{fdl1}
If a Hausdorff topological gyrogroup $G$ is Fr\'echet-Urysohn and has an $\omega^{\omega}$-base $\{U_{\alpha}:\alpha \in \mathbb{N}^{\mathbb{N}}\}$, then $G$ is metrizable.
\end{theorem}

\begin{proof}
First, we establish the following:

{\bf Claim.} $D_{k}(\alpha)$ is a neighborhood of $0$ for each $\alpha \in \mathbb{N}^{\mathbb{N}}$ for some $k\in \mathbb{N}$.

Suppose not, that is, we can find $\alpha \in \mathbb{N}^{\mathbb{N}}$ such that $D_{k}(\alpha)$ is not a neighborhood of $0$, for any $k\in \mathbb{N}$. It means that $0\in \overline{G\setminus D_{k}(\alpha)}$ for any $k\in \mathbb{N}$. By the hypothesis, $G$ is Fr\'echet-Urysohn, for arbitrary $k$. Therefore, we can find a sequence $\{x_{n,k}\}_{n\in \mathbb{N}}$ in $G\setminus D_{k}(\alpha)$ which converges to $0$. Since all Fr\'echet-Urysohn Hausdorff topological gyrogroups are strong $\alpha _{4}$-spaces, we can choose natural numbers sequences $(n_{i})_{i\in \mathbb{N}}$ and $(k_{i})_{i\in \mathbb{N}}$ with $lim_{i\rightarrow \infty}x_{n_{i},k_{i}}=0$, where $(n_{i})_{i\in \mathbb{N}}$ and $(k_{i})_{i\in \mathbb{N}}$ are strictly increasing.

For each $i\in \mathbb{N}$, we choose $\beta _{k_{i}}\in I_{k_{i}}(\alpha)$ with $x_{n_{i},k_{i}}\not \in U_{\beta _{k_{i}}}$. It follows from Lemma \ref{GKL1} that, for every $i\in \mathbb{N}$, $\beta _{k_{i}}\leq \gamma$ for some $\gamma \in \mathbb{N}^{\mathbb{N}}$. Therefore, for any $i\in \mathbb{N}$, $x_{n_{i},k_{i}}\not \in U_{\gamma}$. We conclude that the sequence $\{x_{n_{i},k_{i}}\}_{i\in \mathbb{N}}$ does not converge to $0$ and this is a contradiction.

Therefore, for each $\alpha \in \mathbb{N}^{\mathbb{N}}$, set $D_{k_{\alpha}}(\alpha)$ is a neighborhood of $0$, where $k_{\alpha}$ is a minimal natural number. It is clear that $D_{k_{\alpha}}(\alpha)\subset U_{\alpha}$. Moreover, for $i\in \mathbb{N}$, fix $\alpha ^{(i)}=(i,\alpha_{2},\alpha_{3},...)\in \mathbb{N}^{\mathbb{N}}$. Then for any $\beta =(\beta_{1},\beta_{2},...)\in I_{1}(\alpha ^{(i)})$, $D_{1}(\beta)=D_{1}(\alpha ^{i})$. Therefore, $\{D_{1}(\alpha):\alpha \in \mathbb{N}^{\mathbb{N}}\}=\{D_{1}(\alpha^{(i)}):i\in \mathbb{N}\}$ is countable. So, $\{D_{k}(\alpha):k\in \mathbb{N},\alpha \in \mathbb{N}^{\mathbb{N}}\}$ is countable. Furthermore, $\{D_{k_{\alpha}}(\alpha):\alpha \in \mathbb{N}^{\mathbb{N}}\}\subset \{D_{k}(\alpha):k\in \mathbb{N},\alpha \in \mathbb{N}^{\mathbb{N}}\}$. Therefore, the countability of the family $\{D_{k_{\alpha}}(\alpha):\alpha \in \mathbb{N}^{\mathbb{N}}\}$ is obtained. In conclusion, the family $\{int(D_{k_{\alpha}}(\alpha)):\alpha \in \mathbb{N}^{\mathbb{N}}\}$ is a countable open neighborhood base at $0$. It follows from above that $G$ is first-countable and hence metrizable by \cite{CZ}.
\end{proof}

By Lemma \ref{fyl1} and Theorem \ref{fdl1},we deduce the following result.

\begin{corollary}
A topological gyrogroup $G$ is metrizable iff $G$ has an $\omega^{\omega}$-base and $G$ is also Fr\'echet-Urysohn.
\end{corollary}

Let $X$ be a topological space and $\mathcal{N}$ a family of subsets of $X$. We call $\mathcal{N}$ a {\it $cs^{*}$-network at a point $x\in X$} \cite{GMZ} if we can find $N\in \mathcal{N}$ with $x\in N\subset O_{x}$ and $\{n\in \mathbb{N}:x_{n}\in N\}$ is infinite, where $(x_{n})_{n\in \mathbb{N}}$ is arbitrary sequence in $X$ converging to $x$ and $O_{x}$ is arbitrary neighborhood of $x$.

Then we give the concept of $cs^{*}$-character in topological gyrogroups.

\begin{definition}
If $G$ is a topological gyrogroup, we call the least cardinality of $cs^{*}$-network at the identity element $0$ of $G$ {\it $cs^{*}$-character}.
\end{definition}

\begin{theorem}
If a topological gyrogroup $G$ has an $\omega^{\omega}$-base, then it has countable $cs^{*}$-character.
\end{theorem}

\begin{proof}
Suppose that $\{U_{\alpha}:\alpha \in \mathbb{N}^{\mathbb{N}}\}$ is an $\omega^{\omega}$-base in $G$. Put $\mathcal{D}=\{D_{k}(\alpha):\alpha \in \mathbb{N}^{\mathbb{N}},k\in \mathbb{N}\}$. Then $\mathcal{D}$  is countable and is a $cs^{*}$-network at $0$. Choose a sequence $S=(g_{n})_{n\in \mathbb{N}}$ in $G$ which converges to $0$ and fix a neighborhood $U_{\alpha}$ of $0$. Therefore, we just need to show that $S\cap D_{k}(\alpha)$ is infinite for some $k\in \mathbb{N}$.

{\bf Claim.} $S\cap D_{k}(\alpha)$ is infinite for some $k\in \mathbb{N}$.

Suppose on the contrary, $S\cap D_{k}(\alpha)$ is finite for every $k\in \mathbb{N}$. Then, for arbitrary $k\in \mathbb{N}$, take $n_{k}\in \mathbb{N}$ and $\beta_{k}\in I_{k}(\alpha)$ such that $n_{1}<n_{2}<...$ and $g_{n_{k}}\not \in U_{\beta_{k}}$. Then $\{g_{n_{k}}\}_{k\in \mathbb{N}}$ converges to $0$. By Lemma \ref{GKL1}, there exists $\gamma \in \mathbb{N}^{\mathbb{N}}$ with $\alpha \leq \gamma$ and $\beta_{k}\leq \gamma$ for all $k\in \mathbb{N}$. It is clear that $g_{n_{k}}\not \in U_{\gamma}$ for every $k\in \mathbb{N}$. Hence, $g_{n_{k}}\not \rightarrow 0$, which is a contradiction.
\end{proof}

It was claimed in \cite{BZ} that if $G$ is a Fr\'echet-Urysohn topological group and $G$ also has countable $cs^{*}$-character, then $G$ is metrizable. Now, we pose the following problem.

\begin{question}
If a topological gyrogroup $G$ is Fr\'echet-Urysohn and $G$ also has countable $cs^{*}$-character, is $G$ metrizable?
\end{question}

\section{The weakly three-space property in topological gyrogroups with Fr\'echet-Urysohn property}
In this section, we prove that every (countably, sequentially) compact subset being strictly (strongly) Fr\'echet-Urysohn is a weakly three-space property with $H$ a closed $L$-subgyrogroup of a topological gyrogroup $G$. More precisely, for a topological gyrogroup $G$ and a closed $L$-subgyrogroup $H$, if every (countably, sequentially) compact subset of $H$ is first-countable, and every (countably, sequentially) compact subset of $G/H$ is strictly (strongly) Fr\'echet-Urysohn, then every (countably, sequentially) compact subset of $G$ is strictly (strongly) Fr\'echet-Urysohn.

The following concept of the coset space of a topological gyrogroup was introduced in \cite{BL,BL2}.

If $H$ is an $L$-subgyrogroup of a topological gyrogroup $G$, it follows from \cite[Theorem 20]{ST} that $G/H=\{a\oplus H:a\in G\}$ forms a partition of $G$. Let $\pi:G\rightarrow G/H$ be $a\mapsto a\oplus H$ for all $a\in G$, then, it is obtained that $\pi^{-1}\{\pi(a)\}=a\oplus H$. Moreover, if we denote the topology of $G$ by $\tau (G)$, we define $\tau(G/H)$ in $G/H$ as the following: $$\tau (G/H)=\{O\subset G/H: \pi^{-1}(O)\in \tau (G)\}.$$

Furthermore, we call a property $\mathscr P$ {\it three-space property} in topological groups \cite{BT3,GKL} if topological group $G$ and a closed normal subgroup $H$ of $G$ both have $\mathscr P$, then $G$ enjoys $\mathscr P$, too.

Then we give the definitions of {\it three-space property} and {\it weakly three-sapce property} in topological gyrogroups.

\begin{definition}
We call a topological property $\mathscr Q$ {\it three-space property} in topological gyrogroups if a topological gyrogroup $G$ and a closed $L$-subgyrogroup $H$ of $G$ both have $\mathscr Q$, then $G$ enjoys $\mathscr Q$, too.
\end{definition}

\begin{definition}
We call a topological property $\mathscr Q$ {\it weakly three-space property} in topological gyrogroups, if in a topological gyrogroup $G$, there is a closed $L$-subgyrogroup $H$ of $G$ having a property $\mathscr P$ which is stronger than $\mathscr Q$ and the quotient space $G/H$ has $\mathscr Q$, then $G$ has $\mathscr Q$, too.
\end{definition}

Obviously, every three-space property in topological gyrogroups is a weakly three-space property in topological gyrogroups.

There is an open problem posed by A.V. Arhangel' ski\v\i $~~$and M. Tkachenko in \cite{AA}.

\begin{question}\cite[Open problem 9.10.3]{GG}
Let all compact subsets of the groups $H$ and $G/H$ be Fr\'echet-Urysohn. Does the same hold for compact subsets of $G$?
\end{question}

It is natural to pose the following problems.

\begin{question}\label{m}
Let $G$ be a topological gyrogroup and $H$ a closed $L$-subgyrogroup of $G$. If every compact subset of $H$ and $G/H$ both are Fr\'echet-Urysohn, is any compact subset of $G$ Fr\'echet-Urysohn? In particular, is any compact subset being Fr\'echet-Urysohn a weakly three-space property in topological gyrogroups?
\end{question}

\begin{question}\label{4m1}
Let $G$ be a topological gyrogroup and $H$ a closed $L$-subgyrogroup of $G$. If  every compact subset of $H$ and $G/H$ both are strictly (strongly) Fr\'echet-Urysohn, is any compact subset of $G$ strictly (strongly) Fr\'echet-Urysohn? In particular, is any compact subset being strictly (strongly) Fr\'echet-Urysohn a weakly three-space property in topological gyrogroups?
\end{question}

Next, we show that all compact subsets being strictly (strongly) Fr\'echet-Urysohn is a weakly three-space property in topological gyrogroups. More precisely, for a topological gyrogroup $G$ and a closed $L$-subgyrogroup $H$, if every (countably, sequentially) compact subset of $H$ is first-countable, and every (countably, sequentially) compact subset of $G/H$ is strictly (strongly) Fr\'echet-Urysohn, then every (countably, sequentially) compact subset of $G$ is strictly (strongly) Fr\'echet-Urysohn, and hence give a partial answer about Question \ref{4m1}, see Theorem \ref{n}.

Let $f: X\rightarrow Y$ be a continuous onto mapping and the space $Y$ and the fibers of $f$ have $\mathscr P$, then $X$ enjoys $\mathscr P$, we call the property $\mathscr P$ {\it inverse fiber property} \cite{BT}. Moreover, if the domain $X$ is (countably, sequentially) compact, we call $\mathscr P$ an {\it inverse fiber property for (countably, sequentially) compact sets}. Moreover, if the space $X$ is regular, call $\mathscr P$ {\it regular inverse fiber property}.

\begin{lemma}\cite{XL}\label{o}
The first-countability is an inverse fiber property for (countably, sequentilly) compact sets.
\end{lemma}

\begin{proposition}\label{a}
If $\mathscr P$ is an inverse fiber property, then it is a three-space property in topological gyrogroups.
\end{proposition}

\begin{proof}
We assume that $H$ is a closed $L$-subgyrogroup of a topological gyrogroup $G$. We assume further that both gyrogroups $H$ and $G/H$ have an inverse fiber property $\mathscr P$. If $y\in G/H$, we can find $x\in G$ such that $\pi (x)=y$. Then $\pi ^{-1}(y)=x\oplus H$ is homeomorphic with $H$, so the fiber $\pi^{-1}(y)$ has $\mathscr P$ for all $y\in G/H$. It follows from the inverse fiber property of $\mathscr P$ that $G$ enjoys $\mathscr P$, too.
\end{proof}

We call a topological space $X$ having a $G_{\delta}$-diagonal \cite{GG} if the diagonal $\Delta =\{(x,x): x\in X\}$ of $X\times X$ is a $G_{\delta}$-set in $X\times X$.

\begin{lemma}\label{e}
Let $G$ be a topological gyrogroup. The following two conditions are equivalent:

$(a)$ all sequentially compact subspaces of $G$ have the first axioms of countability;

\smallskip
$(b)$ all sequentially compact subspaces of $G$ are metrizable.
\end{lemma}

\begin{proof}
We only need to prove (a) $\Rightarrow$ (b). Let $X$ be a non-empty sequentially compact subset of $G$. Define a mapping $\varphi : G\times G\rightarrow G$ as $\varphi (x,y)=(\ominus x)\oplus y$ for every $x,y\in G$. Since $\varphi$ is continuous and $X\times X$ is sequentially compact, we have that $F=\varphi (X\times X)$ is sequentially compact subset of $G$ and $0\in F$. By the first-countability of $F$, $\{0\}$ is a $G_{\delta}$-set in $F$. Therefore, $(\varphi |_{X\times X})^{-1}(0)=\Delta$ is the diagonal in $X\times X$, and $\Delta$ is a $G_{\delta}$-set in $X\times X$. Moreover, it is well-known that every sequentially compact space is a countably compact space. Then, it follows from \cite[Theorem 2.14]{GG} that if $X$ is a countably compact space and $X$ has $G_{\delta}$-diagonal, then $X$ is compact and metrizable. Therefore, $X$ is metrizable.
\end{proof}

\begin{corollary}\label{p}
The following two conditions are equivalent in topological gyrogroups:

$(a)$ all countably compact subspaces have the first axioms of countability;

$(b)$ all countably compact subspaces are metrizable.
\end{corollary}

\begin{proof}
We will show that (a) $\Rightarrow$ (b). Indeed, it is known that if $X$ is countably compact and first-countable, then it is sequentially compact. Therefore, we complete the proof by Lemma \ref{e}.
\end{proof}

\begin{corollary}\label{g}
all of the following are three-space properties in topological gyrogroups:

$(a)$ every sequentially compact subset is closed.

\smallskip
$(b)$ every sequentially compact subset is compact.

\smallskip
$(c)$ every (countably, sequentially) compact subset is first-countable.

\smallskip
$(d)$ every (countably, sequentially) compact subset is metrizable.
\end{corollary}

\begin{proof}
By Proposition \ref{a} and \cite[Lemma 2.2]{LS}, (a) and (b) hold.

\smallskip
By Lemma \ref{o}, we have that every (countably, sequentially) compact subset satisfying the first axiom of countability is an inverse fiber property and by Proposition \ref{a}, Lemma \ref{e}, Corollary \ref{p} and \cite[Theorem 3.10]{LF}, (c) and (d) hold.
\end{proof}

\begin{theorem}
every sequentially compact subset being sequential is a three-space property in topological gyrogroups.
\end{theorem}

\begin{proof}
Assume that $G$ is a topological gyrogroup and $H$ is a closed $L$-subgyrogroup of $G$. Assume further that every sequentially compact subsets of both $H$ and $G/H$ are sequential. It follows from \cite[Lemma 2.4]{LS} that every sequentially compact subset of $H$ and $G/H$ both are closed. By Corollary \ref{g}, every sequentially compact subset of $G$ is closed. For arbitrary sequentially compact subset $B$ of $G$, let $A$ be a sequentially closed subset of $B$. It is clear that $A$ is sequentially compact in $G$. Therefore, $A$ is closed. We obtain that $B$ is sequential by the definition. In conclusion, every sequentially compact subset of $G$ is sequential since $B$ is arbitrary.
\end{proof}

\begin{lemma}\label{h}
If all (countably, sequentially) compact subspaces of a topological gyrogroup $G$ are Fr\'echet-Urysohn, then all (countably, sequentially) compact subspaces of $G$ are strongly Fr\'echet-Urysohn.
\end{lemma}

\begin{proof}
Let $G$ be a topological gyrogroup and all (countably, sequentially) compact subspaces of $G$ Fr\'echet-Urysohn. It follows from \cite[Lemma 2.4]{LS} that all (countably, sequentially) compact subsets of $G$ are closed. Let $A$ be an arbitrary (countably, sequentially) compact subset of $G$. We have that $A$ is Fr\'echet-Urysohn and closed. Let $a$ be an accumulation point of $A$ and let $\{A_{n}\}_{n\in \mathbb{N}}$ be a decreasing sequence of subsets of $A$ such that $a\in \bigcap _{n\in \mathbb{N}}\overline{A_{n}}$. Since $A$ is Fr\'echet-Urysohn, there exists a sequence $\{a_{n}\}_{n\in \mathbb{N}}$ in $A\backslash \{a\}$ converging to $a$. Set $$B = (\ominus a)\oplus A,~~and~~B_{n}=(\ominus a)\oplus A_{n},~~b_{n}=(\ominus a)\oplus a_{n}~~~~for~~all~~n\in \mathbb{N}.$$ Obviously, $B$ is closed, $0\in (\ominus a)\oplus \overline{A_{n}}=\overline{B_{n}}\subset B$, $b_{n}\in B\backslash \{0\}$ for every $n\in \mathbb{N}$ and $\{b_{n}\}_{n\in \mathbb{N}}$ converges to $0$. Let $\{V_{n}\}_{n\in \mathbb{N}}$ be a symmetric open neighborhood sequence of $0$ in $G$ with $b_{n}\not \in V_{n}\oplus V_{n}$ for each $n\in \mathbb{N}$. Put $C_{n}=(B_{n}\cap V_{n})\oplus b_{n}$  for every $n\in \mathbb{N}$. Since $0\in \overline{B_{n}\cap V_{n}}$, we have $b_{n}\in \overline{C_{n}}$. Moreover, it follows from $V_{n}\cap C_{n}\subset V_{n}\cap (V_{n}\oplus b_{n})=\emptyset$ that $0\not \in \overline{C_{n}}$.

Now set  $$D=\bigcup \{C_{n}: n\in \mathbb{N}\},~~and~~S=\{0\}\cup \{b_{n}: n\in \mathbb{N}\}.$$ Then $D\subset \bigcup _{n\in \mathbb{N}}(B_{n}\oplus b_{n})\subset B\oplus S$.

{\bf Claim.} The subspace $B\oplus S$ of $G$ is Fr\'echet-Urysohn and closed.

It is obvious that $S$ is compact and sequentially compact.

{\bf Case 1.} Suppose that $A$ is compact. By the compactness of $A$, $B$ is also compact. Therefore, the Cartesian product $B\times S$ is compact. Moreover, since the binary operation in $G\times G$ is jointly continuous, it is obtained that $B\oplus S$ is compact as the continuous image of $B\times S$. Thus, $B\oplus S$ is Fr\'echet-Urysohn and closed.

{\bf Case 2.}We assume that $A$ is countably compact or sequentially compact. If $A$ is countably compact, by the Fr\'echet-Urysohn property of $A$, we obtain that $A$ is sequentially compact. Since $L_{\ominus a}$ is homeomorphic, it is obtained that $B$ is also sequentially compact. Then the Cartesian product $B\times S$ is sequentially compact. Furthermore, since the binary operation in $G\times G$ is jointly continuous, it is achieved that $B\oplus S$ is sequentially compact as the continuous image of $B\times S$. Thus, $B\oplus S$ is Fr\'echet-Urysohn and closed.

Since $b_{n}\in \overline{C_{n}}$ for each $n\in \mathbb{N}$ and $b_{n}$ converges to $0$, we have that $0\in \overline{D} \subset B\oplus S$, and we can find a sequence $\{d_{k}\}_{k\in \mathbb{N}}$ converging to $0$ in $D$. For all $n\in \mathbb{N}$, since $0\not \in \overline{C_{n}}$, $C_{n}$ contains only finitely many terms of the sequence $\{d_{k}\}_{k\in \mathbb{N}}$. There exists a subsequence $\{C_{n_{k}}\}_{k\in \mathbb{N}}$ of the sequence $\{C_{n}\}_{n\in \mathbb{N}}$ with $d_{k}\in C_{n_{k}}$ for each $k\in \mathbb{N}$. Since $C_{n_{k}}\subset B_{n_{k}}\oplus b_{n_{k}}=((\ominus a)\oplus A_{n_{k}})\oplus b_{n_{k}}$, there exists $x_{n_{k}}\in A_{n_{k}}$ such that $d_{k}=((\ominus a)\oplus x_{n_{k}})\oplus b_{n_{k}}$, for all $k\in \mathbb{N}$. Then $(\ominus a)\oplus x_{n_{k}}=d_{k}\oplus gyr[(\ominus a)\oplus x_{n_{k}},b_{n_{k}}](\ominus b_{n_{k}})$, so $x_{n_{k}}=a\oplus (d_{k}\oplus gyr[(\ominus a)\oplus x_{n_{k}},b_{n_{k}}](\ominus b_{n_{k}}))$. Since $gyr[x,y](z)=\ominus (x\oplus y)\oplus (y\oplus (y\oplus z))$ for all $x,y,z\in G$, it follows that $gyr[x,y](0)=\ominus (x\oplus y)\oplus (x\oplus y)=0$. Therefore, $x_{n_{k}}=a\oplus (d_{k}\oplus gyr[(\ominus a)\oplus x_{n_{k}},b_{n_{k}}](\ominus b_{n_{k}}))\rightarrow a$ whenever $k\rightarrow \infty$. When $n_{k-1}< n\leq n_{k}$, fix $y_{n}=x_{n_{k}}$. Then $y_{n}\in A_{n}$ for each $n\in \mathbb{N}$ and $y_{n}\rightarrow a$. In conclusion, $A$ is strongly Fr\'echet-Urysohn.
\end{proof}

\begin{theorem}\label{n}
Let $H$ be a closed $L$-subgyrogroup of a topological gyrogroup $G$ with every (countably, sequentially) compact subset of $H$ being first-countable. If $G/H$ has one of the following conditions, then $G$ has the same property:

$(a)$ every (countably, sequentially) compact subset is strongly Fr\'echet-Urysohn.

$(b)$ every (countably, sequentially) compact subset is strictly Fr\'echet-Urysohn.

\end{theorem}

\begin{proof}
It follows from Theorem 3 in \cite{AW} that every $T_{0}$ topological gyrogroup is regular. Suppose that $C$ is a (countably, sequentially) compact subset of $G$. It follows from Proposition \ref{a}, \cite[Lemma 2.2]{LS} and \cite[Lemma 2.4]{LS} that $C$ is closed in $G$. Set $\varphi =\pi |_{C}:C\rightarrow \pi (C)$, we obtain that $\pi (C)$ is (countably, sequentially) compact. Moreover, $\varphi$ is a closed mapping by \cite[Lemma 2.4]{LS}, and $\varphi^{-1}(\varphi(c))=\pi ^{-1}(\pi (c))\cap C = (c\oplus H)\cap C$ is first-countable for every $c\in C$. We complete the proof by Lemma \ref{h}, \cite[Proposition 4.7.18]{AA} and \cite[Lemma 2.11]{LS}.
\end{proof}

\section{The weakly three-space property in topological gyrogroups  with $\omega^{\omega}$-base }

Finally, we study whether having an $\omega^{\omega}$-base is a (weakly) three-space property in topological gyrogroups. In particular, we discuss the following question.

\begin{question}\label{4wt1}
If a closed $L$-subgyrogroup $H$ of a topological gyrogroup $G$ and the quotient space $G/H$ both have an $\omega^{\omega}$-base, does $G$ have an $\omega^{\omega}$-base?
\end{question}

We will show that having an $\omega^{\omega}$-base is a weakly three-space property in topological gyrogroups. More precisely, if a closed $L$-subgyrogroup $H$ of a topological gyrogroup $G$ is first-countable and $G/H$ has an $\omega^{\omega}$-base, then $G$ has an $\omega^{\omega}$-base.

\begin{theorem}
If a closed $L$-subgyrogroup $H$ of a topological gyrogroup $G$  is first-countable and the quotient space $G/H$ has an $\omega^{\omega}$-base, then $G$ has an $\omega^{\omega}$-base.
\end{theorem}

\begin{proof}
Suppose that $\{W_{n}\}_{n\in \mathbb{N}}$ is a family of open symmetric neighborhoods of $0$ and is decreasing with $W_{n+1}\oplus W_{n+1}\subset W_{n}$ for each $n\in \mathbb{N}$. Since $H$ is first-countable, suppose further that $\{W_{n}\cap H\}_{n\in \mathbb{N}}$ is an open neighborhood base of $0$ in $H$. Assume that $\mathscr V=\{V_{\alpha}:\alpha \in \mathbb{N}^{\mathbb{N}}\}$ is an $\omega^{\omega}$-base in $G/H$. Without loss of generality, let $V_{\alpha}$ be symmetric for every $V_{\alpha} \in \mathscr V$. Set $$\{U_{\alpha}=\pi ^{-1}(V_{\alpha}):\alpha \in \mathbb{N}^{\mathbb{N}}\}.$$ Put $R_{\beta}=W_{n}\cap U_{\alpha}$, for each $n\in \mathbb{N}$ and $\alpha =(\alpha _{i})\in \mathbb{N}^{\mathbb{N}}$, where $\beta =(n,\alpha _{1},\alpha _{2},...)$. Then $\mathscr R=\{R_{\beta}:\beta \in \mathbb{N}\times \mathbb{N}^{\mathbb{N}}\}$ is a family of open symmetric neighborhoods of $0$ with $R_{\beta}\subset R_{\gamma}$ if $\beta \geq \gamma$.

{\bf Claim.} $\mathscr R$ is an $\omega^{\omega}$-base for $G$.

Since $G$ is homogenous, it suffices to show that $\mathscr R$ is an $\omega^{\omega}$-base at $0$ for $G$. Let $U$ be an arbitrary open neighborhood of $0$. We can find an open symmetric neighborhood $V$ of $0$ with $V\oplus V\subset U$. By the construction of $W_{n}$, there exists $n\in \mathbb{N}$ with $W_{n}\cap H\subset V$. Then, as $\mathscr V$ is a symmetric $\omega^{\omega}$-base in $G/H$, we can choose $V_{\alpha}\in \mathscr V$ such that $V_{\alpha}=\pi (U_{\alpha})\subset \pi (V\cap W_{n+1})$. Put $$R_{\beta}=W_{n+1}\cap \pi^{-1}(V_{\alpha})=W_{n+1}\cap U_{\alpha}.$$

For an arbitrary $g\in R_{\beta}$, since $R_{\beta}=W_{n+1}\cap U_{\alpha}$, $g\in W_{n+1}$ and $g\in U_{\alpha}\subset (V\cap W_{n+1})\oplus H$. There exist $a\in V\cap W_{n+1}$ and $b\in H$ satisfying $g=a\oplus b$. Therefore, $b=(\ominus a)\oplus g\in (W_{n+1})\oplus W_{n+1}\subset W_{n}$. So $g\in (V\cap W_{n+1})\oplus (H\cap W_{n})\subset V\oplus V\subset U$. In conclusion, $R_{\beta}\subset U$ and we complete the proof.
\end{proof}