The accurate detection of traffic signs is a critical component of self-driving systems, enabling safe and efficient navigation. In the literature, various methods have been investigated for traffic sign detection, among which deep learning-based approaches have demonstrated superior performance compared to other techniques. This paper justifies the widespread adoption of deep learning due to its ability to provide highly accurate results. However, the current research challenge lies in addressing the need for high accuracy rates and real-time processing requirements. In this study, we propose a convolutional neural network based on the YOLOv8 algorithm to overcome the aforementioned research challenge. Our approach involves generating a custom dataset with diverse traffic sign images, followed by conducting training, validation, and testing sets to ensure the robustness and generalization of the model. Experimental results and performance evaluation demonstrate the effectiveness of the proposed method. Extensive experiments show that our model achieved remarkable accuracy rates in traffic sign detection, meeting the real-time requirements of the input data.