Parking space and obstacle detection method, device, electronic equipment and storage medium

By using the pre-trained target detection model for multi-task recognition in the intelligent parking system, the problem of insufficient accuracy and efficiency of obstacle detection and parking space identification in the traditional system is solved, and efficient and accurate obstacle and parking space information detection is achieved. .

CN118135543BActive Publication Date: 2024-09-20CHENGDU CELIS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410547925.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-09-20
Estimated Expiration
2044-05-06

AI Technical Summary

Technical Problem

Existing smart parking systems have a trade-off between accuracy and efficiency in obstacle detection and parking space recognition. The sensor field of view is limited and the algorithm accuracy is insufficient, resulting in misjudgments or delayed responses.

Method used

Using a pre-trained target detection model, combined with the obstacle detection network, grounding point detection network and parking space detection network, the environment image is obtained through the camera, feature data is extracted for multi-task recognition, and accurate detection of obstacles, grounding points and parking space information is achieved .

Benefits of technology

It improves recognition accuracy and efficiency, supports various types of image recognition, has strong scene adaptability, saves computing resources, and reduces misjudgments and delayed responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135543B
    Figure CN118135543B
Patent Text Reader

Abstract

The embodiment of the present application relates to a parking space and obstacle detection method, device, electronic device and storage medium, the method comprising: obtaining an environmental image taken by a camera on a target vehicle; extracting feature data from the environmental image using a feature extraction network included in a pre-trained target detection model; performing obstacle detection on the feature data using the obstacle detection network to obtain obstacle information representing the position and category of obstacles in the environmental image; performing obstacle grounding point detection on the feature data using a grounding point detection network to obtain grounding point information of obstacles in the environmental image; performing parking space detection on the feature data using a parking space detection network to obtain parking space information representing the position and size of parking spaces around the target vehicle. The embodiment of the present application realizes the integration of multiple recognition methods into one target detection model, and runs multiple algorithms in parallel, thereby improving recognition efficiency and recognition accuracy, and saving computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent vehicle technology, and in particular to a parking space and obstacle detection method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the field of intelligent parking technology, the commonly used solutions include the following:

[0003] Vision sensors and related algorithms are often used for obstacle detection and parking space recognition in smart parking systems. However, these technologies are often limited by the sensor's field of view and the accuracy of the algorithm. The sensor's limited field of view may cause obstacles to be overlooked or parking space recognition to be inaccurate, especially in complex environments, such as when there are a large number of vehicles or other obstacles in a parking lot.

[0004] AVM (Around View Monitor) image processing uses images captured by panoramic cameras for obstacle detection and parking space recognition in parking systems. However, AVM image processing is often affected by image distortion and deformation, especially in edge areas or in the case of distant objects, where obstacles may be stretched and extended, leading to misjudgment of parking space occupancy.

[0005] Single-task algorithm: Currently, many smart parking systems use single-task algorithms, that is, different algorithms are used for obstacle detection and parking space recognition. This method may have certain limitations in algorithm calling and system operation efficiency, especially when resources are limited, and multiple algorithms cannot be run at the same time, thus affecting system performance.

[0006] The above schemes often have a trade-off between accuracy and efficiency. Some schemes may perform well in terms of accuracy but have low operating efficiency, while some algorithms may pursue high efficiency but sacrifice accuracy, which may lead to misjudgment or delayed response during the parking process in the smart parking system.

[0007] In summary, the existing technologies in the current intelligent parking system have some limitations and defects in obstacle detection and parking space recognition. Therefore, it is necessary to overcome these shortcomings and improve the performance and reliability of the intelligent parking system. Summary of the invention

[0008] In view of this, in order to solve some or all of the above technical problems, the embodiments of the present application provide a parking space and obstacle detection method, device, electronic device and computer-readable storage medium.

[0009] In a first aspect, an embodiment of the present application provides a parking space and obstacle detection method, the method comprising: acquiring an environmental image taken by a camera on a target vehicle; extracting feature data from the environmental image using a feature extraction network included in a pre-trained target detection model; performing obstacle detection on the feature data using an obstacle detection network included in the target detection model to obtain obstacle information representing the position and category of obstacles in the environmental image; performing obstacle grounding point detection on the feature data using a grounding point detection network included in the target detection model to obtain grounding point information of obstacles in the environmental image, the grounding point information representing the boundary position between the obstacle and the ground; performing parking space detection on the feature data using the parking space detection network included in the target detection model to obtain parking space information representing the position and size of parking spaces around the target vehicle.

[0010] In a second aspect, an embodiment of the present application provides a parking space and obstacle detection device, which includes: an acquisition module, used to acquire an environmental image taken by a camera on a target vehicle; an extraction module, used to extract feature data from the environmental image using a feature extraction network included in a pre-trained target detection model; a first detection module, used to perform obstacle detection on the feature data using the obstacle detection network included in the target detection model, and obtain obstacle information representing the position and category of the obstacle in the environmental image; a second detection module, used to perform obstacle grounding point detection on the feature data using the grounding point detection network included in the target detection model, and obtain grounding point information of the obstacle in the environmental image, wherein the grounding point information represents the boundary position between the obstacle and the ground; a third detection module, used to perform parking space detection on the feature data using the parking space detection network included in the target detection model, and obtain parking space information representing the position and size of the parking spaces around the target vehicle.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the parking space and obstacle detection method of the first aspect of the present application is implemented.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a method as in any embodiment of the parking space and obstacle detection method of the first aspect described above is implemented.

[0013] In a fifth aspect, an embodiment of the present application provides a computer program, which includes a computer readable code. When the computer readable code runs on a device, the processor in the device implements a method as in any embodiment of the parking space and obstacle detection method of the first aspect mentioned above.

[0014] The parking space and obstacle detection method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application use a pre-trained target detection model to identify the environmental image taken by the camera on the target vehicle. During the identification process, the obstacle detection network, ground point detection network and parking space detection network included in the target detection model are used to implement a multi-task approach to respectively predict the obstacle information around the target vehicle, the ground point information of the obstacle and the parking space information. Compared with the current single-task identification method, the embodiments of the present application integrate multiple identification methods into one target detection model, which can support the identification of various types of images, has high scene adaptability, and runs multiple algorithms in parallel, which improves the recognition efficiency and recognition accuracy, and can save computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0018] Figure 1 A system diagram applicable to the embodiments of the present application;

