Parking space detection method, device, vehicle and storage medium
By combining the parking space detection model, obstacle detection model and scene detection model, and performing multiple verifications based on the position relationship of the on-board cameras, the reliability problem of parking space detection in complex scenarios is solved, and high-precision and efficient parking space detection is achieved.
Patent Information
- Application Number
- CN202210639071.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-06-07
AI Technical Summary
In complex scenarios, when relying solely on image classification methods to detect parking space validity, the results are less reliable, especially when parking spaces are obscured or contain non-standard elements and obstacles.
The parking space detection model, obstacle detection model and scene detection model are used to detect the current frame image of the scene where the vehicle is located. Combined with the position relationship of the on-board camera, the validity of the parking space is judged through a multiple verification mechanism, including the obstacle and scene prediction results to verify the parking space prediction results.
Providing high-precision parking space detection results in complex scenarios improves the parking space release rate and ensures accurate predictions without the vehicle having to completely pass through the target parking space.
Smart Images

Figure CN115082892B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and specifically provides a parking space detection method, device, vehicle and storage medium. Background Art
[0002] When designing automated parking systems, the user interface needs to inform users of available parking spaces, facilitating interactive selection. The accuracy of determining parking space availability must be high to minimize situations where users are unable to select a space.
[0003] Related technologies typically use image classification to determine parking space availability. However, parking space detection can present complex scenarios. For example, these scenarios may include: obstructed parking spaces ahead or behind; the presence of numerous non-standard elements within the parking lot, such as piles of cabbage, user graffiti, and various charging signs and patterns; and the presence of dynamic and static obstacles of varying sizes near parking spaces, such as vehicles, pedestrians, cones, and signage. Relying solely on image classification to determine parking space availability in these complex scenarios can yield unreliable results. Summary of the Invention
[0004] In order to overcome the above-mentioned defects, the present invention is proposed to provide a parking space detection method, device, vehicle and storage medium that solves or at least partially solves the technical problem that the validity of parking spaces is obtained by relying solely on image classification methods in complex scenarios, and the reliability of the results is poor.
[0005] In a first aspect, the present invention provides a parking space detection method, comprising:
[0006] Obtain the current frame image of the scene where the vehicle is located from the on-board camera;
[0007] Inputting the current frame image into a pre-trained parking space detection model, an obstacle detection model, and a scene detection model for detection, respectively, to obtain a parking space prediction result, an obstacle prediction result, and a scene prediction result;
[0008] According to the positional relationship between any detected target parking space and the vehicle-mounted camera, determining whether the target parking space is the parking space where the vehicle-mounted camera is located;
[0009] If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space;
[0010] If it is determined that the target parking space is not a parking space where the vehicle-mounted camera is located, the scene prediction result is used to verify the parking space prediction result of the target parking space, thereby obtaining a single-frame prediction result of the target parking space.
[0011] In a second aspect, the present invention provides a parking space detection device, comprising a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and is characterized in that the program code is suitable for being loaded and run by the processor to execute any of the above-mentioned parking space detection methods.
[0012] In a third aspect, a vehicle is provided, characterized in that it includes the parking space detection device described above.
[0013] In a fourth aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored in the computer-readable storage medium, wherein the program codes are suitable for being loaded and run by a processor to execute the parking space detection method described in any one of the above technical solutions.
[0014] Solution 1. A parking space detection method, comprising:
[0015] Obtain the current frame image of the scene where the vehicle is located from the on-board camera;
[0016] Inputting the current frame image into a pre-trained parking space detection model, an obstacle detection model, and a scene detection model for detection, respectively, to obtain a parking space prediction result, an obstacle prediction result, and a scene prediction result;
[0017] According to the positional relationship between any detected target parking space and the vehicle-mounted camera, determining whether the target parking space is the parking space where the vehicle-mounted camera is located;
[0018] If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space;
[0019] If it is determined that the target parking space is not a parking space where the vehicle-mounted camera is located, the scene prediction result is used to verify the parking space prediction result of the target parking space, thereby obtaining a single-frame prediction result of the target parking space.
[0020] Solution 2. The parking space detection method according to Solution 1, wherein the scene prediction result includes a drivable area of the scene in which the vehicle is located;
[0021] If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space, including:
[0022] Using the obstacle prediction result, verifying the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space; wherein the intermediate prediction result of the target parking space includes a parking state or a non-parking state;
[0023] If the target parking space includes a non-curbside point in the drivable area, and the intermediate prediction result of the target parking space is a parking state, verifying the parking state as an unknown state as a single-frame prediction result of the target parking space;
[0024] If there is no non-roadside point in the drivable area within the target parking space, and the intermediate prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space;
[0025] If the target parking space includes a non-roadside point in the drivable area, and the intermediate prediction result of the target parking space is an unparkable state, maintaining the unparkable state as the single-frame prediction result of the target parking space;
[0026] If there is no non-roadside point in the drivable area within the target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, the non-parkable state is verified as a parkable state as the single-frame prediction result of the target parking space.
[0027] Solution 3. The parking space detection method according to Solution 2 is characterized in that if it is determined that the target parking space is not a parking space where the on-board camera is located, the parking space prediction result of the target parking space is verified using the scene prediction result to obtain a single-frame prediction result of the target parking space, including:
[0028] If the target parking space includes a non-roadside point in the drivable area, and the parking space prediction result of the target parking space is a parking state, verifying the parking state as an unknown state as a single-frame prediction result of the target parking space;
[0029] If there is no non-roadside point in the drivable area within the target parking space, and the parking space prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space;
[0030] If the target parking space includes a non-roadside point in the drivable area, and the parking space prediction result of the target parking space is a non-parking state, verifying the non-parking state as an unknown state as a single-frame prediction result of the target parking space;
[0031] If there is no non-roadside point in the drivable area within the target parking space, and the parking space prediction result of the target parking space is a non-parkable state, the non-parkable state is verified as a parking state as the single-frame prediction result of the target parking space.
[0032] Solution 4. The parking space detection method according to Solution 1, wherein the scene prediction result includes display information of the parking space in the scene where the vehicle is located in the current frame image; the display information includes displaying the entire target parking space or displaying a portion of the target parking space;
[0033] If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space, including:
[0034] Using the obstacle prediction result, verifying the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space; wherein the intermediate prediction result of the target parking space includes a parking state or a non-parking state;
[0035] If the display information shows a portion of the target parking space, and the intermediate prediction result of the target parking space is a parking state, verifying the parking state as an unknown state as a single-frame prediction result of the target parking space;
[0036] If the display information shows the entire target parking space, and the intermediate prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space;
[0037] If the display information shows a portion of the target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, maintaining the non-parkable state as the single-frame prediction result of the target parking space;
[0038] If the display information is for displaying the entire target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, the non-parkable state is verified to a parking state as a single-frame prediction result of the target parking space.
[0039] Solution 5. The parking space detection method according to Solution 4 is characterized in that, if the target parking space is determined to be the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result to obtain a single-frame prediction result of the target parking space, including:
[0040] If the display information shows a portion of a target parking space, and the parking space prediction result of the target parking space is a parking available state, verifying the parking available state as an unknown state as a single-frame prediction result of the target parking space;
[0041] If the display information is for displaying the entire target parking space, and the parking space prediction result of the target parking space is a parking available state, maintaining the parking available state as the single-frame prediction result of the target parking space;
[0042] If the display information shows a portion of a target parking space, and the parking space prediction result of the target parking space is a non-parking state, verifying the non-parking state as an unknown state as a single-frame prediction result of the target parking space;
[0043] If the display information displays the entire target parking space, and the parking space prediction result of the target parking space is a non-parkable state, the non-parkable state is verified to a parking state as a single-frame prediction result of the target parking space.
[0044] Solution 6. The parking space detection method according to any one of Solutions 1-5, further comprising:
[0045] Obtaining a historical frame image having the same parking space identifier as the target parking space and a historical single-frame prediction result of the target parking space under the historical frame image;
[0046] Detecting whether there is a target image frame that is temporally adjacent to the current frame image in the historical frame image;
[0047] If there is a target image frame that is temporally adjacent to the current frame image in the historical frame image, detecting whether the historical single-frame prediction result of the target parking space under the target image is in an unknown state;
[0048] If the historical single-frame prediction result of the target parking space under the target image is not in an unknown state, the single-frame prediction result of the target parking space under the historical frame image is verified according to the historical single-frame prediction result of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image.
[0049] Solution 7. The parking space detection method according to Solution 6 is characterized in that, based on the historical single-frame prediction results of the target parking space in the historical frame images and the positional relationship between the target parking space and the vehicle-mounted camera, the single-frame prediction result of the target parking space in the current frame image is verified to obtain the final prediction result of the target parking space in the current frame image, including:
[0050] If it is determined based on the positional relationship between the target parking space and the on-board camera that the target parking space is the parking space where the on-board camera is located, and if there are at least N set reasons for the non-parking status in the historical single-frame prediction results of the parking space in the historical frame image, the non-parking status with the set reasons is used as the final prediction result of the target parking space in the current frame image;
[0051] If it is determined based on the positional relationship between the target parking space and the vehicle-mounted camera that the target parking space is the parking space where the vehicle-mounted camera is located, and / or if the single-frame prediction results of the parking space under the historical frame image do not contain an unparkable state due to at least N set reasons, the historical single-frame prediction results of the target parking space under the target image are used as the final prediction results of the target parking space under the current frame image.
[0052] Solution 8. The parking space detection method according to Solution 6, further comprising:
[0053] When the first preset condition is met, the state voting result of the target parking space under the current frame image is calculated based on the historical single-frame prediction results of the target parking space under the historical frame image;
[0054] The state voting result is verified based on the historical single-frame prediction results of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image;
[0055] The first preset condition includes:
[0056] There is a target image frame in the historical frame image that is adjacent in time sequence to the current frame image, but the historical single-frame prediction result of the target parking space under the target image is not in an unknown state; or
[0057] There is no target image in the historical frame image that is temporally adjacent to the current frame image.
[0058] Solution 9. The parking space detection method according to Solution 8 is characterized in that the status voting result is verified based on the historical single-frame prediction results of the target parking space in the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space in the current frame image, including:
[0059] If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located based on the positional relationship between the target parking space and the vehicle-mounted camera, when the second preset condition is met, the parkable state is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met and the third preset condition is not met, the unknown state is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met but the third preset condition and the fourth preset condition are met, the non-parkable state due to a set reason is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met and the fourth preset condition is met but the third preset condition is met, the non-parkable state due to a non-set reason is used as the final prediction result of the target parking space under the current frame image; wherein, the non-parkable state due to a non-set reason is obtained by voting calculation;
[0060] The second preset condition includes that the historical single-frame prediction results of the target parking space under the historical frame image contain at least M parking states, and there are no at least P non-parking states due to set reasons;
[0061] The third preset condition includes that the historical single-frame prediction results of the target parking space under the historical frame image contain at least P non-parking states due to set reasons, or at least Q non-parking states due to non-set reasons;
[0062] The fourth preset condition includes that there are at least P set reasons for an unparkable state in the historical single-frame prediction results of the target parking space under the historical frame image.
[0063] Solution 10. The parking space detection method according to Solution 8 is characterized in that the status voting result is verified based on the historical single-frame prediction results of the target parking space in the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space in the current frame image, including:
[0064] If it is determined based on the positional relationship between the target parking space and the on-board camera that the target parking space is not a parking space where the on-board camera is located, detecting whether there are at least M parking available states in the historical single-frame prediction results of the target parking space under the historical frame image;
[0065] If there are at least M parking states in the historical single-frame prediction results of the target parking space under the historical frame image, the parking state is used as the final prediction result of the target parking space under the current frame image;
[0066] If there are no at least M parking states in the historical single-frame prediction results of the parking space under the historical frame image, the unknown state is used as the final prediction result of the target parking space under the current frame image.
[0067] Solution 11. A parking space detection device, comprising a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, and is characterized in that the program codes are suitable for being loaded and run by the processor to execute the parking space detection method described in any one of Solutions 1 to 10.
[0068] Solution 12. A vehicle, characterized in that it includes the parking space detection device as described in Solution 11.
[0069] Solution 13. A computer-readable storage medium storing a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the parking space detection method according to any one of Solutions 1 to 10.
[0070] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:
[0071] In the technical solution of the present invention, a current frame image of the vehicle's scene, captured by an on-board camera, is input into pre-trained parking space detection models, obstacle detection models, and scene detection models for detection. These models then generate parking space prediction results, obstacle prediction results, and scene prediction results, respectively. Based on the positional relationship between any detected target parking space and the on-board camera, a determination is made as to whether the target parking space is the one located at the on-board camera's location. If the target parking space is determined to be the one located at the on-board camera's location, the parking space prediction results for the target parking space are verified using the obstacle prediction results and the scene prediction results, thereby obtaining a single-frame prediction result for the target parking space. If the target parking space is determined to be a space not located at the on-board camera's location, the parking space prediction results for the target parking space are verified using the scene prediction results, thereby obtaining a single-frame prediction result for the target parking space. This multiple verification mechanism allows for highly accurate parking space detection results in complex scenarios. Furthermore, relatively accurate prediction results can be obtained without the vehicle having to fully pass through the target parking space, thereby improving the parking space release rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The disclosure of the present invention will be more easily understood with reference to the accompanying drawings. Those skilled in the art will readily appreciate that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. Furthermore, similar numbers in the drawings represent similar components, wherein:
[0073] Figure 1 This is a flow chart of the main steps of a parking space detection method according to one embodiment of the present invention;
[0074] Figure 2 is a flow chart of main steps of a parking space detection method according to another embodiment of the present invention;
[0075] Figure 3 is a flow chart of main steps of a parking space detection method according to another embodiment of the present invention;
[0076] Figure 4 This is a main structural block diagram of a parking space detection device according to one embodiment of the present invention;
[0077] Figure 5 It is a schematic diagram of the current frame image of the scene where the vehicle is located. DETAILED DESCRIPTION
[0078] Some embodiments of the present invention are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0079] In the description of the present invention, "module" and "processor" may include hardware, software, or a combination of both. A module may include hardware circuitry, various suitable sensors, communication ports, and memory. It may also include software components, such as program code, or a combination of software and hardware. A processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. A processor has data and / or signal processing capabilities. A processor may be implemented in software, hardware, or a combination of both. Non-transitory computer-readable storage media include any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, and the like. The term "A and / or B" refers to all possible combinations of A and B, such as only A, only B, or both A and B. The terms "at least one of A or B" or "at least one of A and B" have similar meanings to "A and / or B" and may include only A, only B, or both A and B. The singular forms "one" and "the" may also include the plural forms.
[0080] In automated parking technology, image classification is often used to determine parking space availability. However, parking space detection can present complex scenarios. For example, these scenarios may include: obstructed parking spaces ahead or behind; the presence of numerous non-standard elements within the parking lot, such as piles of cabbages, user graffiti, and various charging signs and patterns; and the presence of dynamic and static obstacles of varying sizes near parking spaces, such as vehicles, pedestrians, cones, and signage. Relying solely on image classification to determine parking space availability in these complex scenarios can yield unreliable results.
[0081] Therefore, in order to solve the above technical problems, the present invention provides the following technical solutions:
[0082] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart showing the main steps of a parking space detection method according to an embodiment of the present invention. Figure 1 As shown, the parking space detection method in the embodiment of the present invention mainly includes the following steps 101 to 105.
[0083] Step 101: Acquire a current frame image of a scene in which the vehicle is located from a vehicle-mounted camera;
[0084] In a specific implementation process, a vehicle-mounted camera can be set in the vehicle, and the vehicle-mounted camera can collect the current frame image of the scene in which the vehicle is located. For example, the vehicle-mounted camera can be a fisheye camera or any other form of camera. The vehicle-mounted camera can be arranged in the corresponding areas of the front, rear and both sides of the vehicle, so that the current frame image of the scene in which the vehicle is located can be obtained based on the vehicle-mounted camera.
[0085] In a specific implementation process, taking the vehicle-mounted camera set on the vehicle ear 11 (rearview mirror) as an example, the moving vehicle 1 is traveling along the road with parking spaces on both sides of the road. The scene images along the way are continuously collected, and then a bird's-eye view of the scene where the vehicle is located is obtained through splicing as the current frame image. Figure 5 is a schematic diagram of the current frame image of the scene where the vehicle is located. Figure 5 Only a portion of the image of the scene in which the vehicle is located is shown. The current frame image of the scene in which the vehicle is located may include a moving vehicle 1, a first parking space C1, a second parking space C2, a third parking space C3, a fourth parking space C4, a ground lock L, and a parked vehicle 2. Step 102: Input the current frame image into a pre-trained parking space detection model, an obstacle detection model, and a scene detection model for detection, respectively, to obtain parking space prediction results, obstacle prediction results, and scene prediction results;
[0086] In a specific implementation process, different detection models for predicting the validity of parking spaces may be pre-trained so that the prediction results of multiple detection models can be used to perform multiple checks on the validity of parking spaces.
[0087] Specifically, the parking space detection model, obstacle detection model and scene detection model can be pre-trained. After obtaining the current frame image of the scene in which the vehicle is located, the pre-trained parking space detection model, obstacle detection model and scene detection model can be input respectively for detection to obtain parking space prediction results, obstacle prediction results and scene prediction results.
[0088] Among them, the parking space prediction result is the initial result obtained based on image classification, the obstacle prediction result is whether there are obstacles such as open ground locks and cones in the parking space, and the scene prediction result is the drivable area of the scene in which the vehicle is located, the display information of the parking space in the current frame image under the current scene, etc.
[0089] Step 103: Determine whether the target parking space is the parking space where the vehicle-mounted camera is located based on the positional relationship between the detected target parking space and the vehicle-mounted camera; if so, execute step 104; if not, execute step 105;
[0090] In a specific implementation process, there may be one or more parking spaces in the current frame image. For any target parking space, the following operations can be performed:
[0091] According to the positional relationship between any detected target parking space and the vehicle-mounted camera, it is determined whether the target parking space is the parking space where the vehicle-mounted camera is located.
[0092] Specifically, the center coordinates of the target parking space and the coordinates of the on-board camera in the current frame image can be obtained, and then the geometric relationship between the center coordinates of the target parking space and the coordinates of the on-board camera can be used to determine whether the target parking space is the parking space where the on-board camera is located. For example, if the deviation angle between the target parking space and the on-board camera is within a preset range, it can be determined that the target parking space is the parking space where the on-board camera is located; otherwise, it can be determined that the target parking space is not the parking space where the on-board camera is located.
[0093] It should be noted that the aforementioned method of determining whether the target parking space is the parking space where the onboard camera is located using the geometric relationship between the center coordinates of the target parking space and the coordinates of the onboard camera is merely an exemplary method, and this embodiment does not limit other methods. For example, if the coordinates of the onboard camera are between the coordinates of two corner points of the parking space parallel to the roadway, the target parking space can be determined to be the parking space where the onboard camera is located. Otherwise, the target parking space can be determined to be a parking space other than the parking space where the onboard camera is located.
[0094] In a specific implementation process, such as Figure 5 As shown, at this moment, the onboard camera is aligned with the second parking space C2 in the horizontal direction perpendicular to the road. In this case, the second parking space C2 in the current frame image is called the parking space where the onboard camera is located. On the contrary, at this time, the onboard camera is not aligned with the first parking space C1 and the third parking space C3 in the horizontal direction, and the onboard camera is not aligned with the fourth parking space C4 in the vertical direction parallel to the road. The first parking space C1, the third parking space C3 and the fourth parking space C4 are all called parking spaces where the onboard camera is not located. Step 104: Use the obstacle prediction result and the scene prediction result to verify the parking space prediction result of the target parking space, thereby obtaining a single-frame prediction result of the target parking space;
[0095] In a specific implementation process, if it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, it means that the vehicle has completely passed the target parking space. At this time, the target parking space is no longer blocked, and the obstacle information can be clearly obtained. At this time, the obstacle prediction result and the scene prediction result can be used to verify the parking space prediction result of the target parking space to obtain a single-frame prediction result of the target parking space.
[0096] For example, the obstacle prediction result can be used to perform a first check on the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space. Then, the scene prediction result can be used to perform a second check on the intermediate prediction result of the target parking space to obtain a single-frame prediction result of the target parking space. Alternatively, the scene prediction result can be used to perform a first check on the intermediate prediction result of the target parking space to obtain an intermediate prediction result of the target parking space. Then, the obstacle prediction result can be used to perform a second check on the intermediate prediction result of the target parking space to obtain a single-frame prediction result of the target parking space.
[0097] Step 105: Use the scene prediction result to verify the parking space prediction result of the target parking space, so as to obtain a single-frame prediction result of the target parking space.
[0098] In a specific implementation process, if it is determined that the target parking space is not a parking space where the on-board camera is located, it means that the target parking space may be obstructed. In this way, it is impossible to clearly obtain information about the obstacles in the target parking space. Therefore, only the scene prediction result is used to verify the parking space prediction result of the target parking space, so as to obtain a single-frame prediction result of the target parking space.
[0099] In a specific implementation process, this embodiment can predict the effectiveness of parking spaces where non-vehicle-mounted cameras are located. In this way, a relatively accurate prediction result can be obtained without the vehicle completely passing through the target parking space, thereby improving the parking space release rate.
[0100] like Figure 5 As shown, after the above parking space detection method, the single-frame prediction results of all parking spaces under the current frame image can be obtained as follows: the first parking space C1 corresponding to the dotted box represents a parking space in a parking state, the second parking space C2 and the third parking space C3 corresponding to the solid box represent parking spaces in a non-parking state, and the fourth parking space C4 with a slash represents a parking space in an unknown state.
[0101] It should be noted that in order to distinguish parking spaces in different states, other methods may be used, such as using different colors for distinction, and this embodiment does not impose any specific limitation.
[0102] The parking space detection method of this embodiment inputs the current frame image of the vehicle's scene, captured by the vehicle-mounted camera, into a pre-trained parking space detection model, an obstacle detection model, and a scene detection model for detection, respectively, to obtain parking space prediction results, obstacle prediction results, and scene prediction results. Then, based on the positional relationship between any detected target parking space and the vehicle-mounted camera, it is determined whether the target parking space is the parking space where the vehicle-mounted camera is located. If the target parking space is determined to be the parking space where the vehicle-mounted camera is located, the parking space prediction result for the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result for the target parking space. If the target parking space is determined to be a parking space not located at the vehicle-mounted camera, the parking space prediction result for the target parking space is verified using the scene prediction result, thereby obtaining a single-frame prediction result for the target parking space. In this way, through the verification of multiple verification mechanisms, high-precision parking space detection results can be obtained in complex scenarios. Furthermore, relatively accurate prediction results can be obtained without the vehicle having to completely pass through the target parking space, thereby improving the parking space release rate.
[0103] In a specific implementation process, the scene prediction result may include a drivable area of the scene in which the vehicle is located;
[0104] The above step 104 may specifically include the following steps:
[0105] (1) Using the obstacle prediction result, verifying the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space;
[0106] In a specific implementation, the parking space prediction result for the target parking space may include a parking state or a non-parking state. If the target parking space is determined to be the parking space where the vehicle-mounted camera is located, the obstacle prediction result may be used to verify the parking space prediction result for the target parking space to obtain an intermediate prediction result for the target parking space. The intermediate prediction result for the target parking space also includes a parking state or a non-parking state.
[0107] Specifically, if the obstacle prediction result indicates an obstacle is present in the target parking space, regardless of the parking space prediction result for the target parking space, the target parking space can be verified as unparkable and used as the intermediate prediction result for the target parking space. If the obstacle prediction result indicates no obstacle is present in the target parking space, the parking space prediction result for the target parking space can be maintained as the intermediate prediction result for the target parking space.
[0108] (2) If the target parking space includes a non-roadside point in the drivable area, and the intermediate prediction result of the target parking space is a parking state, the parking state is verified as an unknown state as the single-frame prediction result of the target parking space;
[0109] In a specific implementation process, the points on the boundary corresponding to the drivable area can be used as roadside points, and the points inside it can be used as non-roadside points. Then, it is detected whether there are non-roadside points (hereinafter referred to as fs points) in the drivable area in the target parking space to obtain the detection results. Based on the obtained detection results and the intermediate prediction results of the target parking space, the parking space prediction results of the target parking space are verified to obtain the single-frame prediction results of the target parking space.
[0110] Specifically, if the fs point exists in the target parking space, it indicates that there may be an object in the target parking space. In this case, if the intermediate prediction result of the target parking space is a parking state, the parking state can be verified as an unknown state as the single-frame prediction result of the target parking space.
[0111] (3) If the fs point does not exist in the target parking space and the intermediate prediction result of the target parking space is a parking state, the parking state is maintained as the single-frame prediction result of the target parking space;
[0112] In a specific implementation process, if the fs point does not exist in the target parking space, it means that there is no object in the target parking space. In this case, if the intermediate prediction result of the target parking space is a parking state, the parking state is maintained as the single-frame prediction result of the target parking space.
[0113] (4) If the fs point exists in the target parking space and the intermediate prediction result of the target parking space is an unparkable state, the unparkable state is maintained as the single-frame prediction result of the target parking space;
[0114] In a specific implementation process, if the point fs exists in the target parking space, it indicates that there may be an object in the target parking space. In this case, if the intermediate prediction result of the target parking space is an unparkable state, the unparkable state is maintained as the single-frame prediction result of the target parking space.
[0115] (5) If the fs point does not exist in the target parking space and the intermediate prediction result of the target parking space is an unparkable state, the unparkable state is verified to a parkable state as the single-frame prediction result of the target parking space.
[0116] In a specific implementation process, if the fs point does not exist in the target parking space, it means that there may be an object in the target parking space. In this case, if the intermediate prediction result of the target parking space is an unparkable state, the unparkable state is verified as a parkable state as the single-frame prediction result of the target parking space.
[0117] The above step 105 may specifically include the following steps:
[0118] (11) If the fs point exists in the target parking space and the parking space prediction result of the target parking space is a parking state, the parking state is verified as an unknown state as the single-frame prediction result of the target parking space;
[0119] (12) If the fs point does not exist in the target parking space, and the parking space prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space;
[0120] (13) If the fs point exists in the target parking space and the parking space prediction result of the target parking space is an unparkable state, the unparkable state is verified as an unknown state as the single-frame prediction result of the target parking space;
[0121] (14) If the fs point does not exist in the target parking space, and the parking space prediction result of the target parking space is an unparkable state, the unparkable state is verified as a parkable state as the single-frame prediction result of the target parking space.
[0122] In a specific implementation process, the scene prediction result may include display information of the parking space in the scene where the vehicle is located in the current frame image; the display information includes displaying the entire target parking space or displaying a portion of the target parking space.
[0123] The above step 104 may specifically include the following steps:
[0124] (21) using the obstacle prediction result, verifying the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space; wherein the intermediate prediction result of the target parking space includes a parking state or a non-parking state;
[0125] (22) If the display information is a partial parking space of the target parking space, and the intermediate prediction result of the target parking space is a parking state, the parking state is verified as an unknown state as the single-frame prediction result of the target parking space;
[0126] (23) If the display information is for displaying the entire target parking space, and the intermediate prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space;
[0127] (24) If the display information shows a portion of the target parking space, and the intermediate prediction result of the target parking space is an unparkable state, the unparkable state is maintained as the single-frame prediction result of the target parking space;
[0128] (25) If the display information is for displaying the entire target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, the non-parkable state is verified as a parkable state as a single-frame prediction result of the target parking space.
[0129] The implementation process is similar to the process of verification using the drivable area. Please refer to the above-mentioned relevant records for details and will not be repeated here.
[0130] The above step 105 may specifically include the following steps:
[0131] (31) If the display information is a partial parking space of the target parking space, and the parking space prediction result of the target parking space is a parking state, the parking state is verified as an unknown state as the single-frame prediction result of the target parking space;
[0132] (32) If the display information is for displaying the entire target parking space, and the parking space prediction result of the target parking space is a parking available state, maintaining the parking available state as the single-frame prediction result of the target parking space;
[0133] (33) If the display information is a partial parking space of the target parking space, and the parking space prediction result of the target parking space is a non-parking state, the non-parking state is verified as an unknown state as the single-frame prediction result of the target parking space;
[0134] (34) If the display information is for displaying the entire target parking space, and the parking space prediction result of the target parking space is a non-parkable state, the non-parkable state is verified as a parkable state as a single-frame prediction result of the target parking space.
[0135] In a specific implementation, the single-frame prediction results for the target parking space can be found in Table 1, which is a checksum table comparing the target parking space with the fs point or the displayed information of the parking space in the current frame image. The displayed information of the parking space in the current frame image is represented by whether the parking space is located inside the image or outside the image. For example, using the example of an onboard camera positioned in the rearview mirror, the parking space where the onboard camera is located can be referred to as a "car-ear" parking space, and the parking space where the onboard camera is not located can be referred to as a "non-car-ear" parking space.
[0136] Table 1
[0137]
[0138] In a specific implementation process, the vehicle will capture multiple frames of images at different times while moving forward, and the single-frame prediction results of the target parking space in each frame may be different. Therefore, in order to more accurately determine the validity of the target parking space in the current frame image, the present invention also provides the following technical solutions.
[0139] See attached Figure 2 , Figure 2 1 is a flow chart of the main steps of a parking space detection method according to another embodiment of the present invention. After obtaining the single-frame prediction result of the target parking space using the parking space detection method of the above embodiment, the parking space detection method of this embodiment can further correct the single-frame prediction result of the target parking space based on the historical target parking space. Figure 2 As shown, the parking space detection method in the embodiment of the present invention mainly includes the following steps 201 to 205.
[0140] Step 201: Acquire a historical frame image having the same parking space identifier as the target parking space and a historical single-frame prediction result of the target parking space under the historical frame image;
[0141] In a specific implementation process, after obtaining the single-frame prediction result of the target parking space, the historical frame image with the same parking space identification as the target parking space and the historical single-frame prediction result of the target parking space under the historical frame image can be obtained according to the identification of the target parking space.
[0142] Step 202: Detect whether there is a target image frame in the historical frame image that is temporally adjacent to the current frame image; if so, execute step 203; if not, execute step 205;
[0143] In a specific implementation, each frame image has a corresponding time sequence, and it is possible to detect whether there is a target image frame in the historical frame image that is adjacent to the current frame image in time sequence. Specifically, if the time sequence of the current frame image is t, the time sequence of the target image frame adjacent to the current frame image is t-1. If the historical frame image has an image with a time sequence of t-1, it can be determined that there is a target image frame adjacent to the current frame image in time sequence, and step 203 is executed. If the historical frame image does not have an image with a time sequence of t-1, it can be determined that there is no target image frame adjacent to the current frame image in time sequence, and step 205 is executed.
[0144] Step 203: Detect whether the historical single-frame prediction result of the target parking space under the target image is in an unknown state; if so, execute step 205; if not, execute step 204;
[0145] In a specific implementation process, if there is a target image frame that is temporally adjacent to the current frame image in the historical frame image, it can be detected whether the historical single-frame prediction result of the target parking space under the target image is in an unknown state. If so, step 204 is executed; if not, step 205 is executed;
[0146] Step 204: Verify the single-frame prediction result of the target parking space in the current frame image based on the historical single-frame prediction results of the target parking space in the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain a final prediction result of the target parking space in the current frame image.
[0147] In a specific implementation process, if the historical single-frame prediction result of the target parking space under the target image is not in an unknown state, the single-frame prediction result of the target parking space under the current frame image can be verified based on the historical single-frame prediction result of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image.
[0148] Specifically, if the target parking space is determined to be the parking space at the location of the on-board camera based on the positional relationship between the target parking space and the on-board camera, and the historical single-frame prediction results for the parking space in the historical frame image show at least N set reasons for the non-parking state, the non-parking state with the set reason is used as the final prediction result for the target parking space in the current frame image. If the target parking space is determined to be the parking space at the location of the on-board camera based on the positional relationship between the target parking space and the on-board camera, and / or the single-frame prediction results for the parking space in the historical frame image do not show at least N set reasons for the non-parking state, the historical single-frame prediction results for the target parking space in the target image are used as the final prediction result for the target parking space in the current frame image. N can be 3, and the non-parking state with the set reason can be, but is not limited to, non-parking with the ground lock unlocked.
[0149] Step 205: Calculate the state voting result of the target parking space in the current frame image based on the historical single-frame prediction results of the target parking space in the historical frame image;
[0150] In a specific implementation process, if there is a target image frame that is temporally adjacent to the current frame image in the historical frame image, but the historical single-frame prediction result of the target parking space under the target image is not an unknown state, the state voting result of the target parking space under the current frame image can be calculated based on the historical single-frame prediction result of the target parking space under the historical frame image. Alternatively, if there is no target image frame that is temporally adjacent to the current frame image in the historical frame image, the state voting result of the target parking space under the current frame image can be calculated based on the historical single-frame prediction result of the target parking space under the historical frame image.
[0151] In a specific implementation, when calculating the state voting result for the target parking space in the current frame image, the state with the largest number of historical single-frame prediction results for the target parking space in the previous frame image can be selected as the state voting result for the target parking space in the current frame image. For example, if the historical single-frame prediction results for the target parking space in the previous frame image have the largest number of non-parking states with a set reason, the state voting result for the target parking space in the current frame image will be the non-parking state with the set reason.
[0152] Step 206 : Verify the state voting result based on the historical single-frame prediction result of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image.
[0153] In a specific implementation process, after calculating the status voting result of the target parking space under the current frame image, the status voting result can be further verified based on the historical single-frame prediction result of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image.
[0154] Specifically, if the target parking space is determined to be the parking space where the vehicle-mounted camera is located based on the positional relationship between the target parking space and the vehicle-mounted camera, when the second preset condition is met, the parkable state is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met and the third preset condition is not met, the unknown state is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met but the third preset condition and the fourth preset condition are met, the non-parkable state due to a set reason is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met and the fourth preset condition is met but the third preset condition is met, the non-parkable state due to a non-set reason is used as the final prediction result of the target parking space under the current frame image; wherein, the non-parkable state due to a non-set reason is obtained by voting calculation;
[0155] Among them, the second preset condition includes that there are at least M parking states in the historical single-frame prediction results of the target parking space under the historical frame image, and there are no at least P non-parking states due to set reasons; among them, M can be 3 and P can be 1.
[0156] The third preset condition includes that there are at least P set reasons for the non-parking state in the historical single-frame prediction results of the target parking space under the historical frame image, or there are at least Q non-parking states for non-set reasons; wherein Q can be 3.
[0157] The fourth preset condition includes that there are at least P set reasons for an unparkable state in the historical single-frame prediction results of the target parking space under the historical frame image.
[0158] In a specific implementation process, if it is determined based on the positional relationship between the target parking space and the on-board camera that the target parking space is not a parking space where the on-board camera is located, it is detected whether there are at least M parking states in the historical single-frame prediction results of the target parking space under the historical frame image;
[0159] If there are at least M parking states in the historical single-frame prediction results of the target parking space under the historical frame image, the parking state is used as the final prediction result of the target parking space under the current frame image;
[0160] If there are no at least M parking states in the historical single-frame prediction results of the parking space under the historical frame image, the unknown state is used as the final prediction result of the target parking space under the current frame image.
[0161] The parking space detection method of this embodiment, after obtaining the single-frame prediction result of the target parking space under the current frame image, can be combined with the single-frame prediction result of the target parking space under the historical frame image to further verify the single-frame prediction result of the target parking space, thereby obtaining the final prediction result of the target parking space under the current frame image. The final prediction result of the target parking space under the current frame image obtained in this way is more accurate and reliable.
[0162] In a specific implementation process, the process of using the historical single-frame prediction results of the target parking space under the historical frame image to verify the single-frame prediction results of the target parking space under the current frame image can refer to Figure 3 Example shown. Figure 3 1 is a flow chart of main steps of a parking space detection method according to another embodiment of the present invention.
[0163] like Figure 3 As shown, the parking space detection method of this embodiment may specifically include steps 301 to 316.
[0164] Step 301: The single-frame prediction result of the current frame is input into a timing queue;
[0165] The single-frame prediction result of the current frame can be understood as the single-frame prediction result of the target parking space under the current frame image.
[0166] Step 302: Calculate the historical single-frame prediction results for the same ID in the time series queue;
[0167] This step is equivalent to the aforementioned process of obtaining the historical frame image having the same parking space identifier as the target parking space and the historical single-frame prediction result of the target parking space under the historical frame image.
[0168] Step 303: Is there a target image in an adjacent time sequence? If so, go to step 308; if not, go to step 304.
[0169] This step is equivalent to the aforementioned detection of whether there is a target image frame that is temporally adjacent to the current frame image in the historical frame image.
[0170] Step 304: Is the parking space under the target image in an unknown state? If so, execute step 308; if not, execute step 305;
[0171] This step is equivalent to the aforementioned step of detecting whether the historical single-frame prediction result of the target parking space under the target image is in an unknown state.
[0172] Step 305: Is the target parking space a car-ear parking space, and is the number of image frames in the ground lock non-parking state ≥ 3? If so, go to step 306; if not, go to step 307;
[0173] Among them, this step is equivalent to the aforementioned if it is judged that the target parking space is the parking space where the vehicle-mounted camera is located based on the positional relationship between the target parking space and the vehicle-mounted camera, and there is an unparkable state due to at least N set reasons in the historical single-frame prediction results of the parking space under the historical frame image.
[0174] Step 306: The ground lock is in an unstoppable state;
[0175] Among them, this step is equivalent to the aforementioned step of judging that the target parking space is the parking space where the vehicle-mounted camera is located based on the positional relationship between the target parking space and the vehicle-mounted camera, and that there are at least N non-parking states with set reasons in the historical single-frame prediction results of the parking space under the historical frame image, and taking the non-parking state with set reasons as the final prediction result of the target parking space under the current frame image.
[0176] Step 307: The parking space status is consistent with the target image;
[0177] Among them, this step is equivalent to the aforementioned step of using the historical single-frame prediction result of the target parking space under the target image as the final prediction result of the target parking space under the current frame image if it is judged that the target parking space is the parking space where the vehicle-mounted camera is located based on the positional relationship between the target parking space and the vehicle-mounted camera, and / or there is no non-parking state due to at least N set reasons in the single-frame prediction result of the parking space under the historical frame image.
[0178] Step 308: Calculate the voting result of the target parking space;
[0179] This step is equivalent to calculating the state voting result of the target parking space under the current frame image based on the historical single-frame prediction results of the target parking space under the historical frame image.
[0180] Step 309: Is it a car ear parking space? If so, go to step 310; if not, go to step 317;
[0181] Step 310: The timing frame of the stoppable state is ≥ 3, and the timing frame of the ground lock non-stoppable state is ≤ 1; if so, go to step 311; if not, go to step 312;
[0182] This step is equivalent to the aforementioned second preset condition.
[0183] Step 311, stoppable state;
[0184] This step is equivalent to the aforementioned step of taking the parking state as the final prediction result of the target parking space in the current frame image.
[0185] Step 312: Other non-stop state timing frames ≥ 3, or the ground lock non-stop state timing frames ≥ 1; if yes, go to step 313; otherwise, go to step 316;
[0186] This step is equivalent to the third preset condition mentioned above.
[0187] Step 313: The timing frame of the ground lock cannot be stopped is ≥ 1; if so, go to step 306; if not, go to step 314;
[0188] This step is equivalent to the fourth preset condition mentioned above.
[0189] Step 314: Voting results for other non-stop states;
[0190] This step is equivalent to the aforementioned step of taking the non-parking state due to non-set reasons as the final prediction result of the target parking space in the current frame image.
[0191] Step 315: unknown state;
[0192] This step is equivalent to the aforementioned step of taking the unknown state as the final prediction result of the target parking space in the current frame image.
[0193] Step 316 , the stoppable state timing frame ≥ 3; if so, execute step 311 , if not, execute step 315 .
[0194] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not have to be performed in such an order. They can be performed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present invention.
[0195] It will be understood by those skilled in the art that the present invention can implement all parking space frames or part of the process in the method of the above embodiment by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium can include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0196] Furthermore, the present invention also provides a parking space detection device.
[0197] See attached Figure 4 , Figure 4 FIG. 1 is a main structural block diagram of a parking space detection device according to an embodiment of the present invention. Figure 4 As shown, the parking space detection device according to an embodiment of the present invention may include a processor 40 and a storage device 41. The storage device 41 is adapted to store multiple program codes, which are loaded and executed by the processor 40 to execute the parking space detection method described in the above embodiment. For ease of illustration, only the portions relevant to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of the present invention. The parking space detection device may be a control device formed by various electronic devices.
[0198] Furthermore, the present invention also provides a vehicle, which may include the parking space detection device of the above embodiment. The vehicle may be an autonomous vehicle.
[0199] Furthermore, the present invention also provides a computer-readable storage medium. In one embodiment of a computer-readable storage medium according to the present invention, the computer-readable storage medium can be configured to store a program for executing the parking space detection method of the above-mentioned method embodiment, and the program can be loaded and run by a processor to implement the above-mentioned parking space detection method. For ease of explanation, only the parts related to the embodiment of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present invention is a non-transitory computer-readable storage medium.
[0200] Furthermore, it should be understood that since the configuration of each module is merely to illustrate the functional units of the apparatus of the present invention, the physical devices corresponding to these modules may be the processor itself, or a portion of the parking space frame of the software in the processor, a portion of the parking space frame of the hardware, or a portion of the parking space frame of the software and hardware combination. Therefore, the number of modules in the figure is merely illustrative.
[0201] Those skilled in the art will appreciate that the various modules in the device can be adaptively split or merged. Such splitting or merging of specific modules does not cause the technical solution to deviate from the principles of the present invention. Therefore, the technical solutions after splitting or merging will fall within the scope of protection of the present invention.
[0202] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. A parking space detection method, characterized in that: include: Obtain the current frame image of the scene where the vehicle is located from the on-board camera; The current frame image is respectively input into a pre-trained parking space detection model, an obstacle detection model, and a scene detection model for detection, to obtain a parking space prediction result, an obstacle prediction result, and a scene prediction result, respectively; wherein the obstacle prediction result is whether there is an obstacle in the parking space, and the obstacle prediction result is used to determine whether the target parking space is in a parkable state; the scene prediction result is the drivable area of the scene in which the vehicle is located, including whether the target parking space has a non-roadside point of the drivable area, and / or display information of the parking space in the current frame image under the current scene, wherein the display information includes displaying the entire target parking space or displaying a portion of the target parking space; Determine, based on a positional relationship between any detected target parking space and the on-board camera, whether the target parking space is the parking space where the on-board camera is located; wherein the parking space where the on-board camera is located is determined based on a geometric relationship between the coordinates of the target parking space and the coordinates of the on-board camera; if the geometric relationship is within a preset range, determine that the target parking space is the parking space where the on-board camera is located; if the geometric relationship is not within the preset range, determine that the target parking space is not the parking space where the on-board camera is located; If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space; If it is determined that the target parking space is not a parking space where the vehicle-mounted camera is located, the scene prediction result is used to verify the parking space prediction result of the target parking space, thereby obtaining a single-frame prediction result of the target parking space.
2. The parking space detection method according to claim 1, characterized in that: The scene prediction result includes the drivable area of the scene in which the vehicle is located; If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space, including: Using the obstacle prediction result, verifying the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space; wherein the intermediate prediction result of the target parking space includes a parking state or a non-parking state; If the target parking space includes a non-curbside point in the drivable area, and the intermediate prediction result of the target parking space is a parking state, verifying the parking state as an unknown state as a single-frame prediction result of the target parking space; If there is no non-roadside point in the drivable area within the target parking space, and the intermediate prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space; If the target parking space includes a non-roadside point in the drivable area, and the intermediate prediction result of the target parking space is an unparkable state, maintaining the unparkable state as the single-frame prediction result of the target parking space; If there is no non-roadside point in the drivable area within the target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, the non-parkable state is verified as a parkable state as the single-frame prediction result of the target parking space.
3. The parking space detection method according to claim 2, characterized in that: If it is determined that the target parking space is not a parking space where the vehicle-mounted camera is located, the scene prediction result is used to verify the parking space prediction result of the target parking space, thereby obtaining a single-frame prediction result of the target parking space, including: If the target parking space includes a non-roadside point in the drivable area, and the parking space prediction result of the target parking space is a parking state, verifying the parking state as an unknown state as a single-frame prediction result of the target parking space; If there is no non-roadside point in the drivable area within the target parking space, and the parking space prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space; If the target parking space includes a non-roadside point in the drivable area, and the parking space prediction result of the target parking space is a non-parking state, verifying the non-parking state as an unknown state as a single-frame prediction result of the target parking space; If there is no non-roadside point in the drivable area within the target parking space, and the parking space prediction result of the target parking space is a non-parkable state, the non-parkable state is verified as a parking state as the single-frame prediction result of the target parking space.
4. The parking space detection method according to claim 1, characterized in that: The scene prediction result includes display information of the parking space in the scene where the vehicle is located in the current frame image; the display information includes displaying the entire parking space of the target parking space or displaying a portion of the parking space of the target parking space; If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space, including: Using the obstacle prediction result, verifying the parking space prediction result of the target parking space to obtain an intermediate prediction result of the target parking space; wherein the intermediate prediction result of the target parking space includes a parking state or a non-parking state; If the display information shows a portion of the target parking space, and the intermediate prediction result of the target parking space is a parking state, verifying the parking state as an unknown state as a single-frame prediction result of the target parking space; If the display information shows the entire target parking space, and the intermediate prediction result of the target parking space is a parking state, maintaining the parking state as the single-frame prediction result of the target parking space; If the display information shows a portion of the target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, maintaining the non-parkable state as the single-frame prediction result of the target parking space; If the display information is for displaying the entire target parking space, and the intermediate prediction result of the target parking space is a non-parkable state, the non-parkable state is verified to a parking state as a single-frame prediction result of the target parking space.
5. The parking space detection method according to claim 4, characterized in that: If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located, the parking space prediction result of the target parking space is verified using the obstacle prediction result and the scene prediction result, thereby obtaining a single-frame prediction result of the target parking space, including: If the display information shows a portion of a target parking space, and the parking space prediction result of the target parking space is a parking available state, verifying the parking available state as an unknown state as a single-frame prediction result of the target parking space; If the display information is for displaying the entire target parking space, and the parking space prediction result of the target parking space is a parking available state, maintaining the parking available state as the single-frame prediction result of the target parking space; If the display information shows a portion of a target parking space, and the parking space prediction result of the target parking space is a non-parking state, verifying the non-parking state as an unknown state as a single-frame prediction result of the target parking space; If the display information displays the entire target parking space, and the parking space prediction result of the target parking space is a non-parkable state, the non-parkable state is verified to a parking state as a single-frame prediction result of the target parking space.
6. The parking space detection method according to any one of claims 1 to 5, characterized in that: Also includes: Obtaining a historical frame image having the same parking space identifier as the target parking space and a historical single-frame prediction result of the target parking space under the historical frame image; Detecting whether there is a target image frame that is temporally adjacent to the current frame image in the historical frame image; If there is a target image frame that is temporally adjacent to the current frame image in the historical frame image, detecting whether the historical single-frame prediction result of the target parking space under the target image is in an unknown state; If the historical single-frame prediction result of the target parking space under the target image is not in an unknown state, the single-frame prediction result of the target parking space under the historical frame image is verified according to the historical single-frame prediction result of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image.
7. The parking space detection method according to claim 6, characterized in that: Based on the historical single-frame prediction results of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera, the single-frame prediction result of the target parking space under the current frame image is verified to obtain the final prediction result of the target parking space under the current frame image, including: If it is determined based on the positional relationship between the target parking space and the on-board camera that the target parking space is the parking space where the on-board camera is located, and if there are at least N set reasons for the non-parking status in the historical single-frame prediction results of the parking space in the historical frame image, the non-parking status with the set reasons is used as the final prediction result of the target parking space in the current frame image; If it is determined based on the positional relationship between the target parking space and the vehicle-mounted camera that the target parking space is the parking space where the vehicle-mounted camera is located, and / or if the single-frame prediction results of the parking space under the historical frame image do not contain an unparkable state due to at least N set reasons, the historical single-frame prediction results of the target parking space under the target image are used as the final prediction results of the target parking space under the current frame image.
8. The parking space detection method according to claim 6, characterized in that: Also includes: When the first preset condition is met, the state voting result of the target parking space under the current frame image is calculated based on the historical single-frame prediction results of the target parking space under the historical frame image; The state voting result is verified based on the historical single-frame prediction results of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image; The first preset condition includes: There is a target image frame in the historical frame image that is adjacent in time sequence to the current frame image, but the historical single-frame prediction result of the target parking space under the target image is not in an unknown state; or There is no target image in the historical frame image that is temporally adjacent to the current frame image.
9. The parking space detection method according to claim 8, characterized in that: The state voting result is verified based on the historical single-frame prediction results of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image, including: If it is determined that the target parking space is the parking space where the vehicle-mounted camera is located based on the positional relationship between the target parking space and the vehicle-mounted camera, when the second preset condition is met, the parkable state is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met and the third preset condition is not met, the unknown state is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met but the third preset condition and the fourth preset condition are met, the non-parkable state due to a set reason is used as the final prediction result of the target parking space under the current frame image; when the second preset condition is not met and the fourth preset condition is met but the third preset condition is met, the non-parkable state due to a non-set reason is used as the final prediction result of the target parking space under the current frame image; wherein, the non-parkable state due to a non-set reason is obtained by voting calculation; The second preset condition includes that the historical single-frame prediction results of the target parking space under the historical frame image contain at least M parking states, and there are no at least P non-parking states due to set reasons; The third preset condition includes that the historical single-frame prediction results of the target parking space under the historical frame image contain at least P non-parking states due to set reasons, or at least Q non-parking states due to non-set reasons; The fourth preset condition includes that there are at least P set reasons for an unparkable state in the historical single-frame prediction results of the target parking space under the historical frame image.
10. The parking space detection method according to claim 8, characterized in that: The state voting result is verified based on the historical single-frame prediction results of the target parking space under the historical frame image and the positional relationship between the target parking space and the vehicle-mounted camera to obtain the final prediction result of the target parking space under the current frame image, including: If it is determined based on the positional relationship between the target parking space and the on-board camera that the target parking space is not a parking space where the on-board camera is located, detecting whether there are at least M parking available states in the historical single-frame prediction results of the target parking space under the historical frame image; If there are at least M parking states in the historical single-frame prediction results of the target parking space under the historical frame image, the parking state is used as the final prediction result of the target parking space under the current frame image; If there are no at least M parking states in the historical single-frame prediction results of the parking space under the historical frame image, the unknown state is used as the final prediction result of the target parking space under the current frame image.
11. A parking space detection device, comprising a processor and a storage device, wherein the storage device is suitable for storing multiple program codes, characterized in that: The program code is suitable for being loaded and run by the processor to execute the parking space detection method according to any one of claims 1 to 10.
12. A vehicle, characterized in that: Comprising the parking space detection device as claimed in claim 11.
13. A computer-readable storage medium storing a plurality of program codes, characterized in that: The program code is suitable for being loaded and run by a processor to execute the parking space detection method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Parking space detection method and device, equipment and storage medium
CN110738867A
Parking space detection method and device, computer equipment and storage medium
CN111160172A