Parking space recognition method, device, equipment and storage medium

By acquiring target block data from drawings and utilizing classification models and geometric recognition methods, the parking space type and location are automatically identified, solving the problem of low parking space extraction efficiency in existing technologies and achieving efficient and accurate parking space extraction and confirmation.

CN115455525BActive Publication Date: 2025-12-05WANYI TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210952353.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-12-05
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

The existing technology requires multiple steps and repeated extraction and verification by multiple staff members in the parking space retrieval process, resulting in long time consumption and low efficiency.

Method used

By obtaining target block data from drawings, a pre-trained classification model is used to obtain the parking space type and first reference position, and geometric recognition is combined to obtain the geometric position of the parking space. Finally, the accuracy of the parking space is verified by comparing the classification results and the geometric recognition results.

Benefits of technology

It has improved the automation level of parking space retrieval, reduced labor costs, and increased the efficiency of parking space retrieval and confirmation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115455525B_ABST
    Figure CN115455525B_ABST
Patent Text Reader

Abstract

The application relates to a parking space recognition method, device and equipment and a storage medium. The method comprises the following steps: obtaining target block data from a drawing; obtaining a classification result based on the target block data and a pre-trained classification model; performing geometric recognition on the target block data to obtain a geometric recognition result; and obtaining a parking space recognition result based on the classification result and the geometric recognition result. The method obtains a parking space type through classification recognition, obtains a geometric position of the parking space through geometric recognition, and verifies the accuracy of the obtained parking space through mutual comparison between the classification result and the geometric recognition result. Therefore, the method accurately extracts the parking space in the drawing, greatly improves the automation degree of the parking space extraction work through computer execution of the method, reduces the labor cost, and improves the efficiency of parking space extraction and confirmation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information processing, and in particular to a parking space recognition method and device, equipment and a storage medium. BACKGROUND

[0002] In the process of architectural design, after the drawings are set, all the parking space information in the drawings is extracted for subsequent processing, including confirming whether the position and size of the parking space meet the relevant standards.

[0003] In the prior art, in order to improve the accuracy of parking space extraction, multiple layers are often set up, and repeated extraction and review are performed by multiple workers, which consumes a lot of time and is low in confirmation efficiency. SUMMARY

[0004] The present application provides a parking space recognition method, device, equipment and storage medium to solve the technical problem that multiple layers need to be set up in the parking space extraction process, and repeated extraction and review are performed by multiple workers.

[0005] In a first aspect, the embodiments of the present application provide a parking space recognition method, comprising:

[0006] obtaining target block data from the drawings, the target block data being a set of blocks meeting the preset parking space size requirements;

[0007] obtaining a classification result based on the target block data and a pre-trained classification model, the classification result including a parking space type and a first reference position of the parking space;

[0008] performing geometric recognition on the target block data to obtain a geometric recognition result, the geometric recognition result including a geometric position of the parking space;

[0009] obtaining a parking space recognition result based on the classification result and the geometric recognition result.

[0010] Optionally, the target block data is obtained from the drawings, comprising:

[0011] extracting all block data in the drawings;

[0012] grouping the block data based on a grouping identification field of the blocks to obtain grouped block data;

[0013] filtering the grouped block data based on preset parking space size data to obtain grouped block data meeting the preset parking space size as the target block data.

[0014] Optionally, the target block data includes data of at least one block.

[0015] The process of obtaining classification results based on the target block data and a pre-trained classification model includes:

[0016] Obtain the image and first reference position corresponding to each block in the target block data;

[0017] The set of images corresponding to each block is taken as the target block image, and the first reference position of each block is taken as the first reference position of the parking space.

[0018] The target block image is input into the classification model to obtain the parking space type. The dataset for training the classification model consists of pre-acquired parking space images and the parking space types corresponding to the parking spaces in the pre-acquired parking space images.

[0019] The parking space type and the first reference position of the parking space are combined to form the classification result.

[0020] Optionally, performing geometric recognition on the target block data and obtaining the geometric recognition result includes:

[0021] Extract all line type primitives from the target block data;

[0022] Based on the preset parking space geometric features, all linear primitives are filtered by geometric features to obtain parallelogram primitives.