[0019] Figure 2 A flowchart of a parking space and obstacle detection method provided in an embodiment of the present application;

[0020] Figure 3A A structural diagram of the target detection model provided in the embodiment of the present application;

[0021] Figure 3B A structural diagram of another target detection model provided in an embodiment of the present application;

[0022] Figure 4A A schematic diagram of a grounding point provided in an embodiment of the present application;

[0023] Figure 4B Another grounding point schematic diagram provided in an embodiment of the present application;

[0024] Figure 5 A flowchart of another parking space and obstacle detection method provided in an embodiment of the present application;

[0025] Figure 6 A flowchart of another parking space and obstacle detection method provided in an embodiment of the present application;

[0026] Figure 7 A flowchart of another parking space and obstacle detection method provided in an embodiment of the present application;

[0027] Figure 8 A flowchart of another parking space and obstacle detection method provided in an embodiment of the present application;

[0028] Fig. 9 A schematic diagram of parking space information provided in an embodiment of the present application;

[0029] Fig.10 A flowchart of another parking space and obstacle detection method provided in an embodiment of the present application;

[0030] Fig.11 A schematic diagram of the training process of the target detection model provided in the embodiment of the present application;

[0031] Fig.12 A schematic diagram of the training process of another target detection model provided in an embodiment of the present application;

[0032] Fig.13 A schematic diagram of the structure of a parking space and obstacle detection device provided in an embodiment of the present application;

[0033] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values ​​described in these embodiments do not limit the scope of the present application.

[0035] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.

[0036] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

[0037] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0038] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0039] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0040] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.

[0041] Technologies, circuits, and devices known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, circuits, and devices should be considered as part of the specification.

[0042] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0043] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0044] Figure 1 An exemplary system architecture 100 is shown to which the parking space and obstacle detection method or parking space and obstacle detection device according to the embodiments of the present application can be applied.

[0045] like Figure 1As shown, the system architecture 100 may include a front-end controller 101, a network 102, a back-end server 103, and a vehicle 104. The front-end controller 101 may be disposed on the vehicle 104. The network 102 is used to provide a medium for a communication link between the front-end controller 101 and the back-end server 103. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0046] The user can use the front-end controller 101 to interact with the back-end server 103 through the network 102 to receive or send messages, etc. Various communication client applications, such as map applications, navigation applications, etc., can be installed on the front-end controller 101.

[0047] The vehicle 104 is provided with cameras for real-time perception of the vehicle's surrounding environment, such as a plurality of fisheye cameras provided on the outside of the vehicle.

[0048] The backend server 103 may be a server that provides various services to the frontend controller 101. For example, it may provide high-precision map data, traffic condition data, etc. to the frontend controller 101.

[0049] It should be noted that the parking space and obstacle detection method provided in the embodiment of the present application can be executed by the back-end server 103 or by the front-end controller 101. Accordingly, the parking space and obstacle detection device can be set in the back-end server 103 or in the front-end controller 101. For example, the front-end controller 101 uploads the environment image to the back-end server 103, and the back-end server 103 recognizes the environment image and feeds back the recognition result to the front-end controller 101. In addition, the parking space and obstacle detection method provided in the embodiment of the present application can also be executed by other types of electronic devices, such as mobile phones, laptops, tablet computers, etc. These electronic devices can also receive the environment image, recognize the environment image, and finally feed back the recognition result to the front-end controller 101.

[0050] It should be understood that Figure 1 The number of front-end controllers 101, networks 102, back-end servers 103, and vehicles 104 in the embodiment is only illustrative. According to the implementation requirements, there can be any number of front-end controllers 101, networks 102, back-end servers 103, and vehicles 104.

[0051] In order to solve the technical problem that the types of images recognized and the recognition algorithms in the prior art are relatively single, resulting in low recognition accuracy and efficiency, the present application provides a parking space and obstacle detection method, which can realize a multi-task recognition algorithm performed by a target detection model to improve recognition accuracy and efficiency.

[0052] Figure 2A flow chart of a parking space and obstacle detection method provided in an embodiment of the present application is shown in FIG. Figure 1 On one or more electronic devices such as the front-end controller 101, the back-end server 103 shown. In addition, the execution subject of the present method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute the present method, or a plurality of electronic devices can cooperate with each other to execute the present method. When the above-mentioned execution subject is software, the present method can be implemented as a plurality of software or software modules, or as a single software or software module. No specific limitation is made here.

[0053] like Figure 2 As shown, the method specifically includes:

[0054] Step 201, obtaining an environment image captured by a camera on a target vehicle.

[0055] In this embodiment, the camera may be a camera installed outside the target vehicle, the number of cameras may be at least one, and the camera type may be of various types, such as a fisheye camera, etc. The environment image may be a single image taken by a camera, or an image stitched from multiple images, such as a panoramic image.

[0056] Step 202 , extracting feature data from the environment image using a feature extraction network included in a pre-trained target detection model.

[0057] In this embodiment, the target detection model can be a software module of a detection algorithm for executing multiple tasks. The target detection model can be constructed based on a neural network model of various structures related to the art.

[0058] For example, Figure 3A As shown in the figure, the target detection model can include a backbone network and a neck network, which constitute a feature extraction network. The backbone network can be a network with a structure such as CSPNet (Cross Stage Partial Network), and the neck network can be a network with a structure such as PAN (Pyramid Attention Network). The backbone network can extract basic feature maps from the environment image, and the neck network can fuse feature maps of different sizes and semantic levels, integrate the global features and local features of the environment image, and obtain feature data of large and small targets at the same time.

[0059] Step 203: using the obstacle detection network included in the target detection model, perform obstacle detection on the feature data to obtain obstacle information representing the position and category of the obstacle in the environment image.

[0060] In this embodiment, if Figure 3A As shown, the target detection model includes an obstacle detection network, which can run an obstacle detection algorithm to predict the location and category of obstacles. Generally, obstacle information includes an obstacle detection frame indicating the location of the obstacle and obstacle category information indicating the category of the obstacle. The obstacle detection frame is a frame diagram (usually a rectangular frame) containing an obstacle in the environment image. The obstacle category information indicates the category of the obstacle in the obstacle detection frame. For example, the categories of obstacles may include pedestrians, cone barrels, anti-collision bars, anti-collision barrels, animals, etc.

