Plane drawing information identification method and device

By using pre-trained models and sliding window clipping technology, accurate outlines of architectural drawings are generated, solving the problem of insufficient accuracy in the recognition of 2D drawings and achieving efficient standardization of drawings.

CN121768028APending Publication Date: 2026-03-31CHINA RAILWAY SIYUAN SURVEY & DESIGN GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, 3D modeling of 2D drawings relies on manual recognition, which is inefficient and prone to errors. Furthermore, traditional computer recognition methods suffer from insufficient accuracy due to non-standardized layers and inconsistent styles, making it difficult to meet the needs of intelligent design.

Method used

A pre-trained target detection model is used to identify target categories, detection boxes, and key points in local coordinates. The recognition results of two-dimensional drawings are generated by sliding window cropping and tilt angle calculation. Image features are optimized by rasterization and color inversion to eliminate duplicate recognition and generate accurate vector graphic contours.

Benefits of technology

It significantly improves the accuracy and efficiency of 2D drawing recognition, solves the problems of non-standard layers and inconsistent styles, realizes standardized recognition of architectural drawings, and reduces the need for manual modification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121768028A_ABST
    Figure CN121768028A_ABST
Patent Text Reader

Abstract

The invention provides a plane drawing information identification method and device, and belongs to the technical field of underground engineering, and the method comprises the steps: inputting a to-be-detected image after preprocessing into a pre-trained target detection model, and carrying out the identification to obtain a target type, a target detection frame and a key point under local coordinates, performing fixed-size sliding window cutting on the preprocessed to-be-detected image based on the target detection frame and the key points to obtain a target detection frame range after duplicate removal; and extracting a corresponding vector graph set from the source two-dimensional vector graph, calculating an inclination angle of the target, rotating the vector graph set according to the inclination angle, calculating a minimum enclosing rectangle after rotation, taking the minimum enclosing rectangle as an accurate contour of the target, and generating an identification result of the two-dimensional drawing. According to the method, the reliability of the information extraction process is remarkably improved, accurate recognition can be carried out again after the architectural drawing is modified, a designer does not need to manually modify a changed part, and the plane drawing recognition efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method and apparatus for recognizing information from planar drawings. Background Technology

[0002] In the process of the design industry moving towards intelligent and digital transformation, strategic emerging business areas such as digital twins have generated a large demand for 3D modeling of drawings.

[0003] Currently, 3D modeling of 2D drawings relies heavily on manual recognition, which is not only inefficient but also prone to errors and omissions, making it difficult to meet the needs of business development. As a core foundation for achieving intelligent design, automatic recognition technology for 2D drawings is crucial.

[0004] However, existing drawings generally suffer from insufficient standardization, poor layer specification, inconsistent styles, and chaotic block hierarchy, resulting in unreliable traditional rule-based computer recognition methods and seriously hindering the progress of subsequent business. Against this backdrop, leveraging artificial intelligence technology to empower design work has become a key approach to improving design quality and efficiency. Summary of the Invention

[0005] This invention provides a method and apparatus for recognizing information in two-dimensional drawings, which overcomes the shortcomings of the prior art and improves the efficiency and accuracy of two-dimensional drawing recognition.

[0006] In a first aspect, the present invention provides a method for identifying information in a two-dimensional drawing, comprising: The preprocessed image to be detected is input into a pre-trained target detection model to identify the target category, target detection box and key points in local coordinates; Based on the target detection box and key points, a fixed-size sliding window is cropped from the preprocessed image to be detected to obtain the deduplicated target detection box range. Based on the deduplicated target detection bounding box range, extract the corresponding vector graphic set from the source 2D vector map and calculate the target's tilt angle; The vector graphic set is rotated according to the tilt angle, and the smallest bounding rectangle after rotation is calculated as the precise outline of the target, generating the recognition result of the two-dimensional drawing.

[0007] Furthermore, the input two-dimensional vector paper is rasterized by sampling at a fixed ratio to generate a rasterized image, so as to unify the drawing format and retain geometric information; A fixed-size sliding window is cropped on the rasterized image to extract multiple local images to be detected, in order to adapt to the input requirements of the subsequent target detection model; The local image to be detected is inverted and resized to optimize image features and match the input specifications of the target detection model, resulting in a preprocessed image to be detected.

