<figure><img src="image_1.png" /></figure>

HAL
open science

# Hybrid Attention for Robust RGB-T Pedestrian Detection in Real-World Conditions

Arunkumar Rathinam, Leo Pauly, Abd El Rahman Shabayek, Wassim Rharbaoui, Anis Kacem, Vincent Gaudillière, Djamila Aouada

► To cite this version:

Arunkumar Rathinam, Leo Pauly, Abd El Rahman Shabayek, Wassim Rharbaoui, Anis Kacem, et al. Hybrid Attention for Robust RGB-T Pedestrian Detection in Real-World Conditions. IEEE Robotics and Automation Letters, 2025, 10 (1), pp.319-326. 10.1109/LRA.2024.3504296. hal-04874785

HAL Id: hal-04874785

https://inria.hal.science/hal-04874785v1

Submitted on 8 Jan 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Hybrid Attention for Robust RGB-T Pedestrian Detection in Real-World Conditions

Arunkumar Rathinam<fnref n="1" />*, Leo Pauly<fnref n="2" />*, Abd El Rahman Shabayek<fnref n="1" />, Wassim Rharbaoui<fnref n="3" />, Anis Kacem<fnref n="1" />, Vincent Gaudillière<fnref n="4" /> and Djamila Aouada<fnref n="1" />

(*Equal contribution)

**Abstract**—Multispectral pedestrian detection has gained significant attention in recent years, particularly in autonomous driving applications. To address the challenges posed by adversarial illumination conditions, the combination of thermal and visible images has demonstrated its advantages. However, existing fusion methods rely on the critical assumption that the RGB-Thermal (RGB-T) image pairs are fully overlapping. These assumptions often do not hold in real-world applications, where only partial overlap between images can occur due to sensors configuration. Moreover, sensor failure can cause loss of information in one modality. In this paper, we propose a novel module called the Hybrid Attention (HA) mechanism as our main contribution to mitigate performance degradation caused by partial overlap and sensor failure, i.e. when at least part of the scene is acquired by only one sensor. We propose an improved RGB-T fusion algorithm, robust against partial overlap and sensor failure encountered during inference in real-world applications. We also leverage a mobile-friendly backbone to cope with resource constraints in embedded systems. We conducted experiments by simulating various partial overlap and sensor failure scenarios to evaluate the performance of our proposed method. The results demonstrate that our approach outperforms state-of-the-art methods, showcasing its superiority in handling real-world challenges.

**Index Terms**—Deep Learning for Visual Perception; Multi-Modal Perception for HRI; Sensor Fusion; Human Detection and Tracking; Computer Vision for Transportation.

## I. INTRODUCTION

PDESTRIAN detection is one of the important domains within computer vision for robotics, playing a significant role in applications such as self-driving vehicles, surveillance automation, and mobile robot navigation [1]. RGB cameras are commonly preferred sensors for such applications. However, they tend to suffer from overexposure in daylight, low illumination in night scenarios, and high-contrast lighting. To

<figure><img src="image_3.png" /><figcaption>Fig. 1. Constraints on (a) stereo setup (extrinsic parameters) and (b) sensor resolution (intrinsic parameters) resulting in only partial overlap between RGB and thermal images.</figcaption></figure>

address these shortcomings, a number of sensors and fusion solutions were investigated. In particular, thermal cameras seem to provide several advantages in terms of costs, algorithms, and data [2]. Among them, RGB images provide texture and color information, while thermal images focus on the infrared heat emitted by the objects and are therefore invariant to lighting conditions [3]. RGB and thermal images are therefore complementary with each other by nature. This led the community to collect multispectral datasets such as KAIST [1], CVC [4] or FLIR [5], providing thermal data in addition to RGB data.

KAIST dataset provides fully-overlapping RGB-T image pairs, i.e. both images are acquired at the same time and cover the same field of view. However, acquiring such image pairs requires specialised sensor setup over conventional stereo setup which is widely used in real-world applications. In stereo setups, partial overlap will occur inherently due to a different camera Field of View (FoV) and pixel-level misalignment will occur due to parallax [6]. Information discrepancy between one image and the other can cause features to be out of their corresponding positions, resulting in decreased algorithm performance and less accurate predictions during the inference process [7]. Even in the KAIST dataset that has fully overlapping image pairs, the authors attempted to reduce the pixel-level misalignment problem. This was achieved by further improving the original data labels to “sanitised” cross-modal annotations [8] and “paired” modality-specific annotations [7]

Manuscript received: May, 27, 2024; Revised September, 17, 2024; Accepted October, 23, 2024.

This paper was recommended for publication by Editor Gentiane Venture upon evaluation of Reviewers' comments. This work was supported by Luxembourg National Research Fund (FNR), under the project reference BRIDGES2020/IS/14755859/MEET-A/Aouada.

Code is available at https://cvi2.uni.lu/ha-mlpd/

<footnote n="1">¹Authors are with Interdisciplinary Center for Security, Reliability and Trust (SnT), University of Luxembourg, L-1855 Kirchberg Luxembourg. arunkumar.rathinam@uni.lu</footnote>

<footnote n="2">²The work was done when author was with the SnT, University of Luxembourg.</footnote>

<footnote n="3">³The author was with the SnT, University of Luxembourg. He is now with the XLIM institute, University of Poitiers, F-87060 Limoges, France.</footnote>

<footnote n="4">⁴The author was with the SnT, University of Luxembourg. He is now with Université de Lorraine, CNRS, Inria, Loria, F-54000, Nancy, France.</footnote>
(in this paper, different *modalities* correspond to different spectral images: RGB or thermal).

Recent methods, such as multi-label learning [6], aimed to learn more discriminative features while using semi-unpaired augmentation to generate unpaired inputs between two modalities where considering a single bounding-box label is irrelevant. Even with different learning approaches, the robustness of an algorithm is questioned when one of the modalities is unavailable or partially available; for example, when a malfunction in one of the camera sensor arrays leads to a partial or even complete loss of one modality. This situation is investigated in very few existing literature [6], and the performance drop in such scenarios is quite high even for best performing models on fully overlapping images.