[0061] It should be understood that the obstacle information obtained in this step may represent the positions and categories of multiple obstacles, that is, multiple obstacle detection frames and category information corresponding to each obstacle detection frame may be obtained.

[0062] Step 204 , using the ground point detection network included in the target detection model, obstacle ground point detection is performed on the feature data to obtain ground point information of the obstacles in the environment image.

[0063] In this embodiment, if Figure 3A As shown, the target detection model includes a ground point detection network, which can run a ground point detection algorithm to predict the location of the ground point of the obstacle. The ground point detection network can determine the boundary and ground area of ​​the obstacle based on the input feature data, and then determine multiple ground points from the boundary of the obstacle and the area in contact with the ground.

[0064] The grounding point information indicates the boundary position between the obstacle and the ground. One obstacle may correspond to multiple grounding points (for example, 3), and each node may indicate the boundary point between the obstacle and the ground.

[0065] like Figure 4A As shown, for a cone barrel, its corresponding grounding point information may include the coordinates of three grounding points P1, P2, and P3, and the three grounding points are respectively located on the left line, the bottom line, and the right line of the rectangular obstacle detection frame.

[0066] Step 205, using the parking space detection network included in the target detection model, perform parking space detection on the feature data to obtain parking space information indicating the position and size of parking spaces around the target vehicle.

[0067] In this embodiment, if Figure 3AAs shown, the target detection model includes a parking space detection network, which can run a parking space detection algorithm to predict the position and size of empty parking spaces around the target vehicle. The parking space detection network can determine the position of the parking space line and the position of obstacles around the parking space line based on the input feature data, and determine the position, size and other features of the parking space that can park the target vehicle in combination with the size of the target vehicle. Optionally, the generated parking space information may include information such as the corner point position of the parking space, the detection frame of the parking space, and the entrance position of the parking space.

[0068] Typically, after obtaining the above-mentioned obstacle information, touchdown point information and parking space information, the information can be output to a system that uses the information to control the vehicle (eg, an automatic parking control system) to provide accurate reference information for the automatic parking algorithm.

[0069] The parking space and obstacle detection method provided in the embodiment of the present application uses a pre-trained target detection model to identify the environmental image taken by the camera on the target vehicle. During the identification process, the obstacle detection network, the grounding point detection network and the parking space detection network included in the target detection model are used to implement a multi-task approach to respectively predict the obstacle information around the target vehicle, the grounding point information of the obstacle and the parking space information. Compared with the current single-task recognition method, the embodiment of the present application integrates multiple recognition methods into one target detection model, which can support the recognition of various types of images, has high scene adaptability, and runs multiple algorithms in parallel, which improves the recognition efficiency and recognition accuracy, and can save computing resources.

[0070] In some optional implementations of this embodiment, such as Figure 5 As shown, step 204 includes:

[0071] Step 2041, input the feature data into a grounding point detection network to obtain the grounding point location information of the obstacle in the environment image.

[0072] The grounding point location information may include the coordinates of the grounding points, and the number of grounding points may be set arbitrarily.

[0073] Step 2042: Based on the obstacle information, determine the target obstacle detection frame and the target obstacle category corresponding to the touchdown point location information.

[0074] Specifically, the obstacle information may include obstacle detection frames of respective obstacles. Therefore, according to the touchdown point position information corresponding to a certain obstacle, a target obstacle detection frame corresponding to the obstacle may be determined from the respective obstacle detection frames.

[0075] Step 2043, based on the preset correspondence between the obstacle category and the target touchdown point determination method, determine the target touchdown point determination method corresponding to the target obstacle category, and determine the target touchdown point coordinates according to the target touchdown point determination method and the touchdown point position information.

[0076] Specifically, different obstacle types correspond to different target grounding point determination methods. For obstacles of regular shapes such as cones and trash cans, the target grounding point can be determined from the left line, bottom line, and right line of the target obstacle detection frame, and the line connecting the target grounding points can represent the grounding line of the obstacle. Figure 4A As shown, the bottom surface of the cone barrel is a square, and the target grounding points include three points P1, P2, and P3 on the left line, bottom line, and right line of the detection frame. The connecting line of P1, P2, and P3 can represent the grounding line.

[0077] For irregularly shaped obstacles such as pedestrians and animals, the target ground point can be determined from the bottom edge of the target obstacle detection frame. Figure 4B As shown, when the obstacle is a pedestrian, the target grounding point includes the left and right endpoints P4 and P6 on the bottom line of the detection frame, and the contact point P5 between the pedestrian and the ground line. In this case, the bottom line of the target obstacle detection frame is the grounding line.

[0078] Step 2044, based on the target grounding point coordinates and the length of the edge line of the target obstacle detection box where each target grounding point is located, calculate the grounding point ratio information, and generate the grounding point information based on the grounding point ratio information.

[0079] like Figure 4A As shown in the figure, the length of the edge where P1 and P3 are located is the height h of the target obstacle detection frame, and the length of the edge where P2 is located is the width w of the target obstacle detection frame. S1 represents the distance between the grounding line vertex P1 and the upper left vertex of the rectangular frame; S2 represents the distance between the grounding line vertex P2 and the lower left vertex of the rectangular frame; S3 represents the distance between the grounding line vertex P3 and the upper right vertex of the rectangular frame. The ratios of the three grounding points are: a1=S1 / h, a2=S2 / w, and a3=S3 / h.

[0080] like Figure 4B As shown, according to the above-mentioned method for calculating the ratio of grounding points, S4=S6=h, and the ratios of the three grounding points are: a4=1, a5=S5 / w, and a6=1.

[0081] Optionally, the above-mentioned grounding point ratio may be used as the grounding point information, or the grounding point ratio and the target grounding point coordinates may be used together as the grounding point information.

[0082] The grounding point information including the grounding point ratio can be used to provide the automatic parking algorithm with data representing the positional relationship between the obstacle and the ground when executing the automatic parking function, thereby enabling the automatic parking system to obtain more reference data, which helps to improve the accuracy and safety of automatic parking.

[0083] In this embodiment, by calculating the ground point ratio information, the ground point ratio information can represent the ratio of the ground area in the target obstacle detection frame, so that the generated ground point information can more accurately represent the positional relationship between the obstacle and the ground, and provide more reference data for subsequent systems that use the ground point information (such as automatic parking systems), which helps to improve the accuracy and safety of vehicle control.

[0084] In some optional implementations of this embodiment, such as Figure 6 As shown, step 203 includes:

[0085] Step 2031: Convolve the feature data using the convolution layer included in the obstacle detection network to obtain at least two feature maps of different sizes.

[0086] like Figure 3B As shown, the obstacle detection network includes a convolution layer 1, which can convolve the feature data through different convolution parameters to obtain three feature maps F1, F2, and F3 of different sizes. As an example, the single channel sizes of the three feature maps are 128*128, 64*64, and 32*32 respectively.

[0087] Step 2032: Using at least two obstacle detection sub-networks included in the obstacle detection network, respectively perform obstacle detection of corresponding sizes on at least two feature maps to obtain obstacle information of corresponding sizes.

[0088] like Figure 3B As shown in the figure, the obstacle detection network includes three obstacle detection sub-networks, which perform obstacle detection on feature maps of large, medium and small sizes respectively, and output obstacle detection frames of large, medium and small sizes as well as category information.

[0089] This embodiment sets a plurality of obstacle detection sub-networks in the obstacle detection network to detect feature maps of different sizes respectively, so as to realize targeted detection of obstacles of different sizes in the environment image, thereby improving the accuracy and comprehensiveness of obstacle detection.

[0090] In some optional implementations of this embodiment, such as Figure 7 As shown, step 205 includes:

[0091] Step 2051, using the convolution layer included in the parking space detection network, convolve the feature data to obtain at least two feature maps of different sizes.

[0092] like Figure 3B As shown, the parking space detection network includes a convolution layer 3, which can convolve the feature data through different convolution parameters to obtain three feature maps F4, F5, and F6 of different sizes. As an example, the single channel sizes of the three feature maps are 128*128, 64*64, and 32*32 respectively.

[0093] Step 2052: Using at least two parking space detection sub-networks included in the parking space detection network, perform parking space detection of corresponding sizes on at least two feature graphs to obtain parking space information of corresponding sizes.

[0094] like Figure 3B As shown, the parking space detection network includes three parking space detection sub-networks, which perform parking space detection on feature maps of large, medium and small sizes respectively, and output parking space information of large, medium and small sizes.

[0095] This embodiment sets a plurality of parking space detection sub-networks in the parking space detection network to detect feature maps of different sizes respectively, thereby achieving targeted detection of parking spaces of different sizes in the environment image, thereby improving the accuracy and comprehensiveness of parking space detection.

[0096] Optionally, the ground point detection network can also include convolutional layers, such as Figure 3B As shown, the grounding point detection network includes a convolution layer 2. The feature data output by the convolution layer 2 is input into a grounding point regression subnetwork. The grounding point regression subnetwork further performs obstacle grounding point detection to obtain grounding point information.

[0097] It should be noted that Figure 3A and Figure 3B The model architecture shown is schematic. In actual scenarios, Figure 3A and Figure 3B Other modules are set on the basis of the shown architecture. For example, CBR (Conv (convolution) + Batch Norm + ReLU (activation function)) modules can be set before convolution layer 1, convolution layer 2, and convolution layer 3, respectively. After the CBR module processes the input feature data, it is input into convolution layer 1, convolution layer 2, and convolution layer 3, respectively.

[0098] In some optional implementations of this embodiment, such as Figure 8 As shown, step 205 includes:

[0099] Step 2053, using the parking space detection network, perform parking space entrance detection, parking space corner point detection and parking space area detection on the feature data to obtain parking space entrance position information, parking space corner point position information and parking space area information.

[0100] Specifically, the parking space detection network can extract the geometric shape features of the parking space entrance, corner points and the overall area of ​​the parking space from the feature data, thereby classifying different areas of the parking space and obtaining the parking space entrance position information, parking space corner point position information and parking space area information.

[0101] like Fig. 9 As shown, the parking space entrance position information, parking space corner point position information and parking space area information include three detection frames a, b and c respectively, where a represents the entrance position area, b represents the corner point position area, and c represents the overall area of ​​the parking space.

[0102] Step 2054: determine the parking space entrance position information, the parking space corner position information and the parking space area information as the parking space information.

[0103] This embodiment detects the parking space features contained in the feature data and then classifies the various areas of the parking space, so that the various areas of the parking space can be more accurately identified. The parking space information can include richer content, thereby more accurately representing the location, size and other features of the parking space.

[0104] In some optional implementations of this embodiment, such as Fig.10 As shown, step 201 includes:

[0105] Step 2011, obtaining original images taken by at least two cameras on the target vehicle.

[0106] The at least two cameras mentioned above may be cameras installed outside the vehicle, such as a plurality of fisheye cameras, and the captured original images are a plurality of fisheye images.

[0107] Step 2012, stitching and perspective conversion are performed on the original images to obtain a panoramic image.

[0108] Usually, the panoramic image is an AVM image, that is, an image converted into a bird's-eye view after a plurality of fisheye images are stitched together.

[0109] Step 2013: determine the original image and the panoramic image as the environment image.

[0110] In subsequent steps 202 to 205, detection tasks can be performed on the original image and the panoramic image respectively. The first obstacle information, the first grounding point information, and the first parking space information can be obtained by detecting the original image, and the second obstacle information, the second grounding point information, and the second parking space information can be obtained by detecting the panoramic image.

[0111] like Fig.10 As shown, after step 205, the following steps may be performed:

[0112] Step 206, integrating the first obstacle information, the first grounding point information, and the first parking space information detected using the original image, and the second obstacle information, the second grounding point information, and the second parking space information detected using the panoramic image to obtain integrated obstacle information, integrated grounding point information, and integrated parking space information.

[0113] Specifically, there are multiple ways to integrate the detected information. For example, since the parking space information detected by the panoramic image is more accurate, and the parking space information detected by the original image is less accurate, or no parking space information can be detected, the second parking space information can be determined as the integrated parking space information. Alternatively, since the panoramic image is a bird's-eye view image, the corresponding parking space information does not contain height information, and therefore, the height information included in the first parking space information can be added to the second parking space information, and the second parking space information with the height information added can be determined as the integrated parking space information.

[0114] Since the obstacle information and grounding point information detected from the original image are highly accurate, the first obstacle information and the first grounding point information are respectively determined as the integrated obstacle information and the integrated grounding point information. Alternatively, since the panoramic image is a bird's-eye view image, the coordinates on the two-dimensional horizontal plane contained in the corresponding second obstacle information and the second grounding point information can be combined with the height information contained in the second obstacle information and the second grounding point information to obtain the integrated obstacle information and the integrated grounding point information that can more accurately represent the three-dimensional positions of the obstacles and the grounding points.

