Vehicle detection in intelligent transportation systems usually adopts cloud computing mode. The increasing amount of traffic surveillance video has brought challenges to the storage, communication, and processing of intelligent transportation systems based on cloud computing models. In this paper, we propose a vehicle detection scheme based on edge computing. First, the traffic surveillance video is preprocessed at the edge device. Using the frame difference algorithm based on structural similarity (SSIM) to remove video redundant frames, and avoid repeated frames in the subsequent extracted key frame sequence. Then, a frame difference algorithm based on local maxima is used to extract key frames as the basis for subsequent vehicle detection. Finally, the YOLOv5s is improved and used for vehicle detection. The efficient channel attention mechanism (ECA) is introduced to enhance the important features of the vehicle and suppress the general features to strengthen the detection network's ability to identify vehicle targets. At the same time, the Focal loss function is introduced to solve the positive and negative sample imbalance problem and improve the detection speed. The experimental results show that the scheme has more advantages than the original YOLOv5s in terms of precision, recall, and mean average precision.