To improve performance and enhance algorithm robustness, our research examines the issue of partial overlap caused by various factors such as stereo configurations, sensor malfunctions, and others. This can result in partial or complete invisibility of regions in one modality during inference. In this paper, we adopt the term *blackout* to refer to areas in the union of pictures where data are absent from one of the modalities. Figure 1 shows sample cases of *blackout* that can arise from sensor setups, Figure 1-a showing *sides blackout* from different camera extrinsic in stereo setup, Figure 1-b depicting *surrounding blackout* arising due to difference in camera intrinsic such as sensor resolution or focal length. To achieve robustness in such scenarios, we present a hybrid attention module, which reduces performance degradation irrespective of network architecture. We also consider a much lighter backbone compared to previous works for coping with hardware resource constraints in embedded systems. Our contributions are as follows:

* We introduce the Hybrid-Attention (HA) module, which combines self-attention and cross-attention, to mitigate performance degradation arising from modality-specific blackouts;

* We propose an improved RGB-T fusion algorithm, named Hybrid Attention-based Multi-Label Pedestrian Detector (HA-MLPD), robust against partial overlap and sensor failure encountered in real-world scenarios, while being resource-friendly;

* We provide experimental evidence that the proposed method prevents a performance drop and makes the fusion algorithm more robust and reliable irrespective of the network backbone architecture.

The remainder of the paper is structured as follows: Section II provides an overview of the related literature. In Section III, the HA-MLPD algorithm is introduced, with a detailed explanation of its implementation. Our approach is tested on the KAIST dataset [1] under various simulated blackout conditions, as discussed in Section IV. Finally, Section V concludes with a discussion on future research directions.

## II. RELATED WORKS

The multispectral pedestrian detection problem has been widely studied in computer vision. Several classical methods

use RGB and thermal images, relying on pixel difference values [9], local shape features [10], contour saliency maps [11], disparity maps [2] and HOG features [12].

In 2015, Hwang et al. introduced KAIST [1], a large-scale multispectral pedestrian detection dataset that contains RGB and thermal images with the corresponding pedestrian labels. The release of the KAIST dataset accompanied a renewed interest in the multispectral pedestrian detection problem, and several new methods have been proposed since then. For example, Liu et al. [13] proposed a deep learning-based Halfway Fusion model and presented comparative analyses with other early fusion architectures (input-level fusion) and late fusion architectures (decision-level fusion). In another study, Li et al. [8] demonstrated that the incorporation of an additional semantic segmentation task led to enhanced performance compared to the use of a model focused solely on detection. They introduced a combined architecture that included a multispectral proposal network to generate pedestrian proposals and a subsequent multispectral classification network to distinguish pedestrian instances from challenging negatives. The authors trained the integrated network by simultaneously optimising both pedestrian detection and semantic segmentation tasks. Zheng et al. [14] introduced Gated Fusion Units (GFU) which are designed to merge feature maps from the feature extraction layers of Single Shot MultiBox Detector (SSD) at various scales [15]. In their studies [16], [17], the authors explored the use of distinct subnetworks for individual modalities and incorporated illumination-adaptive weighting of these subnetworks to enhance the efficiency of multispectral pedestrian detection. This approach enabled the prioritization of information from the RGB modality in adequately illuminated images or from the thermal modality in low-light situations. Zhou et al. [18] introduced Modality Balance Network (MBNet), which simultaneously compensated for modality imbalance problems in illumination and at the feature levels. Chen et al. [19] presented a late fusion architecture by probabilistically ensembling decisions made individually from RGB and thermal images. Zhang et al. [20] presented a fusion mechanism under the guidance of the intermodal and intramodal attention modules, to learn to dynamically weigh and fuse multispectral features. Yang et al. [21] proposed an algorithm that uses cascaded information enhancement and fusion of cross-modal attention features, both of which rely on the attention mechanism.

The existing research has significantly enhanced the effectiveness of combining RGB and thermal images for pedestrian detection through multispectral fusion. Nonetheless, the algorithms typically operate under the assumption that both types of images are accessible during inference, neglecting scenarios where sensor failure may occur. Furthermore, potential sensor modifications during inference such as modifications in the stereo arrangement or lens settings, compared to the training dataset acquisition, are not taken into account. Such discrepancies may result in only partially-overlapping images leading to *blackout* regions (refer to Figure 1). Analysis of existing algorithms shows a considerable degradation in performance under such conditions [6]. However, robustness to such realistic inference-time conditions is important for real-world
<figure><img src="image_4.png" /><figcaption>Fig. 2. Simulated inference-time conditions for assessing the robustness of HA-MLPD: a) fully-overlapping RGB and thermal images; b),c) complete blackouts of one of the modalities (sensor failures); d),e),f) partial overlaps (discrepancies in the extrinsic (d,e) or intrinsic (f) camera parameters).</figcaption></figure>

deployment of algorithms and has not received much attention in the field. In this direction, Zhang *et al.* [22] proposed a region feature alignment module (RFA), which adaptively compensates for misalignment of feature maps in both modalities. Recently, Kim *et al.* [6] introduced the MLPD algorithm, which has shown robustness to sensor failures and inference-time partial overlap. However, MLPD lacks interconnection between the feature extraction branches of the RGB and the thermal modalities. This could affect performance during blackout scenarios. Similarly, [23] used Multispectral Recall-ing (MSR) memory that can recall the missing features of multispectral modalities to detect pedestrians when one of the modalities is available. However, this architecture is not designed to handle both available simultaneous modalities.