[0115] This embodiment detects the original image and the panoramic image separately and integrates the results obtained after the detection, so that the target detection model can perform target detection tasks on different types of images without calling different algorithms for different types of images separately, thereby improving the detection efficiency. After integrating the detection results obtained from different types of images, the obtained obstacle information, grounding point information and parking space information can be more accurate.

[0116] In some optional implementations of this embodiment, such as Fig.11 As shown in the figure, the target detection model is pre-trained according to the following steps:

[0117] Step 1101 , obtaining a sample environment image, and annotated obstacle information, annotated ground point information, and annotated parking space information obtained by annotating the sample environment image in advance.

[0118] Specifically, the marked obstacle information may include manually marked obstacle detection boxes and obstacle categories, the marked grounding point information may include manually marked grounding point coordinates, and the marked parking space information may include manually marked parking space detection boxes, parking space entrances, parking space corner points, etc.

[0119] Step 1102: extract sample feature data from the sample environment image using the feature extraction network included in the initial target detection model to be trained.

[0120] Step 1103, using the obstacle detection network included in the initial target detection model, perform obstacle detection on the sample feature data to obtain predicted obstacle information.

[0121] Step 1104, using the grounding point detection network included in the initial target detection model, obstacle grounding point detection is performed on the sample feature data to obtain predicted grounding point information of obstacles in the sample environment image.

[0122] Step 1105, using the parking space detection network included in the initial target detection model, perform parking space detection on the sample feature data to obtain predicted parking space information.

[0123] The above feature extraction network, obstacle detection network, ground point detection network, and parking space detection network can be referenced Figure 3A and Figure 3B As shown in the structural diagram, and refer to the above Figure 2 The contents described in the corresponding embodiments will not be repeated here.

[0124] Step 1106 : determining a first loss value representing an error between the predicted obstacle information and the labeled obstacle information based on a preset first loss function.

[0125] The first loss function may include a regression loss function for performing detection frame regression and a classification loss function for classifying obstacles in the detection frame. For example, the regression loss function may be an L2 loss function (mean square error loss function), an L1 loss function (absolute value loss function), etc. The classification loss function may be a cross entropy loss function, etc. The regression loss function may represent the error between the predicted obstacle detection frame and the labeled obstacle detection frame, and the classification loss function may represent the error between the predicted category and the actual category of the obstacle.

[0126] Step 1107: Determine a second loss value representing an error between the predicted grounding point information and the marked grounding point information based on a preset second loss function.

[0127] The first loss function may be a regression loss function for ground point regression, for example, the regression loss function may be an L2 loss function.

[0128] Step 1108: Determine a third loss value representing the error between the predicted parking space information and the marked parking space information based on a preset third loss function.

[0129] Among them, the third loss function can be similar to the first loss function, including a regression loss function for regressing the parking space detection frame, and a classification loss function for classifying the area in the parking space detection frame. The regression loss function can represent the error between the predicted parking space detection frame and the annotated parking space detection frame, and the classification loss function can represent the error between the predicted category of a certain area in the parking space (such as the parking space corner point, the parking space entrance, the entire parking space area, etc.) and the actual category.

[0130] Step 1109, adjusting the parameters of the initial target detection model based on the first loss value, the second loss value, and the third loss value.

[0131] In this embodiment, the first loss value, the second loss value, and the third loss value can be weighted and summed to obtain a total loss value, and the weight value can be preset. Then, the gradient descent method and the back propagation method can be used to iteratively update the parameters of the initial target detection model so that the above total loss value gradually decreases. Usually, each iteration requires executing the above steps 1101-1109 once, that is, iteratively training the model using multiple sets of training samples. The adjusted model obtained after each iteration is used as the initial target detection model for the next iteration, and it is iterated multiple times until the adjusted initial target detection model meets the preset training end condition.

[0132] Step 1110, in response to the initial target detection model after adjusting parameters meeting a preset training end condition, determining the initial target detection model after adjusting parameters as the target detection model.

[0133] In this embodiment, the above-mentioned training end conditions may include but are not limited to at least one of the following: the training time exceeds the preset duration; the number of training times exceeds the preset number of times; the calculated loss value converges; the recognition accuracy obtained by testing the model using the test sample exceeds the accuracy threshold.

[0134] This embodiment obtains sample environment images and annotation information in advance, and uses the loss functions corresponding to the three task branches of obstacle detection network, ground point detection network, and parking space detection network to train the initial target detection model until a lens contamination recognition model that meets the training end conditions is obtained. The target detection model obtained in the embodiment of the present application is trained using a machine learning method to make the model parameters more compatible with the actual scene. The three different loss functions can be used to train the parameters of the three branch networks in a targeted manner, thereby helping to obtain a target detection model with high prediction accuracy.

[0135] In some optional implementations of this embodiment, the predicted grounding point information includes at least two pieces of predicted grounding point location information, and the marked grounding point information includes at least two pieces of marked grounding point location information.

[0136] like Fig.12 As shown, step 1107 includes:

[0137] Step 11071, sorting the location information of at least two predicted grounding points according to a preset sorting rule to obtain a predicted grounding point level sequence.

[0138] The predicted grounding point location information may include the coordinates of the predicted grounding point, and at least two predicted grounding point location information may be sorted according to the order of arrangement of the coordinates. For example, the predicted grounding point may be sorted according to the order of the horizontal coordinates of each predicted grounding point, or according to the order of the vertical coordinates of each predicted grounding point, or according to the distance between each predicted grounding point and the origin, etc. The predicted grounding point level in the predicted grounding point level sequence indicates the position of each predicted grounding point location information in the sorted predicted grounding point location information sequence. For example, for the predicted grounding point P1, if the position of the point in the sorted sequence is the second, the predicted grounding point level of the point is 2.

[0139] Step 11072: sort the position information of at least two marked grounding points according to a preset sorting rule to obtain a grade sequence of the marked grounding points.

[0140] Specifically, the sorting rules of the annotated grounding point position information are the same as the sorting rules of the predicted grounding point position information. Since the annotated grounding point position information and the predicted grounding point position information correspond one to one, the annotated grounding point level in the annotated grounding point level sequence indicates the position of the annotated grounding point information corresponding to a certain predicted grounding point information in the sorted annotated grounding point position information sequence. For example, for the predicted grounding point P1, the annotated grounding point corresponding to the point is P1'. If the position of P1' in the sorted sequence is the third, the annotated grounding point level of point P1' is 3.