[0008] Furthermore, based on the cropping position information of the sliding window, an inverse coordinate transformation is performed on the target detection box and key points to obtain the global coordinates of the preprocessed image to be detected in the original two-dimensional vector paper; The target detection boxes in global coordinates are judged to overlap. When the overlapping area of ​​two detection boxes exceeds the proportion of the smaller box area, the detection box with higher confidence is retained to eliminate duplicate recognition and obtain the range of the target detection boxes after deduplication.

[0009] Furthermore, based on the deduplicated target detection bounding box range, the corresponding vector graphic set is extracted from the source 2D vector image. Based on the aforementioned vector graphic set and its key points, the quadrant method is used to calculate the target's tilt angle.

[0010] Furthermore, the target category, key points, tilt angle, and precise contour are grouped and associated to generate the recognition result of the two-dimensional drawing.

[0011] Furthermore, based on the starting position of the sliding window in the rasterized image, an affine transformation matrix from local coordinates to global coordinates is calculated and applied to the coordinate transformation of the target detection box and key points.

[0012] Furthermore, the minimum bounding rectangle calculation step includes: extracting the contour of the rotated vector graphic set using a convex hull algorithm or a rotating caliper algorithm.

[0013] In a second aspect, the present invention also provides a device for recognizing planar drawing information, comprising: a detection and extraction module, used to input the preprocessed image to be detected into a pre-trained target detection model, and to identify and obtain the target category, target detection box and key points under local coordinates; The deduplication module is used to perform fixed-size sliding window cropping on the preprocessed image to be detected based on the target detection box and key points to obtain the range of the target detection box after deduplication. The tilt angle calculation module is used to extract the corresponding vector graphic set from the source two-dimensional vector map and calculate the tilt angle of the target based on the range of the deduplicated target detection box. The recognition module is used to rotate the vector graphic set according to the tilt angle, calculate the smallest bounding rectangle after rotation as the precise outline of the target, and generate the recognition result of the two-dimensional drawing.

[0014] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method for recognizing planar drawing information as described above.

[0015] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for recognizing planar drawing information as described above.

[0016] The method and apparatus for recognizing planar drawing information provided by this invention have the following advantages compared to the prior art: The preprocessed image to be detected is input into a pre-trained target detection model to identify the target category, target detection box, and key points in local coordinates. Based on the target detection box and key points, a fixed-size sliding window is cropped on the preprocessed image to obtain the deduplicated target detection box range. According to the deduplicated target detection box range, the corresponding vector graphic set is extracted from the source 2D vector image, and the tilt angle of the target is calculated. The vector graphic set is rotated according to the tilt angle, and the minimum bounding rectangle after rotation is calculated as the precise contour of the target, generating the recognition result of the 2D drawing. This invention applies image recognition technology to the recognition process of 2D drawing information, effectively solving the problems of insufficient accuracy and missing information caused by non-standardized layers and inconsistent styles in 2D drawing recognition technology. It has extremely low requirements for the standardization of architectural drawings and significantly improves the reliability of the information extraction process. After modifications are made to the architectural drawings, they can be accurately recognized again without the need for designers to manually modify the changed parts, thus improving the efficiency of 2D drawing recognition. This invention is novel in concept, reasonable in design, and simple in operation, and can be quickly industrialized for mass production. This invention can be widely applied to various fields such as civil buildings and industrial buildings with information recognition needs. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating an optional method for recognizing planar drawing information provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of an optional process for obtaining the range of a target detection box after deduplication, provided by an embodiment of the present invention. Figure 3This is a schematic diagram of an optional process for extracting the corresponding vector graphic set and calculating the tilt angle of the target, provided by an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an optional electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0020] It should be noted that in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly, for example, as a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.

[0021] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more.

[0022] The following is combined Figures 1-4 This invention describes a method and apparatus for identifying planar drawing information provided in embodiments of the present invention.

[0023] Figure 1 This is a flowchart illustrating the method for recognizing planar drawing information provided by the present invention, as shown below. Figure 1 As shown, including but not limited to the following steps: S102, input the preprocessed image to be detected into the pre-trained target detection model to identify and obtain the target category, target detection box and key points in local coordinates.