Beyond the domain of multispectral pedestrian detection, the issue of partial image overlap has also been investigated in related fields, such as multi-view person tracking from multiple cameras [24]. In this context, proposed solutions range from hand-engineered methods, such as geometric transformations of images based on predefined ground plane homographies [25], [26], to more advanced deep learning-based approaches [27]. However, these methods require substantial adaptation to address the specific challenges posed by multispectral pedestrian detection, particularly due to the multimodal nature of the data and differences in problem formulation.

In this work, we propose an RGB and thermal fusion algorithm for pedestrian detection using the novel HA module, providing robustness to blackout scenarios caused by inference-time sensor failure or partial overlap. Our proposed HA module facilitates the flow of information and inter-connects the features extracted between the modalities using cross-attention [29], [30] (during normal conditions) and self-attention [31], [32] (during blackouts).

### III. PROPOSED HA-MLPD

#### A. Problem Statement

Our method, HA-MLPD, assumes that images from both modalities are automatically registered at test time and that pixel values in resulting non-overlapping regions are set to zero (i.e. blackout). Figure 2 shows some examples. The masks of the overlapping regions are further leveraged to guide the network through cross- or self-attention to the features. For that, we use masks $M_{rgb}$, $M_{thermal}$ corresponding to blackout

regions as what can be obtained by registering the images from the two modalities (using methods such as [33] for instance, or directly using the likely known stereo parameters). Note that the registration process is not within the scope of this paper. In detail, the masks $M_{rgb}$ and $M_{thermal}$ are set to 1 modality-specific information is available at the location of the pixel, 0 otherwise.

#### B. HA-MLPD Overview

Our model, HA-MLPD, consists of the feature extraction layers, HA module, fusion layer, and detection head. Figure 3 presents the general network architecture for the proposed HA-MLPD algorithm with the MobilenetV2 [28] backbone. Two separate branches are used to extract feature maps from both RGB and thermal images. The HA module, placed after the first block of layers, is used to perform cross- or self-attention across the two modalities. The attention mechanism varies according to the overlapping and non-overlapping image regions (as illustrated in Figure 4). The extracted features from different levels are then concatenated and passed through a fusion layer to generate features used as input to the detection head. The fusion layer, designed to be as light as possible for real-time applications, is composed of one convolutional layer followed by batch normalization and ReLu activation. This is similar to MLPD, where this multi-level fusion strategy and fusion layer were introduced to cope with the loss of modality-specific information after shared convolutional blocks. To

<table><caption>TABLE I
MOBILENETV2 [28] ARCHITECTURE DESCRIPTION.</caption><thead><tr><th>Input</th><th>Operator</th><th>t</th><th>c</th><th>n</th><th>s</th><th>Blocks</th></tr></thead><tbody><tr><td>224<sup>2</sup> × 3</td><td>conv2d</td><td>-</td><td>32</td><td>1</td><td>2</td><td rowspan="4">B1</td></tr><tr><td>112<sup>2</sup> × 32</td><td>bottleneck</td><td>1</td><td>16</td><td>1</td><td>1</td></tr><tr><td>112<sup>2</sup> × 16</td><td>bottleneck</td><td>6</td><td>24</td><td>2</td><td>2</td></tr><tr><td>56<sup>2</sup> × 24</td><td>bottleneck</td><td>6</td><td>32</td><td>3</td><td>2</td></tr><tr><td>28<sup>2</sup> × 32</td><td>bottleneck</td><td>6</td><td>64</td><td>4</td><td>2</td><td rowspan="2">B2</td></tr><tr><td>14<sup>2</sup> × 64</td><td>bottleneck</td><td>6</td><td>96</td><td>3</td><td>1</td></tr><tr><td>14<sup>2</sup> × 96</td><td>bottleneck</td><td>6</td><td>160</td><td>3</td><td>2</td><td rowspan="3">B3</td></tr><tr><td>7<sup>2</sup> × 160</td><td>bottleneck</td><td>6</td><td>320</td><td>1</td><td>1</td></tr><tr><td>7<sup>2</sup> × 320</td><td>conv2d 1x1</td><td>-</td><td>1280</td><td>1</td><td>1</td></tr><tr><td>7<sup>2</sup> × 1280</td><td>avgpool 7x7</td><td>-</td><td>-</td><td>1</td><td>-</td><td rowspan="2">N/A</td></tr><tr><td>1 × 1 × 1280</td><td>conv2d 1x1</td><td>-</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>

Each line describes a sequence of 1 or more identical (modulo stride) layers, repeated *n* times. All layers in the same sequence have the same number *c* of output channels. The first layer of each sequence has a stride *s* and all others use stride 1; *t* denotes the expansion factor [28].
<figure><img src="image_5.png" /><figcaption>Fig. 3. Network Architecture for the proposed HA-MLPD. Modality-specific features are extracted from the respective image using a feature extraction backbone (here MobilenetV2 [28], and the blocks B1, B2 and B3 are described as in Table I). The HA module then enhances the features by attending only to the regions with useful information. This is followed by a sequence of shared convolutional blocks that extract features common to both modalities. Finally, the extracted multiscale features are fed to the SSD detector [15] to predict the pedestrian bounding boxes and their confidence scores.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 4. Illustration of the novel HA module developed. The use of masks to remove blackout regions helps in attending to only regions with useful information. The results reported in Section IV show that the use of HA helps to reduce performance degradation during inference. Q,K,V depict Queries, Keys and Values.</figcaption></figure>

strengthen this effect, we decoupled the modality-shared layers of MLPD to make them modality-specific in HA-MLPD.

### C. Details of HA-MLPD Pipeline

**Feature Extraction:** Any standard feature extraction backbone, possibly followed by additional blocks of layers, can be used to extract features ($F_{rgb}$, $F_{thermal}$) from both images:

$$ 
\begin{aligned}
F_{rgb} &= \phi_{rgb}(I_{rgb}), \\
F_{thermal} &= \phi_{thermal}(I_{thermal}),
\end{aligned}
\qquad (1) 
$$