[0141] Step 11073, based on the predicted grounding point level sequence and the marked grounding point level sequence, determine the reference predicted grounding point level and the reference marked grounding point level.

[0142] Among them, the reference predicted grounding point level and the reference marked grounding point level can be set arbitrarily. Usually, the reference predicted grounding point level and the reference marked grounding point level are set to the average values ​​of the predicted grounding point level sequence and the marked grounding point level sequence respectively.

[0143] Step 11074, using the predicted grounding point level sequence, the marked grounding point level sequence, the reference predicted grounding point level and the reference marked grounding point level as parameters of the second loss function, and calculating the second loss value.

[0144] In this embodiment, the second loss function can be constructed based on the SROCC statistical method. SROCC does not depend on the specific distribution of the data. This means that SROCC can be used for various types of data without making assumptions about the data or making specific distribution assumptions. Therefore, the second loss function in this embodiment is expressed as SRL loss.

[0145] SRL loss has the following advantages: Compared with some distance-based loss functions (such as mean squared error loss function), SRL loss has less impact on outliers. Because SRL loss is based on the order of data rather than specific values, it is insensitive to outliers or extreme values. Since SRL loss is based on the correlation of ranks rather than the correlation of specific values, it makes fewer assumptions about the distribution of data, which makes SRL loss more effective in calculating errors when dealing with non-normally distributed data or data with different distribution shapes. SRL loss directly measures the ranking ability of the model's prediction results. In ranking tasks, people usually pay more attention to the relative order of data rather than specific values. Therefore, using SRL loss can better evaluate the overall performance of the model for ranking tasks. The SRL loss loss function is not affected by the scale change of the ranking results. Even if the scale of the predicted value changes, as long as its ranking order remains unchanged, the loss value will remain unchanged, which makes SRL loss insensitive to the output scale of the model.

[0146] The second loss function constructed in this embodiment is shown as follows:

[0147]

[0148] Where n represents the number of predicted grounding points or marked grounding points, i represents the serial number of the corresponding predicted grounding points and marked grounding points, represents the level of the i-th predicted grounding point, represents the level of the i-th marked grounding point, Represents the average value of the predicted grounding point level sequence, that is, the reference predicted grounding point level, It represents the average value of the grade sequence of the annotated grounding points, that is, the grade of the reference annotated grounding points.

[0149] It can be seen from the above formula that the closer the ranking of the predicted touchdown point location information is to the ranking of the labeled touchdown point location information, the smaller the SRL loss is and the higher the accuracy of the predicted touchdown point location information is.

[0150] The second loss function provided in this embodiment, based on the advantages described above, can make the loss function focus on the arrangement order of the grounding points, avoid the influence of outliers and extreme values, and make the predicted grounding point location information more accurately regressed, so that the model can converge faster during training, thereby improving the efficiency of model training and improving the prediction accuracy of the docking point location of the trained model.

[0151] Fig.13 A schematic diagram of the structure of a parking space and obstacle detection device provided in an embodiment of the present application. Specifically comprising: an acquisition module 1301, used to acquire an environmental image taken by a camera on a target vehicle; an extraction module 1302, used to extract feature data from the environmental image using a feature extraction network included in a pre-trained target detection model; a first detection module 1303, used to perform obstacle detection on the feature data using an obstacle detection network included in the target detection model, and obtain obstacle information indicating the position and category of obstacles in the environmental image; a second detection module 1304, used to perform obstacle grounding point detection on the feature data using a grounding point detection network included in the target detection model, and obtain grounding point information of obstacles in the environmental image, wherein the grounding point information indicates the boundary position between the obstacle and the ground; a third detection module 1305, used to perform parking space detection on the feature data using a parking space detection network included in the target detection model, and obtain parking space information indicating the position and size of parking spaces around the target vehicle.

[0152] In some optional implementations of this embodiment, the second detection module includes: an input unit, which is used to input feature data into a grounding point detection network to obtain grounding point position information of obstacles in the environment image; a first determination unit, which is used to determine a target obstacle detection frame and a target obstacle category corresponding to the grounding point position information based on the obstacle information; a second determination unit, which is used to determine a target grounding point determination method corresponding to the target obstacle category based on a preset correspondence between the obstacle category and the target grounding point determination method, and determine the target grounding point coordinates according to the target grounding point determination method and the grounding point position information; a generation unit, which is used to calculate the grounding point proportion information based on the target grounding point coordinates and the length of the edge line of the target obstacle detection frame where each target ground point is located, and generate the grounding point information based on the grounding point proportion information.

[0153] In some optional implementations of this embodiment, the first detection module includes: a first convolution unit, used to convolve the feature data using a convolution layer included in the obstacle detection network to obtain at least two feature maps of different sizes; the first detection unit, used to perform obstacle detection of corresponding sizes on the at least two feature maps using at least two obstacle detection sub-networks included in the obstacle detection network to obtain obstacle information of corresponding sizes.

[0154] In some optional implementations of this embodiment, the third detection module includes: a second convolution unit, used to use the convolution layer included in the parking space detection network to convolve the feature data to obtain at least two feature maps of different sizes; a second detection unit, used to use at least two parking space detection sub-networks included in the parking space detection network to perform parking space detection of corresponding sizes on at least two feature maps to obtain parking space information of corresponding sizes.

[0155] In some optional implementations of this embodiment, the third detection module includes: a third detection unit, used to use a parking space detection network to perform parking space entrance detection, parking space corner point detection and parking space area detection on the feature data to obtain parking space entrance position information, parking space corner point position information and parking space area information; a third determination unit, used to determine the parking space entrance position information, parking space corner point position information and parking space area information as parking space information.

[0156] In some optional implementations of this embodiment, the acquisition module includes: an acquisition unit, which is used to acquire original images taken by at least two cameras on the target vehicle; a conversion unit, which is used to splice and convert the perspective of the original images to obtain a panoramic image; a fourth determination unit, which is used to determine the original image and the panoramic image as an environmental image; the device also includes: an integration module, which is used to integrate the first obstacle information, the first grounding point information, and the first parking space information detected using the original image, and the second obstacle information, the second grounding point information, and the second parking space information detected using the panoramic image to obtain integrated obstacle information, integrated grounding point information, and integrated parking space information.