[0024] In this embodiment, a pre-trained object detection model is obtained, and the pre-processed image to be detected is input into the pre-trained object detection model. This object detection model can be a deep learning-based convolutional neural network (such as Faster R-CNN, YOLO, etc.) or a traditional feature-based machine vision object detection algorithm. In this example, the object detection model selected is YOLO11. The model will output the object category, object detection box, and key points in local coordinates. The object category indicates which type of object the detected object belongs to (e.g., toilet, sink, bathtub, etc.). The object detection box represents the position and range of the object in the local image, usually represented by the coordinates of a rectangle (e.g., the coordinates of the top left and bottom right corners). Key points represent the coordinates of representative points on the object, such as the corners or center of the object. In this example, the key point selected is the water inlet of the sanitary fixture.

[0025] S104, based on the target detection box and key points, perform fixed-size sliding window cropping on the preprocessed image to be detected to obtain the deduplicated target detection box range.

[0026] In this embodiment, the overlap area of ​​each pair of target detection boxes is calculated based on the position of the sliding window in the rasterized image and the cropping information. A geometric algorithm can be used to calculate the overlap area of ​​two rectangular detection boxes, such as calculating the area of ​​the intersection region of two rectangles. For each pair of target detection boxes, the overlap area is divided by the area of ​​the smaller detection box to obtain the overlap ratio. When the overlap ratio exceeds a preset ratio, the two detection boxes are considered to overlap.

[0027] When overlapping bounding boxes are detected, deduplication is performed according to certain rules. For example, one bounding box can be retained, such as the one with higher confidence (if the object detection model outputs confidence information), or selection can be based on other prior information (such as the size and position of the bounding box). This example uses the overlap area method to retain bounding boxes with higher confidence.

[0028] S106, Based on the deduplicated target detection box range, extract the corresponding vector graphic set from the source 2D vector map and calculate the target's tilt angle.

[0029] In this embodiment, the vector graphics set is first extracted. Based on the range of each target detection box in the source 2D vector graphics, a spatial search algorithm is used to find all vector graphics elements located within that range. In this example, for a rectangular target, the angle between the major axis of the rectangle and the coordinate axis can be calculated based on the positional distribution of its four corner points, serving as the tilt angle.

[0030] S108, rotate the vector graphic set according to the tilt angle, and calculate the smallest bounding rectangle after rotation as the precise outline of the target to generate the recognition result of the two-dimensional drawing.

[0031] In this embodiment, considering the tilt angle obtained in S106, a rotation algorithm is used to rotate the elements in the vector graphic set to the corresponding tilt angle. Then, the minimum bounding rectangle of the rotated vector graphic set is calculated as the precise contour of the target. Finally, a recognition result of a two-dimensional drawing is generated based on the obtained target category, target tilt angle, and target contour.

[0032] Optionally, the minimum bounding rectangle calculation step includes: extracting the contour of the rotated vector graphic set using a convex hull algorithm or a rotating caliper algorithm.

[0033] In this embodiment, the minimum bounding rectangle can be calculated using the convex hull algorithm or the rotating caliper algorithm. This rectangle will serve as the precise outline of the target, enabling a more accurate description of the target's shape and position.

[0034] Based on the content disclosed in the above embodiments, in an optional planar information recognition method provided by this invention, the preprocessed image to be detected may include the following steps: The input 2D vector paper is rasterized by sampling at a fixed ratio to generate a rasterized image, so as to unify the paper format and preserve geometric information; A fixed-size sliding window is cropped on the rasterized image to extract multiple local images to be detected, in order to adapt to the input requirements of the subsequent target detection model; The local image to be detected is inverted and resized to optimize image features and match the input specifications of the target detection model, resulting in a preprocessed image to be detected.

[0035] Optionally, the rasterization step may include decomposing complex graphic elements in a two-dimensional vector paper into basic graphic elements, which may include line segments, arcs, circles, and ellipses.

[0036] Before performing fixed-ratio sampling, complex graphic elements in the 2D vector paper are decomposed into basic graphic elements, including line segments, arcs, circles, and ellipses. For example, for a rectangle composed of multiple line segments, the system breaks it down into four independent line segments; for a "door" tile, it is expanded into the line segments and arcs that make up the door, rather than being rasterized as a whole, thus ensuring that the rasterized image accurately reflects the original geometric information and avoiding information loss.

