Vehicle detection in Intelligent Transportation Systems (ITS) is a key factor ensuring road safety, as it is necessary for the monitoring of vehicle flow, illegal vehicle type detection, incident detection, and vehicle speed estimation. Despite the growing popularity in research, it remains a challenging problem that must be solved. Hardware-based solutions such as radars and LIDAR are been proposed but are too expensive to be maintained and produce little valuable information to human operators at traffic monitoring systems. Software based solutions using traditional algorithms such as Histogram of Gradients (HOG) and Gaussian Mixed Model (GMM) are computationally slow and not suitable for real-time traffic detection. Therefore, the paper will review and evaluate different vehicle detection methods. In addition, a method of utilizing Convolutional Neural Network (CNN) is used for the detection of vehicles from roadway camera outputs to apply video processing techniques and extract the desired information. Specifically, the paper utilized the YOLOv5s architecture coupled with k-means algorithm to perform anchor box optimization under different illumination levels. Results from the simulated and evaluated algorithm showed that the proposed model was able to achieve a mAP of 97.8 in the daytime dataset and 95.1 in the nighttime dataset.