[0157] In some optional implementations of the present embodiment, the target detection model is pre-trained according to the following steps: obtaining a sample environment image, and pre-annotating the sample environment image to obtain annotated obstacle information, annotated grounding point information, and annotated parking space information; extracting sample feature data from the sample environment image using a feature extraction network included in the initial target detection model to be trained; performing obstacle detection on the sample feature data using the obstacle detection network included in the initial target detection model to obtain predicted obstacle information; performing obstacle grounding point detection on the sample feature data using the grounding point detection network included in the initial target detection model to obtain predicted grounding point information of obstacles in the sample environment image; and The parking space detection network included performs parking space detection on sample feature data to obtain predicted parking space information; based on a preset first loss function, determines a first loss value representing the error between predicted obstacle information and labeled obstacle information; based on a preset second loss function, determines a second loss value representing the error between predicted grounding point information and labeled grounding point information; based on a preset third loss function, determines a third loss value representing the error between predicted parking space information and labeled parking space information; based on the first loss value, the second loss value, and the third loss value, adjusts the parameters of an initial target detection model; in response to the initial target detection model after adjusting the parameters meeting a preset training end condition, determines the initial target detection model after adjusting the parameters as the target detection model.

[0158] In some optional implementations of the present embodiment, the predicted grounding point information includes at least two predicted grounding point location information, and the marked grounding point information includes at least two marked grounding point location information; based on a preset second loss function, a second loss value representing the error between the predicted grounding point information and the marked grounding point information is determined, including: sorting at least two predicted grounding point location information according to a preset sorting rule to obtain a predicted grounding point level sequence; sorting at least two marked grounding point location information according to a preset sorting rule to obtain a marked grounding point level sequence; determining a reference predicted grounding point level and a reference marked grounding point level based on the predicted grounding point level sequence and the marked grounding point level sequence; using the predicted grounding point level sequence, the marked grounding point level sequence, the reference predicted grounding point level and the reference marked grounding point level as parameters of the second loss function, and calculating the second loss value.

[0159] The parking space and obstacle detection device provided in this embodiment can be as follows Fig.13 The parking space and obstacle detection device shown in can execute all the steps of the above parking space and obstacle detection methods, thereby achieving the technical effects of the above parking space and obstacle detection methods. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.

[0160] Fig.14A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Fig.14 The electronic device 1400 shown includes: at least one processor 1401, a memory 1402, at least one network interface 1404 and other user interfaces 1403. The various components in the electronic device 1400 are coupled together via a bus system 1405. It is understood that the bus system 1405 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1405 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 1405 is not described in detail. Fig.14 Various buses are labeled as bus system 1405.

[0161] The user interface 1403 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0162] It can be understood that the memory 1402 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus DRAM (DRRAM). The memory 1402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0163] In some implementations, the memory 1402 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 14021 and an application program 14022 .

[0164] The operating system 14021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 14022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 14022.

[0165] In this embodiment, by calling the program or instruction stored in the memory 1402, specifically, the program or instruction stored in the application 14022, the processor 1401 is used to execute the method steps provided by each method embodiment, for example, including:

[0166] Acquire an environment image taken by a camera on a target vehicle; extract feature data from the environment image using a feature extraction network included in a pre-trained target detection model; perform obstacle detection on the feature data using an obstacle detection network included in the target detection model to obtain obstacle information representing the position and category of obstacles in the environment image; perform obstacle grounding point detection on the feature data using a grounding point detection network included in the target detection model to obtain grounding point information of obstacles in the environment image, wherein the grounding point information represents the boundary position between the obstacle and the ground; perform parking space detection on the feature data using a parking space detection network included in the target detection model to obtain parking space information representing the position and size of parking spaces around the target vehicle.

[0167] The method disclosed in the above embodiment of the present application can be applied to the processor 1401, or implemented by the processor 1401. The processor 1401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1401. The above processor 1401 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor are combined and executed. The software unit may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1402, and the processor 1401 reads the information in the memory 1402 and completes the steps of the above method in combination with its hardware.

[0168] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.

[0169] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0170] The electronic device provided in this embodiment may be Fig.14 The electronic device shown in can execute all the steps of the above-mentioned parking space and obstacle detection methods, thereby achieving the technical effects of the above-mentioned parking space and obstacle detection methods. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.

[0171] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0172] When one or more programs in the storage medium can be executed by one or more processors, the parking space and obstacle detection method executed on the electronic device side can be implemented.

[0173] The processor is used to execute the program stored in the memory to implement the following steps of the parking space and obstacle detection method executed on the electronic device side:

[0174] Acquire an environment image taken by a camera on a target vehicle; extract feature data from the environment image using a feature extraction network included in a pre-trained target detection model; perform obstacle detection on the feature data using an obstacle detection network included in the target detection model to obtain obstacle information representing the position and category of obstacles in the environment image; perform obstacle grounding point detection on the feature data using a grounding point detection network included in the target detection model to obtain grounding point information of obstacles in the environment image, wherein the grounding point information represents the boundary position between the obstacle and the ground; perform parking space detection on the feature data using a parking space detection network included in the target detection model to obtain parking space information representing the position and size of parking spaces around the target vehicle.

[0175] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different circuits to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0176] The steps of the circuits or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, software modules executed by a processor, or a combination of the two. The software modules may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0177] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The circuit steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0178] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A parking space and obstacle detection method, It is characterized in that The method comprises: Obtain an environment image captured by a camera on a target vehicle; Extracting feature data from the environment image using a feature extraction network included in a pre-trained object detection model; Using the obstacle detection network included in the target detection model, performing obstacle detection on the feature data to obtain obstacle information representing the position and category of the obstacle in the environment image; Using a ground point detection network included in the target detection model, performing obstacle ground point detection on the feature data to obtain ground point information of the obstacle in the environment image, wherein the ground point information indicates a boundary position between the obstacle and the ground; Using the parking space detection network included in the target detection model to perform parking space detection on the feature data to obtain parking space information representing the position and size of parking spaces around the target vehicle; using the grounding point detection network included in the target detection model to perform obstacle grounding point detection on the feature data to obtain grounding point information of obstacles in the environment image, including: Inputting the feature data into the grounding point detection network to obtain grounding point location information of the obstacle in the environment image; Based on the obstacle information, determining a target obstacle detection frame and a target obstacle category corresponding to the touchdown point position information; Based on a preset correspondence between an obstacle category and a target touchdown point determination method, determine a target touchdown point determination method corresponding to the target obstacle category, and determine the target touchdown point coordinates according to the target touchdown point determination method and the touchdown point position information; Based on the target grounding point coordinates and the length of the edge line of the target obstacle detection box where each target grounding point is located, grounding point ratio information is calculated, and the grounding point information is generated based on the grounding point ratio information.