[0023] The position of the parallelogram primitive is obtained, and the position of the parallelogram primitive is used as the geometric recognition result of the parking space. The geometric recognition result is then output.

[0024] Optionally, the classification result includes the parking space type of the N parking spaces and the first reference position corresponding to the N parking spaces;

[0025] The geometric recognition results include the geometric positions of M parking spaces;

[0026] Where M and N are both natural numbers, and the first reference position and the geometric position are the positions of the parking space on the drawing;

[0027] The step of obtaining parking space recognition results based on the classification results and the geometric recognition results includes:

[0028] For each of the M parking spaces, the following processing is performed:

[0029] The geometric position is compared sequentially with the first reference position of N parking spaces;

[0030] When the comparison result is that the geometric position is the same as the first reference position, the comparison is stopped, and parking space information of the parking space corresponding to the geometric position is added to the parking space recognition result, the parking space information including the geometric position and a parking space type of the parking space corresponding to the first reference position.

[0031] Optionally, before the parking space recognition result is acquired based on the classification result and the geometric recognition result, the method further includes:

[0032] acquiring a blueprint image corresponding to the blueprint;

[0033] performing target detection recognition on the blueprint image to acquire a target detection recognition result, the target detection recognition result including P parking spaces and second reference positions of the P parking spaces, the second reference position being a position of a parking space on the blueprint;

[0034] after the parking space recognition result is acquired based on the classification result and the geometric recognition result, the method further includes:

[0035] performing the following processing on each of the second reference positions of the P parking spaces: comparing the second reference position with a geometric position of a parking space in the parking space recognition result; and when the comparison result is that the parking space recognition result does not have a geometric position that is the same as the second reference position, adding parking space information of the parking space corresponding to the second reference position to the parking space recognition result, the parking space information including the second reference position of the parking space and a preset parking space type;

[0036] traversing the parking space recognition result to update the second reference position of a parking space in the parking space recognition result to a geometric position of the parking space.

[0037] Optionally, the updating of the second reference position of a parking space in the parking space recognition result to a geometric position of the parking space includes:

[0038] extracting all line-type primitives of a block in which the second reference position is located;

[0039] performing geometric feature filtering on the all line-type primitives based on a preset parking space geometric feature to obtain parallelogram primitives;

[0040] acquiring a position of the parallelogram primitive, and updating the position of the parallelogram primitive as the geometric position of the parking space to the parking space recognition result.

[0041] In a second aspect, an embodiment of the present application provides a parking space recognition device, including:

[0042] a data processing unit, configured to acquire target block data from a blueprint, the target block data being a set of blocks meeting a preset parking space size requirement;

[0043] The classification unit is configured to obtain a classification result based on the target block data and a pre-trained classification model, the classification result including a parking space type and a first reference position of the parking space.

[0044] The geometry recognition unit is configured to perform geometry recognition on the target block data to obtain a geometry recognition result, the geometry recognition result including a geometry position of the parking space.

[0045] The output unit is configured to obtain a parking space recognition result based on the classification result and the geometry recognition result.

[0046] Optionally, the data processing unit is further configured to obtain an image corresponding to each block in the target block data, combine the images corresponding to at least one block to obtain a combined block image, and send the combined block image to the classification unit.

[0047] The classification unit is configured to, when receiving the combined block image, crop the combined block image to obtain an image corresponding to each block in the target block data, and obtain a classification result based on the image corresponding to each block in the target block data and the classification model.

[0048] In a third aspect, an electronic device is provided, including a processor, a memory and a communication bus, wherein the processor and the memory complete mutual communication through the communication bus.

[0049] The memory is configured to store a computer program.

[0050] The processor is configured to execute the program stored in the memory to implement the parking space recognition method in the first aspect.

[0051] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the parking space recognition method in the first aspect.

[0052] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains target block data from drawings, where the target block data is a set of blocks that meet preset parking space size requirements; based on the target block data and a pre-trained classification model, it obtains classification results, including parking space type and first reference position of the parking space; it performs geometric recognition on the target block data to obtain geometric recognition results, including the geometric position of the parking space; and based on the classification results and the geometric recognition results, it obtains parking space recognition results. This method obtains the parking space type through classification recognition, obtains the geometric position of the parking space through geometric recognition, and verifies the accuracy of the obtained parking space by comparing the classification results and the geometric recognition results. Therefore, this method accurately extracts parking spaces from drawings. By executing this method by computer, the automation level of parking space extraction is greatly improved, labor costs are reduced, and the efficiency of parking space extraction and confirmation is improved. Attached Figure Description

