Image processing method and device, electronic equipment and readable storage medium
By using the pre-trained parking space recognition model to generate heat maps for parking space detection and category detection, it solves the problems of being unable to determine the parking space category and consuming large computing power in the existing technology, and achieves fast and effective parking space detection and classification. The amount of information increases.
Patent Information
- Application Number
- CN202310086797.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-01
- Publication Date
- 2024-08-23
AI Technical Summary
The existing technology cannot determine the type of parking space in parking space detection, resulting in a small amount of information, and the deep learning model consumes a lot of computing power, has low efficiency, and has limited applicable scenarios.
By obtaining the target image and using a pre-trained parking space recognition model, a center point heat map and a parking space type heat map are generated to perform parking space detection and category detection, avoiding excessive computing power consumption and scene constraints, and increasing the amount of parking space information.
It achieves fast and effective parking space detection, increases the amount of effective information generated during the parking space detection process, and avoids the problems of excessive computing power consumption and limited scenarios.
Smart Images

Figure CN118537831A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image processing method, device, electronic device and readable storage medium. Background Art
[0002] At present, with the development of computer technology, related technologies have applied parking space detection to various scenarios. For example, parking space detection can be applied to scenarios such as parking assistance or automatic driving.
[0003] In the related art, the parking space detection can be realized by deep learning or extracting the boundary information of the parking space. However, the parking space detection method of the related art cannot determine the type of the parking space, resulting in less information about the parking space. Summary of the invention
[0004] In view of this, embodiments of the present application provide an image processing method, device, electronic device, and readable storage medium to quickly and effectively detect parking spaces and increase the amount of effective information about parking spaces.
[0005] In a first aspect, an image processing method is provided, the method comprising:
[0006] Get the target image.
[0007] According to the target image and a pre-trained parking space recognition model, a center point heat map of the target image and at least one parking space type heat map are determined.
[0008] Parking space detection is performed on the target image according to the center point heat map to determine a parking space detection result.
[0009] The target image is subjected to category detection according to each of the parking space type heat maps to determine the target category corresponding to the target image.
[0010] In some embodiments, the parking space type corresponding to the parking space type heat map includes one or more of a horizontal parking space, a vertical parking space, and a diagonal parking space.
[0011] In some embodiments, the method further comprises:
[0012] According to the target image and a pre-trained parking space recognition model, at least one parking space status heat map corresponding to the target image is determined, and the parking space status corresponding to the parking space status heat map includes one or more of a parking space idle state, a parking space occupied state and a parking space disabled state.
[0013] In response to detecting that the target image includes a parking space, a target state corresponding to the target image is determined according to each of the parking space state heat maps.
[0014] In some embodiments, performing parking space detection on the target image according to the center point heat map and determining a parking space detection result includes:
[0015] At least one key point heat map corresponding to the target image is determined according to the target image and a pre-trained parking space recognition model, wherein key points corresponding to the key point heat map include points corresponding to at least one corner of a parking space.
[0016] According to each of the key point heat maps, the confidence level corresponding to each key point is determined.
[0017] According to the central point heat map and the confidence corresponding to each key point, parking space detection is performed on the target image to determine a parking space detection result.
[0018] In some embodiments, the method further comprises:
[0019] According to the target image and a pre-trained parking space recognition model, an offset of each key point corresponding to the target image is determined.
[0020] The position coordinates of each key point are determined according to the center point heat map and the offset of each key point.
[0021] In some embodiments, the parking space recognition model includes at least an encoder layer, a decoder layer, and a parking space detection layer.
[0022] The step of determining the center point heat map and at least one parking space type heat map of the target image according to the target image and the pre-trained parking space recognition model comprises:
[0023] The target image is preprocessed according to the encoder layer and the decoder layer to determine an intermediate image corresponding to the target image.
[0024] The center point heat map and each parking space type heat map are determined according to the intermediate image and the parking space detection layer.
[0025] In some embodiments, acquiring the target image includes:
[0026] Gets a collection of panoramic view images.
[0027] The images in the panoramic view image set are stitched together to generate the target image.
[0028] In a second aspect, an image processing device is provided, the device comprising:
[0029] The target image acquisition module is configured to execute acquisition of the target image.
[0030] The parking space recognition module is configured to determine a center point heat map and at least one parking space type heat map of the target image based on the target image and a pre-trained parking space recognition model.
[0031] The parking space detection module is configured to perform parking space detection on the target image according to the center point heat map and determine a parking space detection result.
[0032] The parking space category determination module is configured to perform category detection on the target image according to each of the parking space type heat maps to determine the target category corresponding to the target image.
[0033] In some embodiments, the parking space type corresponding to the parking space type heat map includes one or more of a horizontal parking space, a vertical parking space, and a diagonal parking space.
[0034] In some embodiments, the apparatus further comprises:
[0035] The parking space status heat map determination module is configured to execute, based on the target image and a pre-trained parking space recognition model, to determine at least one parking space status heat map corresponding to the target image, wherein the parking space status corresponding to the parking space status heat map includes one or more of a parking space idle state, a parking space occupied state, and a parking space disabled state.
[0036] The target state determination module is configured to execute, in response to detecting that the target image includes a parking space, determining the target state corresponding to the target image according to each of the parking space state heat maps.
[0037] In some embodiments, the parking space detection module is specifically configured to perform:
[0038] At least one key point heat map corresponding to the target image is determined according to the target image and a pre-trained parking space recognition model, wherein key points corresponding to the key point heat map include points corresponding to at least one corner of a parking space.
[0039] According to each of the key point heat maps, the confidence level corresponding to each key point is determined.
[0040] According to the central point heat map and the confidence corresponding to each key point, parking space detection is performed on the target image to determine a parking space detection result.
[0041] In some embodiments, the apparatus further comprises:
[0042] The offset determination module is configured to determine the offset of each key point corresponding to the target image based on the target image and a pre-trained parking space recognition model.
[0043] The coordinate determination module is configured to determine the position coordinates of each key point based on the center point heat map and the offset of each key point.
[0044] In some embodiments, the parking space recognition model includes at least an encoder layer, a decoder layer, and a parking space detection layer.
[0045] The parking space recognition module is specifically configured to execute:
[0046] The target image is preprocessed according to the encoder layer and the decoder layer to determine an intermediate image corresponding to the target image.
[0047] The center point heat map and each parking space type heat map are determined according to the intermediate image and the parking space detection layer.
[0048] In some embodiments, the target image acquisition module is specifically configured to execute:
[0049] Gets a collection of panoramic view images.
[0050] The images in the panoramic view image set are stitched together to generate the target image.
[0051] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in the first aspect.
[0052] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in the first aspect is implemented.
[0053] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the method described in the first aspect.
[0054] In an embodiment of the present application, a center point heat map and at least one parking space type heat map of the target image can be determined through a target image and a pre-trained parking space recognition model, and a parking space detection result and a target category can be determined based on the center point heat map and at least one parking space type heat map. Since the embodiment of the present application performs parking space detection by means of a heat map, the embodiment of the present application can avoid the problems of excessive computing power consumption, scene limitation, and less parking space information, and achieves rapid and effective detection of parking spaces while increasing the amount of effective information generated during the parking space detection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The above and other purposes, features and advantages of the embodiments of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0056] Figure 1 A schematic diagram of the flow of an image processing method according to an embodiment of the present application;
[0057] Figure 2 A flowchart of an image processing method according to an embodiment of the present application;
[0058] Figure 3 A schematic diagram of a flow chart of another image processing method according to an embodiment of the present application;
[0059] Figure 4 A schematic diagram of parking space types according to an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a flow chart of another image processing method according to an embodiment of the present application;
[0061] Figure 6 A flowchart of another image processing method according to an embodiment of the present application;
[0062] Figure 7 A schematic diagram of the key points of an embodiment of the present application;
[0063] Figure 8 A schematic diagram of a flow chart of another image processing method according to an embodiment of the present application;
[0064] Fig. 9 A schematic diagram of a flow chart of another image processing method according to an embodiment of the present application;
[0065] Fig.10 A schematic diagram of a flow chart of another image processing method according to an embodiment of the present application;
[0066] Fig.11 A schematic diagram of the structure of an image processing device according to an embodiment of the present application;
[0067] Fig.12 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0068] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.
[0069] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0070] Unless the context clearly requires otherwise, words such as “include”, “including” and the like in the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as meaning “including but not limited to”.
[0071] In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more. In addition, this application authorizes the acquisition, collection, storage, use, processing, transmission, provision and presentation of data on the premise of complying with the provisions of relevant laws and regulations, not infringing on the privacy of others and not violating public order and good morals.
[0072] At present, relevant technologies have applied parking space detection to a variety of scenarios. For example, parking space detection can be applied to scenarios such as parking assistance or autonomous driving. Vehicles with parking assistance or autonomous driving functions can capture images of the vehicle's surroundings through cameras and perform parking space detection based on the images.
[0073] In the related art, after the vehicle acquires an image of the surrounding environment, the parking space can be detected by deep learning or by extracting the boundary information of the parking space. Among them, if the parking space is detected by deep learning, the related art cannot determine the type of parking space on the one hand, and on the other hand, the deep learning model consumes a lot of computing power, which increases the time required for parking space detection, and further leads to low efficiency of parking space detection. If the parking space is detected by extracting the boundary information of the parking space, the related art cannot determine the type of parking space on the one hand, and on the other hand, the method of extracting the boundary information of the parking space cannot be applied to scenes such as blurred parking space lines and severe wear.
[0074] Therefore, the parking space detection methods in related technologies have problems such as the inability to determine the type of parking space, high computing power consumption, and limited usage scenarios. These problems will lead to less information about parking spaces, lower efficiency of parking space detection, and limited usage scenarios of parking space detection. Therefore, how to increase the amount of information about parking spaces while detecting parking spaces quickly and effectively is an issue that needs to be solved urgently.
[0075] In order to solve the above problems, the embodiment of the present application provides an image processing method to quickly and effectively detect parking spaces and increase the amount of effective information about parking spaces. The method can be applied to electronic devices, which can be terminals or servers. The terminals can be smart phones, tablet computers, personal computers (PCs), or control terminals installed in vehicles, etc. The servers can be single servers, server clusters configured in a distributed manner, or cloud servers.
[0076] like Figure 1 As shown, after acquiring the target image 11, the electronic device 12 can determine the center point heat map and at least one parking space type heat map of the target image 11 according to the image processing method of the embodiment of the present application. Furthermore, the electronic device 12 can perform parking space detection on the target image 11 according to the center point heat map to determine the parking space detection result 13. At the same time, the electronic device 12 can also perform category detection on the target image 11 according to each parking space type heat map to determine the target category 14 corresponding to the target image 11.
[0077] In this process, on the one hand, the embodiment of the present application can detect whether there is a parking space in the target image 11 by determining the center point heat map, thereby avoiding the problem of excessive computing power consumption caused by the deep learning model and the scene limitation problem caused by the boundary information detection. On the other hand, the embodiment of the present application can set one or more channels for identifying different parking space categories in the parking space recognition model, so that the parking space recognition model can determine the parking space type heat map under each parking space category according to the target image 11, and perform category detection on the target image 11 according to each parking space type heat map to determine the target category 14 corresponding to the target image 11. The detection result for the target image adds the information of the parking space category, that is, the amount of information about the parking space is increased. It should be noted that the process of the electronic device 12 determining the parking space detection result 13 and the process of determining the target category 14 can be performed simultaneously, or they can be performed in a certain order.
[0078] Therefore, in the embodiment of the present application, the center point heat map and at least one parking space type heat map of the target image 11 can be determined through the target image 11 and the pre-trained parking space recognition model, and the parking space detection result 13 and the target category 14 can be determined according to the center point heat map and the at least one parking space type heat map. Since the embodiment of the present application performs parking space detection by means of heat maps, the embodiment of the present application can avoid the problems of excessive computing power consumption, scene limitation, and less parking space information, and realizes rapid and effective detection of parking spaces while increasing the amount of effective information generated during the parking space detection process.
[0079] The following will describe in detail an image processing method provided by an embodiment of the present application in combination with a specific implementation manner. Figure 2 As shown, the specific steps are as follows:
[0080] In step S110, a target image is acquired.
[0081] Among them, the target image can be an image of a specific area. For example, the target image can be an image of the rear area of the vehicle taken by a rear camera of the vehicle, the target image can also be an image of the front area of the vehicle taken by a driving recorder in the vehicle, or the target image can also be an image taken by a fixed camera on the road.
[0082] In addition, the target image may also be a panoramic image obtained by stitching together multiple images.
[0083] In an optional implementation, the above step S110 may include the following steps:
[0084] In step S111 , a panoramic view image set is acquired.
[0085] Among them, the panoramic view image set may include images taken from multiple different perspectives. For example, the panoramic view image set may include images of the rear area of the vehicle taken by a rear camera of the vehicle, images of the front area of the vehicle taken by a driving recorder in the vehicle, and images taken by other cameras in the vehicle.
[0086] In step S112, each image in the panoramic view image set is stitched to generate a target image.
[0087] Among them, the embodiment of the present application can stitch each image in the panoramic view image set in a predetermined order to obtain a target image. Specifically, the predetermined order in the embodiment of the present application can be determined by each camera that shoots the image. For example, the image shot by camera A is image a, the image shot by camera B is image b, and the image shot by camera C is image c. If the predetermined order is camera A, camera C, and camera B, the stitching order of each image in the panoramic view image set is image a, image c, and image b.
[0088] The embodiment of the present application stitches the images in the panoramic view image set so that the target image includes the entire scene around the vehicle, thereby enabling the electronic device to obtain more environmental information, thereby more accurately detecting whether the area around the vehicle includes a parking space and the category to which the parking space belongs.
[0089] In step S120, a center point heat map of the target image and at least one parking space type heat map are determined according to the target image and a pre-trained parking space recognition model.
[0090] In an embodiment of the present application, the parking space recognition model may include at least an input layer and a parking space detection layer. The input layer may be used to receive a target image and preprocess the target image, wherein the preprocessing may include but is not limited to image stretching processing, image transformation processing, image cropping processing, and image feature extraction. The parking space detection layer may be the head in the parking space recognition model. After the input layer receives the target image, the parking space detection layer may perform parking space detection on the target image to determine a center point heat map and at least one parking space type heat map of the target image.
[0091] For example, Figure 3 As shown, after the output layer 31 receives the target image 11, the target image 11 can be input to the parking space detection layer 32. In the above process, the output layer 31 can pre-process the target image 11 so that the parking space detection layer 32 can perform parking space detection more quickly and accurately.
[0092] Furthermore, after receiving the target image, the parking space detection layer 32 can determine the center point heat map 33 of the target image 11 and at least one parking space type heat map 34 through a heat map channel. The heat map channel can be a collection of multiple channels, each of which can correspond to a type of heat map. For example, the center point heat map channel can be used to generate the center point heat map 33 of the target image 11, and the parking space type heat map channel can be used to generate each parking space type heat map 34 of the target image 11.
[0093] In an optional implementation, the parking space type corresponding to the parking space type heat map includes one or more of a horizontal parking space, a vertical parking space, and a diagonal parking space.
[0094] Among them, horizontal parking spaces are used to represent parking spaces arranged in the horizontal direction of parking spaces, vertical parking spaces are used to represent parking spaces arranged in the vertical direction of parking spaces, and oblique parking spaces are arranged in the horizontal direction of parking spaces, and the parking spaces are parallelogram-shaped parking spaces. It should be noted that the parking space types in the embodiment of the present application may also include other types of parking spaces, such as irregularly arranged parking spaces or irregularly shaped parking spaces, etc.
[0095] For example, Figure 4 As shown, the parking space type of the four parking spaces 42 on the left side of the vehicle 41 is a horizontal parking space, the parking space type of the four parking spaces 43 on the right side of the vehicle 41 is an oblique parking space, and the parking space type of the two parking spaces 44 in front of the vehicle 41 is a vertical parking space.
[0096] In practical applications, vehicles can adopt different assisted parking or automatic parking strategies for different parking space types. The embodiment of the present application can determine the parking spaces and parking space types around the vehicle through the parking space recognition model, and pass the above parking space-related information to downstream applications (for example, the downstream application can be an automatic driving program or an assisted driving program), so that the downstream application can obtain richer information, thereby effectively improving the accuracy of the vehicle's automatic driving or assisted driving.
[0097] For example, for parking space 42 (i.e. horizontal parking space) and parking space 43 (i.e. diagonal parking space), vehicle 41 can adopt an assisted parking strategy or an automatic parking strategy for reverse parking. For parking space 44 (i.e. vertical parking space), vehicle 41 can adopt an assisted parking strategy or an automatic parking strategy for side parking.
[0098] In an optional implementation, the embodiment of the present application may also determine the state of the parking space in the target image according to the parking space recognition model. Specifically, the process may include the following steps:
[0099] In step S210, at least one parking space status heat map corresponding to the target image is determined according to the target image and a pre-trained parking space recognition model.
[0100] The parking space status corresponding to the parking space status heat map includes one or more of a parking space free state, a parking space occupied state, and a parking space disabled state. Specifically, the parking space free state can be used to represent a parking space that is not parked and available, the parking space occupied state can be used to represent a parking space occupied by other vehicles, and the parking space disabled state can be used to represent a parking space that is not parked but unavailable (such as a private parking space, etc.).
[0101] In an embodiment of the present application, an additional channel can be added to the parking space recognition model to detect the status of the parking space, so that the parking space recognition model can determine the parking space status heat map in addition to the center point heat map and the parking space type heat map based on the target image.
[0102] For example, Figure 5 As shown, after the output layer 31 receives the target image 11, the target image 11 can be input to the parking space detection layer 32. In the above process, the output layer 31 can pre-process the target image 11 so that the parking space detection layer 32 can perform parking space detection more quickly and accurately.
[0103] Further, after receiving the target image, the parking space detection layer 32 can determine the center point heat map 33, at least one parking space type heat map 34 and at least one parking space status heat map 51 of the target image 11 through the heat map channel. The heat map channel can be a collection of multiple channels, each of which can correspond to a type of heat map. For example, the center point heat map channel can be used to generate the center point heat map 33 of the target image 11, the parking space type heat map channel can be used to generate each parking space type heat map 34 of the target image 11, and the parking space status heat map channel can be used to generate each parking space status heat map 51 of the target image 11.
[0104] In step S220, in response to detecting that the target image includes a parking space, a target state corresponding to the target image is determined according to a heat map of the state of each parking space.
[0105] In an embodiment of the present application, in addition to determining the center point heat map and parking space type heat map of the target image, the embodiment of the present application can also determine the parking space status heat map of the target image, so that the embodiment of the present application can judge the target state of the parking space in the target image according to the parking space status heat map. In practical applications, the vehicle can adopt different assisted parking or automatic parking strategies for different parking space types and different parking space states. The embodiment of the present application can determine the parking spaces around the vehicle, the parking space types of each parking space, and the parking space status of each parking space through the parking space recognition model, and pass the above parking space-related information to the downstream application (for example, the downstream application can be an automatic driving program or an assisted driving program), so that the downstream application can obtain richer information, thereby effectively improving the accuracy of the vehicle's automatic driving or assisted driving.
[0106] In step S130, parking space detection is performed on the target image according to the center point heat map to determine a parking space detection result.
[0107] It should be noted that there is no specific execution order between step S130 and step S140 below. That is, the embodiment of the present application may execute step S130 first and then step S140, may execute step S140 first and then step S130, or may execute step S130 and step S140 simultaneously.
[0108] In practical applications, each type of heat map can be used to detect objects of the corresponding type. For example, the center point heat map in the embodiment of the present application can be used to detect the center point of a parking space. Furthermore, if the heat map contains objects of the above corresponding types, the detected object will be represented by a target center point in the heat map. It should be noted that if an image contains multiple objects of the same type, multiple center points of the same type of objects may appear in a heat map. For example, if the target image contains multiple parking spaces, the target center points corresponding to the center points of multiple parking spaces may be included in the center point heat map corresponding to the target image.
[0109] That is to say, in an embodiment of the present application, if the center point heat map includes a target center point used to characterize the detected parking space center point, then the parking space detection result determined by the embodiment of the present application is that the target image includes the parking space center point, that is, includes the parking space.
[0110] Furthermore, the true value of each type of heat map is determined by its virtual center point. In an optional implementation, the embodiment of the present application can train the parking space recognition model based on different types of training samples. Taking the above-mentioned parking space occupancy status heat map as an example, when training the parking space occupancy status heat map channel in the parking space recognition model, if the training sample includes occupied parking spaces, then the sample is a positive sample. If there are no occupied parking spaces in the training sample, or there are no parking spaces in the training sample, then the sample is a negative sample. By training the parking space recognition model, the embodiment of the present application can effectively improve the detection accuracy of the parking space recognition model.
[0111] In an optional implementation, the embodiment of the present application may filter the results in the process of determining the parking space detection results. Specifically, Figure 6 As shown, the above step S130 may include the following steps:
[0112] In step S131, at least one key point heat map corresponding to the target image is determined according to the target image and a pre-trained parking space recognition model.
[0113] Among them, the key points corresponding to the key point heat map include points corresponding to at least one corner of the parking space. In the embodiment of the present application, each corner point of the parking space can be defined in advance, for example, Figure 7 As shown, the embodiment of the present application can define that when a vehicle is parked in a parking space in a specific manner (for example, the front of the vehicle faces the road or the front of the vehicle is in the same direction as the road), the parking space corner point corresponding to the upper left corner of the vehicle is the starting point, and four key points P0, P1, P2 and P3 are formed clockwise. In other words, the parking space corner point corresponding to the upper left corner of the vehicle is P0, the parking space corner point corresponding to the upper right corner of the vehicle is P1, the parking space corner point corresponding to the lower right corner of the vehicle is P2, and the parking space corner point corresponding to the lower left corner of the vehicle is P3.
[0114] Furthermore, in the parking space recognition model, the embodiment of the present application can construct a key point heat map channel for at least one key point, so that each key point heat map channel in the parking space recognition model can generate a key point heat map of the corresponding key point according to the target image. Among them, the key points of the embodiment of the present application may include some or all of the parking space corner points in P0, P1, P2 and P3 mentioned above. Optionally, in addition to at least one corner point of the parking space, the key points of the embodiment of the present application may also include points corresponding to other positions of the parking space (such as the center points of the parking lines, etc.).
[0115] like Figure 8 As shown, after the output layer 31 receives the target image 11, the target image 11 can be input to the parking space detection layer 32. In the above process, the output layer 31 can pre-process the target image 11 so that the parking space detection layer 32 can perform parking space detection more quickly and accurately.
[0116] Further, after receiving the target image, the parking space detection layer 32 can determine the center point heat map 33, at least one parking space type heat map 34, at least one parking space state heat map 51 and at least one key point heat map 81 of the target image 11 through the heat map channel. The heat map channel can be a collection of multiple channels, each of which can correspond to a type of heat map. For example, the center point heat map channel can be used to generate the center point heat map 33 of the target image 11, the parking space type heat map channel can be used to generate each parking space type heat map 34 of the target image 11, the parking space state heat map channel can be used to generate each parking space state heat map 51 of the target image 11, and the key point heat map channel can be used to generate each key point heat map 81 of the target image 11.
[0117] In step S132, the confidence level corresponding to each key point is determined according to the heat map of each key point.
[0118] The confidence level is used to characterize the accuracy of each key point heat map in detecting each key point. The higher the confidence level, the greater the probability that the key point heat map contains the corresponding key point, and the lower the confidence level, the smaller the probability that the key point heat map contains the corresponding key point.
[0119] In step S133, parking space detection is performed on the target image according to the central point heat map and the confidence corresponding to each key point to determine the parking space detection result.
[0120] Among them, the embodiment of the present application can screen the detected parking spaces according to the confidence corresponding to each key point, and filter out the parking spaces with lower confidence. For example, when the confidence corresponding to a key point is less than the confidence threshold, it indicates that the object corresponding to the key point is most likely not a parking space. At this time, the embodiment of the present application can filter the object corresponding to the key point to improve the accuracy of parking space detection.
[0121] In an optional implementation, the embodiment of the present application may also determine the position coordinates of each key point. Specifically, the process may include the following steps:
[0122] In step S310, the offset of each key point corresponding to the target image is determined according to the target image and the pre-trained parking space recognition model.
[0123] The offset of the key point is used to characterize the distance of the key point from the center point of the corresponding parking space in the center point heat map. Specifically, the embodiment of the present application can determine the offset of each key point through the offset channel in the parking space recognition model.
[0124] like Fig. 9 As shown, after the output layer 31 receives the target image 11, the target image 11 can be input to the parking space detection layer 32. In the above process, the output layer 31 can pre-process the target image 11 so that the parking space detection layer 32 can perform parking space detection more quickly and accurately.
[0125] Further, after receiving the target image, the parking space detection layer 32 can determine the center point heat map 33 of the target image 11, at least one parking space type heat map 34, at least one parking space state heat map 51 and at least one key point heat map 81 through the heat map channel. At the same time, the parking space detection layer 32 can also determine the offset 91 of each key point through the offset channel. Each key point heat map 81 can correspond to an offset 91, that is, the number of key point heat maps 81 is the same as the number of offsets 91.
[0126] In step S320, the position coordinates of each key point are determined according to the center point heat map and the offset of each key point.
[0127] Among them, the embodiment of the present application can calculate the position coordinates of each key point based on the position coordinates of the center point of the parking space in the center point heat map and the offset of each key point corresponding to the center point of the parking space.
[0128] Furthermore, after determining the position coordinates of each key point, the embodiment of the present application can pass each position coordinate to a downstream application (for example, the downstream application can be an autonomous driving program or an assisted driving program), so that the downstream application can determine the outline of the parking space or the coordinates of each point in the parking space based on the position coordinates, thereby effectively improving the accuracy of the vehicle's autonomous driving or assisted driving.
[0129] In step S140, category detection is performed on the target image according to the heat map of each parking space type to determine the target category corresponding to the target image.
[0130] It should be noted that there is no specific execution order between step S140 and step S130 mentioned above. That is, in the embodiment of the present application, step S130 may be executed first and then step S140, step S140 may be executed first and then step S130, or step S130 and step S140 may be executed simultaneously.
[0131] Each type of heat map can be used to detect objects of the corresponding type. For example, the horizontal parking space heat map in the embodiment of the present application can be used to detect horizontal parking spaces in the target image, the vertical parking space heat map in the embodiment of the present application can be used to detect vertical parking spaces in the target image, and the diagonal parking space heat map in the embodiment of the present application can be used to detect diagonal parking spaces in the target image. It should be noted that the embodiment of the present application can add channels to the parking space recognition model according to actual conditions to increase the number of heat maps (such as heat maps for obstacle detection), thereby increasing the amount of relevant information about parking spaces.
[0132] Furthermore, if the heat map contains the above-mentioned corresponding type of objects, the detected object will be represented by a target center point in the heat map. It should be noted that if an image contains multiple objects of the same type, multiple center points of the same type of objects may appear in a heat map. For example, if the target image contains multiple horizontal parking spaces, the target center points corresponding to the multiple horizontal parking spaces may be included in the horizontal parking space heat map corresponding to the target image.
[0133] That is to say, in an embodiment of the present application, if the parking space type heat map includes a target center point for characterizing the detected parking space type, then the target category determined in the embodiment of the present application is the category corresponding to the parking space type heat map.
[0134] Therefore, in the embodiment of the present application, the center point heat map and at least one parking space type heat map of the target image can be determined through the target image and the pre-trained parking space recognition model, and the parking space detection result and the target category can be determined based on the center point heat map and the at least one parking space type heat map. Since the embodiment of the present application performs parking space detection by means of heat maps, the embodiment of the present application can avoid the problems of excessive computing power consumption, scene restrictions, and less parking space information, and achieves rapid and effective detection of parking spaces while increasing the amount of effective information generated during the parking space detection process.
[0135] In an optional implementation, the parking space recognition model may include at least an encoder layer, a decoder layer, and a parking space detection layer.
[0136] Among them, the embodiment of the present application can perform a downsampling (dimensionality reduction) operation on the target image through an encoder, and an upsampling (dimensionality increase) operation on the target image through a decoder, thereby extracting feature information from the target image.
[0137] For example, Fig.10 As shown, after the output layer 31 receives the target image 11, the target image 11 can be input to the encoder layer 101, so that the encoder layer 101 performs a downsampling operation on the target image 11. Further, the encoder layer 101 can input the downsampling result to the decoder layer 102, so that the decoder layer 102 performs upsampling on the downsampling result to determine the intermediate image, thereby realizing feature extraction of the target image 11.
[0138] Further, the decoder layer 102 may input the intermediate image to the parking space detection layer 32. After receiving the target image, the parking space detection layer 32 may determine the center point heat map 33, at least one parking space type heat map 34, at least one parking space state heat map 51 and at least one key point heat map 81 of the target image 11 through the heat map channel. At the same time, the parking space detection layer 32 may also determine the offset 91 of each key point through the offset channel.
[0139] Specifically, the above step S120 may include the following steps:
[0140] In step S121, the target image is preprocessed according to the encoder layer and the decoder layer to determine an intermediate image corresponding to the target image.
[0141] In step S122, a center point heat map and heat maps of each parking space type are determined based on the intermediate image and the parking space detection layer.
[0142] Combination Fig.10According to the process shown, the embodiment of the present application can extract features in the target image through the encoder layer and the decoder layer, and further determine the heat maps corresponding to the target image according to the parking space detection layer. The embodiment of the present application can more accurately detect the parking spaces in the target image and more accurately classify the parking spaces in the target image through the fusion of the encoder, the decoder and the parking space detection layer, thereby obtaining a more accurate classification result.
[0143] Based on the same technical concept, the embodiment of the present application also provides an image processing device, such as Fig.11 As shown, the device comprises:
[0144] The target image acquisition module 111 is configured to acquire a target image.
[0145] The parking space recognition module 112 is configured to determine a center point heat map and at least one parking space type heat map of the target image based on the target image and a pre-trained parking space recognition model.
[0146] The parking space detection module 113 is configured to perform parking space detection on the target image according to the center point heat map and determine a parking space detection result.
[0147] The parking space category determination module 114 is configured to perform category detection on the target image according to each of the parking space type heat maps to determine the target category corresponding to the target image.
[0148] In some embodiments, the parking space type corresponding to the parking space type heat map includes one or more of a horizontal parking space, a vertical parking space, and a diagonal parking space.
[0149] In some embodiments, the apparatus further comprises:
[0150] The parking space status heat map determination module is configured to execute, based on the target image and a pre-trained parking space recognition model, to determine at least one parking space status heat map corresponding to the target image, wherein the parking space status corresponding to the parking space status heat map includes one or more of a parking space idle state, a parking space occupied state, and a parking space disabled state.
[0151] The target state determination module is configured to execute, in response to detecting that the target image includes a parking space, determining the target state corresponding to the target image according to each of the parking space state heat maps.
[0152] In some embodiments, the parking space detection module 113 is specifically configured to perform:
[0153] At least one key point heat map corresponding to the target image is determined according to the target image and a pre-trained parking space recognition model, wherein key points corresponding to the key point heat map include points corresponding to at least one corner of a parking space.
[0154] According to each of the key point heat maps, the confidence level corresponding to each key point is determined.
[0155] According to the central point heat map and the confidence corresponding to each key point, parking space detection is performed on the target image to determine a parking space detection result.
[0156] In some embodiments, the apparatus further comprises:
[0157] The offset determination module is configured to determine the offset of each key point corresponding to the target image based on the target image and a pre-trained parking space recognition model.
[0158] The coordinate determination module is configured to determine the position coordinates of each key point based on the center point heat map and the offset of each key point.
[0159] In some embodiments, the parking space recognition model includes at least an encoder layer, a decoder layer, and a parking space detection layer.
[0160] The parking space identification module 112 is specifically configured to execute:
[0161] The target image is preprocessed according to the encoder layer and the decoder layer to determine an intermediate image corresponding to the target image.
[0162] The center point heat map and each parking space type heat map are determined according to the intermediate image and the parking space detection layer.
[0163] In some embodiments, the target image acquisition module 111 is specifically configured to execute:
[0164] Gets a collection of panoramic view images.
[0165] The images in the panoramic view image set are stitched together to generate the target image.
[0166] In an embodiment of the present application, a center point heat map and at least one parking space type heat map of the target image can be determined through a target image and a pre-trained parking space recognition model, and a parking space detection result and a target category can be determined based on the center point heat map and at least one parking space type heat map. Since the embodiment of the present application performs parking space detection by means of a heat map, the embodiment of the present application can avoid the problems of excessive computing power consumption, scene limitation, and less parking space information, and achieves rapid and effective detection of parking spaces while increasing the amount of effective information generated during the parking space detection process.
[0167] Fig.12 Schematic diagram of an electronic device according to an embodiment of the present application. Fig.12 As shown, Fig.12 The electronic device shown is a general address query device, which includes a general computer hardware structure, which at least includes a processor 121 and a memory 122. The processor 121 and the memory 122 are connected via a bus 123. The memory 122 is suitable for storing instructions or programs executable by the processor 121. The processor 121 can be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 121 executes the instructions stored in the memory 122, thereby executing the method flow of the embodiment of the present application as described above to realize the processing of data and the control of other devices. The bus 123 connects the above-mentioned multiple components together, and at the same time connects the above-mentioned components to the display controller 124 and the display device and the input / output (I / O) device 125. The input / output (I / O) device 125 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output device 125 is connected to the system through an input / output (I / O) controller 126.
[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices (equipment) or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0169] The present application is described with reference to flowcharts of methods, apparatuses (devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.
[0170] These computer program instructions may be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.
[0171] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1A device that specifies functions in a process or multiple processes.
[0172] Another embodiment of the present application relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.
[0173] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by specifying relevant hardware through a program, and the program is stored in a storage medium, including several instructions for a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0174] Another embodiment of the present application relates to a computer program product, including a computer program / instruction, which can implement part or all of the above method embodiments when the computer program / instruction is executed by a processor.
[0175] That is, those skilled in the art can understand that the embodiments of the present application can specify relevant hardware (including the processor itself) through the processor executing a computer program product (computer program / instructions), thereby implementing all or part of the steps in the above-mentioned embodiment method.
[0176] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0177] The solutions described in this specification and the embodiments, if they involve the processing of personal information, will be processed on the premise of having a legal basis (for example, obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the prescribed or agreed scope. The user's refusal to process personal information other than the necessary information required for basic functions will not affect the user's use of basic functions. In addition, the solutions described in this specification and the embodiments, if they involve surveying and mapping activities, will be processed on the premise of having a legal basis, and will be regulated and managed in accordance with the provisions of surveying and mapping laws, regulations and policies.
Claims
1. An image processing method, characterized in that: The method comprises: Get the target image; Determine a center point heat map and at least one parking space type heat map of the target image according to the target image and a pre-trained parking space recognition model; Performing parking space detection on the target image according to the center point heat map to determine a parking space detection result; and The target image is subjected to category detection according to each of the parking space type heat maps to determine the target category corresponding to the target image.
2. The method according to claim 1, characterized in that The parking space types corresponding to the parking space type heat map include one or more of horizontal parking spaces, vertical parking spaces, and diagonal parking spaces.
3. The method according to claim 1, characterized in that The method further comprises: Determine, according to the target image and a pre-trained parking space recognition model, at least one parking space status heat map corresponding to the target image, wherein the parking space status corresponding to the parking space status heat map includes one or more of a parking space vacant state, a parking space occupied state, and a parking space disabled state; and In response to detecting that the target image includes a parking space, a target state corresponding to the target image is determined according to each of the parking space state heat maps.
4. The method according to claim 1, characterized in that: The performing parking space detection on the target image according to the center point heat map and determining the parking space detection result comprises: Determine, according to the target image and a pre-trained parking space recognition model, at least one key point heat map corresponding to the target image, wherein the key points corresponding to the key point heat map include points corresponding to at least one corner of the parking space; Determining the confidence level corresponding to each key point according to each of the key point heat maps; and According to the central point heat map and the confidence corresponding to each key point, parking space detection is performed on the target image to determine a parking space detection result.
5. The method according to claim 4, characterized in that The method further comprises: Determining, according to the target image and a pre-trained parking space recognition model, an offset of each key point corresponding to the target image; and The position coordinates of each key point are determined according to the center point heat map and the offset of each key point.
6. The method according to claim 1, characterized in that The parking space recognition model comprises at least an encoder layer, a decoder layer and a parking space detection layer; The step of determining the center point heat map and at least one parking space type heat map of the target image according to the target image and the pre-trained parking space recognition model comprises: Preprocessing the target image according to the encoder layer and the decoder layer to determine an intermediate image corresponding to the target image; as well as The center point heat map and each parking space type heat map are determined according to the intermediate image and the parking space detection layer.
7. The method according to claim 1, characterized in that The acquiring of the target image comprises: Acquire a panoramic view image set; and The images in the panoramic view image set are stitched together to generate the target image.
8. An image processing device, characterized in that: The device comprises: A target image acquisition module is configured to acquire a target image; a parking space recognition module configured to determine a center point heat map and at least one parking space type heat map of the target image based on the target image and a pre-trained parking space recognition model; a parking space detection module, configured to perform parking space detection on the target image according to the center point heat map; and The parking space category determination module is configured to execute, in response to detecting that the target image includes a parking space, determining a target category corresponding to the target image according to each of the parking space type heat maps.
9. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Detection method and device of parking space and direction and angle thereof, equipment and medium
CN110706509A
Method, device and apparatus for detecting parking space, storage medium and vehicle
CN110969655A
Method for determining angular point of parking space and related device
CN115346188A
Parking space detection method and apparatus, and electronic device
WO2020238284A1
Image processing method and apparatus, electronic device, storage medium, and program product
WO2022007342A1
