# NTS-YOLO: A Notcurnal Traffic Sign Detection Method Based on Improved YOLOv5
## 2 Methods
### Image Preprocessing  
Due to the influence of the light intensity strength, direction angle, and other factors at night, the visibility of traffic signs was significantly reduced, resulting in image feature details being difficult to identify, the signal-to-noise ratio being reduced, and the image as a whole being darker. Therefore, it was necessary to carry out the data enhancement preprocessing of the image to eliminate the factors that affected the image quality so that the captured image could be more efficiently extracted from the effective information. At present, image enhancement algorithms are commonly used to adjust the brightness, contrast, saturation, hue, etc., of an image to increase its clarity, reduce noise, etc. Common methods include histogram equalization, the Gamma transform, the Laplace transform, the Retinex algorithm, and image enhancement based on deep learning. Through these preprocessing steps, the recognition accuracy and reliability of traffic signs in the night environment can be effectively improved. Existing nighttime visibility enhancement methods mainly focus on increasing the intensity of low-light regions; therefore, when these methods are applied to nighttime images containing light effects, they inevitably amplify the light effects and even further impair the visibility of the images. In this paper, we adopted the unsupervised nighttime image enhancement method proposed by [PERSON] et al. [43], which integrates a decom  
Figure 1: NTS-YOLO process diagram. The NTS-YOLO process diagram integrates unsupervised image preprocessing, the Convolutional Block Attention Module (CBAM), and Online Template Adaptation (OTA) to enhance the object detection performance beyond that of the standard YOLO model. position network and a light effect suppression network in a single unified framework with the goal of suppressing the light effect while increasing the intensity of the dark regions. Specifically, the image decomposition network divides the input image into a base layer and a detail layer. The base layer is designed to process the brightness and global information of the image, while the detail layer captures fine textures and local features. Building on this decomposition, the light effect suppression network leverages an attention mechanism to dynamically adjust high-light regions, effectively mitigating the adverse effects of glare and overexposure on detail extraction. This integrated approach not only enhances the visual quality of nighttime images but also significantly improves the visibility and discriminability of target regions. The structure diagram is shown in Figure 2.  
To better adapt the enhancement method to a specific nighttime traffic sign dataset, this study conducted an optimization of its key hyperparameters to achieve a balance between brightness enhancement, contrast adjustment, and light effect suppression, as detailed in Table 1.  
The experimental results demonstrated that the optimized hyperparameters led to significant improvements in model performance. As shown in Figure 3, the adjustments to the brightness and contrast ranges enhanced the target regions while reducing the interference of glare and noise on the detection results. Furthermore, the optimization of the light effect suppression weight not only effectively suppressed interference from high-light regions but also improved the separability of features in dark areas. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Hyperparameter** & **Initial** & **Optimized** & **Optimization Objective** \\ \hline Brightness Adjustment Range Contrast & [0.5, 1.5] & [0.8, 1.2] & Enhance brightness in dark areas while suppressing distortion in bright regions. Strengthen edge features of target while avoiding excessively high background contrast. Balance the suppression of strong light effects with the enhancement of dark areas. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hyperparameter optimization and settings. Figure 2: The unsupervised nighttime image enhancement method structure diagram.