[0053] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 This is a flowchart illustrating a parking space recognition method according to an embodiment of this application;

[0056] Figure 2 This is a flowchart illustrating the target detection method in an embodiment of this application;

[0057] Figure 3 This is a flowchart illustrating the specific implementation of the parking space recognition method in this application embodiment;

[0058] Figure 4 This is a schematic diagram of the structure of a parking space recognition device according to an embodiment of this application;

[0059] Figure 5 This is a schematic diagram of the structure of the electronic device in the embodiments of this application. Detailed Implementation

[0060] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0061] It should be noted that the terms "first", "second", and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0062] The embodiments of the present application provide a parking space recognition method, as shown in the method can comprise the following steps: Figure 1

[0063] Step 101, obtaining target block data from the drawing, the target block data being a set of blocks meeting the preset parking space size requirement;

[0064] The block is a drawing unit defined by the staff in the drawing process. A drawing can include a plurality of abstract block definitions, and the staff can further draw a plurality of specific blocks on the drawing according to the abstract block definitions.

[0065] In the drawing process, when the staff draws a specific block by calling an abstract block definition, the specific block will have a grouping identification field, which is used to identify which block definition is called to draw the specific block.

[0066] In the exemplary embodiments, obtaining the target block data from the drawing comprises: extracting all block data in the drawing; grouping the block data based on the grouping identification field of the block to obtain grouped block data; filtering the grouped block data based on the preset parking space size data to obtain grouped block data meeting the preset parking space size as the target block data.

[0067] ​It should be understood that the parking space size data can be actually required and related national standards. Since there are multiple specific blocks in a drawing, all the blocks in the drawing need to be extracted first, and then the blocks are classified according to the grouping identification field, and all the specific blocks drawn based on the same block definition are grouped.

[0068] After the grouping is completed, filtering is performed according to the parking space size data. The application provides the following filtering methods:

[0069] Method one: filter out the groups whose block size is greater than the parking space size, and keep the remaining group block data.

[0070] Method two: set a size threshold, filter out the groups whose absolute value of the difference between the block size and the parking space size is greater than the size threshold, and keep the remaining group block data.

[0071] The filtering method described in method one can speed up the filtering of the grouped block data. In actual application, when the further identification method for target block data has strong identification ability after filtering, method one can be selected to speed up the filtering. If more accurate target block data is required, method two can be selected.

[0072] Step 102, based on the target block data and the pre-trained classification model, obtaining a classification result, the classification result including a parking space type and a first reference position of the parking space.

[0073] In an exemplary embodiment, the target block data includes data of at least one block; based on the target block data and the pre-trained classification model, obtaining a classification result, including: obtaining an image corresponding to each block in the target block data and a first reference position; taking the set of images corresponding to each block as a target block image, and taking the first reference position of each block as the first reference position of the parking space; inputting the target block image into the classification model to obtain the parking space type, and the data set of the classification model is pre-obtained parking space image and the parking space type corresponding to the parking space in the pre-obtained parking space image; merging the parking space type and the first reference position of the parking space to obtain the classification result.

[0074] It should be understood that a plurality of parking space images and the parking space types corresponding to the parking space images need to be pre-obtained to form the data set of the training classification model. The parking space images can be selectively obtained according to actual needs. For example, when the drawing is a general residential community building drawing, the parking space images can include images of charging parking spaces, ordinary parking spaces and barrier-free parking spaces. When the drawing is a parking lot with special vehicle storage requirements, the parking space images can also include images of special parking spaces.

[0075] It should be understood that since the input data of the classification model is an image, each block in the target block data extracted from the drawing needs to be converted from the drawing format to the image format.

