# Two-Stage Efficient Parking Space Detection Method Based on Deep Learning and Computer Vision
## 2 Research Content  
### Research Content and Innovation  
The parking spot detection problem is divided into a two-stage problem. In the first stage, deep neural networks are used to find the key points of parking spaces, which can be regarded as an object detection problem in convolutional neural networks. Thanks to the rapid development of object detection algorithms in recent years, many object detection algorithms with excellent performance have emerged, such as two-stage RCNN series, SPPNet [32; 33], one-stage YOLO series [34; 35], SSD series [36; 37], and methods fused with the Transformer's DETR [38] series. DETR integrates Transformer architecture with object detection, utilizing self-attention mechanisms that allow the model to simultaneously analyze all parts of the image, understanding the global context and relationships between objects. Unlike traditional object detection methods, DETR does not rely on predefined regions or anchor boxes; instead, it uses learnable object queries to directly predict the bounding boxes and categories of objects in the image. This end-to-end approach has shown superior performance and accuracy, especially in tasks requiring fine-grained detection, such as parking spot key point detection. However, the main drawback of DETR is its high computational cost, particularly due to the calculation-heavy self-attention mechanism, which requires significant processing power and memory. This makes it less suitable for real-time applications in vehicles. The YOLO series is based on the classic convolutional neural network (CNN) architecture and adopts a one-stage object detection approach. It treats object detection as a single regression problem, where the entire image is input into the network at once, and the network directly outputs the bounding boxes and class labels for the detected objects. The design of YOLO is simple, with relatively low computational cost, making it highly suitable for scenarios requiring a rapid response. According to the comparison and comprehensive consideration in Figure 1 and Table 1, we choose YOLO series as the method to find the key points of the parking space in key point detection. After obtaining the location information of the key points of the parking space, the classic method is to use the simplified version of VGGNet proposed by [PERSON] et al. to classify the key points of the parking space, and the subsequent work is also based on this approach. [PERSON] et al. integrate global and local information to improve the accuracy of parking spot detection [39]. [PERSON] et al. first detect parking spots in the spliced ring view, use the detected parking spots as nodes in the diagram, and then adopt a Transformer-based approach. The attention information aggregation and location coding of parking spots are carried out. Finally, a multi-layer perceptron (MLP) is used to make a binary classification judgment on whether a pair of parking spots can form a parking space [40]. However, when the key point location is located, after simple image processing, we believe that the obtained image has very obvious features and little noise interference. Traditional computer vision can be used to process the image extracted by the YOLO network. We construct a convolution kernel whose size is consistent with that of the extracted key point image. This convolution kernel is used to identify whether the parking space is clockwise or counterclockwise, and use the principle that the key points are in pairs to identify the orientation of the parking space, and finally use the characteristics of the parking space to complete the positioning of the parking space. Compared with the previous methods, the proposed method combines the advantages of deep learning and traditional computer vision, and greatly simplifies the calculation and hardware requirements while ensuring performance, providing a feasible scheme for the industrialization of automatic parking.