where $I_{rgb}$, $I_{thermal}$ represents RGB and thermal images respectively, and $\phi_{rgb}$, $\phi_{thermal}$ the corresponding feature extractors. In our experiments, MobileNetV2 [28] was chosen for its compactness (see Figure 3 for overview of the corresponding architecture), and VGG-16 [34] as the original

MLPD backbone. These feature extractors are composed of B consecutive blocks of layers:

$$ 
\begin{aligned}
\phi_{rgb} &= \phi_{rgb}^{(B)} \circ \cdots \circ \phi_{rgb}^{(2)} \circ \phi_{rgb}^{(1)}, \\
\phi_{thermal} &= \phi_{thermal}^{(B)} \circ \cdots \circ \phi_{thermal}^{(2)} \circ \phi_{thermal}^{(1)},
\end{aligned}
\qquad (2) 
$$

Features extracted after the first blocks $\phi_{rgb}^{(1)}$, $\phi_{thermal}^{(1)}$, denoted in what follows as $F_{rgb}$, $F_{thermal}$ for simplification, are then fed to our novel HA module.

**Hybrid-Attention Module:** The HA module shown in Figure 4 is the core of the proposed method. It enhances RGB and thermal features using the attention mechanism. The module switches between cross- and self-attention in response to the blackout regions in the input images. For that, we use masks $M_{rgb}$, $M_{thermal}$ corresponding to blackout regions to filter out features originating from these regions (⊗ denotes
element-wise multiplication):

$$ 
\begin{aligned}
f_{\text{rgb}} &= M_{\text{rgb}} \otimes F_{\text{rgb}}, \\
f_{\text{thermal}} &= M_{\text{thermal}} \otimes F_{\text{thermal}}.
\end{aligned} 
\quad (3) $$

The Keys, Queries and Values for each modality are then generated using 1 × 1 convolution layers:

$$ 
\begin{aligned}
Q_{\text{rgb}} &= \text{Conv}_{1 \times 1}(f_{\text{rgb}}), \\
K_{\text{rgb}} &= \text{Conv}_{1 \times 1}(f_{\text{rgb}}), \\
V_{\text{rgb}} &= \text{Conv}_{1 \times 1}(f_{\text{rgb}}), \\
Q_{\text{thermal}} &= \text{Conv}_{1 \times 1}(f_{\text{thermal}}), \\
K_{\text{thermal}} &= \text{Conv}_{1 \times 1}(f_{\text{thermal}}), \\
V_{\text{thermal}} &= \text{Conv}_{1 \times 1}(f_{\text{thermal}}).
\end{aligned} 
\quad (4) $$

The combined Query $Q_c$ is then computed as the sum of the two modality-specific queries:

$$ Q_c = Q_{\text{rgb}} + Q_{\text{thermal}}. \quad (5) $$

Removing the features corresponding to the blackout regions using the masks and then combining the queries will therefore make the modalities cross-attend where both modalities are available, and self-attend in the blackout regions. Following the standard practice, attended features $f_{\text{rgb}}^*$ and $f_{\text{thermal}}^*$ are calculated as:

$$ 
\begin{aligned}
f_{\text{rgb}}^* &= \text{softmax}(Q_c^\top K_{\text{rgb}}) V_{\text{rgb}}, \\
f_{\text{thermal}}^* &= \text{softmax}(Q_c^\top K_{\text{thermal}}) V_{\text{thermal}}.
\end{aligned} 
\quad (6) $$

Finally, the enhanced features $f'_{\text{rgb}}$ and $f'_{\text{thermal}}$ for each modality are obtained as:

$$ 
\begin{aligned}
f'_{\text{rgb}} &= f_{\text{rgb}} + f_{\text{rgb}}^*, \\
f'_{\text{thermal}} &= f_{\text{thermal}} + f_{\text{thermal}}^*.
\end{aligned} 
\quad (7) $$

**Fusion Layer:** The enhanced features are then processed by the remaining feature extraction layers, to extract higher-level dual-modality-guided information. After each block of layers, the features from both branches are concatenated then fused using shared network layers. These layers are composed of 2D convolutions followed by Batch Norm and ReLu, similar to the MLPD baseline (see Figure 3).

**Detector Head:** The multi-level fused features are then passed through the detection head. In our architecture, and similar to MLPD, we use the SSD [15] model for object detection. However, it can be replaced with any other state-of-the-art detector in practice. The detector outputs pedestrian bounding box locations and confidence scores.

**Loss function:** The model is trained with regression loss on the bounding box locations $\mathcal{L}_{bbox}$ as in SSD [15] and multi-label loss $\mathcal{L}_{multitabel}$ from MLPD [6], balanced by a scaling factor $\lambda$:

$$ \mathcal{L} = \mathcal{L}_{bbox} + \lambda \mathcal{L}_{multitabel}. \quad (8) $$

## D. Masking Data Augmentation

In addition to the data augmentations from the MLPD baseline, we included data augmentations using masking in our training process to foster the resilience of our approach. Our method involves masking the complete RGB and thermal

modalities (probability of 10% for each), as well as randomly masking patches of either modality again with a probability of 10% for RGB masking and 10% for thermal masking. Note that we avoid masking the same region in both modalities simultaneously. Also, these augmentations are implemented exclusively during the training phase and are not used during inference.

# IV. EXPERIMENTS AND RESULTS

## A. Dataset

The KAIST Multispectral Pedestrian Dataset [1] consists of 95,328 RGB-Thermal pairs fully overlapped captured in an urban environment. The provided ground truth consists of 103,128 pedestrian bounding boxes in 1,182 instances. In our experiments, we sample 1 frame out of 2 so that 25,076 frames are used for training, as in [6]. For evaluation, we also follow the standard evaluation criterion, which consists of sampling 1 out of every 20 frames, so the results are evaluated in 2,252 frames where 1,455 frames were recorded during the day and 797 frames at night [6]. We use paired annotations for training [7] and sanitised annotations for evaluation [8].