[0076] It should be understood that the classification result also needs to extract the first reference position of each block in the target block data. Since a specific block records the position of the block on the drawing, further, the model can be used to extract the linear elements in the block image (the element is the basic graphic element in the drawing), and the first reference position is calculated by combining the position of the block on the drawing. According to the needs, the position of the parking space on the drawing can also be converted into the real position. However, it should be noted that since there is a certain error when converting the block data into the block image, and the model recognition itself also has a certain error, the accuracy of the first reference position is relatively general, and can only be used to refer to the approximate position of the parking space on the drawing, and cannot be used to determine the accurate distance between the parking line of the parking space and the surrounding buildings and other objects.

[0077] Step 103, performing geometric recognition on the target block data to obtain a geometric recognition result, the geometric recognition result including the geometric position of the parking space.

[0078] In an exemplary embodiment, the geometric recognition on the target block data to obtain the geometric recognition result includes: extracting all linear elements in the target block data, performing geometric feature filtering on all linear elements based on a preset geometric feature of the parking space to obtain a parallelogram element; obtaining the position of the parallelogram element, taking the position of the parallelogram element as the geometric recognition result of the parking space, and outputting the geometric recognition result.

[0079] It should be understood that in order to further obtain the accurate position of the parking space, the target block data needs to be geometrically recognized. All linear elements in the target block are extracted and geometrically filtered to filter out the remaining elements and retain the linear elements constituting the parallelogram element. Then, the geometric position of the parking space is obtained according to the specific position of the element on the drawing recorded by the element. According to the needs, the specific position of the element on the drawing can also be converted into the real position and used as the geometric position of the parking space.

[0080] It should be understood that since the element data in the block is extracted in the geometric recognition process and needs to be processed collectively, a mapping relationship needs to be established for the extracted element data to identify that the element is specifically extracted from which block.

[0081] It should be understood that since the geometric recognition is determined by the linear elements in the block, there is no error generated when the model recognizes the elements in the image, and therefore the geometric position obtained by the geometric recognition can indicate the accurate position of the parking space.

[0082] Step 104, obtaining a parking space recognition result based on the classification result and the geometric recognition result.

[0083] In the example embodiment, the classification result includes the types of N parking spaces and first reference positions corresponding to the N parking spaces, and the geometric recognition result includes geometric positions of M parking spaces, where M and N are natural numbers, and the first reference positions and the geometric positions are positions of the parking spaces on the drawing. Based on the classification result and the geometric recognition result, the parking space recognition result is obtained by performing the following processing on each of the geometric positions of the M parking spaces: comparing the geometric position with the first reference positions of the N parking spaces one by one; when the comparison result is that the geometric position is the same as a first reference position, stopping the comparison and adding parking space information of a parking space corresponding to the geometric position to the parking space recognition result, where the parking space information includes the geometric position and the type of the parking space corresponding to the first reference position.

[0084] For ease of illustration, the classification result includes related data of N parking spaces, and the geometric recognition result includes related data of M parking spaces, where M and N are natural numbers. In general cases, the number of parking spaces output by the classification model and the number of parking spaces obtained by the geometric recognition should be the same based on the same target block data, that is, M is equal to N. If the two numbers are not equal, further processing of the classification result and the geometric recognition result is needed to determine whether there is an error recognition or a missing situation.

[0085] When obtaining the parking space recognition result, the specification takes a parking space A as an example: selecting the parking space A in the geometric recognition result, comparing the geometric position of the parking space A with the first reference positions in the classification result one by one, when a first reference position in the classification result is the same as the geometric position, considering that the parking space A in the classification result is found, and adding the geometric position of the parking space A and the type of the parking space A to the parking space recognition result.

[0086] It should be understood that, since the first reference position of the parking space A can only be used for reference and has a certain error, some settings are needed when comparing, that is, when the position indicated by the first reference position is consistent with the position indicated by the geometric position of the parking space A within a certain error range, it is considered that the first reference position is the same as the geometric position.

[0087] In actual applications, due to the drawing method of drawing multiple parking spaces in a larger block during drawing of a drawing, for example, when a parking lot in a drawing is drawn, a larger and independent block is drawn, the range of the block covers the entire parking lot, and then each parking space is further drawn in the block using a line type element. The parking spaces drawn using this method will be filtered due to size problems when obtaining the target block data, resulting in missing of some parking spaces in the obtained parking space recognition result. Therefore, the example embodiment further provides a target detection method as shown in Figure 2 which is used to detect these missing parking spaces.

