# Detection of Parking Slots Based on Mask R-CNN
## 1 Introduction  
Parking is an essential task in the driving process as vehicles will have to park at some point during or at the end of the driving process. However, completing this task conveniently and safely during the driving process is not trivial. As a result, empirical research on developing intelligent, safe and convenient parking systems abounds in literature [1; 2]. One of such parking systems that has drawn much attention is the automatic parking system (APS) with its major component being the identification of parking slots that affects path planning and motion control. Three main methods were employed in the detection of parking slots: the infrastructure-based methods, the free-space-based approach and the parking-slot-marking-based approach. The infrastructure-based method [3; 4; 5] usually requires the installation of intelligent infrastructure in the parking slots in order for the parking slots information to be obtained in real-time. However, the drawback of this approach is the high cost for its commercialization. The free-space-based approach [6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19] has been widely studied and typically uses different types of sensors, such as short-range radars [6; 7], lidars [8; 9; 10; 11] and ultrasonic radars [12; 13; 14; 15], which provide range distance information to detect parking slots. Compared with the ultrasonic radar, the short-range radars and lidars have higher frequency, which is able to detect parking slots with longer distance and provide high accuracy of the edge information, especially when driving at high speed. However, the cost of these two sensors is high. Ultrasonic radar is the most widely used because it is cheap and easy to install, but it usually needs to design a complex algorithm to improve the detection accuracy of parking slots. The disadvantages of above sensors are that they cannot detect free spaces when there is no adjacent vehicle, with its accuracy dependent on the positions of adjacent vehicles. Compared with the free-space-based method, the parking-slot-marking-based approach provides more accurate information on parking slots using around-view monitoring (AVM) systems composed of multiple fisheye cameras that provide a wider field of vision without depending on the presence of adjacent vehicles. This method uses visual algorithms for the detection of the parking slots. The research direction of the around-view monitoring (AVM) system mainly focuses on camera calibration [16; 17; 18] and image stitching [19; 20; 21]. [PERSON]'s calibration [16] has maintained the accuracy of calibration while ensuring the simplicity of the calibration experiment. It has become one of the main methods for camera calibration of machine vision systems. The mainstream image stitching methods usually select different image features (such as SURF [19], SIFT [20]) for automatic registration to achieve image stitching. These methods are insensitive to the geometric transformation of the image and have high robustness, but they are computation-intensive and time-consuming, which cannot satisfy real-time requirements of an AVM system. Most of the current visual algorithms are based on two visual features: corners and lines, detected by some low-level vision algorithms (such as Fast detector [22], Harris detector [23; 24; 25], Hough transform [26], Radon transform [27], Ransac transform [28; 29; 30]), which are sensitive to light and make it difficult to maintain robustness. Therefore, to solve the above problems, this paper proposes a method to detect parking slots based on deep learning. The mask of marking-points is generated by Mask R-CNN [31]; then, after the line segment detection (LSD) algorithm [32] is used to detect the mask and filter the interference lines, the guidelines and parallel lines can be found to finalize candidate parking slots. Our contributions in this paper are summarized as follows:  
1. A method for detecting parking slots based on Mask R-CNN is proposed.