To generate the complete blackout cases arising from sensor failures, the original pixels values are replaced with zeros for either of the modalities as shown in Figure 2. For sides blackout cases, the original images are divided into three equal-sized vertical portions, and opposite side portions (e.g., left part in the RGB image and right part in the thermal image) are replaced with zero value pixels in each modality. For the surrounding blackout scenarios, we centre-crop the thermal image (96 pixels cropped at both the top and bottom and 120 pixels on the left and right sides) and replace the removed regions with zero pixels, while retaining the entire RGB image.

## B. Training details

**HA-MLPD with MobileNetV2 backbone** – We extended the MobileNetV2 architecture with further convolutional layers, as shown in Figure 3. To initialise, we used ImageNet pre-trained weights for blocks (B1, B2, B3) and the remaining convolution kernels were initialised using values sampled from a normal distribution (std=0.01). The network training process spanned 200 epochs, with an early stop callback in place to stop training if no improvement was observed for 50 epochs. The model was trained using SGD with an initial LR, momentum, and weight decay set at $1e^{-3}$, 0.9, and $4e^{-5}$, respectively. The LR was scheduled to decrease at the 150th and 190th epochs with a gamma value of 0.1.

**HA-MLPD with VGG-16 backbone** – Like the original MLPD, we use VGG16 pre-trained on ImageNet with batch normalisation, from Conv1 to Conv5, and the remaining convolution kernels are initialised with values drawn from the normal distribution (std=0.01). The HA module is adopted at the output of Conv4 [6]. The model is trained by Stochastic Gradient Descent (SGD) with the initial learning rate (LR), momentum, and weight decay, as $1e^{-4}$, 0.9, and $5e^{-4}$, respectively. The mini-batch size is set to 8 and the input image size is resized to 512 (H) x 640 (W). The network was trained
<table><caption>TABLE II
EXPERIMENT RESULTS ON KAIST DATASET WITH TWO ("Dual Modality") OR ONLY ONE ("RGB Blackout", "Thermal Blackout") MODALITIES.</caption><thead><tr><th rowspan="2">Method</th><th colspan="3">Dual Modality</th><th colspan="3">RGB Blackout</th><th colspan="3">Thermal Blackout</th><th rowspan="2">All<br>Average<br>difference</th></tr><tr><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th></tr></thead><tbody><tr><td>ACF [1]</td><td>47.32</td><td>42.57</td><td>56.17</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Halfway Fusion [35]</td><td>25.75</td><td>24.88</td><td>26.59</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>FusionRPN+BF [36]</td><td>18.29</td><td>19.57</td><td>16.27</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>IAF R-CNN [37]</td><td>15.73</td><td>14.55</td><td>18.26</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>IATDNN+IASS [38]</td><td>14.95</td><td>14.67</td><td>15.72</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>CIAN [39]</td><td>14.12</td><td>14.77</td><td>11.13</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>MSDS-RCNN [8]</td><td>11.34</td><td>10.53</td><td>12.94</td><td>36.36</td><td>39.53</td><td>28.67</td><td>82.97</td><td>76.04</td><td>97.68</td><td>+27.60</td></tr><tr><td>AR-CNN [7]</td><td>9.34</td><td>9.94</td><td>8.38</td><td>17.70</td><td>21.95</td><td>8.64</td><td>77.03</td><td>67.54</td><td>97.85</td><td>+18.73</td></tr><tr><td>MBNet [18]</td><td>8.13</td><td>8.28</td><td>7.86</td><td>55.56</td><td>57.49</td><td>46.81</td><td>80.20</td><td>71.88</td><td>100</td><td>+32.01</td></tr><tr><td>SSD-RGB [15]</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>34.63</td><td>25.38</td><td>53.86</td><td>-</td></tr><tr><td>SSD-Thermal [15]</td><td>-</td><td>-</td><td>-</td><td>21.12</td><td>25.63</td><td>12.58</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>MLPD [6]</td><td>7.58</td><td>7.95</td><td>6.95</td><td>16.34</td><td>20.07</td><td>8.22</td><td>23.95</td><td>16.88</td><td>39.37</td><td>0</td></tr><tr><td>HA-MLPD (VGG-16)</td><td><strong>5.19</strong></td><td><strong>6.16</strong></td><td><strong>3.81</strong></td><td><strong>15.21</strong></td><td>20.41</td><td><strong>4.88</strong></td><td><strong>20.6</strong></td><td><strong>15.86</strong></td><td><strong>30.76</strong></td><td><strong>-2.29</strong></td></tr><tr><td>HA-MLPD (MobileNetv2)</td><td><strong>4.42</strong></td><td><strong>5.42</strong></td><td><strong>2.55</strong></td><td><strong>13.9</strong></td><td><strong>18.38</strong></td><td><strong>3.62</strong></td><td>24.29</td><td>16.92</td><td>40.83</td><td><strong>-1.75</strong></td></tr></tbody></table>