[0088] Step 201, before step 104, further comprising: acquiring a blueprint image corresponding to the blueprint; performing target detection and recognition on the blueprint image to obtain a target detection and recognition result, the target detection and recognition result comprising P parking spaces and second reference positions of the P parking spaces, the second reference position being a position of a parking space on the blueprint.

[0089] It should be understood that in order to add the result of target detection to the parking space recognition result, target detection needs to be performed before the parking space recognition result is acquired, i.e., before step 104.

[0090] It should be understood that since the input data of target detection is an image, the entire blueprint needs to be converted from a blueprint format to an image format.

[0091] It should be understood that target detection will identify P parking spaces in the blueprint image, and after identifying a parking space, the position of the parking space in the blueprint will be analyzed to obtain the position of the parking space as a second reference position.

[0092] It should be understood that P is a natural number, and in normal recognition, the value of P should be greater than or equal to M and N. If P is less than M and N, it needs to be checked whether an error occurred in the recognition process.

[0093] It should be understood that due to certain errors in converting the blueprint to a blueprint image, and certain errors in the model used for target detection and recognition when identifying, the second reference position can only be used to refer to the approximate position of the parking space on the blueprint, and cannot be used to determine the precise distance between the parking line of the parking space and surrounding buildings and other objects.

[0094] Step 202, after step 104, further comprising: for each of the second reference positions in the second reference positions of the P parking spaces, performing the following processing: comparing the second reference position with the geometric position of the parking space in the parking space recognition result; when the comparison result is that there is no geometric position identical to the second reference position in the parking space recognition result, adding the parking space information of the parking space corresponding to the second reference position to the parking space recognition result, the parking space information comprising the second reference position of the parking space and a preset parking space type; traversing the parking space recognition result to update the second reference position of the parking space in the parking space recognition result to the geometric position of the parking space.

[0095] It should be understood that for each of the P parking spaces, the second reference position of the parking space is compared with each geometric position, and when the comparison result is that the geometric position is the same as the second reference position, the comparison is stopped, and at this time, it is considered that the parking space has been classified and geometrically recognized and is not missed, and the comparison of the next parking space is started. When the comparison result is that there is no geometric position in the parking space recognition result that is the same as the second reference position, it is considered that the parking space is a parking space missed by the classification and geometric recognition, and the parking space information of the second reference position corresponding parking space is added to the parking space recognition result, and the parking space information includes the second reference position of the parking space and the preset parking space type.

[0096] When the comparison of the P parking spaces is completed, it is considered that all the parking spaces in the drawing have been recognized and there is no missed parking space.

[0097] In the exemplary embodiment, the second reference position of the parking space in the parking space recognition result is updated to the geometric position of the parking space, including: extracting all line type elements of the block where the second reference position is located; performing geometric feature filtering on all line type elements based on the preset geometric features of the parking space to obtain parallelogram elements; and obtaining the position of the parallelogram element and updating the position of the parallelogram element as the geometric position of the parking space to the parking space recognition result.

[0098] It should be understood that after the comparison is completed, the parking space recognition result can be divided into two parts: one part is the parking space obtained by geometric recognition and classification recognition, and the position information of this part of the parking space is the geometric position and is accurate. The position information of the other part of the parking space is the second reference position, and therefore, geometric feature recognition needs to be performed again on these parking spaces to obtain the accurate position of this part of the parking spaces. The specific steps of the geometric feature recognition can be referred to step 103.

[0099] It should be understood that according to actual needs, the classification of this part of the parking spaces can also be selected to obtain the parking space type of this part of the parking spaces, and the obtained parking space type of this part of the parking spaces is updated to the parking space recognition result to replace the preset parking space type.

[0100] The above steps 101-104 and steps 201-202 are described below in combination with a specific embodiment as shown in Figure 3

[0101] This embodiment simultaneously uses the geometric recognition, classification recognition and target detection recognition methods to recognize and extract the parking spaces in the drawing. The steps are as follows:

[0102] Step 310, service interface input, wherein:

