Driver-assistance systems have become an indispensable component of modern vehicles, serving as a crucial element in enhancing safety for both drivers and passengers. Among the fundamental aspects of these systems, object detection stands out, posing significant challenges in low-light scenarios, particularly during nighttime. In this research paper, we propose an innovative and advanced approach for detecting objects during nighttime in driver-assistance systems. Our proposed method leverages thermal vision and incorporates You Only Look Once version 5 (YOLOv5), which demonstrates promising results. The primary objective of this study is to comprehensively evaluate the performance of our model, which utilizes a combination of stochastic gradient descent (SGD) and Adam optimizer. Moreover, we explore the impact of different activation functions, including SiLU, ReLU, Tanh, LeakyReLU, and Hardswish, on the efficiency of nighttime object detection within a driver assistance system that utilizes thermal imaging. To assess the effectiveness of our model, we employ standard evaluation metrics including precision, recall, and mean average precision (mAP), commonly used in object detection systems.