<table><caption>TABLE III
EXPERIMENT RESULTS ON KAIST DATASET WITH PARTIAL OVERLAP BETWEEN MODALITIES.</caption><thead><tr><th rowspan="2">Method</th><th colspan="3">Sides Blackout (RGB-Thermal)</th><th colspan="3">Sides Blackout (Thermal-RGB)</th><th colspan="3">Surrounding Blackout</th><th rowspan="2">All<br>Avg.<br>diff.</th></tr><tr><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th></tr></thead><tbody><tr><td>MSDS-RCNN [8]</td><td>43.00</td><td>-</td><td>-</td><td>59.42</td><td>-</td><td>-</td><td>47.22</td><td>-</td><td>-</td><td>+30.05</td></tr><tr><td>AR-CNN [7]</td><td>32.18</td><td>-</td><td>-</td><td>54.59</td><td>-</td><td>-</td><td>57.58</td><td>-</td><td>-</td><td>+28.28</td></tr><tr><td>MBNet [18]</td><td>56.65</td><td>-</td><td>-</td><td>63.81</td><td>-</td><td>-</td><td>46.99</td><td>-</td><td>-</td><td>+35.98</td></tr><tr><td>SSD-RGB [15]</td><td>63.75</td><td>-</td><td>-</td><td>51.08</td><td>-</td><td>-</td><td>34.63</td><td>-</td><td>-</td><td>+29.99</td></tr><tr><td>SSD-Thermal [15]</td><td>38.73</td><td>-</td><td>-</td><td>59.98</td><td>-</td><td>-</td><td>55.06</td><td>-</td><td>-</td><td>+31.42</td></tr><tr><td>MLPD* [6]</td><td>17.31</td><td>19.46</td><td>13.44</td><td>23.03</td><td>20.41</td><td>27.38</td><td>19.16</td><td>18.11</td><td>22.41</td><td>0</td></tr><tr><td>HA-MLPD (VGG-16)</td><td><strong>13.40</strong></td><td><strong>15.32</strong></td><td><strong>9.55</strong></td><td><strong>18.24</strong></td><td><strong>18.11</strong></td><td><strong>18.97</strong></td><td><strong>11.84</strong></td><td><strong>10.94</strong></td><td><strong>14.43</strong></td><td><strong>-5.34</strong></td></tr><tr><td>HA-MLPD (MobileNetv2)</td><td><strong>12.84</strong></td><td><strong>13.90</strong></td><td><strong>10.34</strong></td><td><strong>19.29</strong></td><td><strong>18.67</strong></td><td><strong>20.97</strong></td><td><strong>11.26</strong></td><td><strong>11.56</strong></td><td><strong>11.25</strong></td><td><strong>-5.37</strong></td></tr></tbody></table>

for 40 epochs, and the LR was scheduled to decrease after 20 and 36 epochs. The models were trained on a single GPU accelerator node featuring 2x AMD Rome CPUs (32 cores @ 2.35 GHz) and 4x NVIDIA A100-40 GPUs.

### C. Adverse inference-time conditions simulation

To simulate sensor failure, we replaced one image of the RGB-Thermal pair by a full black image (zero pixel values). To simulate partial overlapping, we replace different parts of the images by black regions (see Figure 2). Side blackouts simulate discrepancies in lateral fields of view, whereas surrounding blackouts simulate differences in either focal length or sensor resolution.

### D. Metrics

Following the standard practice in the field, and especially the MLPD baseline [6], we report the log-average Miss Rate (MR) [40] at an Intersection-over-Union threshold of 0.5 to summarise the detector performance. This metric gives a stable and informative assessment of detector performance [40].

### E. Results

Table II presents a comparison of the performance of our method with the existing literature in pedestrian detection

scenarios using dual RGB and thermal modalities, especially in cases of sensor failure, such as RGB and thermal blackouts. Our method consistently shows competitive or superior results, demonstrating robustness in blackout conditions, particularly excelling in scenarios with RGB blackouts. It is important to highlight that even in complete blackouts of one modality, our method, in which HA then collapses in self-attention, outperforms both the RGB-only and Thermal-only models (referred to as SSD-RGB & SSD-Thermal). Furthermore, Table II includes comparisons with MLPD [6]. The colour and font coding highlights the best and second-best results in **bold red** and **italic blue**, respectively. HA-MLPD with the MobileNetv2 backbone achieves the highest performance in dual modality and RGB blackout scenarios, while HA-MLPD with the original VGG-16 backbone excels when RGB information is unavailable. In summary, our method demonstrates state-of-the-art performance, underscoring the effective RGB-Thermal fusion strategy in managing diverse real-world inference conditions.

Table III delves into the performance of the different methods in the context of inference-time misalignments involving extrinsic and intrinsic discrepancies in cameras. The scenarios considered include Sides Blackout with RGB-Thermal and Thermal-RGB misalignments, as well as Surrounding Blackout; see Figure 2. Our method consistently exhibits the best performance across these misalignment scenarios,

<footnote>*: MR values for day and night images were computed from pre-trained model released by authors; not reported in [6].</footnote>
<figure><img src="image_7.png" /><figcaption>Fig. 5. Visualization of experiment results on KAIST Dataset.</figcaption></figure>

<table><caption>TABLE IV
ABLATION STUDY AND COMPARISON WITH THE MLPD BASELINE.</caption><thead><tr><th rowspan="2">Method</th><th colspan="3">Sides Blackout (RGB-Thermal)</th><th colspan="3">Sides Blackout (Thermal-RGB)</th><th colspan="3">Surrounding Blackout</th><th rowspan="2">All<br>Average<br>difference</th></tr><tr><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th><th>MR<br>(All)</th><th>MR<br>(Day)</th><th>MR<br>(Night)</th></tr></thead><tbody><tr><td>MLPD [6]</td><td>17.31</td><td>19.46</td><td>13.44</td><td>23.03</td><td>20.41</td><td>27.38</td><td>19.16</td><td>18.11</td><td>22.41</td><td>0</td></tr><tr><td>HA-MLPD w/o HA</td><td><u>15.66</u></td><td><u>17.81</u></td><td><u>10.65</u></td><td><u>19.79</u></td><td><u>19.64</u></td><td><u>20.6</u></td><td><u>12.48</u></td><td><u>13.17</u></td><td><u>10.63</u></td><td>-3.86</td></tr><tr><td>HA-MLPD</td><td><u>13.40</u></td><td><u>15.32</u></td><td><u>9.55</u></td><td><u>18.24</u></td><td><u>18.11</u></td><td><u>18.97</u></td><td><u>11.84</u></td><td><u>10.94</u></td><td><u>14.43</u></td><td><u>-5.34</u></td></tr></tbody></table>