[0103] ​Step 311, block data input: according to the file information of the drawing, the frame information and the viewport information, all block data of the frame is extracted and processed, wherein the frame information indicates the drawing range, the viewport information can be compared to a camera lens, through the lens we can observe and display different parts of the drawing, and also can adjust the size of the drawing display through zooming.

[0104] Step 312, convert the drawing into an image file, and download the image file of the whole layer according to the file hash, wherein the file hash indicates the specific drawing image to be downloaded.

[0105] Step 320: input data processing, wherein:

[0106] Step 321, block data grouping and splitting: according to the grouping identification field signatures of the block instance, the block data is grouped and processed to obtain grouped block data.

[0107] According to the size data of all parking spaces, the grouped block data is filtered according to the threshold value, and the filtered data is taken as the target block data.

[0108] Step 322, according to the threshold filtering result, the possible parking space grouping block data is synthesized and printed, and the block image data is output.

[0109] Step 330, parking space recognition processing, wherein:

[0110] Step 331, block-based geometric recognition: according to the graphic element information in the frame, the effective frame block line type graphic element data of the frame is obtained.

[0111] The mapping relationship between the effective block and the line type graphic element is established.

[0112] According to the parking space geometric characteristics and the effective line type graphic element, the effective grouping block in the frame is filtered to obtain the effective parallelogram line type graphic element.

[0113] Step 332, according to the effective parallelogram line type graphic element mapping information, the geometric parking space classification recognition is carried out, the outline of the parking space is extracted, and the geometric position of the parking space is obtained.

[0114] Step 333, according to the output block image data, the block image data is cropped.

[0115] According to the cropping result, the block image is input into the classification model for parking space recognition, and the parking space type is output, including ordinary parking space, charging parking space and barrier-free parking space type.

[0116] Step 334, parking space target detection.

[0117] The image file of the full layer is input into the target detection model for parking space recognition, and a target detection result is output.

[0118] In step 335, a parking space contour is extracted according to the range meta data.

[0119] The line type meta position in the image is determined by the model, the contour of the parking space is extracted, and the reference position of the parking space is obtained.

[0120] In step 340, a fusion deduplication process is performed, wherein:

[0121] In step 341, a parking space data fusion deduplication process is performed according to the parking space contour data.

[0122] The classification recognition result, the target detection result, and the geometric recognition result are subjected to parking space grid storage processing. The parking space grid storage processing is a data storage method that grids the drawing and identifies the grid where the parking space is located. When the parking space data is needed, the data in the identified grid can be directly extracted, and there is no need to traverse all the grids, thereby improving the work efficiency.

[0123] According to the parking space data grid storage result and the geometric recognition result priority principle, a grid parking space data deduplication process is performed, and the three recognition results are fused to obtain a parking space recognition result. The geometric recognition result priority principle indicates that when an identification error occurs, the result of the geometric recognition is used preferentially.

[0124] In step 350, a parking space recognition result is output, wherein:

[0125] In step 351, a parking space recognition result is output, and the parking space recognition result includes a parking space bbox, parking space contour data, and a parking space type. The parking space bbox is a general drawing data storage method and can be used for positioning the parking space on the drawing. The parking space contour data includes more accurate parking space position data and can accurately obtain the specific position of the parking space.

[0126] Based on the same concept, the embodiments of the present application provide a parking space recognition device. The specific implementation of the device can be referred to the description of the method embodiments, and the repeated parts will not be described here. As shown in the Figure 4 The device mainly includes:

[0127] The data processing unit 401 is configured to obtain target block data from the drawing. The target block data is a set of blocks that meet the preset parking space size requirements.

[0128] The classification unit 402 is configured to obtain a classification result based on the target block data and a pre-trained classification model. The classification result includes a parking space type and a first reference position of the parking space.

[0129] The geometric recognition unit 403 is used to perform geometric recognition on the target block data and obtain the geometric recognition result, which includes the geometric position of the parking space.

[0130] Output unit 404 is used to obtain parking space recognition results based on classification results and geometric recognition results.

[0131] The data processing unit 401 is also used to: acquire the image corresponding to each block in the target block data, merge the images corresponding to at least one block, acquire the merged block image, and send the merged block image to the classification unit.