[0037] Optionally, the color inversion process may include: converting the grayscale value P of each pixel in the image to 255-P. Performing grayscale value inversion on each pixel in the grayscale image: if the original pixel value is P, then the inverted value is 255-P. For example, a pixel with a grayscale value of 50 becomes 205 after color inversion, thereby unifying the bright and dark backgrounds and adapting to the contrast preference of the YOLO11 model for the input image.

[0038] Optionally, the target detection model is YOLO11, and the identified key points include the water inlets of sanitary fixtures. Using the YOLO11 model, while identifying targets such as "toilet," "sink," and "bathtub," the corresponding water inlet key points are output. These water inlets are the functional locations where sanitary fixtures connect to water supply and drainage pipes, and can be directly used for subsequent 3D modeling and pipe layout design, reducing manual annotation costs.

[0039] In this embodiment, the present invention provides a method for recognizing planar information, comprising the following steps: First, the input two-dimensional vector paper is rasterized by sampling at a fixed ratio to generate a rasterized image, thereby unifying the paper format and preserving geometric information; then, the rasterized image is cropped by a fixed-size sliding window to extract multiple local images to be detected, in order to adapt to the input requirements of the subsequent target detection model; next, the local images to be detected are inverted and resized to optimize image features and match the input specifications of the target detection model, thereby obtaining a preprocessed image to be detected.

[0040] Based on the content disclosed in the above embodiments, as an optional planar information recognition method provided in this embodiment of the invention, Figure 2 This is a schematic diagram of the process for obtaining the deduplicated target detection box range provided by the present invention, as shown below. Figure 2 As shown, step 104 may include the following steps: Step 401: Based on the cropping position information of the sliding window, perform inverse coordinate transformation on the target detection box and key points to obtain the global coordinates of the preprocessed image to be detected in the original two-dimensional vector paper; Step 402: Perform overlap judgment on the target detection boxes in global coordinates. When the overlap area of ​​two detection boxes exceeds the proportion of the smaller box area, retain the detection box with higher confidence to eliminate duplicate recognition and obtain the range of the deduplicated target detection boxes.

[0041] In this embodiment, the preprocessed image to be detected is input into a pre-trained target detection model to identify the target category, target detection box, and key points in local coordinates.

[0042] Based on the clipping position information of the sliding window, the target detection box and key points are subjected to inverse coordinate transformation to obtain their global coordinates in the original two-dimensional vector paper. The target detection boxes under the global coordinates are judged to overlap. When the overlapping area of ​​two detection boxes exceeds the area of ​​the smaller box by more than a preset ratio, such as 30%, the detection box with higher confidence is retained to eliminate duplicate recognition and obtain the range of the target detection box after deduplication.

[0043] Optionally, the inverse coordinate transformation step includes: calculating an affine transformation matrix from local coordinates to global coordinates based on the starting position of the sliding window in the rasterized image, and applying it to the coordinate transformation of the target detection box and key points.

[0044] Specifically, based on the position of the sliding window in the rasterized image and the cropping information, a transformation matrix or formula from local coordinates to global coordinates is calculated. For each object detection box and keypoint, this transformation matrix or formula is used for inverse transformation to obtain its accurate position in the global coordinate system of the original 2D vector image.

[0045] Based on the content disclosed in the above embodiments, as an optional planar information recognition method provided in this embodiment of the invention, Figure 3 This is a flowchart illustrating the process of extracting the corresponding vector graphic set and calculating the tilt angle of the target, as provided by the present invention. Figure 3 As shown, step 106 may include the following steps: Step 601: Based on the deduplicated target detection bounding box range, extract the corresponding vector graphic set from the source 2D vector image; Step 602: Based on the vector graphics set and its key points, calculate the tilt angle of the target using the quadrant method.

[0046] Based on the deduplicated target detection bounding box, a corresponding vector graphic set is extracted from the source 2D vector map. Based on the vector graphic set and its key points, the quadrant method is used to calculate the target's tilt angle. The vector graphic set is then rotated according to the tilt angle, and the minimum bounding rectangle after rotation is calculated as the target's precise outline. The quadrant method typically divides the target into different quadrants based on the relative positions of key points within the target detection bounding box, and calculates the target's orientation or tilt angle based on the distribution of key points within each quadrant.

