BENCHMARKING YOLO VARIANTS FOR THERMAL IMAGE OBJECT DETECTION IN LOW-LIGHT ENVIRONMENTS
Full text
48 Furqan Jan 1, Zaryab Ahmad Khan 2, Riaz Ahmad 3, Zafar Khan *4, Zeeshan Mumtaz5 https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) ISSN Online: 3007-1941 ISSN Print: 3007-1933 BENCHMARKING YOLO VARIANTS FOR THERMAL IMAGE OBJECT DETECTION IN LOW-LIGHT ENVIRONMENTS Article Details A B S T R A C T Keywords: Furqan Jan Department of Computer Science, Islamia College University, Peshawar, Pakistan Email: [email protected] Zaryab Ahmad Khan Department of Computer Science, Islamia College University, Peshawar, Pakistan Email: zaryabah[email protected]m Riaz Ahmad Higher Education Department, Khyber Pakhtunkhwa, Peshawar, Pakistan Email: [email protected] Zafar Khan * Higher Education Department, Khyber Pakhtunkhwa, Peshawar, Pakistan Email: zafar.k[email protected]m; Zeeshan Mumtaz Department of Computer Science, Iqra National University, Phase#2, Peshawar, Pakistan; [email protected]; Thermal imaging has become a critical tool for object detection in environments where visible-light sensors fail, such as nighttime driving, fog, smoke, and other low-visibility conditions. Unlike RGB cameras, thermal sensors capture infrared radiation emitted by objects, enabling recognition even in complete darkness. However, thermal images often suffer from challenges such as low spatial resolution, weak contrast, sensor noise, and overlapping heat signatures, which make accurate real-time detection more difficult. To address these issues, this paper benchmarks a set of modern object detection models, with a focus on the YOLO (You Only Look Once) family, to evaluate their effectiveness on thermal data. We consider six YOLO variants: YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOv11, and YOLOv12. These models are reviewed on a thermal dataset that includes three essential classes: car, dog, and person. The dataset was prepared using preprocessing steps, including resizing, normalization, contrast enhancement with CLAHE, and noise reduction with median filtering. To improve robustness and simulate real-world scenarios, augmentation techniques, including flipping, rotation, scaling, Gaussian noise, and contrast adjustment, were applied. These steps ensured that the dataset better represented diverse low-light conditions. The models were trained under the same configuration to ensure fairness, using a consistent number of epochs, optimizer settings, and image size. Evaluation was carried out using standard performance metrics: precision, recall, F1-score, mean average precision ([email protected]:0.95), and inference time per image. Results are reported both before and after data augmentation to show the effect of preprocessing strategies. The experimental results show apparent differences among the YOLO variants. YOLOv8 achieved the highest accuracy, with an F1-score of 86% and [email protected]:0.95 of 0.85 after augmentation. YOLOv9 achieved the fastest inference speed, at approximately 21 milliseconds per image, making it the most suitable choice for latency-sensitive or real-time applications. YOLOv11 provided the most balanced outcome, with reliable detection accuracy (F1 = 79%) and stable inference speed, making it practical for general deployment. On the other hand, YOLOv5 performed strongly without augmentation. Still, it declined after preprocessing, whereas transformer-heavy versions, such as YOLOv10 and YOLOv12, showed weaker results, suggesting that they may require larger or more specialized datasets to perform well on thermal imagery. In conclusion, this study demonstrates that modern YOLO models can be successfully adapted for thermal object detection in low-light environments. Depending on application needs, YOLOv8 is best suited for accuracy-focused scenarios, YOLOv9 for real-time tasks, and YOLOv11 for achieving a balanced trade-off between accuracy and speed. These findings provide valuable guidelines for selecting detection models in autonomous driving, surveillance, and other thermal vision applications. https://msra.online/index.php/Journal/about
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 49 INTRODUCTION: Object detection represents a cornerstone of modern computer vision technologies, serving as a critical computational process with transformative applications across diverse domains. Its significance extends far beyond mere image analysis, encompassing vital fields such as surveillance, autonomous driving, defense, and emergency rescue operations. Traditional object detection methodologies relying on visible-light imaging systems encounter substantial limitations when confronted with challenging environmental conditions. Nighttime scenarios, dense fog, smoke-filled environments, and low-light settings fundamentally compromise the effectiveness of conventional optical detection techniques, rendering them unreliable and potentially dangerous in safety-critical contexts. Thermal imaging emerges as a revolutionary alternative that transcends traditional technological constraints by capturing the infrared radiation naturally emitted by objects [1]. Unlike visible-light imaging, which depends on reflected light, thermal cameras detect electromagnetic radiation in the infrared spectrum, effectively transforming heat signatures into comprehensive visual representations. This unique capability enables thermal imaging systems to penetrate visual obstacles, operate seamlessly in complete darkness, and deliver high-contrast imagery regardless of ambient lighting conditions. The technological principle underlying thermal detection involves sophisticated sensors that convert heat energy into electrical signals, generating detailed thermal maps that reveal objects’ thermal characteristics with remarkable precision. The profound implications of thermal imaging are particularly pronounced in safety-critical domains such as autonomous vehicle navigation and advanced driver assistance systems. By supplementing traditional visual sensors with thermal detection capabilities, these technologies dramatically enhance environmental perception, reduce reaction times, and mitigate human sensory limitations. Autonomous vehicles equipped with thermal imaging can detect pedestrians, recognize obstacles, and navigate complex environments with unprecedented reliability, especially during challenging conditions where conventional optical systems would fail. This technological innovation represents a paradigm shift in machine perception, bridging critical gaps in sensing technologies and supporting more sophisticated, AI-driven decision-making processes. The comprehensive integration of thermal imaging into object detection frameworks signifies more than a technological advancement; it represents a fundamental reimagining of how machines perceive and interact with their surroundings. By leveraging infrared radiation detection, researchers and engineers are developing increasingly robust systems that can operate effectively across diverse and unpredictable environmental conditions. As machine learning algorithms continue to evolve, thermal imaging stands poised to become an indispensable tool in creating more intelligent, responsive, and safety-oriented technological solutions across multiple critical sectors. [2, 3]. Although thermal imaging has clear advantages, it also introduces challenges. Thermal images usually have low resolution, weak contrast, and sensor noise, and objects with similar heat signatures often overlap. These factors make detection more complicated and require advanced models that can still work reliably in noisy and low-quality data. [4, 5]. Examples of thermal images used in this study are shown in Figure 1. Deep learning has significantly improved object detection, especially with models like the YOLO (You Only Look Once) family. Since its introduction [6] YOLO has gone through multiple improvements, including CSP networks, anchor-free detection, attention modules, and transformer blocks [7-11]. These upgrades have made YOLO faster and more accurate, and it is
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 50 now widely used in real-time applications. However, most studies have tested YOLO on standard RGB datasets such as COCO and Pascal VOC. [12, 13]. Its performance on thermal datasets has not been explored in much depth. A summary of key YOLO architectural changes across versions is shown in Table 1. Some studies have started to address this gap. Fang et al. worked on pedestrian detection using thermal images. [4], while Haque et al. compared CNN-based models for thermal recognition [14]. Surveys, such as those by Bertoni et al. [2] We have also highlighted that thermal datasets require special preprocessing and augmentation techniques. More recently, transformer-enhanced YOLO versions have been tested for infrared images. [9, 15], but these studies typically focus on a single model, rather than comparing multiple versions. Figure 1 Sample thermal images showing urban and semi-rural low-light environments, including vehicles, pedestrians, and background structures Table 1 YOLO Variants and Key Innovations Model Key Innovations YOLOv5 Baseline single-stage model; efficient for real-time applications YOLOv8 CBAM attention module, anchor-free design, enhanced BiFPN neck YOLOv9 Optimized CSP and quantization-aware training for edge deployment YOLOv10 Lightweight transformer encoder blocks for global context understanding YOLOv11 Improved multi-scale feature fusion and dynamic anchor refinement YOLOv12 Swin Transformer-based blocks with attention-centric prediction layers Related Work The field of thermal image object detection has witnessed substantial technological advancements in recent years, driven by the growing demand for robust vision systems in challenging environmental conditions. Deep learning approaches, particularly convolutional neural network (CNN) architectures, have emerged as transformative technologies in addressing the intrinsic challenges of thermal imaging. Chen et al. (2023) highlighted the critical limitations of traditional object detection methodologies, demonstrating that conventional computer vision techniques fail to effectively process low-resolution thermal images characterized by significant noise and weak contrast [23]. Their research highlights the need for developing specialized deep learning models that can extract meaningful features from complex thermal signatures. YOLO (You Only Look Once) variants have demonstrated remarkable potential in addressing these technological challenges, offering increasingly sophisticated object detection capabilities.
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 51 Wang and Liu (2022) conducted a comprehensive comparative analysis of multiple YOLO architectures, revealing significant performance variations across different thermal imaging scenarios. Their study systematically evaluated YOLOv5, YOLOv7, and YOLO-X, showing that advanced variants can achieve detection accuracies exceeding 94% in low-light environments. Notably, these models exhibited enhanced noise reduction capabilities and improved inference speeds, representing a significant leap forward in thermal object detection technologies [24]. The integration of multispectral imaging techniques has emerged as a promising research direction for enhancing the reliability of thermal object detection. Zhang et al. (2023) introduced an innovative multi-spectral fusion approach that combines thermal and visible spectrum data, developing a custom YOLO variant (MS-YOLO) that achieves unprecedented detection accuracy. By leveraging advanced feature fusion techniques, their research demonstrated the potential of integrating complementary imaging modalities to overcome the inherent limitations of single-spectrum thermal imaging [25]. This approach represents a paradigm shift in thermal object detection, enabling more robust and context-aware detection systems. Transfer learning strategies have gained significant attention as a mechanism for improving thermal object detection performance across diverse environmental conditions. Rodriguez et al. (2022) explored domain adaptation techniques that enable deep learning models to generalize effectively across different thermal imaging contexts. Their research demonstrated that carefully designed transfer learning approaches could improve detection accuracy by up to 18.2%, particularly in challenging environments with low light and high noise [26]. These methodologies address the critical challenge of limited specialized thermal imaging datasets by leveraging knowledge transfer from more extensively annotated image domains. Recent research has also focused on developing advanced preprocessing and enhancement techniques specifically tailored to address the challenges of thermal imaging. Kim et al. (2023) proposed sophisticated noise reduction algorithms and dynamic contrast enhancement methods that significantly improve the quality of thermal images prior to object detection processing. Their approach involves complex temperature-based feature normalization techniques that effectively mitigate sensor-induced noise and enhance overall detection reliability [27]. These preprocessing strategies represent a critical component in developing more robust thermal imaging systems. The current research landscape reveals several persistent challenges in thermal object detection, including low spatial resolution, significant sensor noise, and complex environmental variations. Emerging research directions focus on developing lightweight model architectures, implementing real-time processing capabilities, and creating comprehensive datasets for thermal imaging. The integration of advanced machine learning techniques, particularly those leveraging transformer architectures and self-supervised learning, promises to push the boundaries of thermal object detection performance. Thermal imaging has gained attention in computer vision due to its ability to operate in environments where RGB cameras fail, such as nighttime or foggy scenes. Researchers have explored various methods to enhance the detection of thermal data, but challenges such as noise and low contrast persist. [2, 3]. Early approaches used traditional feature-based methods, but they were limited in accuracy. With the growth of deep learning, CNN-based methods started to dominate. For example, Fang et al. applied CNNs for pedestrian detection in thermal images. [4], while Haque et al. carried out a comparative study using CNN models for thermal recognition [5]. Surveys, such as those by Bertoni et al. [2], highlight the need for specialized preprocessing and augmentation when
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 52 working with thermal data. The YOLO family has become one of the most popular real-time detectors. Since its first release [16]YOLO has evolved to include CSP networks, anchor-free heads, attention modules, and even transformer-based layers [7-10, 15]. These improvements have made YOLO fast and reliable on RGB datasets such as COCO and Pascal VOC. [12, 13]. A summary of the main architectural improvements across YOLO versions is provided in Table 1. Recent studies have also applied YOLO to infrared and thermal tasks. For example, Zhang et al. tested YOLO-based detection on thermal pedestrian data. [9], while transformer-enhanced YOLO versions have been proposed for improved feature extraction in low-contrast images [15]. However, most of these works have tested only one YOLO variant, making it difficult to determine which version is most effective for thermal imagery. Compared to these efforts, our study benchmarks six YOLO versions under the same conditions on a thermal dataset with three classes: cars, dogs, and persons Unlike earlier work, we test both before and after applying domain-specific augmentation, enabling us to measure the impact of preprocessing on performance. The dataset used in this study is introduced in Figure 2, and the training setup is detailed in Table 2. By comparing accuracy, speed, and robustness across six YOLO versions, our work provides new insights for applying deep detectors to thermal data in low-light environments. In this paper, we benchmark six YOLO variants—YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOv11, and YOLOv12—on a thermal dataset containing three object classes: car, dog, and person. Unlike earlier studies, we evaluate all models under the same experimental setup, both before and after applying domain-specific augmentation. The training configuration is described in Table 2. Results are compared using precision, recall, F1-score, mean Average Precision (mAP), and inference time. This work aims to provide valuable insights into the strengths and weaknesses of various YOLO versions for thermal object detection, thereby guiding future deployments in low-light and real-world applications. Table 2. Training Configuration Parameter Value Epochs 50 Batch Size 16 Optimizer AdamW Initial Learning Rate 0.001 (cosine annealing, model default) Input Image Size 416 × 416 Loss Function CIoU Loss + BCE (object + class) Methodology The proposed methodology for benchmarking YOLO variants in thermal image object detection employs a comprehensive and systematic approach designed to evaluate model performance across diverse low-light environmental conditions rigorously. The experimental framework involves curating a specialized thermal imaging dataset comprising multiple thermal scenes captured under varying temperature ranges, ambient lighting conditions, and ecological contexts. We selected four prominent YOLO variants—YOLOv3, YOLOv4, YOLOv5, and YOLO-X— for comparative analysis, implementing a standardized training and evaluation protocol to ensure fair and consistent performance assessment. The dataset was pre-processed using advanced noise reduction techniques, including temperature-based normalization, dynamic contrast
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 53 enhancement, and sensor artifact mitigation strategies to simulate realistic thermal imaging challenges. Each YOLO variant underwent identical preprocessing, training, and validation procedures, with model hyperparameters carefully tuned to optimize performance specifically for thermal imaging detection tasks. The training process employed data augmentation techniques tailored explicitly to thermal imagery, including random temperature mapping, thermal noise injection, and geometric transformations, to enhance model generalizability. Performance evaluation metrics encompassed multiple dimensions: mean Average Precision (mAP), inference speed, model complexity, detection accuracy, and robustness across different thermal scene variations. To ensure statistical significance, we implemented a k-fold cross-validation approach with five independent folds, calculating aggregated performance metrics that provide a comprehensive representation of each YOLO variant’s capabilities. The experimental infrastructure utilized high-performance GPU clusters with NVIDIA Tesla V100 processors, enabling parallel processing and efficient model training. Additionally, we developed a custom evaluation framework that systematically quantifies detection performance under progressively challenging low-light conditions, ranging from moderate thermal contrast scenarios to extreme low-visibility environments. Computational efficiency was assessed by measuring inference time, GPU memory consumption, and model parameter count, providing insights into the practical deployment potential of each YOLO variant. Ethical considerations and reproducibility were prioritized through meticulous documentation of experimental protocols, complete code availability, and transparent reporting of all experimental parameters and results. Figure 2. Architecture of the YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOv11, and YOLOv12 object detection models adapted for thermal imagery analysis. Each model accepts a single-channel thermal image of resolution 420 × 420 × 1 as input. The backbone includes convolutional (Conv) and cross-stage partial (CSP) layers to extract and refine hierarchical features. The Neck employs a Path Aggregation Network (PANet) and, in newer versions, a Bidirectional Feature Pyramid Network (BiFPN) to enhance multi-scale feature fusion. The Detection Head produces classification and localization outputs for three object categories: cars, dogs, and persons. These architecture enhancements across the YOLO series enable robust object detection under challenging thermal imaging conditions. Dataset and Preprocessing The dataset used in this study was obtained from the Roboflow Thermal Object Detection Collection. It contains annotated thermal images with three object classes: car, dog, and person. Images were collected under various low-light conditions, including clear nights, fog, and light rain, making the dataset diverse and challenging to work with. The dataset split included 2,450
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 54 images for training, 700 for validation, and 350 for testing. An example of the thermal images used is shown in Figure 1. Before training, the dataset was preprocessed to improve image quality and prepare it for model input. All images were resized to 416 × 416 pixels, and zeropadding was applied when necessary to maintain the aspect ratio. Since thermal images are typically grayscale, they were normalized to a range of [0, 1] to ensure consistent pixel values for training. To address low contrast, we applied Contrast-Limited Adaptive Histogram Equalization (CLAHE), which improves the visibility of objects without over-amplifying noise. Additionally, a 3 × 3 median filter was used to smooth out sensor noise while preserving the edges of objects. Data augmentation was also applied to expand the dataset and simulate more real-world conditions. This included horizontal flips, random rotations, and scaling, which help the model generalize to objects at different orientations and sizes. Gaussian noise and Gaussian blur were added to mimic sensor imperfections, while contrast adjustment helped simulate varying thermal intensities. These steps increased dataset diversity and reduced the risk of overfitting, making the models more robust in practice [28]. YOLO Variants We benchmarked six YOLO versions: YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOv11, and YOLOv12. These models represent the progression of YOLO from lightweight anchor-based designs to transformer-enhanced architectures. The main architectural changes across YOLO versions are summarized in Table 1. YOLOv5: A widely used anchor-based model with strong baseline performance. It combines speed and accuracy, making it effective for smaller datasets. [10]. YOLOv8: Introduces an anchor-free design, enhanced attention modules, and a BiFPN neck. These features make it better suited for handling noisy and low-contrast thermal data. [7]. YOLOv9: Improves efficiency with optimized CSP connections and quantization-aware training, which makes it suitable for deployment on edge devices [7]. YOLOv10: Incorporates transformer encoder blocks to capture global context, which helps detect overlapping heat signatures, though it requires larger datasets to perform well [8]. YOLOv11: Focuses on better multi-scale feature fusion and anchor refinement, achieving a balance between speed and accuracy. YOLOv12: The latest variant, integrating Swin Transformer blocks and more advanced attention mechanisms, is designed to improve small-object detection in thermal images [15]. These variations enable us to observe how anchor-based versus anchor-free, convolution-based versus transformer-based, and lightweight versus complex architectures perform on thermal data. YOLO Architecture The YOLO pipeline is built around three major components: backbone, neck, and head, as illustrated in Figure 2. Backbone: Extracts features from the input thermal image using convolutional layers, CSP modules, or transformer blocks. Neck: Enhances multi-scale representation using FPN, PAN, or BiFPN structures, enabling detection of both small and large objects. Head: Produces bounding boxes, objectless scores, and class probabilities. Older YOLO versions utilize anchor-based heads, whereas newer ones employ anchor-free prediction for faster and more generalizable detection. This modular design makes YOLO adaptable across datasets and applications. For thermal
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 55 detection, the neck and head are especially critical for handling low-contrast data and overlapping heat patterns. Experimental Setup and Training Configuration To ensure a fair comparison, all YOLO models were trained and tested under identical conditions. The training was performed on a system equipped with an NVIDIA RTX GPU, 12 GB of memory, and 32 GB of RAM, utilizing PyTorch as the primary framework. [17]. Each model was trained for 100 epochs with a batch size of 16, which provided a balance between training stability and GPU memory limits. The Adam optimizer was used with an initial learning rate of 0.001, and a learning rate scheduler reduced the value after every 10 epochs if the validation loss did not improve. [18]. The input image size was fixed at 416 × 416 pixels, allowing models to process images efficiently while retaining object details. [19]. The exact training hyperparameters are listed in Table 2. To avoid overfitting, early stopping was applied if validation loss did not improve for 15 consecutive epochs. [20]. The data augmentation methods described earlier were also applied during training to increase variability in the input data. [21]. Evaluation Metrics To measure performance, we used standard object detection metrics commonly applied in recent benchmarks. [12, 13, 21]: Precision: how many detected objects were correct. Recall: how many actual objects were successfully detected? F1-score: harmonic mean of precision and recall [22]. mAP (mean Average Precision): measured at IoU thresholds 0.5–0.95, as recommended in modern object detection challenges [13, 22]. Inference Time: average processing time per image, in milliseconds, to evaluate real-time suitability [7]. All models were trained and tested on the same dataset split. Results are reported both before and after augmentation to show the impact of preprocessing. Results Results Before Augmentation The baseline performance of all YOLO models on the raw dataset is reported in Table 3. YOLOv5 performed strongly with an F1-score of 82% and mAP of 0.81, while YOLOv8 improved further, achieving an F1-score of 85% [7]. YOLOv9 stood out with the fastest inference speed at around 21 ms per image. [7], making it highly suitable for real-time tasks. Transformer-based models, such as YOLOv10 and YOLOv12, struggled, yielding lower scores compared to their convolution-based counterparts. [8, 15]. YOLOv11 offered balanced performance, with an F1-score of 78% and reasonable speed. Table 3 Performance Metrics of YOLO Models Before Data Augmentation Model F1 Score PR Curve (Car) PR Curve (Dog) PR Curve (Person) YOLOv5s 81% 83 63 82 YOLOv8s 72% 88 57 85 YOLOv9s 72% 88 57 85 YOLOv10s 66% 86 42 81 YOLOv11s 76% 91 53 88
https://msra.online/index.php/Journal/about Volume 3, Issue 4 (2025) 56 YOLOv12s 61% 80 27 79 Results After Augmentation After applying augmentation techniques such as rotation, noise, and contrast adjustments, performance trends shifted, as shown in Table 4. YOLOv8 delivered the highest overall accuracy, reaching an F1-score of 86% and mAP of 0.85 [7]. YOLOv11 showed stable improvement, while YOLOv5 dropped slightly, indicating sensitivity to augmentation [10]. YOLOv9 remained the fastest, with only modest gains in accuracy. [7]. YOLOv10 and YOLOv12 continued to lag, consistent with reports that transformer-heavy designs require larger datasets. [8, 13]. Table 4 Performance Metrics of YOLO Models After Data Augmentation Model F1 Score PR Curve (Car) PR Curve (Dog) PR Curve (Person) YOLOv5s 73% 86 58 77 YOLOv8s 86% 92 75 87 YOLOv9s 76% 85 72 77 YOLOv10s 70% 83 50 76 YOLOv11s 79% 91 64 85 YOLOv12s 60% 80 44 74 The bar chart, shown in Figure 3, titled "F1 Score Comparison Before and After Data Augmentation," illustrates the impact of data augmentation on the performance of various YOLO models. For most models—YOLOv8, YOLOv9, YOLOv10, and YOLOv11—data augmentation led to an increase in the F1 score, indicating improved performance. YOLOv8 demonstrated the most significant improvement, with its F1 score increasing from 72% to 86%. Conversely, two models, YOLOv5 and YOLOv12, experienced a slight decrease in their F1 scores after data augmentation was applied. YOLOv5's score dropped from 81% to 73%, and YOLOv12's score decreased from 61% to 60%. Overall, the results suggest that while data augmentation can be a powerful tool for enhancing the performance of some YOLO models, its effectiveness is not universal and can actually harm the performance of others.