Parking space detection method, electronic device and storage medium
Through the detection network, the parking space is detected on the target image to obtain the detection information of the parking space, which solves the problem of inaccurate parking space area determination caused by manual marking in the existing technology, realizes automated and accurate parking space area identification, and saves money. manpower and improve monitoring efficiency.
Patent Information
- Application Number
- CN202110763931.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-06
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-07-06
AI Technical Summary
In the existing technology, the determination of parking space areas relies on manual marking, which consumes manpower and is not highly accurate. It is impossible to quickly and accurately determine whether a parking space is vacant or has illegal parking.
By obtaining the target image containing the parking area, the detection network is used to detect the parking space, and the detection information of the parking space is obtained, including detection key points, and then the area of the parking space in the target image is automatically determined.
It realizes the automatic determination of parking space areas without adding additional devices, saves manpower and improves accuracy, and solves the need for monitoring vacant parking spaces and illegal parking.
Smart Images

Figure CN113674199B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a parking space detection method, an electronic device, and a computer-readable storage medium. Background Art
[0002] As urban populations become increasingly dense and the number of motor vehicles increases dramatically, these issues have led to common social problems: difficulty finding parking, with drivers unable to locate available parking spaces nearby, and irregular parking practices, with drivers often parking in areas deemed unsuitable. Therefore, it is necessary to quickly and accurately determine parking vacancies so that drivers can be informed of available spaces and facilitate parking. Furthermore, it is necessary to automatically monitor for illegal parking.
[0003] Determining whether a parking space is vacant and whether there is illegal parking requires a well-defined parking area. The current approach to defining parking areas is to manually mark the areas at the front end. This approach is labor-intensive and inaccurate. Summary of the Invention
[0004] The present application provides a parking space detection method, an electronic device, and a computer-readable storage medium, which can automatically determine the area of a parking space.
[0005] To address the above technical issues, this application adopts a technical solution: providing a parking space detection method. The method comprises: acquiring a target image containing a parking area; detecting the target image using a detection network to obtain detection information of at least one parking space in the parking area, wherein the parking space detection information includes key detection points of the parking space; and determining the area of the at least one parking space in the target image based on the detection information of the at least one parking space.
[0006] To solve the above technical problems, another technical solution adopted in this application is: to provide an electronic device, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.
[0007] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium storing program instructions, which can implement the above method when executed.
[0008] Through the above-mentioned method, the present application can use the detection network to detect the target image, obtain detection information of the parking space, and determine the area of the parking space in the target image based on the detection information. Therefore, the present application can automatically determine the area of the parking space in the target image without adding additional equipment, which not only saves manpower but also improves the accuracy of the determined parking space area. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is a flow chart of an embodiment of the parking space detection method of the present application;
[0010] Figure 2 is a schematic diagram of a target image captured when the camera is on the same side as the parking area;
[0011] Figure 3 is a schematic diagram of a target image captured when the camera is on the opposite side of the parking area;
[0012] Figure 4 is a schematic diagram of the area of the parking space determined by the present application in the target image;
[0013] Figure 5 This is a flow chart of another embodiment of the parking space detection method of the present application;
[0014] Figure 6 yes Figure 5 Specific process diagram of S22;
[0015] Figure 7 It is a schematic diagram of the detection results of the detection network;
[0016] Figure 8 This is a schematic diagram of the key points of detection of two adjacent parking spaces under ideal conditions;
[0017] Figure 9 yes Figure 1 Specific process diagram of S13;
[0018] Figure 10 yes Figure 9 Specific process diagram of S132;
[0019] Figure 11 This is a structural diagram of an embodiment of an electronic device of the present application;
[0020] Figure 12 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically specified.
[0023] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments unless there is a conflict.
[0024] Figure 1 It is a flow chart of an embodiment of the parking space detection method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment may include:
[0025] S11: Acquire a target image including a parking area.
[0026] The parking area can be a dedicated parking lot (including outdoor roadside parking lots and indoor parking lots) or a parking area adjacent to a road (driveway or sidewalk). The target image can be acquired using cameras pre-placed in the parking area. In the target image, the parking spaces in the parking area are arranged vertically, with adjacent spaces sharing a common edge.
[0027] The following text of this application mainly uses roadside parking areas as an example. For roadside parking areas, the camera can be installed on the side of the road where the parking area is located (the camera and the parking area are on the same side), or it can be installed on the other side of the road where the parking area is located (the camera and the parking area are on opposite sides). Figure 2 This is a schematic diagram of the target image captured when the camera is on the same side as the parking area. Figure 3 This is a schematic diagram of a target image captured when the camera is on opposite sides of the parking area. M and M' extend in the vertical direction of the parking spaces, and N and N' represent the common edges of two adjacent parking spaces.
[0028] S12: Detect the target image using the detection network to obtain detection information of at least one parking space in the parking area.
[0029] The parking space detection information includes key detection points of the parking space.
[0030] It should be understood that the key points of a parking space referred to in this application are the corner points of the area within the target image where the parking space resides. The key points for parking space detection are those detected by the detection network. Generally speaking, the area within the target image where a parking space resides is rectangular, so the key points for detection are the corner points of that rectangular area.
[0031] In addition, in other embodiments, the parking space detection information may further include a detection frame of the parking space, wherein the key detection points of the parking space are located within the detection frame.
[0032] The detection network can obtain the detection information of the parking space through a top-down or bottom-up key point detection method. Take the top-down key point method as an example for explanation. The target image can be input into the detection network; the detection network is used to extract the feature map of the target image; the detection network is used to obtain the detection frame of at least one parking space in the target image; the detection network is used to obtain the detection key points in each detection frame based on the feature map. Specifically, the detection network can include a backbone network, an RPN network, and an ROIAlign layer. The target image can be first input into the backbone network to obtain the feature map (Feature maps), and then the feature map is input into the RPN network to obtain the pre-selected box (Proposals); finally, the Feature maps and Proposals are input into the ROIAlign layer to obtain the detection box and detection key points of the parking space.
[0033] S13: Determine an area of the at least one parking space in the target image based on the detection information of the at least one parking space.
[0034] Figure 4 is a schematic diagram of the area of the parking space determined by this application in the target image, Figure 4 The area includes 8 parking spaces arranged in a vertical direction.
[0035] Through the implementation of this embodiment, the present application can utilize the detection network to detect the target image, obtain detection information of the parking space, and determine the area of the parking space in the target image based on the detection information. Therefore, the present application can automatically determine the area of the parking space in the target image without adding additional equipment, which not only saves manpower but also improves the accuracy of the determined parking space area.
[0036] Since there may be false detections of key points of parking spaces, before S12, it is necessary to determine whether there is false detection information of parking spaces and to filter out the false detection information of parking spaces. The details can be as follows:
[0037] Figure 5It is a flow chart of another embodiment of the parking space detection method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 5 The process sequence shown is limited. This embodiment is a further extension of the above embodiment, and the same content will not be repeated. Figure 5 As shown, this embodiment may include:
[0038] S21: Obtain a reference straight line by fitting the detected key points of at least one parking space.
[0039] If the side of the parking area close to the lane is defined as the first side, and the side close to the sidewalk is defined as the second side, then the detection key points of the parking space can be divided into the first side key points and the second side key points. If the first side is the left side and the second side is the right side, the first side key points can include the key points of the upper left corner (upper left key point, LeftTop) and the lower left corner (lower left key point, LeftBottom) of the rectangular area, and the second side key points can include the key points of the upper right corner (upper right key point, RightTop) and the lower right corner (lower right key point, RightBottom) of the rectangular area.
[0040] A reference line can be obtained by fitting key points detected on the same side of at least one parking space. Specifically, a first reference line can be obtained by fitting key points on a first side of at least one parking space, and / or a second reference line can be obtained by fitting key points on a second side of at least one parking space. Line fitting methods include, but are not limited to, least squares methods.
[0041] S22: For each parking space, determine whether to filter out the detection information of the parking space based on the distance between the detection key point of the parking space and the reference line.
[0042] If only the first reference line is fitted, then a determination is made as to whether to filter out the parking space detection information based on the first distance from the key point on the first side of the parking space to the first reference line. The filtering condition can be that the first distance is too large. If the first distance is too large, it indicates that the parking space detection information was falsely detected, and thus is filtered out. The first distance can be the sum of the distance from the upper left key point to the first reference line and the distance from the lower left key point to the first reference line, or the average of the distances from the upper left key point to the first reference line and the lower left key point to the first reference line, etc.
[0043] If only the second reference line is fitted, then a determination is made as to whether to filter out the parking space detection information based on the second distance from the key point on the second side of the parking space to the second reference line. The filtering condition can be that the second distance is too large. Accordingly, the second distance can be the sum of the distance from the upper right key point to the second reference line and the distance from the lower right key point to the second reference line, or the average of the distances from the upper right key point to the second reference line and the distance from the lower right key point to the second reference line, etc.
[0044] If the first reference line and the second reference line are obtained by fitting, then based on the first distance from the key point on the first side of the parking space to the first reference line and the second distance from the key point on the second side of the parking space to the second reference line, it is determined whether to filter out the detection information of the parking space. Figure 6 In this case, S22 may include the following sub-steps:
[0045] S221: For each parking space, obtain a first distance from a key point on a first side of the parking space to a first reference line and a second distance from a key point on a second side of the parking space to a second reference line.
[0046] S222: If it is determined that the first distance and the second distance meet the preset requirements, the detection information of the parking space is filtered out.
[0047] The preset requirement may be that the sum of the first distance and the second distance is greater than a preset threshold, or that the average of the first distance and the second distance is greater than a preset average, etc.
[0048] The following combination Figure 7 , S221-S222 are explained in the form of an example.
[0049] like Figure 7 As shown, the key detection points of each parking space include LeftTop, LeftBottom, RightBottom, and RightTop. Using a least squares method or similar method, the LeftTop and LeftBottom points of all detected parking spaces are used to fit a first reference line A, and the RightBottom and RightTop points of all detected parking spaces are used to fit a second reference line B. The detection information of a parking space is retained only when the following conditions are met:
[0050] Dis_sum <Thres_S,
[0051] Dis_sum=Dis left +Dis right ,
[0052] Dis left=Dis(A,LeftTop,LeftBottom),
[0053] Dis right =Dis(B,RightTop,RightBottom),
[0054] Among them, Dis left Represents the sum of the distances from LeftTop and LeftBottom to line A (first distance), Dis right It represents the sum of the distances from RightBottom and RightTop to line B (the second distance), and Thres_S represents the preset threshold.
[0055] therefore, Figure 7 The C in the figure will be filtered out as the detection information of the falsely detected parking space.
[0056] In the above S13, the area of the parking space in the target image can be drawn directly based on the key detection points of the parking space obtained by the detection network.
[0057] It is understandable that, ideally, there are four key points for detecting parking spaces, namely the upper left key point, lower left key point, upper right key point and lower right key point mentioned above, and two adjacent parking spaces have two completely overlapping detection key points. Figure 8 For example, in two adjacent parking spaces, the RightBottom of the upper parking space overlaps with the RightTop of the lower parking space, as well as the LeftBottom of the upper parking space and the LeftTop of the lower parking space. However, due to factors such as detection accuracy, two adjacent parking spaces may not necessarily have two completely overlapping detection key points. This can occur in two different situations: one is that at least one of the key points of the two adjacent parking spaces is missed, and the other is that the detection key points of the two adjacent parking spaces, which should be at the intersection, do not completely overlap. This can affect the accuracy of the subsequently determined parking space area.
[0058] In order to improve the accuracy of the subsequently determined parking space area, the detection key points can be optimized / updated first, and then the parking space area in the target image can be drawn based on the optimized / updated detection key points. Figure 9 In this case, S13 may include the following sub-steps:
[0059] S131: Check whether there is a corresponding detection key point for at least one preset key point of the parking space, and determine whether the preset key point has been missed.
[0060] The preset key points can be expressed as (RightBottom, RightTop, LeftBottom, LeftTop). The process of obtaining the detection key points using the detection network can be understood as the process of obtaining the coordinates of each preset key point.
[0061] If there is no corresponding detection key point for the preset key point, that is, the coordinates of the preset key point are not detected, then the preset key point is considered to be missed; if there is a corresponding detection key point for the preset key point, that is, the coordinates of the preset key point are detected, then the preset key point is considered to be not missed.
[0062] S132: Based on the missed detection of the preset key points, update the detection key points corresponding to the preset key points.
[0063] See also Figure 10 , S132 may include the following sub-steps:
[0064] S1321: Determine the type of the preset key point.
[0065] The types of preset key points include shared key points and non-shared key points. A shared key point is a key point located at the junction of two adjacent parking spaces, that is, a key point on the common edge of two adjacent parking spaces.
[0066] The two detection key points corresponding to the shared key point at two adjacent parking spaces include a first detection key point and a second detection key point. The first detection key point is a detection key point at the intersection of one parking space, and the second detection key point is a detection key point at the intersection of the other parking space.
[0067] If the type of the preset key point is a shared key point, execute S1322; if the type of the preset key point is a non-shared key point, execute S1323.
[0068] S1322: Based on the missed detection of the preset key points, the detection key points corresponding to the preset key points are updated using the first updating method.
[0069] If none of the preset key points have corresponding first detection key points and second detection key points, the first detection key points and second detection key points corresponding to the preset key points are added using the intersection of the detection frames of two adjacent parking spaces and the reference straight line.
[0070] Specifically, the first preset point between the intersections of the detection frames of two adjacent parking spaces and the reference line can be used as the first detection key point and the second detection key point corresponding to the preset key point. The first preset point can be a midpoint or other point.
[0071] If the preset key point has a corresponding first detection key point, but does not have a corresponding second detection key point, a second detection key point corresponding to the preset key point is added using the reference line and the first detection key point.
[0072] Specifically, a point on the reference line that meets the position requirement can be used as the second detection key point corresponding to the preset key point, where the position requirement includes that the preset axis coordinates of the point be the same as the preset axis coordinates of the first detection key point. Thus, the point that meets the position requirement can be the point on the reference line that is closest to the first detection key point.
[0073] If the preset key point has a corresponding first detection key point and a second detection key point, the first detection key point and the second detection key point corresponding to the preset key point are adjusted.
[0074] Specifically, the second preset point between the first detection key point and the second detection key point before adjustment can be used as the first detection key point and the second detection key point after adjustment. The second preset point can be a midpoint or other point.
[0075] The reference line is obtained by fitting the detection key points of at least one parking space, and the detection key points used for the reference line are on the same side as the preset key points. For details, please refer to the description of the previous embodiment. The first detection key point and the second detection key point corresponding to the updated preset key point are located at the same position.
[0076] S1323: Based on the missed detection of the preset key points, the detection key points corresponding to the preset key points are updated using the second updating method.
[0077] If there is no corresponding detection key point for the preset key point, the intersection of the detection frame of the parking space where the preset key point is located and the reference line is added as the detection key point corresponding to the preset key point.
[0078] If the preset key point has a corresponding detection key point, the reference line is used to adjust the detection key point corresponding to the preset key point.
[0079] Specifically, a point on the reference line that meets the position requirement can be used as the adjusted detection key point corresponding to the preset key point, where the position requirement includes the preset axis coordinates of the point being the same as the preset axis coordinates of the detection key point before adjustment. Thus, the point that meets the position requirement can be the point on the reference line that is closest to the detection key point before adjustment.
[0080] The reference straight line is obtained by fitting using detection key points of at least one parking space.
[0081] S133: For each parking space, determine the area of the parking space in the target image using the updated detection key points of the parking space.
[0082] S1321 to S1323 are described below using an example.
[0083] Determine whether the preset key point is a shared key point;
[0084] If it is a common key point of parking space 1 and parking space 2, determine whether the corresponding first detection key point and second detection key point are missed. If both are missed, the average value of the intersection of the detection frame of parking space 1 and the reference line and the average value of the intersection of the detection frame of parking space 2 and the reference line are used as the first detection key point and the second detection key point corresponding to the preset key point. If there is a missed detection, for example, the second detection key point is missed, and the first detection key point is (x, y), then x is substituted into the reference line to obtain (x, y1), and (x, y1) is used as the adjusted first detection key point and second detection key point. If there is no missed detection, the first detection key point and the second detection key point are updated using the average value of the detected first detection key point and the second detection key point.
[0085] If it is a non-shared keypoint and belongs to parking space 3, determine whether the corresponding detection keypoint is missed. If it is missed, obtain the intersection of the detection box of parking space 3 and the reference line as the detection keypoint. If it is not missed and the detected detection keypoint is (x', y'), then substitute x' into the reference line to obtain (x', y1'), and use (x', y1') as the adjusted detection keypoint.
[0086] Figure 11 This is a schematic diagram of the structure of an embodiment of the electronic device of the present application. Figure 11 As shown, the electronic device may include a processor 31 and a memory 32 coupled to the processor 31 .
[0087] The memory 32 stores program instructions for implementing the method of any of the above embodiments; the processor 31 is used to execute the program instructions stored in the memory 32 to implement the steps of the above method embodiments. The processor 31 can also be called a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.
[0088] Figure 12 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of the present application. Figure 12 As shown, the computer-readable storage medium 40 of the embodiment of the present application stores program instructions 41, and when the program instructions 41 are executed, the method provided by the above embodiment of the present application is implemented. Among them, the program instructions 41 can form a program file and be stored in the above-mentioned computer-readable storage medium 40 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of the methods of each embodiment of the present application. The aforementioned computer-readable storage medium 40 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0090] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. The above is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A parking space detection method, characterized in that: include: Acquire a target image containing a parking area; Detecting the target image using a detection network to obtain detection information of at least one parking space in the parking area, wherein the detection information of the parking space includes detection key points of the parking space; determining, based on the detection information of the at least one parking space, an area of the at least one parking space in the target image; Wherein, determining the area of the at least one parking space in the target image based on the detection information of the at least one parking space includes: searching whether there is a corresponding detection key point for the preset key point of the at least one parking space, and determining the missed detection of the preset key point; the preset key point is four corner points of the area of the parking space in the target image; based on the missed detection of the preset key point, updating the detection key point corresponding to the preset key point; for each of the parking spaces, determining the area of the parking space in the target image using the updated detection key point of the parking space; The detection information of the parking space includes a detection frame of the parking space, the types of the preset key points include non-shared key points and / or shared key points, and the shared key points are key points located at the junction of two adjacent parking spaces; and updating the detection key points corresponding to the preset key points based on the missed detection of the preset key points includes: In response to the type of the preset key point being the non-shared key point, if the preset key point does not have a corresponding detection key point, an intersection point between the detection frame of the parking space where the preset key point is located and a reference straight line is added as the detection key point corresponding to the preset key point; and / or, In response to the type of the preset key point being the shared key point, the two detection key points corresponding to the shared key point at two adjacent parking spaces include a first detection key point and a second detection key point, and if the preset key point does not have the corresponding first detection key point and second detection key point, then using the intersection between the detection frames of the two adjacent parking spaces and the reference straight line, the first detection key point and the second detection key point corresponding to the preset key point are added; The reference straight line is obtained by fitting using detection key points of the at least one parking space.
2. The method according to claim 1, characterized in that Before determining the area of the at least one parking space in the target image based on the detection information of the at least one parking space, the method further includes: Using the detection key points of the at least one parking space to fit a reference straight line; For each of the parking spaces, it is determined whether to filter out the detection information of the parking space based on the distance between the detection key point of the parking space and the reference straight line.
3. The method according to claim 2, characterized in that The detection key points include a first side key point and a second side key point, and the step of fitting a reference straight line using the key points of the at least one parking space includes: Fitting key points on a first side of the at least one parking space to obtain a first reference straight line, and fitting key points on a second side of the at least one parking space to obtain a second reference straight line; For each of the parking spaces, judging whether to filter out the detection information of the parking space based on the distance between the detection key point of the parking space and the reference straight line includes: For each of the parking spaces, obtaining a first distance from a key point on a first side of the parking space to the first reference straight line, and obtaining a second distance from a key point on a second side of the parking space to the second reference straight line; if it is determined that the first distance and the second distance meet a preset requirement, filtering out the detection information of the parking space; The first side is a side of the parking area close to the lane, and the second side is a side close to the sidewalk.
4. The method according to claim 3, characterized in that The preset requirement is that the sum of the first distance and the second distance is greater than a preset threshold; And / or, the first side key points include an upper left key point and a lower left key point, the second side key points include an upper right key point and a lower right key point, the first distance is the sum of the distance from the upper left key point to the first reference straight line and the distance from the lower left key point to the first reference straight line, and the second distance is the sum of the distance from the upper right key point to the second reference straight line and the distance from the lower right key point to the second reference straight line.
5. The method according to claim 1, characterized in that The updating of the detection key points corresponding to the preset key points based on the missed detection of the preset key points includes: In response to the type of the preset key point being the non-shared key point, if the preset key point has a corresponding detection key point, the detection key point corresponding to the preset key point is adjusted using the reference straight line.
6. The method according to claim 1 or 5, characterized in that: The updating of the detection key points corresponding to the preset key points based on the missed detection of the preset key points includes: In response to the type of the preset key point being the shared key point, if the preset key point has a corresponding first detection key point, but does not have a corresponding second detection key point, then the reference straight line and the first detection key point are used to add the second detection key point corresponding to the preset key point; if the preset key point has a corresponding first detection key point and a corresponding second detection key point, then the first detection key point and the second detection key point corresponding to the preset key point are adjusted.
7. The method according to claim 6, characterized in that The method of adding the first detection key point and the second detection key point corresponding to the preset key point by using the intersection between the detection frames of two adjacent parking spaces and the reference straight line includes: Using first preset points between intersections of the detection frames of the two adjacent parking spaces and the reference straight line as the first detection key point and the second detection key point corresponding to the preset key point; The step of adding the second detection key point corresponding to the preset key point by using the reference straight line and the first detection key point includes: Using a point in the reference straight line that meets the position requirement as the second detection key point corresponding to the preset key point, wherein the position requirement includes that the preset axis coordinates of the point are the same as the preset axis coordinates of the first detection key point; The adjusting the first detection key point and the second detection key point corresponding to the preset key point includes: A second preset point between the first detection key point and the second detection key point before adjustment is used as the first detection key point and the second detection key point after adjustment.
8. The method according to claim 5, characterized in that The step of adjusting the detection key point corresponding to the preset key point by using the reference straight line includes: The point in the reference straight line that meets the position requirement is used as the adjusted detection key point corresponding to the preset key point, wherein the position requirement includes that the preset axis coordinates of the point are the same as the preset axis coordinates of the detection key point before adjustment.
9. The method according to claim 1, characterized in that: The detecting the target image using a detection network to obtain detection information of at least one parking space in the parking area includes: Inputting the target image into the detection network; Extracting a feature map of the target image using the detection network; Acquire a detection frame of the at least one parking space in the target image using the detection network; The detection network is used to obtain detection key points in each detection box based on the feature map.
10. An electronic device, characterized in that: The method comprises a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 9 is implemented.