2. The method according to claim 1, It is characterized in that The using the obstacle detection network included in the target detection model to perform obstacle detection on the feature data to obtain obstacle information representing the position and category of obstacles in the environment image includes: Using the convolution layer included in the obstacle detection network, convolving the feature data to obtain at least two feature maps of different sizes; By using at least two obstacle detection sub-networks included in the obstacle detection network, obstacle detection of corresponding sizes is performed on the at least two feature maps respectively to obtain obstacle information of corresponding sizes.

3. The method according to claim 1, It is characterized in that The method of using the parking space detection network included in the target detection model to perform parking space detection on the feature data to obtain parking space information indicating the position and size of parking spaces around the target vehicle includes: Using the convolution layer included in the parking space detection network, convolution is performed on the feature data to obtain at least two feature maps of different sizes; By using at least two parking space detection sub-networks included in the parking space detection network, parking space detection of corresponding sizes is performed on the at least two feature graphs respectively to obtain parking space information of corresponding sizes.

4. The method according to claim 1, It is characterized in that The method of using the parking space detection network included in the target detection model to perform parking space detection on the feature data to obtain parking space information indicating the position and size of parking spaces around the target vehicle includes: Using the parking space detection network, the characteristic data is subjected to parking space entrance detection, parking space corner point detection and parking space area detection to obtain parking space entrance position information, parking space corner point position information and parking space area information; The parking space entrance position information, the parking space corner point position information and the parking space area information are determined as the parking space information.

5. The method according to claim 1, It is characterized in that The step of obtaining an environment image captured by a camera on the target vehicle includes: Acquire original images taken by at least two cameras on the target vehicle; The original images are stitched and the viewing angle is converted to obtain a panoramic image; Determine the original image and the panoramic image as the environment image; After performing parking space detection on the feature data using the parking space detection network included in the target detection model to obtain parking space information indicating the position and size of parking spaces around the target vehicle, the method further includes: The first obstacle information, the first grounding point information, and the first parking space information detected using the original image, and the second obstacle information, the second grounding point information, and the second parking space information detected using the panoramic image are integrated to obtain integrated obstacle information, integrated grounding point information, and integrated parking space information.

6. The method according to any one of claims 1 to 5, It is characterized in that The target detection model is pre-trained according to the following steps: Acquire a sample environment image, and obtain annotated obstacle information, annotated ground point information, and annotated parking space information by annotating the sample environment image in advance; Extracting sample feature data from the sample environment image using a feature extraction network included in the initial target detection model to be trained; Using the obstacle detection network included in the initial target detection model, performing obstacle detection on the sample feature data to obtain predicted obstacle information; Using the ground point detection network included in the initial target detection model, obstacle ground point detection is performed on the sample feature data to obtain predicted ground point information of obstacles in the sample environment image; Using the parking space detection network included in the initial target detection model, perform parking space detection on the sample feature data to obtain predicted parking space information; Based on a preset first loss function, determining a first loss value representing an error between the predicted obstacle information and the marked obstacle information; Based on a preset second loss function, determining a second loss value representing an error between the predicted grounding point information and the marked grounding point information; Based on a preset third loss function, determining a third loss value representing an error between the predicted parking space information and the marked parking space information; Adjusting parameters of the initial object detection model based on the first loss value, the second loss value, and the third loss value; In response to the initial target detection model after adjusting parameters meeting a preset training end condition, the initial target detection model after adjusting parameters is determined as the target detection model.

7. The method according to claim 6, It is characterized in that The predicted grounding point information includes at least two predicted grounding point location information, and the marked grounding point information includes at least two marked grounding point location information; The determining, based on a preset second loss function, a second loss value representing an error between the predicted grounding point information and the marked grounding point information includes: Sorting the at least two predicted grounding point location information according to a preset sorting rule to obtain a predicted grounding point level sequence; Sorting the at least two marked grounding point location information according to the preset sorting rule to obtain a marked grounding point level sequence; Determining a reference predicted grounding point level and a reference annotated grounding point level based on the predicted grounding point level sequence and the annotated grounding point level sequence; The predicted grounding point level sequence, the annotated grounding point level sequence, the reference predicted grounding point level and the reference annotated grounding point level are used as parameters of the second loss function to calculate the second loss value.

8. A parking space and obstacle detection device, It is characterized in that The device comprises: An acquisition module, used to acquire an environment image taken by a camera on a target vehicle; An extraction module, used to extract feature data from the environment image using a feature extraction network included in a pre-trained target detection model; A first detection module, configured to perform obstacle detection on the feature data using an obstacle detection network included in the target detection model, and obtain obstacle information representing a position and a category of an obstacle in the environment image; a second detection module, configured to perform obstacle grounding point detection on the feature data using a grounding point detection network included in the target detection model, and obtain grounding point information of the obstacle in the environment image, wherein the grounding point information indicates a boundary position between the obstacle and the ground; A third detection module is used to perform parking space detection on the feature data using the parking space detection network included in the target detection model to obtain parking space information indicating the position and size of parking spaces around the target vehicle; The second detection module includes: An input unit, used to input the feature data into the grounding point detection network to obtain the grounding point position information of the obstacle in the environment image; A first determining unit, based on the obstacle information, determines a target obstacle detection frame and a target obstacle category corresponding to the touchdown point position information; A second determination unit determines a target grounding point determination method corresponding to the target obstacle category based on a preset correspondence between the obstacle category and the target grounding point determination method, and determines the target grounding point coordinates according to the target grounding point determination method and the grounding point position information; The generating unit calculates the grounding point ratio information based on the target grounding point coordinates and the length of the edge line of the target obstacle detection box where each target grounding point is located, and generates the grounding point information based on the grounding point ratio information.

9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor is used to execute the computer program stored in the memory, and when the computer program is executed, the parking space and obstacle detection method described in any one of claims 1 to 7 is implemented.