[0132] The classification unit 402 is used to: when receiving a merged block image, crop the merged block image to obtain the image corresponding to each block in the target block data, and obtain the classification result based on the image corresponding to each block in the target block data and the classification model.

[0133] It should be understood that when the data processing unit sends target block data to the classification unit, sending the image of each block separately would consume a significant amount of communication resources. Therefore, the data processing unit can be configured to merge and send multiple block images, and then the classification unit can crop them to restore the image of each block. Using this method can reduce the consumption of communication resources during data transmission and improve data transmission efficiency.

[0134] Based on the same concept, this application also provides an electronic device, such as... Figure 5 As shown, the electronic device mainly includes a processor 501, a memory 502, and a communication bus 503. The processor 501 and the memory 502 communicate with each other via the communication bus 503. The memory 502 stores programs that can be executed by the processor 501. The processor 501 executes the programs stored in the memory 502 to perform the following steps:

[0135] Obtain target block data from the drawings. The target block data is a set of blocks that meet the preset parking space size requirements.

[0136] Based on the target block data and a pre-trained classification model, the classification results are obtained, including the parking space type and the first reference position of the parking space.

[0137] Perform geometric recognition on the target block data and obtain the geometric recognition results, which include the geometric location of the parking space;

[0138] Based on the classification and geometric recognition results, the parking space recognition results are obtained.

[0139] The communication bus 503 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 503 can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 5 In the above electronic device, only one thick line is used to represent the communication bus 503, but it does not mean that there is only one bus or only one type of bus.

[0140] The memory 502 can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor 501.

[0141] The aforementioned processor 501 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., and can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0142] In another embodiment of the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. When the computer program runs on a computer, the computer program causes the computer to execute the parking space identification method described in the above embodiments.

[0143] In the embodiments described above, all or some of the steps can be implemented by software, hardware or firmware, or any combination thereof. When implemented by software, all or some of the steps can be implemented in the form of one or more computer programs. The computer program can be stored in any computer readable medium, and loaded into the computer for execution. The computer readable medium includes: a computer storage medium and a computer communication medium. The computer storage medium includes: volatile memory and non-volatile memory. The computer storage medium includes: an electric medium, a magnetic medium, an optical medium, and a solid medium. The computer communication medium includes: computer communication networks and computer networks. The computer program can be loaded into many different computers and computers networks to implement the embodiments described in the present application.

[0144] It should be noted that the terms "first" and "second" and the like in this text are used only to distinguish one entity or action from another, and do not necessarily require or imply these entities or actions have any such actual relationship or order. Also, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

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

Claims

1. A parking space recognition method characterized by comprising: The method comprises the following steps: obtaining target block data from a drawing, wherein the target block data is a set of blocks meeting preset parking space size requirements; obtaining a classification result based on the target block data and a pre-trained classification model, wherein the classification result comprises a parking space type and a first reference position of a parking space; performing geometric recognition on the target block data to obtain a geometric recognition result, wherein the geometric recognition result comprises a geometric position of the parking space; obtaining a parking space recognition result based on the classification result and the geometric recognition result; wherein the classification result comprises a parking space type of N parking spaces and a first reference position corresponding to the N parking spaces; the geometric recognition result comprises a geometric position of M parking spaces; wherein M and N are natural numbers, and the first reference position and the geometric position are positions of the parking spaces on the drawing; obtaining a parking space recognition result based on the classification result and the geometric recognition result comprises: performing the following processing on each geometric position in the geometric positions of the M parking spaces: comparing the geometric position with the first reference positions of the N parking spaces one by one; when the comparison result is that the geometric position is the same as the first reference position, stopping the comparison and adding parking space information of the parking space corresponding to the geometric position to the parking space recognition result, wherein the parking space information comprises the geometric position and the parking space type of the parking space corresponding to the first reference position.

2. The method of claim 1, wherein, The method comprises the following steps: extracting all block data in the drawing; grouping the block data based on a grouping identification field of the blocks to obtain grouped block data; filtering the grouped block data based on preset parking space size data to obtain grouped block data meeting the preset parking space size as target block data.