[0047] Optionally, in the source 2D vector map, based on the range of each target detection box, a spatial search algorithm is used to find all vector graphic elements located within that range. In this example, a range query algorithm is used to traverse all vector graphic elements in the source 2D vector map and add those elements whose coordinates are within the target detection box to the corresponding vector graphic set.

[0048] Based on the content disclosed in the above embodiments, in an optional planar information recognition method provided by this invention, the recognition result of generating a two-dimensional drawing includes: The target category, key points, tilt angle, and precise contour are grouped and associated to generate the recognition result of the two-dimensional drawing.

[0049] In this embodiment, the target category, key points, tilt angle, and precise contour are grouped and associated to generate the recognition result of the two-dimensional drawing, so as to solve the problem of low information extraction accuracy caused by inconsistent styles and chaotic layers in non-standard drawings.

[0050] For example, original CAD drawings contain complex elements such as polylines, fills, and blocks. Through rasterization and subsequent processing, sanitary appliances such as "toilets" and "washbasins," as well as their water inlets, angles, and outlines, can be accurately identified, and duplicate detections can be effectively removed, improving the reliability of identification.

[0051] In summary, the planar information recognition method of the present invention has the following beneficial effects: It can solve the problems of insufficient accuracy and missing information caused by non-standard layers and inconsistent styles in 2D drawing recognition technology. It has very low requirements for the standardization of architectural drawings and significantly improves the reliability of the information extraction process.

[0052] The present invention also provides a device for recognizing information in a two-dimensional drawing, comprising: The detection and extraction module is used to input the preprocessed image to be detected into the pre-trained target detection model to identify and obtain the target category, target detection box and key points in local coordinates; The deduplication module is used to perform fixed-size sliding window cropping on the preprocessed image to be detected based on the target detection box and key points to obtain the range of the target detection box after deduplication. The tilt angle calculation module is used to extract the corresponding vector graphic set from the source two-dimensional vector map and calculate the tilt angle of the target based on the range of the deduplicated target detection box. The recognition module is used to rotate the vector graphic set according to the tilt angle, calculate the smallest bounding rectangle after rotation as the precise outline of the target, and generate the recognition result of the two-dimensional drawing.

[0053] It should be noted that the plan drawing information recognition device provided in this embodiment of the invention can execute the plan drawing information recognition method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0054] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for recognizing planar drawing information. The method includes: S1, inputting the preprocessed image to be detected into a pre-trained target detection model to identify and obtain the target category, target detection box, and key points in local coordinates; S2, based on the target detection box and key points, perform fixed-size sliding window cropping on the preprocessed image to be detected to obtain the deduplicated target detection box range; S3, Based on the deduplicated target detection box range, extract the corresponding vector graphic set from the source 2D vector map and calculate the target's tilt angle; S4. Rotate the vector graphic set according to the tilt angle, and calculate the smallest bounding rectangle after rotation as the precise outline of the target to generate the recognition result of the two-dimensional drawing.

[0055] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0056] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the method for recognizing planar drawing information provided in the above embodiments, the method comprising: The preprocessed image to be detected is input into a pre-trained target detection model to identify the target category, target detection box, and key points in local coordinates. Based on the target detection box and key points, a fixed-size sliding window is cropped on the preprocessed image to obtain the deduplicated target detection box range. According to the deduplicated target detection box range, the corresponding vector graphic set is extracted from the source 2D vector image and the tilt angle of the target is calculated. The vector graphic set is rotated according to the tilt angle, and the minimum bounding rectangle after rotation is calculated as the precise outline of the target, generating the recognition result of the 2D drawing.

[0057] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for recognizing planar drawing information provided in the above embodiments. The method includes: inputting a preprocessed image to be detected into a pre-trained target detection model to identify and obtain the target category, target detection box, and key points in local coordinates; performing a fixed-size sliding window cropping on the preprocessed image to be detected based on the target detection box and key points to obtain a deduplicated target detection box range; extracting the corresponding vector graphic set from the source two-dimensional vector graphic and calculating the target's tilt angle based on the deduplicated target detection box range; rotating the vector graphic set according to the tilt angle and calculating the minimum bounding rectangle after rotation as the precise outline of the target to generate a two-dimensional drawing recognition result.