outperforming baseline methods such as MSDS-RCNN [8], AR-CNN [7], MBNet [18], SSD-RGB [15], SSD-Thermal [15] and MLPD [6]. Both backbones lead to second or best performance, with an average margin of more than 5 percentage points (pp) with respect to competitors. Overall, the table emphasises the robustness of HA-MLPD to inference-time blackouts, showcasing its efficacy in scenarios encountered in real-world applications. Fig. 5 summarizes the results from Tables II and III in a more easily interpretable plot.

## F. Ablation Study

The ablation study in Table IV investigates the impact of our contributions in inference-time blackout scenarios, specifically Sides Blackout with RGB-Thermal, Sides Blackout with Thermal-RGB and surrounding blackout conditions. The table outlines the MR results for different configurations: (1) MLPD, (2) HA-MLPD without the HA mechanism (w/o HA) but with masking data augmentation, and (3) our proposed HA-MLPD. All three methods are with the VGG-16 backbone. The results demonstrate a systematic improvement with each modification, with lower MR values indicating better performance. The addition of data augmentation (Aug) results in a notable reduction in MR values across all scenarios (−3.86pp on average). Furthermore, incorporation of HA contributes to an additional improvement, achieving the lowest MR values (−5.34pp on average, compared to MLPD). Overall, the ablation study underscores the significance of both HA and data augmentation in improving the model’s robustness under inference-time blackouts.

## G. Discussion

a) Dual modality performance: The results achieved in the dual modality scenario, i.e. when both modalities are fully overlapping and available, placed HA-MLPD in the second place (username: UniLu) on the leaderboard<fnref n="1" /> at the time of submission. It is worth noting that this places our method above competitors that were specifically designed for dual modality conditions only, whence not robust to blackout scenarios. On the contrary, our method operates a necessary trade-off to cope with such challenging conditions, but still outperforms most of other methods under the normal conditions.

b) Model efficiency: In our evaluation, we used two models, one with the VGG-16 backbone, which contains a total of 59.88 M parameters, and the other with the MobileNetV2 backbone, which contains a total of 13.96 M with a 4x reduction in the total number of parameters. Due to its larger size, the VGG-16 backbone required more time to train per epoch with a smaller batch size, while the smaller MobileNetV2 backbone allowed faster iteration through each epoch. However, MobileNetV2 required training for more number of epochs to achieve the best results. The overall duration of the training slightly favoured MobileNetV2. Given that the MobileNetV2 backbone is smaller, it can be easily accommodated on hardware with limited resources and can deliver a higher frame-per-second (FPS) rate during inference without compromising the performance. Note that our model takes approx. 20ms (compared to 42ms for MLPD baseline) to process an image during inference on a desktop workstation

<footnote n="1">¹https://eval.ai/web/challenges/challenge-page/1247/leaderboard/3137</footnote>
containing an Intel i7-11700 @ 2.50GHz CPU and 1x NVIDIA GeForce RTX 3090 GPU.

c) *Reliance on masks:* Our approach relies on the masks of the blackout regions to guide the network through hybrid-attention mechanisms. The success of the proposed method depends on the accuracy of these masks. If the blackout regions are not correctly identified, the HA mechanism could be misguided, leading to suboptimal pedestrian detection performance.

## V. CONCLUSION

In this paper, we tackle the challenges of multispectral pedestrian detection in real-world scenarios, such as adverse inference-time configurations and hardware resource limitations. We introduced a novel HA mechanism to mitigate performance degradation arising from modality-specific lack of information. During training, the HA module enables learning both generalised and discriminative features through self- or cross-attention mechanisms. A mobile-friendly backbone is also used for higher energy efficiency. Extensive experimental comparisons demonstrate that the proposed method is robust to realistic stereo conditions. Furthermore, an ablation study highlighted that both introduced HA mechanism and data augmentation play crucial roles in improving the model's robustness. Future work will include deploying the method on edge device for real-condition testing, and evaluating the HA mechanism on other modalities (e.g., depth images).

## ACKNOWLEDGMENT

The simulations were performed on the Luxembourg National Supercomputer MeluXina. The authors gratefully acknowledge the LuxProvide teams for their expert support.

## REFERENCES

[1] S. Hwang, J. Park, N. Kim, Y. Choi, and I. Kweon, "Multispectral pedestrian detection: Benchmark dataset and baselines," in CVPR, 2015.

[2] S. Krotosky and M. Trivedi, "On color-, infrared-, and multimodal-stereo approaches to pedestrian detection," *IEEE Trans. Intell. Transp. Syst.*, vol. 8, no. 4, pp. 619-629, 2007.

[3] Z. Guo, X. Li, Q. Xu, and Z. Sun, "Robust semantic segmentation based on rgb-thermal in variable lighting scenes," *Measurement*, vol. 186, p. 110176, 2021. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0263224121010903

[4] A. González, Z. Fang, Y. Socarras, J. Serrat, D. Vázquez, J. Xu, and A. M. López, "Pedestrian detection at day/night time with visible and fir cameras: A comparison," *Sensors*, vol. 16, no. 6, 2016.

[5] T. F. LLC, "Free flir thermal dataset for algorithm training." [Online]. Available: https://www.flir.com/oem/adas/adas-dataset-form/

[6] J. Kim, H. Kim, T. Kim, N. Kim, and Y. Choi, "Mlpd: Multi-label pedestrian detector in multispectral domain," *IEEE Robotics Autom. Lett.*, vol. 6, no. 4, pp. 7846-7853, 2021.

[7] L. Zhang, X. Zhu, X. Chen, X. Yang, Z. Lei, and Z. Liu, "Weakly aligned cross-modal learning for multispectral pedestrian detection," in *ICCV*, 2019, pp. 5126-5136.

[8] C. Li, D. Song, R. Tong, and M. Tang, "Multispectral pedestrian detection via simultaneous detection and segmentation," in *BMVC*, 2018.

[9] J. Lee, J.-S. Choi, E. Jeon, Y. Kim, T. Thanh Le, K. Shin, H. Lee, and K. Park, "Robust pedestrian detection by combining visible and thermal infrared cameras," *Sensors*, vol. 15, no. 5, 2015.