3. The method of claim 1, wherein, The target block data comprises data of at least one block; obtaining a classification result based on the target block data and a pre-trained classification model comprises: obtaining an image corresponding to each block in the target block data and a first reference position; taking a set of images corresponding to each block as target block images and taking the first reference position of each block as a first reference position of a parking space; inputting the target block images into the classification model to obtain a parking space type, wherein a data set of the classification model is pre-obtained parking space images and a parking space type corresponding to a parking space in the pre-obtained parking space images; combining the parking space type and the first reference position of the parking space as the classification result.

4. The method of claim 1, wherein, The method comprises the following steps: extracting all line-type primitives in the target block data; filtering geometric features of all line-type primitives based on preset parking space geometric features to obtain parallelogram primitives; obtaining positions of the parallelogram primitives, taking the positions of the parallelogram primitives as geometric recognition results of the parking spaces, and outputting the geometric recognition results.

5. The method of claim 1, wherein, The method further comprises the following steps before obtaining a parking space recognition result based on the classification result and the geometric recognition result: obtaining a drawing image corresponding to the drawing; The target detection and recognition is performed on the drawing image to obtain a target detection and recognition result, the target detection and recognition result including P parking spaces and second reference positions of the P parking spaces, the second reference position being a position of a parking space on the drawing; After the parking space recognition result is obtained based on the classification result and the geometric recognition result, the method further includes: For each of the second reference positions of the P parking spaces, the following processing is performed: comparing the second reference position with a geometric position of a parking space in the parking space recognition result; when the comparison result is that there is no geometric position same as the second reference position in the parking space recognition result, adding parking space information of a parking space corresponding to the second reference position to the parking space recognition result, the parking space information including the second reference position of the parking space and a preset parking space type; The second reference position of a parking space in the parking space recognition result is updated to the geometric position of the parking space by traversing the parking space recognition result.

6. The method of claim 5, wherein, The second reference position of a parking space in the parking space recognition result is updated to the geometric position of the parking space, including: all linear graphic elements of the block in which the second reference position is located are extracted; geometric feature filtering is performed on the all linear graphic elements based on a preset parking space geometric feature to obtain a parallelogram graphic element; a position of the parallelogram graphic element is obtained, and the position of the parallelogram graphic element is taken as the geometric position of the parking space and is updated to the parking space recognition result.

7. A parking space recognition device, characterized by comprising: including: a data processing unit configured to obtain target block data from a drawing, the target block data being a set of blocks meeting preset parking space size requirements; a classification unit configured to obtain a classification result based on the target block data and a pre-trained classification model, the classification result including a parking space type and a first reference position of a parking space; a geometric recognition unit configured to perform geometric recognition on the target block data to obtain a geometric recognition result, the geometric recognition result including a geometric position of a parking space; an output unit configured to obtain a parking space recognition result based on the classification result and the geometric recognition result; The classification result includes a parking space type of N parking spaces and first reference positions corresponding to the N parking spaces. The geometric recognition result includes geometric positions of M parking spaces. M and N are both natural numbers, and the first reference position and the geometric position are positions of a parking space on a drawing. The parking space recognition result is obtained based on the classification result and the geometric recognition result, including: For each of the geometric positions of the M parking spaces, the following processing is performed: The geometric position is compared with the first reference positions of the N parking spaces in turn; when the comparison result is that the geometric position is same as the first reference position, the comparison is stopped, parking space information of a parking space corresponding to the geometric position is added to the parking space recognition result, and the parking space information includes the geometric position and the parking space type of the parking space corresponding to the first reference position.

8. The parking space recognition apparatus according to claim 7, characterized by The data processing unit is further configured to obtain an image corresponding to each block in the target block data, to merge images corresponding to at least one block to obtain a merged block image, and to send the merged block image to the classification unit; The classification unit is configured to, after receiving the merged block image, crop the merged block image to obtain an image corresponding to each block in the target block data, and obtain a classification result based on the image corresponding to each block in the target block data and the classification model.

9. An electronic device, comprising: Comprise: A processor, a memory and a communication bus, wherein the processor and the memory complete mutual communication through the communication bus; The memory is configured to store a computer program; The processor is configured to execute the program stored in the memory to implement the parking space identification method in any one of claims 1-6.

10. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the parking space identification method in any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for identifying object in engineering drawing, electronic equipment and storage medium

    CN114283186A