This research investigates the use of convolutional neural networks and YOLOv5 for detecting license plates in photographs taken by speed cameras in Lima, Peru, utilizing a dataset of 2,000 images. The study optimized training through stochastic gradient descent (SGD) and Adam methods, concluding that SGD achieved better loss function convergence and accuracy metrics. The findings suggest that SGD outperforms Adam, especially in applications involving deep learning for object detection.