[10] L. Zhang, B. Wu, and R. Nevatia, "Pedestrian detection in infrared images based on local shape features," in *CVPR*, 2007.

[11] J. Davis and V. Sharma, "Fusion-based background-subtraction using contour saliency," in *CVPR Worksh.*, 2005.

[12] Y. Yuan, X. Lu, and X. Chen, "Multi-spectral pedestrian detection," *Signal Processing*, vol. 110, pp. 94-100, 2015.

[13] J. Liu, S. Zhang, S. Wang, and D. Metaxas, "Multispectral deep neural networks for pedestrian detection," in *BMVC*, 2016.

[14] Y. Zheng, I. H. Izzat, and S. Ziaee, "Gfd-ssd: gated fusion double ssd for multispectral pedestrian detection," *arXiv preprint arXiv:1903.06999*, 2019.

[15] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. E. Reed, C. Fu, and A. C. Berg, "SSD: single shot multibox detector," in *ECCV*, vol. 9905, 2016, pp. 21-37.

[16] C. Li, D. Song, R. Tong, and M. Tang, "Illumination-aware faster r-cnn for robust multispectral pedestrian detection," *Pattern Recognition*, vol. 85, pp. 161-171, 2019.

[17] D. Guan, Y. Cao, J. Yang, Y. Cao, and M. Yang, "Fusion of multispectral data through illumination-aware deep neural networks for pedestrian detection," *Information Fusion*, vol. 50, pp. 148-157, 2019.

[18] K. Zhou, L. Chen, and X. Cao, "Improving multispectral pedestrian detection by addressing modality imbalance problems," in *ECCV*, 2020.

[19] Y.-T. Chen, J. Shi, Z. Ye, C. Mertz, D. Ramanan, and S. Kong, "Multimodal object detection via probabilistic ensembling," in *ECCV*, 2022.

[20] H. Zhang, E. Fromont, S. Lefèvre, and B. Avignon, "Guided attentive feature fusion for multispectral pedestrian detection," in *WACV*, 2021.

[21] Y. Yang, K. Xu, and K. Wang, "Cascaded information enhancement and cross-modal attention feature fusion for multispectral pedestrian detection," *Frontiers in Physics*, vol. 11, 2023.

[22] L. Zhang, X. Zhu, X. Chen, X. Yang, Z. Lei, and Z. Liu, "Weakly aligned cross-modal learning for multispectral pedestrian detection," in *ICCV*, 2019.

[23] J. U. Kim, S. Park, and Y. M. Ro, "Towards versatile pedestrian detector with multisensory-matching and multispectral recalling memory," in *Proceedings of the AAAI Conference on Artificial Intelligence*, vol. 36, no. 1, 2022, pp. 1157-1165.

[24] N. Narayan, N. Sankaran, S. Setlur, and V. Govindaraju, "Learning deep features for online person tracking using non-overlapping cameras: A survey," *Image and Vision Computing*, vol. 89, pp. 222-235, 2019.

[25] R. Eshel and Y. Moses, "Homography based multiple camera detection and tracking of people in a dense crowd," in *CVPR*, 2008.

[26] S. M. Khan and M. Shah, "A multiview approach to tracking people in crowded scenes using a planar homography constraint," in *ECCV*, 2006.

[27] L. V. Ma, T. T. D. Nguyen, B.-N. Vo, H. Jang, and M. Jeon, "Track initialization and re-identification for 3d multi-view multi-object tracking," *Inf. Fusion*, vol. 111, p. 102496, 2024.

[28] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, "Mobilenetv2: Inverted residuals and linear bottlenecks," in *CVPR*, 2018, pp. 4510-4520.

[29] C.-F. Chen, Q. Fan, and R. Panda, "Crossvit: Cross-attention multi-scale vision transformer for image classification," in *ICCV*, 2021.

[30] S. Cai, P. Li, E. Su, and L. Xie, "Auditory attention detection via cross-modal attention," *Frontiers in neuroscience*, vol. 15, p. 652058, 2021.

[31] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, "Attention is all you need," *NeurIPS*, 2017.

[32] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, et al., "An image is worth 16x16 words: Transformers for image recognition at scale," in *ICLR*, 2021.

[33] M. Arar, Y. Ginger, D. Danon, A. Bermano, and D. Cohen-Or, "Unsupervised multi-modal image registration via geometry preserving image-to-image translation," in *CVPR*, 2020.

[34] K. Simonyan and A. Zisserman, "Very deep convolutional networks for large-scale image recognition," in *ICLR*, 2015.

[35] J. Liu, S. Zhang, S. Wang, and D. N. Metaxas, "Multispectral deep neural networks for pedestrian detection," in *BMVC*, 2016.

[36] D. König, M. Adam, C. Jarvers, G. Layher, H. Neumann, and M. Teutsch, "Fully convolutional region proposal networks for multi-spectral person detection," in *CVPR*, 2017, pp. 243-250.

[37] C. Li, D. Song, R. Tong, and M. Tang, "Illumination-aware faster R-CNN for robust multispectral pedestrian detection," *Pattern Recognit.*, vol. 85, pp. 161-171, 2019.

[38] D. Guan, Y. Cao, J. Yang, Y. Cao, and M. Y. Yang, "Fusion of multispectral data through illumination-aware deep neural networks for pedestrian detection," *Inf. Fusion*, vol. 50, pp. 148-157, 2019.

[39] L. Zhang, Z. Liu, S. Zhang, X. Yang, H. Qiao, K. Huang, and A. Husain, "Cross-modality interactive attention network for multispectral pedestrian detection," *Inf. Fusion*, vol. 50, pp. 20-29, 2019.

[40] P. Dollar, C. Wojek, B. Schiele, and P. Perona, "Pedestrian detection: An evaluation of the state of the art," *IEEE Trans. Pattern Anal. Mach. Intell.*, vol. 34, no. 4, pp. 743-761, 2012.