Parking space number recognition method and apparatus, and electronic device and storage medium
The parking space number recognition method, which acquires image data from multiple perspectives and performs target detection and orientation correction, solves the problem of low accuracy in existing technologies and achieves higher recognition accuracy and robustness.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2024-11-12
- Publication Date
- 2026-05-21
AI Technical Summary
In existing technologies, parking space number recognition methods only recognize text objects with a clarity higher than a set threshold, resulting in low recognition accuracy and an inability to effectively recognize parking space number text objects with a clarity lower than the threshold.
By acquiring image data from multiple different perspectives as the vehicle travels along the outside of the parking space, target detection and distortion correction are performed to determine the tilt angle of the parking space number text object. After correcting it to be the same text facing forward, text recognition is performed, and the parking space number is generated by combining the recognition results from various perspectives.
It improves the accuracy of parking space number recognition, avoids inaccurate recognition caused by poor lighting or insufficient clarity under a single viewpoint, and enhances the robustness of recognition.
Smart Images

Figure CN2024131627_21052026_PF_FP_ABST
Abstract
Description
Parking space number identification methods, devices, electronic equipment and storage media Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a method, apparatus, electronic device, and storage medium for recognizing parking space numbers. Background Technology
[0002] With the development of autonomous driving technology, automated parking has become a hot research topic. The highest level of automation in autonomous driving technology is driverless driving, and memory-based parking is a crucial hurdle to overcome in the research process. Cars use various sensors installed on their bodies to perceive the parking lot environment and acquire various target information, such as the parking space number.
[0003] Related technologies identify parking space numbers by predicting the clarity of the text objects containing the parking space number and recognizing those with clarity exceeding a set threshold. However, this method only recognizes text objects with clarity above the threshold and ignores those with clarity below the threshold, resulting in low recognition accuracy.
[0004] Summary of the Invention
[0005] In view of this, one of the objectives of the present invention is to provide a method, apparatus, electronic device and storage medium for identifying parking space numbers, which can improve the accuracy of identifying parking space numbers.
[0006] In a first aspect, the present invention provides a method for identifying parking space numbers, comprising:
[0007] During the process of the vehicle driving along the outside of the parking space, image data of the parking space relative to the vehicle from multiple different perspectives are acquired;
[0008] Target detection is performed on the image data from each viewpoint to obtain the target detection result for the corresponding viewpoint; wherein, the target detection result includes the parking space number text object of the parking space;
[0009] Based on the target detection results from each viewpoint, the tilt angle of the parking space number text object from the corresponding viewpoint is determined; wherein, the tilt angle is the angle between the display direction of the parking space number text object and the forward direction of the text.
[0010] Based on the tilt angle, the orientation of the parking space number text object under each viewpoint is corrected to the same text orientation to obtain the target text object of the corresponding viewpoint; wherein, the target text object is the same as the text content in the parking space number text object;
[0011] Text recognition is performed on the target text object from each viewpoint to obtain the parking space number; wherein, the parking space number is used to determine whether the vehicle is parked in the parking space.
[0012] Optionally, the target detection result may also include the entrance line of the parking space and the entrance corner point of the parking space;
[0013] The step of performing target detection on the image data under each viewpoint to obtain the target detection result under the corresponding viewpoint includes:
[0014] The image data from each viewpoint is input into the target detection model for target detection to obtain the entrance line, entrance corner point, and parking space number text object of the corresponding viewpoint.
[0015] The step of determining the tilt angle of the parking space number text object from each viewpoint based on the target detection results includes:
[0016] Based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint, determine the tilt angle of the parking space number text object from the corresponding viewpoint.
[0017] Optionally, determining the tilt angle of the parking space number text object from each viewpoint based on the entrance line, the entrance corner point, and the parking space number text object includes:
[0018] Based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint, calculate the offset angle of the entrance line from the corresponding viewpoint; wherein, the offset angle is the angle between the normal of the entrance line and the direction of travel of the vehicle;
[0019] The offset angle of the entrance line under each viewpoint is determined as the tilt angle of the parking space number text object under the corresponding viewpoint.
[0020] Optionally, the step of inputting the image data from each viewpoint into the target detection model for target detection to obtain the entrance line, entrance corner point, and parking space number text object of the corresponding viewpoint includes:
[0021] The image data from each viewpoint is input into the target detection network for feature extraction to obtain the overall feature representation of the image data from the corresponding viewpoint.
[0022] The overall feature representation of the image data under each viewpoint is input into the entrance line detection branch, entrance corner detection branch, and parking space number text object detection branch of the target detection network to obtain the entrance line, entrance corner, and parking space number text object of the parking space under the corresponding viewpoint.
[0023] Optionally, correcting the orientation of the parking space number text object in each viewpoint to the same text orientation based on the tilt angle includes:
[0024] The parking space number text object in each viewpoint is rotated by the tilt angle away from the vehicle's forward direction, so that the parking space number text object in each viewpoint is rotated to the same text orientation.
[0025] Optionally, the step of performing text recognition on the target text object from each viewpoint to obtain the parking space number includes:
[0026] The target text object from each viewpoint is input into the text recognition model for text recognition, and the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint are obtained.
[0027] Multiply the text recognition feature value under each viewpoint by the text fuzzy confidence level to obtain the weighted feature value of the target text object under the corresponding viewpoint;
[0028] The weighted feature values from each viewpoint are averaged to obtain the parking space number feature value of the parking space.
[0029] The parking space number feature value is decoded to obtain the parking space number.
[0030] Optionally, the step of inputting the target text object from each viewpoint into a text recognition model for text recognition, and obtaining the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint, includes:
[0031] The target text object from each viewpoint is input into the text recognition network for forward inference to obtain the overall feature representation of the target text object from the corresponding viewpoint.
[0032] The overall feature representation of the target text object under each viewpoint is input into the text recognition branch and the text fuzzy branch of the text recognition network to obtain the text recognition feature value and text fuzzy confidence of the target text object under the corresponding viewpoint.
[0033] Optionally, acquiring image data of the parking space relative to the vehicle from multiple different perspectives includes:
[0034] Once the vehicle enters the preset range of the parking space, image data of the parking space is acquired at multiple different positions during the vehicle's movement, resulting in image data of the parking space relative to the vehicle from multiple different perspectives.
[0035] Optionally, before performing target detection on the image data from each viewpoint, the method for identifying the parking space number further includes:
[0036] Distortion detection is performed on the image data under each viewpoint to obtain the distortion degree of the image data under the corresponding viewpoint;
[0037] Delete image data with distortion levels higher than the distortion threshold, and replace image data with distortion levels not higher than the distortion threshold with new image data.
[0038] Secondly, the present invention provides a parking space number identification device, comprising:
[0039] The acquisition module is used to acquire image data of the parking space relative to the vehicle from multiple different perspectives as the vehicle drives along the outside of the parking space;
[0040] The detection module is used to perform target detection on the image data under each viewpoint and obtain the target detection result under the corresponding viewpoint; wherein, the target detection result includes the parking space number text object of the parking space;
[0041] The determination module is used to determine the tilt angle of the parking space number text object under each viewpoint based on the target detection results under each viewpoint; wherein, the tilt angle is the angle between the display direction of the parking space number text object and the text orientation;
[0042] The correction module is used to correct the orientation of the parking space number text object under each viewpoint to the same text orientation according to the tilt angle, so as to obtain the target text object under the corresponding viewpoint; wherein, the target text object is the same as the text content in the parking space number text object;
[0043] The recognition module is used to perform text recognition on the target text object from each viewpoint to obtain the parking space number; wherein, the parking space number is used to determine whether the vehicle is parked in the parking space.
[0044] Thirdly, the present invention provides an electronic device including one or more processors, the processors being used to implement the parking space number identification method as described in any one of the first aspects.
[0045] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the parking space number identification method as described in any one of the first aspects.
[0046] The present invention provides a parking space number recognition method, apparatus, electronic device, and storage medium. It acquires image data of parking spaces relative to vehicles from multiple different perspectives, detects parking space number text objects from the image data of each perspective, and corrects the orientation of the parking space number text objects in each perspective to the same upright direction before performing text recognition. This results in orientation-corrected target text objects, which are then used for text recognition in each perspective. This approach avoids inaccurate recognition caused by inconsistent display orientation of the parking space number text objects. Furthermore, by comprehensively considering the text recognition results of the target text objects from each perspective to generate the parking space number recognition result, it avoids inaccurate recognition caused by poor lighting or insufficient clarity from a single perspective, thus improving the accuracy of parking space number recognition. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0048] Figure 1 shows a schematic diagram of the applicable scenarios for the parking space number identification method according to an embodiment of the present invention;
[0049] Figure 2 shows a flowchart of a parking space number identification method according to an embodiment of the present invention;
[0050] Figure 3 shows another flowchart of the parking space number identification method according to an embodiment of the present invention;
[0051] Figure 4 shows a schematic diagram of a parking space.
[0052] Figure 5 shows a geometrical diagram illustrating the method for identifying parking space numbers according to an embodiment of the present invention, which determines the tilt angle of the parking space number text object.
[0053] Figure 6 shows a structural block diagram of the parking space number identification device according to an embodiment of the present invention;
[0054] Figure 7 shows a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0056] It should be noted that the steps of the corresponding methods in other embodiments are not necessarily performed in the order shown and described in this specification. In some other embodiments, the methods may include more or fewer steps than those described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0057] Related technologies improve the accuracy of parking space number text object recognition by predicting the clarity of the text and only recognizing text objects with clarity exceeding a set threshold. However, this method only improves accuracy by recognizing text objects with clarity above the threshold and excluding those with clarity below the threshold; it does not optimize the parking space number recognition method itself. Therefore, existing parking space number recognition methods still suffer from low accuracy.
[0058] To address the low accuracy of parking space number identification in the aforementioned related technologies, this invention provides a parking space number identification method. Please refer to Figure 1, which illustrates a scenario where the parking space number identification method of this invention is applicable. The parking space number identification method provided by this invention is suitable for automatic parking scenarios, especially memory-based parking scenarios. When a vehicle enters a parking lot or garage, it needs to locate the target parking space using the parking space number before automatic parking. During the vehicle's movement along the outer edge of the parking space, the system can sequentially identify the parking space numbers of the passed parking spaces to determine whether to reverse into one of them.
[0059] Please refer to Figure 2, which is a schematic flowchart of a parking space number identification method according to an embodiment of the present invention. The parking space number identification method provided in this embodiment includes, but is not limited to, the following steps S110 to S150.
[0060] S110: While the vehicle is driving along the outside of the parking space, acquire image data of the parking space from multiple different perspectives relative to the vehicle.
[0061] As a vehicle moves along the outer edge of a parking space, it will see the same parking space from different angles. In other words, the same parking space will be viewed from different angles relative to the vehicle. Multiple cameras on the vehicle can capture multiple fisheye images from each angle, and these images can be stitched together to obtain a bird's-eye view of each corresponding angle, thus acquiring image data of the parking space relative to the vehicle from multiple different perspectives.
[0062] For example, a camera can be installed on each of the left and right sides of the front of the vehicle and on each of the left and right sides of the rear of the vehicle. These four cameras capture four fisheye images of the parking space relative to the vehicle from each viewpoint. By stitching these four fisheye images together, a bird's-eye view of each corresponding viewpoint can be obtained. Additionally, the camera located at the rear of the vehicle, besides capturing fisheye images of the parking space, can also monitor the position of the rear of the parking space relative to the rear of the vehicle when the vehicle is reversing into the space, reminding the driver to stop in time and preventing the rear of the vehicle from exceeding the rear line of the parking space. It should be noted that multiple cameras can also be installed in other locations on the vehicle, and the number of cameras installed on the vehicle can also be different; this embodiment of the invention does not limit this.
[0063] S120, Perform target detection on the image data under each viewpoint to obtain the target detection result under the corresponding viewpoint; wherein, the target detection result includes the parking space number text object of the parking space.
[0064] The purpose of acquiring parking space image data is to find the parking space number text object from the parking space image data, and then to identify the parking space number text object to obtain the parking space number. By performing object detection on the image data of the parking space relative to the vehicle from each viewpoint, the object detection results for each corresponding viewpoint can be obtained, and the parking space number text object can be included in the object detection results.
[0065] S130, based on the target detection results under each viewpoint, determine the tilt angle of the parking space number text object under the corresponding viewpoint; wherein, the tilt angle is the angle between the display direction of the parking space number text object and the forward direction of the text.
[0066] In image data where parking spaces are positioned relative to vehicles from different viewpoints, the display orientation of the parking space number text object also varies. However, the display orientation of the parking space number text object is not necessarily the upright direction of the text. The angle between the display orientation of the parking space number text object and the upright direction of the text is the tilt angle of the parking space number text object. Based on the target detection results of the parking space relative to the vehicle at each viewpoint, the tilt angle of the parking space number text object at each corresponding viewpoint can be determined.
[0067] It should be noted that in the image data of a parking space relative to a vehicle at a certain angle, the display direction of the parking space number text object is exactly the same as the normal direction of the text. In this case, the tilt angle of the parking space number text object at this angle is 0°.
[0068] S140, based on the tilt angle, the orientation of the parking space number text object under each viewpoint is corrected to the same text orientation, thereby obtaining the target text object under the corresponding viewpoint; wherein, the target text object is the same as the text content in the parking space number text object.
[0069] A distorted display orientation of parking space number text objects can reduce the accuracy of their recognition. Therefore, orientation correction can be performed on the parking space number text objects before recognition. This involves correcting the orientation of the parking space number text objects relative to the vehicle from every viewpoint to ensure the same text orientation, resulting in a target text object with the same display orientation and text orientation for each corresponding viewpoint. Because the target text object is obtained by correcting the orientation of the parking space number text objects, the only difference between the target text object and the parking space number text objects may be their display orientation; the text content within the target text object is identical to that of the parking space number text objects.
[0070] S150, perform text recognition on the target text object from each viewpoint to obtain the parking space number; wherein, the parking space number is used to determine whether the vehicle is parked in the parking space.
[0071] After directional correction of the parking space number text object relative to the vehicle from each viewpoint, and obtaining the target text object for each corresponding viewpoint, text recognition is performed on the target text object relative to the vehicle from each viewpoint to obtain the parking space number recognition result for each corresponding viewpoint. By comprehensively considering the parking space number recognition results relative to the vehicle from each viewpoint, the parking space number can be obtained. The recognized parking space number is used to determine whether the vehicle is parked in the current parking space. For example, if the recognized parking space number is a preset parking space number, it means that the current parking space is a preset parking space, and the vehicle can park in the current parking space; otherwise, the system continues to recognize the parking space number of the next parking space.
[0072] The parking space number recognition method provided in this invention acquires image data of the parking space from multiple different perspectives relative to the vehicle as the vehicle travels along the outer edge of the parking space. The parking space number text object is detected from the image data of each perspective. Before text recognition, the orientation of the parking space number text object in each perspective is corrected to the same upright direction, resulting in a direction-corrected target text object. Text recognition is then performed on the target text object in each perspective. This avoids inaccurate recognition caused by chaotic display orientation of the parking space number text object. Furthermore, by comprehensively considering the text recognition results of the target text object in each perspective to generate the parking space number recognition result, it avoids inaccurate recognition caused by poor lighting or insufficient clarity in a single perspective, thus improving the accuracy of parking space number recognition.
[0073] Please refer to Figures 2 and 3 together. Figure 3 shows another flowchart of the parking space number identification method according to an embodiment of the present invention.
[0074] In some embodiments, when obtaining image data of the parking space relative to the vehicle from multiple different perspectives in step S110, the following step S111 is specifically included.
[0075] S111, after the vehicle enters the preset range of the parking space, image data of the parking space is acquired at multiple different positions during the vehicle's movement, so as to obtain image data of the parking space relative to the vehicle from multiple different perspectives.
[0076] When a vehicle moves beyond the preset range from its parking space, the image data of the parking space captured by the vehicle's camera may not meet the preset clarity requirements, and the shooting angle may also be insufficient. In this case, the parking space number text object in the target detection result obtained from the image data will be too blurry or even excessively distorted, making the text recognition result unreliable. Therefore, after the vehicle enters the preset range of the parking space, image data of the parking space can be acquired at multiple different positions during the vehicle's movement, obtaining image data of the parking space relative to the vehicle from multiple different perspectives. This setup ensures that the target object for recognition, i.e., the parking space number text object, meets the preset clarity requirements in the first step, thus improving the accuracy of parking space number recognition.
[0077] In some embodiments, before performing target detection on the image data under each viewpoint in step S120 above, the parking space number identification method of the present invention further includes the following steps S210 to S220.
[0078] S210, Perform distortion detection on the image data under each viewpoint to obtain the distortion degree of the image data under the corresponding viewpoint.
[0079] It's easy to understand that, for any graphic on a two-dimensional surface, the image will exhibit some degree of distortion from any viewing angle other than the frontal view. For example, a square drawn on the ground will appear as a rhombus instead of a square when viewed from an oblique angle. Similarly, parking space numbers drawn on the ground will also show varying degrees of distortion when viewed from other angles. In other words, the image data of a parking space relative to a vehicle will also exhibit varying degrees of distortion from different perspectives. By performing distortion detection on the image data of the parking space relative to the vehicle from each perspective, the degree of distortion for each corresponding perspective can be obtained.
[0080] It should be noted that the distortion here includes not only the deformation of the image data, but also situations where the image data is obscured or unclear due to reflections.
[0081] S220, delete the image data whose distortion degree is higher than the distortion threshold, and replace the image data whose distortion degree is not higher than the distortion threshold with the new image data.
[0082] A pre-defined distortion threshold is set. Image data with distortion exceeding this threshold is considered to have limited reference value. Therefore, images with distortion exceeding the threshold are directly deleted from the acquired image data of parking spaces relative to vehicles at multiple different viewpoints. Only images with distortion below the threshold are retained. These images are then replaced with new images of parking spaces relative to vehicles at multiple different viewpoints. This setup ensures that the object to be identified in the second step, i.e., when selecting the object for recognition, is the parking space number text object with distortion meeting the pre-defined requirement, further improving the accuracy of parking space number recognition.
[0083] In some embodiments, the target detection result in step S120 above also includes the entrance line of the parking space and the entrance corner point of the parking space; when performing target detection on the image data under each viewpoint in step S120 above to obtain the target detection result under the corresponding viewpoint, it specifically includes the following step S121; when determining the tilt angle of the parking space number text object under the corresponding viewpoint based on the target detection result under each viewpoint in step S130 above, it specifically includes the following step S131.
[0084] S121, input the image data from each viewpoint into the target detection model for target detection, and obtain the entrance line, entrance corner point and parking space number text object of the corresponding viewpoint for the parking space.
[0085] In some embodiments, when the image data from each viewpoint is input into the target detection model for target detection in step S121 to obtain the entrance line, entrance corner point, and parking space number text object of the corresponding viewpoint, the specific steps include the following:
[0086] The image data from each viewpoint is input into the object detection network for feature extraction to obtain the overall feature representation of the image data from the corresponding viewpoint.
[0087] The overall feature representation of the image data from each viewpoint is input into the entrance line detection branch, entrance corner detection branch, and parking space number text object detection branch of the target detection network to obtain the entrance line, entrance corner, and parking space number text object of the corresponding viewpoint.
[0088] Object detection in image data is a computer vision task. Feature extraction is fundamental to computer vision tasks, and a well-designed feature extraction network can significantly improve algorithm performance. In computer vision, the network that extracts features from images is called the backbone network. The backbone network typically refers to the main part of the entire deep neural network, primarily responsible for extracting features from the input data, and is often used to extract local or global features of an image. By training the backbone network with different sample data, the trained backbone network will possess different functions. For example, by training the backbone network for object detection using a large number of image samples, the trained backbone network becomes the backbone network for object detection, i.e., the object detection network in this context. By inputting the image data of the parking space relative to the vehicle from each viewpoint into the object detection network for feature extraction, the overall feature representation of the image data at each corresponding viewpoint can be obtained.
[0089] Furthermore, the target detection network can be functionally refined to include entry line detection branches, entry corner detection branches, and parking space number text object detection branches. By inputting the overall feature representation of the image data of the parking space relative to the vehicle from each viewpoint into the entry line detection branch, entry corner detection branch, and parking space number text object detection branch of the target detection network, the entry line, entry corner, and parking space number text object for each corresponding viewpoint can be obtained.
[0090] Please refer to Figure 4, which shows a schematic diagram of a parking space. Each parking space has four parking lines, which can be functionally divided into entrance lines, dividing lines, and rear lines. The entrance line guides vehicles into the parking space, the dividing line distinguishes the two sides of the space, and the rear line restricts the rear boundary of the vehicle. Each parking space has a unique entrance line, while the dividing and rear lines can be shared with adjacent spaces. Each parking space has four corner points: the two corner points where the entrance line intersects with the dividing line are called entrance corner points, and the two corner points where the rear line intersects with the dividing line are called rear corner points.
[0091] S131, based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint, determine the tilt angle of the parking space number text object from the corresponding viewpoint.
[0092] In some embodiments, when determining the tilt angle of the parking space number text object from the corresponding viewpoint based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint in step S131, the specific steps include the following:
[0093] Based on the entrance line, entrance corner point, and parking space number text object from each viewpoint, calculate the offset angle of the entrance line from the corresponding viewpoint; where the offset angle is the angle between the normal of the entrance line and the direction of travel of the vehicle.
[0094] The offset angle of the entrance line under each viewpoint is determined as the tilt angle of the parking space number text object under the corresponding viewpoint.
[0095] Please refer to Figure 5, which is a geometrical diagram illustrating the determination of the tilt angle of the parking space number text object in the parking space number recognition method of this embodiment of the invention. Let the offset angle of the parking space entrance line be α. Since the parking space number text object is set parallel to the entrance line, the angle between the normal of the parking space number text object and the vehicle's forward direction is also α. Because the vehicle's forward direction is perpendicular to the text's positive direction, the angle β between the normal of the parking space number text object and the text's positive direction is 90° - α. Therefore, the angle between the display direction of the parking space number text object and the text's positive direction is also α. Thus, the offset angle of the parking space relative to the vehicle's entrance line at each viewpoint is the tilt angle of the parking space number text object at each corresponding viewpoint.
[0096] In some embodiments, when step S140 above corrects the orientation of the parking space number text object in each viewpoint to the same text orientation based on the tilt angle, it specifically includes the following step S141.
[0097] S141, rotate the parking space number text object in each viewpoint away from the vehicle's forward direction by the tilt angle, so that the parking space number text object in each viewpoint is rotated to the same text orientation.
[0098] After determining the tilt angle of the parking space number text object relative to the vehicle in each viewpoint, rotate the parking space number text object in each viewpoint away from the vehicle's forward direction—or closer to the text's forward direction—by the tilt angle α (as shown by the curved arrow in Figure 5). This will rotate the parking space number text object relative to the vehicle in each viewpoint to the same text's forward direction, thus obtaining the target text object in each corresponding viewpoint.
[0099] In some embodiments, when performing text recognition on the target text object under each viewpoint to obtain the parking space number in step S150, the steps S151 to S154 are specifically included.
[0100] S151, input the target text object from each viewpoint into the text recognition model for text recognition, and obtain the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint.
[0101] In some embodiments, when step S151 inputs the target text object from each viewpoint into the text recognition model for text recognition and obtains the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint, the specific steps include the following:
[0102] The target text object from each viewpoint is input into the text recognition network for forward inference to obtain the overall feature representation of the target text object from the corresponding viewpoint.
[0103] The overall feature representation of the target text object from each viewpoint is input into the text recognition branch and the text fuzzy branch of the text recognition network to obtain the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint.
[0104] As described in step S121, the backbone network is trained using different sample data, and the trained backbone network will have different functions. For example, by using a large number of text samples to train the backbone network for text recognition, the trained backbone network becomes the backbone network for text recognition, i.e., the text recognition network here. By inputting the target text object of the parking space relative to the vehicle from each viewpoint into the text recognition network for forward inference, the overall feature representation of the target text object from each corresponding viewpoint can be obtained.
[0105] Furthermore, the text recognition network can be functionally refined into a text recognition branch and a text fuzzy branch. By inputting the overall feature representation of the target text object relative to the vehicle from each viewpoint into the text recognition branch and the text fuzzy branch of the text recognition network, the text recognition feature value and text fuzzy confidence of the target text object under each corresponding viewpoint can be obtained.
[0106] S152, multiply the text recognition feature value under each viewpoint with the text fuzzy confidence level to obtain the weighted feature value of the target text object under the corresponding viewpoint.
[0107] The clearer the target text object, the higher the text fuzziness confidence, meaning the more reliable the text recognition feature value. The text fuzziness confidence of the target text object relative to the vehicle at each viewpoint is used as the weight of the text recognition feature value for that corresponding viewpoint. By multiplying the text recognition feature value for each viewpoint by the text fuzziness confidence, the weighted feature value of the target text object at each corresponding viewpoint can be obtained.
[0108] S153, average the weighted feature value under each viewpoint to obtain the parking space number feature value of the parking space.
[0109] To comprehensively consider the recognition results of parking space numbers relative to vehicles from different perspectives, the weighted feature values of the target text objects from each perspective can be averaged to obtain the feature value of the parking space number.
[0110] S154, decode the feature value of the parking space number to obtain the parking space number.
[0111] Because the parking space number feature value is just a value identified according to the parking space number identification method, and is not the actual parking space number, it is necessary to decode the parking space number feature value to finally obtain the actual parking space number.
[0112] The parking space number recognition method provided in this invention acquires image data of the parking space from multiple different perspectives relative to the vehicle as the vehicle travels along the outer edge of the parking space. The parking space number text object is detected from the image data of each perspective. Before text recognition, the orientation of the parking space number text object in each perspective is corrected to the same upright direction, resulting in a direction-corrected target text object. Text recognition is then performed on the target text object in each perspective. This avoids inaccurate recognition caused by chaotic display orientation of the parking space number text object. Furthermore, by comprehensively considering the text recognition results of the target text object in each perspective to generate the parking space number recognition result, it avoids inaccurate recognition caused by poor lighting or insufficient clarity in a single perspective, thus improving the accuracy of parking space number recognition.
[0113] This invention also provides a parking space number identification device. Please refer to Figure 6, which is a structural block diagram of the parking space number identification device according to an embodiment of the present invention. The parking space number identification device 21 provided in this embodiment may include:
[0114] The acquisition module 211 is used to acquire image data of the parking space from multiple different perspectives relative to the vehicle while the vehicle is driving along the outside of the parking space;
[0115] The detection module 212 is used to perform target detection on the image data under each viewpoint and obtain the target detection result under the corresponding viewpoint; wherein, the target detection result includes the parking space number text object of the parking space;
[0116] The determination module 213 is used to determine the tilt angle of the parking space number text object in the corresponding view based on the target detection result in each view; wherein, the tilt angle is the angle between the display direction of the parking space number text object and the normal direction of the text.
[0117] The correction module 214 is used to correct the orientation of the parking space number text object under each viewpoint to the same text orientation according to the tilt angle, so as to obtain the target text object under the corresponding viewpoint; wherein, the target text object is the same as the text content in the parking space number text object;
[0118] The recognition module 215 is used to perform text recognition on the target text object from each viewpoint to obtain the parking space number of the parking space; wherein, the parking space number is used to determine whether the vehicle is parked in the parking space.
[0119] In some embodiments, when the acquisition module 211 acquires image data of the parking space relative to the vehicle from multiple different perspectives, it is specifically used to: acquire image data of the parking space at multiple different positions during the vehicle's driving process after the vehicle enters the preset range of the parking space, thereby obtaining image data of the parking space relative to the vehicle from multiple different perspectives.
[0120] In some embodiments, the identification device 21 may further include:
[0121] The orthodontic module is used to perform distortion detection on the image data under each viewpoint before the detection module 212 performs target detection on the image data under each viewpoint, obtain the distortion degree of the image data under the corresponding viewpoint, delete the image data with distortion degree higher than the distortion threshold, and replace the image data with distortion degree not higher than the distortion threshold with new image data.
[0122] In some embodiments, the target detection result obtained by the detection module 212 further includes the entrance line and the entrance corner of the parking space; when the detection module 212 performs target detection on the image data under each viewpoint and obtains the target detection result under the corresponding viewpoint, it is specifically used to: input the image data under each viewpoint into the target detection model for target detection, and obtain the entrance line, entrance corner, and parking space number text object of the parking space under the corresponding viewpoint.
[0123] In some embodiments, when the detection module 212 inputs the image data from each viewpoint into the target detection model for target detection to obtain the entrance line, entrance corner point, and parking space number text object of the parking space from the corresponding viewpoint, it is specifically used to: input the image data from each viewpoint into the target detection network for feature extraction to obtain the overall feature representation of the image data from the corresponding viewpoint; input the overall feature representation of the image data from each viewpoint into the entrance line detection branch, entrance corner point detection branch, and parking space number text object detection branch of the target detection network respectively to obtain the entrance line, entrance corner point, and parking space number text object of the parking space from the corresponding viewpoint.
[0124] In some embodiments, when determining the tilt angle of the parking space number text object in a corresponding view based on the target detection result in each view, the determining module 213 is specifically used to: determine the tilt angle of the parking space number text object in a corresponding view based on the entrance line, the entrance corner point and the parking space number text object in each view.
[0125] In some embodiments, when determining the tilt angle of the parking space number text object from a given viewpoint based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint, the determining module 213 is specifically configured to: calculate the offset angle of the entrance line from the given viewpoint based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint; wherein the offset angle is the angle between the normal of the entrance line and the forward direction of the vehicle; and determine the offset angle of the entrance line from each viewpoint as the tilt angle of the parking space number text object from the given viewpoint.
[0126] In some embodiments, when the correction module 214 corrects the orientation of the parking space number text object in each view to the same text orientation according to the tilt angle, it is specifically used to: rotate the parking space number text object in each view away from the forward direction of the vehicle by the tilt angle, so that the parking space number text object in each view rotates to the same text orientation.
[0127] In some embodiments, when the recognition module 215 performs text recognition on the target text object under each viewpoint to obtain the parking space number, it is specifically configured to: input the target text object under each viewpoint into a text recognition model for text recognition, and obtain the text recognition feature value and text fuzzy confidence of the target text object under the corresponding viewpoint; multiply the text recognition feature value under each viewpoint with the text fuzzy confidence to obtain the weighted feature value of the target text object under the corresponding viewpoint; average the weighted feature value under each viewpoint to obtain the parking space number feature value of the parking space; and decode the parking space number feature value to obtain the parking space number of the parking space.
[0128] In some embodiments, when the recognition module 215 inputs the target text object from each viewpoint into the text recognition model for text recognition and obtains the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint, it is specifically used to: input the target text object from each viewpoint into the text recognition network for forward inference and obtain the overall feature representation of the target text object from the corresponding viewpoint; input the overall feature representation of the target text object from each viewpoint into the text recognition branch and the text fuzzy branch of the text recognition network respectively to obtain the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint.
[0129] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For those skilled in the art, this can be understood and implemented without creative effort.
[0130] This invention also provides an electronic device that may include the parking space number identification device 21 described above. Please refer to FIG7, which is a structural block diagram of the electronic device according to an embodiment of the present invention. The electronic device 20 may include one or more processors 22, which are used to implement the parking space number identification method described above.
[0131] In some embodiments, the electronic device 20 may include a computer-readable storage medium 23, which may store a program that can be invoked by the processor 22, and may include a non-volatile storage medium. In other embodiments, the electronic device 20 may also include memory 24 and an interface 25. In still other embodiments, the electronic device 20 may also include other hardware depending on the specific application.
[0132] The computer-readable storage medium 23 provided in this embodiment of the invention stores a computer program thereon. When the computer program is executed by the processor 22, it is used to implement the parking space number identification method described above.
[0133] This invention can take the form of a computer program product implemented on one or more computer-readable storage media 23 (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. The computer-readable storage media 23 includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented using any method or technology. This information can be computer-readable instructions, data structures, program modules, or other data. The computer-readable storage media 23 includes, but is not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium, which can be used to store information accessible by a computing device.
[0134] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0135] The parking space number identification method, device, electronic device, and storage medium provided in the embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method of identifying a parking space number, characterized by, include: During the process of the vehicle driving along the outside of the parking space, image data of the parking space relative to the vehicle from multiple different perspectives are acquired. Target detection is performed on the image data under each viewpoint to obtain the target detection result under the corresponding viewpoint; wherein, the target detection result includes the parking space number text object of the parking space; Based on the target detection results from each viewpoint, the tilt angle of the parking space number text object from the corresponding viewpoint is determined; wherein, the tilt angle is the angle between the display direction of the parking space number text object and the forward direction of the text. Based on the tilt angle, the orientation of the parking space number text object under each viewpoint is corrected to the same text orientation to obtain the target text object under the corresponding viewpoint; wherein, the target text object is the same as the text content in the parking space number text object; Text recognition is performed on the target text object from each viewpoint to obtain the parking space number; wherein, the parking space number is used to determine whether the vehicle is parked in the parking space.
2. The method of claim 1, wherein The target detection results also include the entrance line of the parking space and the entrance corner point of the parking space; The step of performing target detection on the image data under each viewpoint to obtain the target detection result under the corresponding viewpoint includes: The image data from each viewpoint is input into the target detection model for target detection to obtain the entrance line, entrance corner point, and parking space number text object of the corresponding viewpoint. The step of determining the tilt angle of the parking space number text object from each viewpoint based on the target detection results includes: Based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint, determine the tilt angle of the parking space number text object from the corresponding viewpoint.
3. The method of claim 2, wherein The step of determining the tilt angle of the parking space number text object from each viewpoint, based on the entrance line, the entrance corner point, and the parking space number text object, includes: Based on the entrance line, the entrance corner point, and the parking space number text object from each viewpoint, calculate the offset angle of the entrance line from the corresponding viewpoint; wherein, the offset angle is the angle between the normal of the entrance line and the direction of travel of the vehicle; The offset angle of the entrance line under each viewpoint is determined as the parking space number text object under the corresponding viewpoint. The tilt angle.
4. The method of claim 2, wherein The step of inputting the image data from each viewpoint into the target detection model for target detection, and obtaining the entrance line, entrance corner point, and parking space number text object of the corresponding viewpoint, includes: The image data from each viewpoint is input into the target detection network for feature extraction to obtain the overall feature representation of the image data from the corresponding viewpoint. The overall feature representation of the image data under each viewpoint is input into the entrance line detection branch, entrance corner detection branch, and parking space number text object detection branch of the target detection network to obtain the entrance line, entrance corner, and parking space number text object of the parking space under the corresponding viewpoint.
5. The method of claim 1, wherein The step of correcting the orientation of the parking space number text object in each viewpoint to the same positive text direction based on the tilt angle includes: The parking space number text object in each viewpoint is rotated by the tilt angle away from the vehicle's forward direction, so that the parking space number text object in each viewpoint is rotated to the same text orientation.
6. The method of claim 1, wherein The step of performing text recognition on the target text object from each viewpoint to obtain the parking space number includes: The target text object from each viewpoint is input into the text recognition model for text recognition, and the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint are obtained. Multiply the text recognition feature value under each viewpoint by the text fuzzy confidence level to obtain the weighted feature value of the target text object under the corresponding viewpoint; The weighted feature values from each viewpoint are averaged to obtain the parking space number feature value of the parking space. The parking space number feature value is decoded to obtain the parking space number.
7. The method of claim 6, wherein The step of inputting the target text object from each viewpoint into a text recognition model for text recognition, and obtaining the text recognition feature value and text fuzzy confidence of the target text object from the corresponding viewpoint, includes: The target text object from each viewpoint is input into the text recognition network for forward inference to obtain the overall feature representation of the target text object from the corresponding viewpoint. The overall feature representation of the target text object under each viewpoint is input into the text recognition branch and the text fuzzy branch of the text recognition network to obtain the text recognition feature value and text fuzzy confidence of the target text object under the corresponding viewpoint.
8. The method of claim 1, wherein The step of acquiring image data of the parking space relative to the vehicle from multiple different perspectives includes: Once the vehicle enters the preset range of the parking space, image data of the parking space is acquired at multiple different positions during the vehicle's movement, resulting in image data of the parking space relative to the vehicle from multiple different perspectives.
9. The method of claim 1, wherein Before performing target detection on the image data from each viewpoint, the method for identifying parking space numbers further includes: Distortion detection is performed on the image data under each viewpoint to obtain the distortion degree of the image data under the corresponding viewpoint; Delete image data with distortion levels higher than the distortion threshold, and replace image data with distortion levels not higher than the distortion threshold with new image data.
10. A parking space number recognition apparatus characterized by comprising: include: The acquisition module is used to acquire image data of the parking space relative to the vehicle from multiple different perspectives while the vehicle is driving along the outside of the parking space; The detection module is used to perform target detection on the image data under each viewpoint and obtain the target detection result under the corresponding viewpoint; wherein, the target detection result includes the parking space number text object of the parking space; The determination module is used to determine the tilt angle of the parking space number text object under the corresponding viewpoint based on the target detection result under each viewpoint; wherein, the tilt angle is the angle between the display direction of the parking space number text object and the text orientation; The correction module is used to correct the orientation of the parking space number text object under each viewpoint to the same text orientation according to the tilt angle, so as to obtain the target text object under the corresponding viewpoint; wherein, the target text object is the same as the text content in the parking space number text object; The recognition module is used to perform text recognition on the target text object from each viewpoint to obtain the parking space number; wherein, the parking space number is used to determine whether the vehicle is parked in the parking space.
11. An electronic device, comprising: It includes one or more processors, said processors being used to implement the parking space number identification method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the parking space number identification method as described in any one of claims 1 to 9.