Vehicle parking method, system and computer readable storage medium
By designing a neural network model that contains a common layer and multiple detection branch layers, parking space detection and drivable area recognition are realized simultaneously, solving the problem of large scale of a single model, improving the real-time performance and accuracy of the algorithm, and overcoming the problem of Effects of light and weather changes.
Patent Information
- Application Number
- CN202110292105.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-03-18
AI Technical Summary
In the existing technology, when deep learning models are used for parking space detection and drivable area detection, a single model can only achieve a single task, resulting in a large model scale and being easily affected by changes in lighting and weather.
A neural network model is designed that includes a common layer, a parking space detection branch layer and a drivable area detection branch layer. Image features are extracted through the common layer, and multiple convolution layers and splicing layers are used for feature fusion to achieve simultaneous processing. Parking space detection and drivable area identification.
This method can reduce the computational power requirements for model inference, improve the real-time performance and accuracy of the algorithm, and overcome the influence of lighting and weather changes while ensuring the accuracy of visual perception.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic parking technology, and in particular to a vehicle parking method, system and computer-readable storage medium. Background Art
[0002] Parking space detection is the basis of automatic parking technology. It uses sensors to sense the empty parking spaces around the vehicle body and determine the relative positions of the empty parking spaces. The drivable area recognition senses the vehicle's drivable area around the vehicle body, providing a basis for vehicle driving path planning, vehicle control, and vehicle avoidance.
[0003] In the existing technology, most traditional non-deep learning methods use traditional edge, color and other features to perform related detection tasks, which are easily affected by factors such as lighting and weather. At present, the application of deep learning network model structure is only designed for parking space detection and drivable area detection, and a single model can only realize the detection of a single task, which leads to a large scale of deep learning model. At present, there is an urgent need for a deep learning model that can realize parking space detection and drivable area detection at the same time, and the model scale is compressed as much as possible. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a vehicle parking method, system and computer-readable storage medium to solve the defects in the prior art that a single model can only realize single task detection when parking a vehicle and the deep learning model is large in scale.
[0005] One aspect of the present invention provides a vehicle parking method, comprising the following steps:
[0006] Acquire images collected by the front camera, rear camera, left camera and right camera of the vehicle in real time;
[0007] Inputting the image into a trained neural network model for processing, and obtaining parking space detection information and drivable area detection information respectively, wherein the trained neural network model comprises a common layer, a parking space detection branch layer and a drivable area detection branch layer, the common layer is used to extract features from the image, and output at least one intermediate feature extraction information and final feature extraction information, the parking space detection branch is used to process the final feature extraction information to obtain parking space detection information, and the drivable area detection branch layer is used to process the final feature extraction information and the at least one intermediate feature extraction information to obtain the drivable area detection information;
[0008] Parsing and fusing the parking space detection information and the drivable area detection information to obtain fused information of the parking space and the drivable area;
[0009] A control instruction is generated according to the fused information, and the control instruction is sent to a vehicle parking system to control the vehicle to park according to the fused information.
[0010] In a specific embodiment, the common layer includes a first common branch, a second common branch and a splicing layer, the first common branch and the second common branch are connected in parallel, the first common branch is used to process the image, and output at least one intermediate feature extraction information and final feature extraction information of the first common branch, the second common branch is used to process the image, and output at least one intermediate feature extraction information and final feature extraction information of the second common branch, and the splicing layer is used to splice the final feature extraction information of the first common branch and the final feature extraction information of the second common branch, and output the final feature extraction information of the common layer;
[0011] The available parking space detection branch is used to process the final feature extraction information output by the splicing layer to obtain the available parking space detection information;
[0012] The drivable area detection branch layer is used to process the final feature extraction information output by the splicing layer, at least one intermediate feature extraction information output by the first common branch, and at least one intermediate feature extraction information output by the second common branch to obtain the drivable area detection information.
[0013] In a specific embodiment, the first common branch includes a plurality of convolutional layers, and according to the order of convolutional layer operations, the first common branch layer sequentially outputs first intermediate feature extraction information, second intermediate feature extraction information, third intermediate feature extraction information, and final feature extraction information of the first common branch; the second common branch includes a plurality of convolutional layers, and according to the order of convolutional layer operations, the second common branch layer sequentially outputs first intermediate feature extraction information, second intermediate feature extraction information, third intermediate feature extraction information, and final feature extraction information of the second common branch layer;
[0014] The drivable area detection branch layer processes the final feature extraction information output by the splicing layer, the first to third intermediate feature extraction information output by the first common branch, and the first to third intermediate feature extraction information output by the second common branch to obtain the drivable area detection information.
[0015] In a specific implementation, the drivable area detection branch layer processes the final feature extraction information output by the splicing layer, the first to third intermediate feature extraction information output by the first common branch, and the first to third intermediate feature extraction information output by the second common branch to obtain the drivable area detection information, specifically including:
[0016] The drivable area detection branch processes the final feature extraction information output by the splicing layer to obtain the first intermediate feature extraction information of the drivable area detection branch, splices the first intermediate feature extraction information of the drivable area detection branch, the third intermediate feature extraction information of the first common branch, and the third intermediate feature extraction information of the second common branch to obtain a first splicing result, the drivable area detection branch processes the first splicing result to obtain the second intermediate feature extraction information of the drivable area detection branch, splices the second intermediate feature extraction information of the drivable area detection branch, the second intermediate feature extraction information of the first common branch, and the second intermediate feature extraction information of the second common branch to obtain a second splicing result, the drivable area detection branch processes the second splicing result to obtain the third intermediate feature extraction information of the drivable area detection branch, splices the third intermediate feature extraction information of the drivable area detection branch, the first intermediate feature extraction information of the first common branch, and the first intermediate feature extraction information of the second common branch to obtain a third splicing result, and processes the third splicing result to obtain the drivable area detection information.
[0017] In a specific implementation, the parsing and fusing the parking space detection information and the drivable area detection information to obtain the fused information of the parking space and the drivable area specifically includes:
[0018] Determine a parking space angle center point information set and an empty parking space center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same time, and obtain a pixel point set corresponding to each camera according to the pixel point information output by each detection frame corresponding to each image at the same time, wherein the parking space detection information output by the detection frame includes a probability value of a parking space angle center point and the coordinates of the parking space angle center point in the detection frame, a probability value of an empty parking space center point and the coordinates of the empty parking space center point in the detection frame, the parking space angle center point information includes the coordinates of the parking space angle center point and the probability value of the existence of the parking space angle center point, the empty parking space center point information includes the coordinates of the empty parking space center point and the probability value of the existence of the empty parking space center point, and the pixel point information includes the coordinates of the pixel point and the probability value of the existence of the pixel point;
[0019] Processing the parking space angle center point information set, the empty parking space center point information set and the drivable area pixel point set corresponding to each camera respectively to obtain the final parking space angle center point information set, the final empty parking space center point information set and the final drivable area information;
[0020] The parking space angle center point in the final parking space angle center point information set and the empty parking space center point in the final empty parking space center point information set are respectively mapped onto the drivable area to generate a visual detection result of the parking space and the drivable area.
[0021] In a specific implementation, the determining of the parking space angle center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same time specifically includes:
[0022] The probability value of the parking angle center point output by each detection frame corresponding to each image is compared with the set parking angle center point probability value. If the probability value of the parking angle center point output by the detection frame is greater than the set parking angle center point probability value, the parking angle center point coordinates output by the detection frame are converted into the parking angle center point coordinates in the image coordinate system, and the probability value of the parking angle center point and the converted parking angle center point coordinates are saved in the parking angle center point information set corresponding to the camera that took the image, and the left camera parking angle center point information set, the right camera parking angle center point information set, the front camera parking angle center point information set and the rear camera parking angle center point information set are obtained accordingly.
[0023] In a specific implementation, determining the vacant parking space center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same time specifically includes:
[0024] The probability value of the center point of the empty parking space output by each detection frame corresponding to each image is compared with the set probability value of the center point of the empty parking space. If the probability value of the center point of the empty parking space output by the detection frame is greater than the set probability value of the center point of the empty parking space, the coordinates of the center point of the empty parking space output by the detection frame are converted into the coordinate values of the center point of the empty parking space in the image coordinate system, and the probability value of the center point of the empty parking space and the converted coordinate values of the center point of the empty parking space are saved in the empty parking space center point information set corresponding to the camera that took the image, and the empty parking space center point information set of the left camera, the empty parking space center point information set of the right camera, the empty parking space center point information set of the front camera and the empty parking space center point information set of the rear camera are obtained accordingly.
[0025] In a specific implementation, obtaining the pixel point set corresponding to each camera according to the pixel point information output by each detection frame corresponding to each image at the same time specifically includes:
[0026] The probability value of the existence of the pixel point output by each detection frame corresponding to each image is compared with the set pixel point probability value. If the probability value of the existence of the pixel point output by the detection frame is greater than the set pixel point probability value, the pixel point coordinates corresponding to the detection frame are converted to the image coordinate system, and the probability value of the existence of the pixel point and the converted pixel point coordinates are saved in the pixel point set corresponding to the camera that took the image, and the left camera pixel point set, the right camera pixel point set, the front camera pixel point set and the rear camera pixel point set are obtained accordingly.
[0027] In a specific implementation, the processing of the parking angle center point information set corresponding to each camera to obtain the final parking angle center point information set specifically includes:
[0028] Projecting the parking angle center point in the parking angle center point information set corresponding to each camera to the vehicle coordinate system, and obtaining the parking angle center point information set corresponding to each camera in the vehicle coordinate system;
[0029] Determine whether there is an identical parking angle center point in two parking angle center point information sets corresponding to two cameras installed at adjacent positions; if there is an identical parking angle center point, obtain the probability value of the identical parking angle center point from the two parking angle center point information sets, determine the size of the two existence probability values corresponding to the identical parking angle center point, retain the position coordinates and the corresponding existence probability value of the identical parking angle center point in the parking angle center point information set with the larger existence probability value, delete the position coordinates and the corresponding probability value of the identical parking angle center point in the parking angle center point information set with the smaller probability value, until the determination of the identical parking angle center point in the parking angle center point information sets corresponding to all adjacent cameras is completed, and obtain the final parking angle center point information set for the left camera, the final parking angle center point information set for the right camera, the final parking angle center point information set for the front camera, and the final parking angle center point information set for the rear camera.
[0030] In a specific implementation manner, the processing of the empty parking space center point information set corresponding to each camera to obtain the final empty parking space center point information set specifically includes:
[0031] Project the empty parking space center point in the empty parking space center point information set corresponding to each camera to the vehicle coordinate system, and obtain the empty parking space center point information set corresponding to each camera in the vehicle coordinate system;
[0032] Determine whether there is an identical empty parking space center point in two empty parking space center point information sets corresponding to two cameras installed at adjacent positions; if there is an identical empty parking space center point, obtain the probability value of the identical empty parking space center point from the two empty parking space center point information sets, determine the size of the two existence probability values corresponding to the identical empty parking space center point, retain the position coordinates and the corresponding existence probability value of the identical empty parking space center point in the empty parking space center point information set with the larger existence probability value, delete the position coordinates and the corresponding probability value of the identical empty parking space center point in the empty parking space center point information set with the smaller probability value, until the determination of the identical empty parking space center point in the empty parking space center point information sets corresponding to all adjacent cameras is completed, and the final empty parking space center point information set of the left camera, the final empty parking space center point information set of the right camera, the final empty parking space center point information set of the front camera, and the final empty parking space center point information set of the rear camera are obtained.
[0033] In a specific implementation, the processing of the pixel point set corresponding to each camera to obtain the final drivable area information specifically includes:
[0034] The pixel points in the pixel point set corresponding to each camera are respectively converted to the camera coordinate system, and the pixel point set after the conversion of each camera is obtained;
[0035] Generate a drivable area corresponding to each camera according to the pixel point set converted by each camera;
[0036] The drivable areas corresponding to each camera are superimposed to obtain the final drivable area. During the superposition process, if there is an overlapping area, the probability value of the pixel points in the overlapping area in the pixel point set corresponding to the adjacent camera is obtained. If any probability value of the pixel point is greater than the set pixel point existence probability value, the pixel point is retained; otherwise, the pixel point is deleted.
[0037] A second aspect of the present invention provides a vehicle parking system, comprising:
[0038] An acquisition unit is used to acquire images captured by the front camera, rear camera, left camera and right camera of the vehicle in real time;
[0039] a neural network processing unit, configured to receive the image, process the image, and obtain parking space detection information and drivable area detection information respectively, wherein the neural network processing unit comprises a common layer, a parking space detection branch layer, and a drivable area detection branch layer, the common layer is configured to perform feature extraction on the image, and output at least one intermediate feature extraction information and final feature extraction information, the parking space detection branch is configured to process the final feature extraction information to obtain parking space detection information, and the drivable area detection branch layer is configured to process the final feature extraction information and the at least one intermediate feature extraction information to obtain the drivable area detection information;
[0040] A parsing and fusing unit, used for parsing and fusing the parking space detection information and the drivable area detection information to obtain fused information of the parking space and the drivable area;
[0041] A control unit is used to generate a control instruction according to the fused information, send the control instruction to the vehicle parking system, and control the vehicle to park according to the fused information.
[0042] In a specific embodiment, the common layer includes a first common branch, a second common branch and a splicing layer, the first common branch and the second common branch are connected in parallel, the first common branch is used to process the image, and output at least one intermediate feature extraction information and final feature extraction information of the first common branch, the second common branch is used to process the image, and output at least one intermediate feature extraction information and final feature extraction information of the second common branch, and the splicing layer is used to splice the final feature extraction information of the first common branch and the final feature extraction information of the second common branch, and output the final feature extraction information of the common layer;
[0043] The available parking space detection branch is used to process the final feature extraction information output by the splicing layer to obtain the available parking space detection information;
[0044] The drivable area detection branch layer is used to process the final feature extraction information output by the splicing layer, at least one intermediate feature extraction information output by the first common branch, and at least one intermediate feature extraction information output by the second common branch to obtain the drivable area detection information.
[0045] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0046] The beneficial effects of the embodiments of the present invention are as follows: the vehicle parking method realizes parking space detection and drivable area identification based on a deep learning convolutional network, can better overcome the influence of lighting changes, weather changes, etc. on the perception results, and deeply optimizes the neural network model structure based on deep learning. Only one model inference operation is required to realize parking space detection and drivable area identification, which greatly reduces the requirements of model inference on the computing power of the computing platform, and improves the real-time performance of the algorithm on the basis of ensuring the accuracy of visual perception. In addition, combined with the characteristics of the installation of the on-board surround view camera, the overlap of the fields of view of different cameras and the visual differences between different cameras are utilized to fuse the reasoning results of multiple cameras, thereby improving the accuracy and stability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 is a schematic flow chart of a vehicle parking method according to an embodiment of the present invention;
[0049] Figure 2 It is a schematic diagram of a specific structure and a flow chart of a trained neural network model of a vehicle parking method according to an embodiment of the present invention;
[0050] Figure 3 (a) is a visualization diagram corresponding to parking space detection information output by a parking space detection branch of a vehicle parking method according to an embodiment of the present invention before parsing;
[0051] Figure 3 (b) is a visualization diagram corresponding to the drivable area information output by the drivable area detection branch of the vehicle parking method according to an embodiment of the present invention before being parsed;
[0052] Figure 3 (c) is a visualization diagram corresponding to the parsed parking space detection information output by the parking space detection branch of a vehicle parking method according to an embodiment of the present invention;
[0053] Figure 3 (d) is a visualization diagram corresponding to the parsed drivable area information output by the drivable area detection branch of a vehicle parking method according to an embodiment of the present invention;
[0054] Figure 4 (a) is a top view of a final drivable area of a vehicle parking method according to an embodiment of the present invention;
[0055] Figure 4 (b) is a visualization diagram of the final parking space detection of a vehicle parking method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following descriptions of the embodiments refer to the accompanying drawings to illustrate specific embodiments in which the present invention may be implemented.
[0057] The following reference Figure 1 As shown, a first embodiment of the present invention provides a vehicle parking method, comprising:
[0058] S1. Acquire images captured by the front camera, rear camera, left camera and right camera of the vehicle in real time.
[0059] Specifically, four video streams are acquired through 180-degree wide-angle cameras installed at the front, rear, left, and right ends of the vehicle, and the size of each image is normalized to scale the image size to 640*480.
[0060] S2. Input the image into a trained neural network model for processing to obtain parking space detection information and drivable area detection information, respectively. The trained neural network model includes a common layer, a parking space detection branch layer, and a drivable area detection branch layer. The common layer is used to extract features from the image and output at least one intermediate feature extraction information and final feature extraction information. The parking space detection branch is used to process the final feature extraction information to obtain parking space detection information. The drivable area detection branch layer is used to process the final feature extraction information and the at least one intermediate feature extraction information to obtain the drivable area detection information.
[0061] Specifically, the collected 4-channel video images are input into the trained neural network model in a set order. The neural network model processes the input images in sequence to obtain parking space detection information and drivable area detection information corresponding to each image.
[0062] Specifically, the trained neural network model includes a common layer, a parking space detection branch layer and a drivable area detection branch layer. The common layer is used to extract features of the image input into the neural network model, and output a final feature extraction information and at least one intermediate feature extraction information. The parking space detection layer is used to process the final feature extraction information to obtain parking space detection information. The drivable area detection branch is used to process the final feature extraction information and at least one intermediate feature extraction information to obtain drivable area detection information.
[0063] Specifically, the common layer includes a first common branch, a second common branch and a splicing layer, the first common branch and the second common branch are connected in parallel, the first common branch is used to process the image input to the neural network, and output at least one intermediate feature extraction information and final feature extraction information of the first common branch, the second common branch is used to process the image input to the neural network, and output at least one intermediate feature extraction information and final feature extraction information of the second common branch, the splicing layer is used to splice the final feature extraction information of the first common branch and the final feature extraction information of the second common branch, and output the final feature extraction information of the common layer, the parking space detection branch is used to process the final feature extraction information output by the splicing layer to obtain parking space detection information, and the drivable area detection branch layer is used to process the final feature extraction information output by the splicing layer, at least one intermediate feature extraction information output by the first common branch, and at least one intermediate feature extraction information output by the second common branch to obtain drivable area detection information.
[0064] Specifically, the first common branch includes multiple convolutional layers. According to the order of convolutional layer operations, the first common branch layer sequentially outputs the first intermediate feature extraction information, the second intermediate feature extraction information, the third intermediate feature extraction information and the final feature extraction information of the first common branch. The second common branch includes multiple convolutional layers. According to the order of convolutional layer operations, the second common branch layer sequentially outputs the first intermediate feature extraction information, the second intermediate feature extraction information, the third intermediate feature extraction information and the final feature extraction information of the second common branch layer. The drivable area detection branch processes the final feature extraction information output by the splicing layer to obtain the first intermediate feature extraction information of the drivable area detection branch, splices the first intermediate feature extraction information of the drivable area detection branch, the third intermediate feature extraction information of the first common branch, and the third intermediate feature extraction information of the second common branch to obtain a first splicing result, the drivable area detection branch processes the first splicing result to obtain the second intermediate feature extraction information of the drivable area detection branch, splices the second intermediate feature extraction information of the drivable area detection branch, the second intermediate feature extraction information of the first common branch, and the second intermediate feature extraction information of the second common branch to obtain a second splicing result, the drivable area detection branch processes the second splicing result to obtain the third intermediate feature extraction information of the drivable area detection branch, splices the third intermediate feature extraction information of the drivable area detection branch, the first intermediate feature extraction information of the first common branch, and the first intermediate feature extraction information of the second common branch to obtain a third splicing result, and processes the third splicing result to obtain the drivable area detection information.
[0065] It should be noted that the first common branch and the second common branch sample convolution kernels of different hole scales, which bring different receptive fields to the subsequent parking space detection branch and drivable area detection branch.
[0066] like Figure 2As shown, the image scale of the input trained neural network model is 640*480*3. The trained neural network model includes a common layer, a parking space detection branch and a drivable area detection branch. The common layer includes a first common branch and a second common branch. The first common branch and the second common branch both include 10 convolutional layers. The linear activation function Relu is used after each convolutional layer of the first common branch and the second common branch. The downsampling function Maxpool is used after the second convolutional layer, the fourth convolutional layer and the sixth convolutional layer of the first common branch. Correspondingly, after each downsampling function Maxpool, the first common branch outputs the first intermediate feature extraction information, the second intermediate feature extraction information and the third intermediate feature extraction information. The downsampling function is used after the second convolutional layer, the fourth convolutional layer and the sixth convolutional layer of the second common branch. The corresponding second common branch outputs the first intermediate feature extraction information, the second intermediate feature extraction information and the third intermediate feature extraction information. The drivable area detection branch includes 9 convolutional layers, 3 upsampling layers Upsample, and 3 splicing layers Cat, wherein the 3 sampling layers are respectively arranged after the 2nd, 4th and 6th convolutional layers, and the 3 splicing layers are correspondingly arranged after the 3 upsampling layers. In the figure, route1, route2 and route3 are labels, and there is a direct connection relationship between the same labels. Among them, the convolution kernel of the first common branch is a 3*3 convolution kernel, and the first common branch extracts features with smaller scales. The convolution kernel of the second common branch uses a 3*3 convolution kernel with a hole scale of 5, and the second common branch extracts features with larger scales. The two common branches bring different receptive fields to the subsequent parking space detection branch and the drivable area detection branch, and can extract richer features. The detection information output scale of the parking space detection branch is 40*30*6, which can be expressed as 40*30*(cre1,x1,y1,cre2,x2,y2). The output result divides the original image into 30 rows and 40 columns of equal-sized rectangular blocks. The prediction result corresponding to the rectangular block in the i-th row and j-th column of the original image is the 6-bit output (cre1,x1,y1,cre2,x2,y2) of the i-th row and j-th column of the parking space recognition model inference result, where cre1 and cre2 represent the probability of containing the parking space angle center point and the probability of an empty parking space center point in the rectangular block, respectively. x1, y1, x2, and y2 represent the normalized horizontal coordinate of the parking space angle center point, the vertical coordinate of the parking space angle center point, the horizontal coordinate of the empty parking space center point, and the vertical coordinate of the empty parking space center point, respectively. The detection information output scale of the drivable area detection branch is 320*240*1, that is, an image is divided into 320*240 detection frames, and the confidence of the corresponding pixel in each detection frame is output.
[0067] S3. Analyze and fuse the parking space detection information and the drivable area detection information to obtain fused information of the parking space and the drivable area.
[0068] In a specific implementation, step S3 specifically includes:
[0069] S31. Determine a parking space angle center point information set and an empty parking space center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same moment, and obtain a pixel point set corresponding to each camera according to the pixel point information output by each detection frame corresponding to each image at the same moment, wherein the parking space detection information output by the detection frame includes a probability value of a parking space angle center point and the coordinates of the parking space angle center point in the detection frame, a probability value of an empty parking space center point and the coordinates of the empty parking space center point in the detection frame, the parking space angle center point information includes the coordinates of the parking space angle center point and the probability value of the existence of the parking space angle center point, the empty parking space center point information includes the coordinates of the empty parking space center point and the probability value of the existence of the empty parking space center point, and the pixel point information includes the pixel point coordinates and the probability value of the existence of the pixel point.
[0070] Specifically, the probability value of the parking angle center point output by each detection frame corresponding to each image is compared with the set parking angle center point probability value. If the probability value of the parking angle center point output by the detection frame is greater than the set parking angle center point probability value, the parking angle center point coordinates output by the detection frame are converted into parking angle center point coordinates in the image coordinate system, and the probability value of the parking angle center point and the converted parking angle center point coordinates are saved in the parking angle center point information set corresponding to the camera that took the image, and the left camera parking angle center point information set, the right camera parking angle center point information set, the front camera parking angle center point information set and the rear camera parking angle center point information set are obtained accordingly.
[0071] Specifically, the probability value of the center point of the empty parking space output by each detection frame corresponding to each image is compared with the set probability value of the center point of the empty parking space. If the probability value of the center point of the empty parking space output by the detection frame is greater than the set probability value of the center point of the empty parking space, the coordinates of the center point of the empty parking space output by the detection frame are converted into the coordinate values of the center point of the empty parking space in the image coordinate system, and the probability value of the center point of the empty parking space and the converted coordinate values of the center point of the empty parking space are saved in the empty parking space center point information set corresponding to the camera that took the image, and the empty parking space center point information set of the left camera, the empty parking space center point information set of the right camera, the empty parking space center point information set of the front camera and the empty parking space center point information set of the rear camera are obtained accordingly.
[0072] For example, suppose the current decision block is a rectangular block at row i and column j. If cre1 i,j >0.9, then the current block is determined to contain the parking space angle center point, otherwise it is not. Similarly, if cre2 i,j >0.9, it is determined that the current block contains the center point of an empty parking space, otherwise it does not contain it. Since the coordinate values x1, y1, x2, and y2 output by the parking space detection branch are the normalized coordinate values for the current block, the coordinate values need to be converted into the corresponding image coordinate system during the parsing stage. The conversion formula is:
[0073]
[0074]
[0075] Among them, x and y are the horizontal and vertical coordinates of the center point of the parking space angle or the center point of the empty parking space in the rectangular block before conversion, x' and y' are the horizontal and vertical coordinates of the center point of the parking space angle or the center point of the empty parking space in the image coordinate system after conversion, w and h are the width and height of the input image, and i and j correspond to the row number and column number of the current block respectively. The converted coordinates of the center point of the parking space angle and the center point of the empty parking space are stored in the form of (x, y, cre) in Set corner,cam and Set place,cam Among them, cam represents the camera number, and its values are front, back, left, and right, corresponding to the front, back, left, and right cameras respectively; x and y are the coordinate values of the corresponding image coordinate system respectively; cre is the credibility of the center point of the current parking space angle or the center point of the empty parking space, and cre is between 0 and 1. The closer to 1, the higher the credibility of the point. The branch reasoning results of parking space detection after analysis are visualized as follows Figure 3 (a) and Figure 3 (c) as shown.
[0076] Specifically, the probability value of the existence of the pixel point output by each detection frame corresponding to each image is compared with the set pixel point probability value. If the probability value of the existence of the pixel point output by the detection frame is greater than the set pixel point probability value, the pixel point coordinates corresponding to the detection frame are converted to the image coordinate system, and the probability value of the existence of the pixel point and the converted pixel point coordinates are saved in the pixel point set corresponding to the camera that took the image, and the left camera pixel point set, the right camera pixel point set, the front camera pixel point set and the rear camera pixel point set are obtained accordingly.
[0077] For example, in the drivable area detection branch, the scale of its output result is 320*240*1, and the length and width are both 1 / 2 of the model input image size. First, the output result of the drivable area branch is upsampled, that is, the length and width are both doubled, so that the inference result of the same size as the input image can be obtained. Each pixel point of the output result represents the feasibility of the corresponding original image pixel point being a drivable area. d , the value is between 0 and 1, cre d The larger the value, the greater the possibility that the current pixel is a drivable area. d Pixels with values >0.9 are considered drivable. Figure 3 (b) and Figure 3 (d) as shown.
[0078] S32, respectively process the parking space angle center point information set, the empty parking space center point information set and the drivable area pixel point set corresponding to each camera to obtain the final parking space angle center point information set, the final empty parking space center point information set and the final drivable area information.
[0079] Specifically, the parking angle center point in the parking angle center point information set corresponding to each camera is projected into the vehicle coordinate system, and the parking angle center point information set corresponding to each camera in the vehicle coordinate system is obtained accordingly. It is determined whether there is the same parking angle center point in the two parking angle center point information sets corresponding to two cameras with adjacent installation positions. If there is the same parking angle center point, the probability value of the existence of the same parking angle center point is obtained from the two parking angle center point information sets respectively, and the size of the two existence probability values corresponding to the same parking angle center point is determined. The position coordinates and the corresponding probability value of the same parking angle center point in the parking angle center point information set with a larger existence probability value are retained, and the position coordinates and the corresponding probability value of the same parking angle center point in the parking angle center point information set with a smaller probability value are deleted, until the determination of the same parking angle center point in the parking angle center point information sets corresponding to all adjacent cameras is completed, and the final parking angle center point information set of the left camera, the final parking angle center point information set of the right camera, the final parking angle center point information set of the front camera, and the final parking angle center point information set of the rear camera are obtained.
[0080] Specifically, the empty parking space center point in the empty parking space center point information set corresponding to each camera is projected into the vehicle coordinate system, and the empty parking space center point information set corresponding to each camera in the vehicle coordinate system is obtained. It is determined whether there is the same empty parking space center point in the two empty parking space center point information sets corresponding to two cameras with adjacent installation positions. If there is the same empty parking space center point, the probability value of the existence of the same empty parking space center point is obtained from the two empty parking space center point information sets, and the size of the two existence probability values corresponding to the same empty parking space center point is determined. The position coordinates and the corresponding probability value of the same empty parking space center point in the empty parking space center point information set with a larger existence probability value are retained, and the position coordinates and the corresponding probability value of the same empty parking space center point in the empty parking space center point information set with a smaller probability value are deleted, until the determination of the same empty parking space center point in the empty parking space center point information sets corresponding to all adjacent cameras is completed, and the final empty parking space center point information set of the left camera, the final empty parking space center point information set of the right camera, the final empty parking space center point information set of the front camera, and the final empty parking space center point information set of the rear camera are obtained.
[0081] For example, Set corner,cam and Set place,cam Under the vehicle coordinate system mapped by the recognition structure, the origin of the current vehicle coordinate system is selected as the projection point of the rear axle center of the vehicle in the ground direction, the x-axis direction is selected from the rear axle center of the vehicle to the front axle center, the y-axis is perpendicular to the x-axis and horizontal to the right, the coordinate unit is centimeters, and the mapped coordinate sets are Set` corner,cam and Set` place,cam According to the relationship between the camera installation positions, there are overlapping areas between the front camera and the right camera, between the right camera and the rear camera, between the rear camera and the left camera, and between the left camera and the front camera. In this case, it is determined whether there are different recognition results for the same parking angle center point in the corresponding two coordinate sets. The basis for determining whether two points are the same is:
[0082] sqrt(pow(x1-x2,2)-pow(y1-y2,2))<thresh
[0083] Where x1 and x2 represent the horizontal coordinates of the two parking angle center points, y1 and y2 represent the vertical coordinates of the two parking angle center points; thresh is the distance threshold, preferably 5. When two points are determined to be the same parking angle center point, it is necessary to measure the accuracy of the two parking angle center points, select the coordinate value with greater credibility as the coordinate value of the current parking angle center, and add it to the final parking angle center point detection result set. Generate the final empty parking center point detection result set according to the same strategy.
[0084] Specifically, the pixel points in the pixel point set corresponding to each camera are converted to the camera coordinate system, and the pixel point set after conversion of each camera is obtained. The drivable area corresponding to each camera is generated according to the pixel point set after conversion of each camera, and the drivable areas corresponding to each camera are superimposed to obtain the final drivable area. During the superposition process, if there is an overlapping area, the probability value of the pixel point in the overlapping area existing in the pixel point set corresponding to the adjacent camera is obtained. If any probability value of the pixel point is greater than the set pixel point existence probability value, the pixel point is retained, otherwise, the pixel point is deleted. The final drivable area is as follows: Figure 4 (a) shown.
[0085] S33, mapping the parking space angle center point in the final parking space angle center point information set and the empty parking space center point in the final empty parking space center point information set to the drivable area respectively, to generate a visual detection result of the parking space and the drivable area.
[0086] The parking angle center points in the final parking angle center point information set of the left camera, the final parking angle center point information set of the right camera, the final parking angle center point information set of the front camera, and the final parking angle center point information set of the rear camera, as well as the empty parking space center points in the final empty parking space center point information set of the left camera, the final empty parking space center point information set of the right camera, the final empty parking space center point information set of the front camera, and the final empty parking space center point information set of the rear camera are projected into the drivable area to form a visual detection result, as shown in the following figure. Figure 4 (b) as shown.
[0087] S4. Generate a control instruction according to the fused information, send the control instruction to the vehicle parking system, and control the vehicle to park according to the fused information.
[0088] A vehicle parking method in an embodiment of the present invention realizes parking space detection and drivable area identification based on a deep learning convolutional network, can better overcome the influence of lighting changes, weather changes, etc. on the perception results, and deeply optimizes the model structure based on deep learning. Parking space detection and drivable area identification are realized by only performing a model reasoning operation once, which greatly reduces the requirements of model reasoning on the computing power of the computing platform, and improves the real-time performance of the algorithm on the basis of ensuring the accuracy of visual perception. In addition, combined with the characteristics of the installation of vehicle-mounted surround-view cameras, the overlap of the fields of view of different cameras and the visual differences between different cameras are utilized, and the reasoning results of multiple cameras are fused, thereby improving the accuracy and stability of the algorithm.
[0089] Based on the first embodiment of the present invention, the second embodiment of the present invention provides a vehicle parking system, including: an acquisition unit, a neural network processing unit, a parsing and fusion unit and a control unit, wherein the acquisition unit is used to acquire images captured by a front camera, a rear camera, a left camera and a right camera of the vehicle in real time, and the neural network processing unit is used to receive the images, process the images, and obtain parking space detection information and drivable area detection information respectively, wherein the neural network processing unit includes a common layer, a parking space detection branch layer and a drivable area detection branch layer, and the common layer is used to extract features from the images and output at least one intermediate feature. The parking space detection branch is used to process the final feature extraction information to obtain the parking space detection information; the drivable area detection branch layer is used to process the final feature extraction information and the at least one intermediate feature extraction information to obtain the drivable area detection information; the parsing and fusion unit is used to parse and fuse the parking space detection information and the drivable area detection information to obtain fusion information of the parking space and the drivable area; the control unit is used to generate a control instruction according to the fusion information, send the control instruction to the vehicle parking system, and control the vehicle to park according to the fusion information.
[0090] In a specific embodiment, the common layer includes a first common branch, a second common branch and a splicing layer, the first common branch and the second common branch are connected in parallel, the first common branch is used to process the image, and output at least one intermediate feature extraction information and final feature extraction information of the first common branch, the second common branch is used to process the image, and output at least one intermediate feature extraction information and final feature extraction information of the second common branch, the splicing layer is used to splice the final feature extraction information of the first common branch and the final feature extraction information of the second common branch, and output the final feature extraction information of the common layer, the parking space detection branch is used to process the final feature extraction information output by the splicing layer to obtain the parking space detection information, and the drivable area detection branch layer is used to process the final feature extraction information output by the splicing layer, at least one intermediate feature extraction information output by the first common branch, and at least one intermediate feature extraction information output by the second common branch to obtain the drivable area detection information.
[0091] Based on the first embodiment of the present invention, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned method are implemented.
[0092] Specifically, the computer-readable storage medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0093] For the working principle of this embodiment and the beneficial effects it brings, please refer to the description of the first embodiment of the present invention, which will not be repeated here.
[0094] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A vehicle parking method, characterized in that: include: Acquire images collected by the front camera, rear camera, left camera and right camera of the vehicle in real time; The image is input into a trained neural network model for processing to obtain parking space detection information and drivable area detection information respectively; Parsing and fusing the parking space detection information and the drivable area detection information to obtain fused information of the parking space and the drivable area; generating a control instruction according to the fused information, and sending the control instruction to a vehicle parking system to control the vehicle to park according to the fused information; The neural network model includes a common layer, a parking space detection branch and a drivable area detection branch; The common layer is used to extract features from the image, the common layer includes a first common branch, a second common branch and a concatenation layer, the first common branch includes a plurality of convolutional layers, and according to the order of convolutional layer operations, the first common branch sequentially outputs first intermediate feature extraction information, second intermediate feature extraction information, third intermediate feature extraction information and final feature extraction information of the first common branch, the second common branch includes a plurality of convolutional layers, and according to the order of convolutional layer operations, the second common branch sequentially outputs first intermediate feature extraction information, second intermediate feature extraction information, third intermediate feature extraction information and final feature extraction information of the second common branch; The concatenation layer is used to concatenate the final feature extraction information of the first common branch and the final feature extraction information of the second common branch, and output the final feature extraction information of the common layer; The available parking space detection branch is used to process the final feature extraction information output by the splicing layer to obtain the available parking space detection information; The drivable area detection branch processes the final feature extraction information output by the splicing layer, the first to third intermediate feature extraction information output by the first common branch, and the first to third intermediate feature extraction information output by the second common branch to obtain drivable area detection information.
2. The method according to claim 1, characterized in that: The drivable area detection branch processes the final feature extraction information output by the splicing layer, the first to third intermediate feature extraction information output by the first common branch, and the first to third intermediate feature extraction information output by the second common branch to obtain the drivable area detection information, specifically including: The drivable area detection branch processes the final feature extraction information output by the splicing layer to obtain the first intermediate feature extraction information of the drivable area detection branch, splices the first intermediate feature extraction information of the drivable area detection branch, the third intermediate feature extraction information of the first common branch, and the third intermediate feature extraction information of the second common branch to obtain a first splicing result, the drivable area detection branch processes the first splicing result to obtain the second intermediate feature extraction information of the drivable area detection branch, splices the second intermediate feature extraction information of the drivable area detection branch, the second intermediate feature extraction information of the first common branch, and the second intermediate feature extraction information of the second common branch to obtain a second splicing result, the drivable area detection branch processes the second splicing result to obtain the third intermediate feature extraction information of the drivable area detection branch, splices the third intermediate feature extraction information of the drivable area detection branch, the first intermediate feature extraction information of the first common branch, and the first intermediate feature extraction information of the second common branch to obtain a third splicing result, and processes the third splicing result to obtain the drivable area detection information.
3. The method according to claim 1, characterized in that The parsing and fusing the parking space detection information and the drivable area detection information to obtain the fused information of the parking space and the drivable area specifically includes: Determine a parking space angle center point information set and an empty parking space center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same time, and obtain a pixel point set corresponding to each camera according to the pixel point information output by each detection frame corresponding to each image at the same time, wherein the parking space detection information output by the detection frame includes a probability value of a parking space angle center point and the coordinates of the parking space angle center point in the detection frame, a probability value of an empty parking space center point and the coordinates of the empty parking space center point in the detection frame, the parking space angle center point information includes the coordinates of the parking space angle center point and the probability value of the existence of the parking space angle center point, the empty parking space center point information includes the coordinates of the empty parking space center point and the probability value of the existence of the empty parking space center point, and the pixel point information includes the coordinates of the pixel point and the probability value of the existence of the pixel point; Processing the parking space angle center point information set, the empty parking space center point information set and the drivable area pixel point set corresponding to each camera respectively to obtain the final parking space angle center point information set, the final empty parking space center point information set and the final drivable area information; The parking space angle center points in the final parking space angle center point information set and the empty parking space center points in the final empty parking space center point information set are respectively mapped onto the drivable area to generate a visual detection result of the parking space and the drivable area.
4. The method according to claim 3, characterized in that The method of determining the parking space angle center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same time specifically includes: The probability value of the parking angle center point output by each detection frame corresponding to each image is compared with the set parking angle center point probability value. If the probability value of the parking angle center point output by the detection frame is greater than the set parking angle center point probability value, the parking angle center point coordinates output by the detection frame are converted into the parking angle center point coordinates in the image coordinate system, and the probability value of the parking angle center point and the converted parking angle center point coordinates are saved in the parking angle center point information set corresponding to the camera that took the image, and the left camera parking angle center point information set, the right camera parking angle center point information set, the front camera parking angle center point information set and the rear camera parking angle center point information set are obtained accordingly.
5. The method according to claim 4, characterized in that The step of determining the vacant parking space center point information set corresponding to each camera according to the parking space detection information output by each detection frame of each image at the same time specifically includes: The probability value of the center point of the empty parking space output by each detection frame corresponding to each image is compared with the set probability value of the center point of the empty parking space. If the probability value of the center point of the empty parking space output by the detection frame is greater than the set probability value of the center point of the empty parking space, the coordinates of the center point of the empty parking space output by the detection frame are converted into the coordinate values of the center point of the empty parking space in the image coordinate system, and the probability value of the center point of the empty parking space and the converted coordinate values of the center point of the empty parking space are saved in the empty parking space center point information set corresponding to the camera that took the image, and the empty parking space center point information set of the left camera, the empty parking space center point information set of the right camera, the empty parking space center point information set of the front camera and the empty parking space center point information set of the rear camera are obtained accordingly.
6. The method according to claim 5, characterized in that The step of obtaining a pixel point set corresponding to each camera according to the pixel point information output by each detection frame corresponding to each image at the same time specifically includes: The probability value of the existence of the pixel point output by each detection frame corresponding to each image is compared with the set pixel point probability value. If the probability value of the existence of the pixel point output by the detection frame is greater than the set pixel point probability value, the pixel point coordinates corresponding to the detection frame are converted to the image coordinate system, and the probability value of the existence of the pixel point and the converted pixel point coordinates are saved in the pixel point set corresponding to the camera that took the image, and the left camera pixel point set, the right camera pixel point set, the front camera pixel point set and the rear camera pixel point set are obtained accordingly.
7. The method according to claim 3, characterized in that The processing of the parking angle center point information set corresponding to each camera to obtain the final parking angle center point information set specifically includes: Projecting the parking angle center point in the parking angle center point information set corresponding to each camera to the vehicle coordinate system, and obtaining the parking angle center point information set corresponding to each camera in the vehicle coordinate system; Determine whether there is an identical parking angle center point in two parking angle center point information sets corresponding to two cameras installed at adjacent positions; if there is an identical parking angle center point, obtain the probability value of the identical parking angle center point from the two parking angle center point information sets, determine the size of the two existence probability values corresponding to the identical parking angle center point, retain the position coordinates and the corresponding existence probability value of the identical parking angle center point in the parking angle center point information set with the larger existence probability value, delete the position coordinates and the corresponding probability value of the identical parking angle center point in the parking angle center point information set with the smaller probability value, until the determination of the identical parking angle center point in the parking angle center point information sets corresponding to all adjacent cameras is completed, and obtain the final parking angle center point information set for the left camera, the final parking angle center point information set for the right camera, the final parking angle center point information set for the front camera, and the final parking angle center point information set for the rear camera.
8. The method according to claim 3, characterized in that The processing of the empty parking space center point information set corresponding to each camera to obtain the final empty parking space center point information set specifically includes: Project the empty parking space center point in the empty parking space center point information set corresponding to each camera to the vehicle coordinate system, and obtain the empty parking space center point information set corresponding to each camera in the vehicle coordinate system; Determine whether there is an identical empty parking space center point in two empty parking space center point information sets corresponding to two cameras installed at adjacent positions; if there is an identical empty parking space center point, obtain the probability value of the identical empty parking space center point from the two empty parking space center point information sets, determine the size of the two existence probability values corresponding to the identical empty parking space center point, retain the position coordinates and the corresponding existence probability value of the identical empty parking space center point in the empty parking space center point information set with the larger existence probability value, delete the position coordinates and the corresponding probability value of the identical empty parking space center point in the empty parking space center point information set with the smaller probability value, until the determination of the identical empty parking space center point in the empty parking space center point information sets corresponding to all adjacent cameras is completed, and the final empty parking space center point information set of the left camera, the final empty parking space center point information set of the right camera, the final empty parking space center point information set of the front camera, and the final empty parking space center point information set of the rear camera are obtained.
9. The method according to claim 3, characterized in that: The processing of the pixel point set corresponding to each camera to obtain the final drivable area information specifically includes: The pixel points in the pixel point set corresponding to each camera are respectively converted to the camera coordinate system, and the pixel point set after the conversion of each camera is obtained; Generate a drivable area corresponding to each camera according to the pixel point set converted by each camera; The drivable areas corresponding to each camera are superimposed to obtain the final drivable area. During the superposition process, if there is an overlapping area, the probability value of the pixel points in the overlapping area in the pixel point set corresponding to the adjacent camera is obtained. If any probability value of the pixel point is greater than the set pixel point existence probability value, the pixel point is retained; otherwise, the pixel point is deleted.
10. A vehicle parking system, characterized in that: include: An acquisition unit is used to acquire images captured by the front camera, rear camera, left camera and right camera of the vehicle in real time; A neural network processing unit, configured to receive the image, process the image, and obtain parking space detection information and drivable area detection information respectively; A parsing and fusing unit, used for parsing and fusing the parking space detection information and the drivable area detection information to obtain fused information of the parking space and the drivable area; a control unit, configured to generate a control instruction according to the fused information, send the control instruction to a vehicle parking system, and control the vehicle to park according to the fused information; The neural network model includes a common layer, a parking space detection branch and a drivable area detection branch; The common layer is used to extract features from the image, the common layer includes a first common branch, a second common branch and a concatenation layer, the first common branch includes a plurality of convolutional layers, and according to the order of convolutional layer operations, the first common branch sequentially outputs first intermediate feature extraction information, second intermediate feature extraction information, third intermediate feature extraction information and final feature extraction information of the first common branch, the second common branch includes a plurality of convolutional layers, and according to the order of convolutional layer operations, the second common branch sequentially outputs first intermediate feature extraction information, second intermediate feature extraction information, third intermediate feature extraction information and final feature extraction information of the second common branch; The concatenation layer is used to concatenate the final feature extraction information of the first common branch and the final feature extraction information of the second common branch, and output the final feature extraction information of the common layer; The available parking space detection branch is used to process the final feature extraction information output by the splicing layer to obtain the available parking space detection information; The drivable area detection branch processes the final feature extraction information output by the splicing layer, the first to third intermediate feature extraction information output by the first common branch, and the first to third intermediate feature extraction information output by the second common branch to obtain drivable area detection information.
11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