[0058] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0059] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of recognizing information on a planar sheet, characterized by, The method comprises the steps of: inputting the preprocessed image to be detected into a pre-trained target detection model to identify a target category, a target detection frame and key points in local coordinates; performing fixed-size sliding window cropping on the preprocessed image to be detected based on the target detection frame and the key points to obtain a target detection frame range after deduplication; extracting a corresponding vector graphics set from the source two-dimensional vector diagram according to the target detection frame range after deduplication and calculating the inclination of the target; rotating the vector graphics set according to the inclination and calculating the minimum circumscribed rectangle after rotation as the accurate contour of the target to generate the recognition result of the two-dimensional drawing.

2. The method of identifying planimetric paper information according to claim 1, characterized in that, The step of obtaining the preprocessed image to be detected comprises: performing rasterization processing on the input two-dimensional vector drawing to generate a rasterized image through fixed-proportion sampling to unify the drawing format and retain geometric information; performing fixed-size sliding window cropping on the rasterized image to extract a plurality of local images to be detected to adapt to the input requirements of the subsequent target detection model; performing inverse color processing and size adjustment on the local image to be detected to optimize the image features and match the input specifications of the target detection model to obtain the preprocessed image to be detected.

3. The method of recognizing planimetric paper information according to claim 1, characterized in that, The step of performing fixed-size sliding window cropping on the preprocessed image to be detected based on the target detection frame and the key points to obtain the target detection frame range after deduplication comprises: performing coordinate inverse transformation on the target detection frame and the key points based on the cropping position information of the sliding window to obtain the global coordinates of the preprocessed image to be detected in the original two-dimensional vector drawing; performing overlap judgment on the target detection frame in the global coordinates, and when the overlapping area of two detection frames accounts for more than a preset proportion of the smaller frame area, retaining the detection frame with higher confidence to eliminate repeated identification and obtain the target detection frame range after deduplication.

4. The method of recognizing planimetric paper information according to claim 1, characterized in that, The step of extracting a corresponding vector graphics set from the source two-dimensional vector diagram according to the target detection frame range after deduplication and calculating the inclination of the target comprises: extracting a corresponding vector graphics set from the source two-dimensional vector diagram according to the target detection frame range after deduplication; calculating the inclination of the target based on the vector graphics set and the key points thereof using the quadrant method.

5. The method of recognizing planimetric paper information according to claim 1, characterized in that, The step of generating the recognition result of the two-dimensional drawing comprises: grouping and associating the target category, the key points, the inclination and the accurate contour to generate the recognition result of the two-dimensional drawing.

6. The method of recognizing planimetric paper information according to claim 3, characterized in that, The step of coordinate inverse transformation comprises: calculating an affine transformation matrix from local coordinates to global coordinates according to the starting position of the sliding window in the rasterized image and applying the matrix to coordinate conversion of the target detection frame and the key points.

7. The method of recognizing planimetric paper information according to claim 1, characterized in that, The step of calculating the minimum circumscribed rectangle comprises:

8. An apparatus for recognizing planar paper information, characterized by performing contour extraction on the rotated vector graphics set using a convex hull algorithm or a rotating puzzle algorithm. The method comprises the steps of: a detection extraction module for inputting the preprocessed image to be detected into a pre-trained target detection model to identify a target category, a target detection frame and key points in local coordinates; a deduplication module for performing fixed-size sliding window cropping on the preprocessed image to be detected based on the target detection frame and the key points to obtain a target detection frame range after deduplication; An inclination angle calculation module is configured to extract a corresponding vector graph set from a source two-dimensional vector graph according to the target detection frame range after deduplication and calculate an inclination angle of the target. An identification module is configured to rotate the vector graph set according to the inclination angle, calculate a minimum circumscribed rectangle after rotation as an accurate contour of the target, and generate an identification result of the two-dimensional drawing.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the identification method of the planar drawing information according to any one of claims 1 to 7. 10.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the identification method of the planar drawing information according to any one of claims 1 to 7.