A drawing retrieval method and system based on computer graphics and twin networks

CN122903646APending Publication Date: 2026-10-13CHENGDU MIAOXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510101566.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]近年来,随着计算机图像处理技术和人工智能技术的发展,出现了一些通过人工智能的技术进行图纸识别与检索的方案;而在CAD图纸检索中,由于CAD图纸通常是由固定底色加上线条构成,相同或者类似的图纸由于附件的信息干扰,导致难以识别到主体信息,从而导致从图纸库中查找相似或者相同图纸的效果较差

Benefits of technology

[0029]本发明实施例提供的技术方案,通过先将CAD图纸基于计算机图形学转换成图片进行处理,再结合标记提取出CAD图纸中的零件主体部分,以排除标注、图框的影响;同时,将孪生神经网络应用于CAD图纸识别,实现精准的图纸识别和检索;以及进一步结合图纸属性信息进行图纸检索,提升检索精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903646A_ABST
    Figure CN122903646A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on computer graphics and twin network's drawing retrieval method and system, the method includes: obtaining the CAD drawing needing retrieval;The CAD drawing is converted to obtain conversion image;Based on the preset computer image processing algorithm, the conversion image is processed to obtain corresponding continuous image;The CAD drawing is marked to obtain the marked drawing containing mark information;The mark includes the marking of the main part of the part of the CAD drawing;The continuous image and the marked drawing are extracted by flooding filling algorithm Image part main part, obtain the main part of the part of CAD drawing;The main part of the part of the drawing obtained is used with the twin network model that is pre-trained, realizes from the database that is pre-constructed Drawing retrieval, obtains retrieval result.The application can realize accurate drawing identification and retrieval, and improves retrieval precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CAD drawing retrieval technology, specifically to a drawing retrieval method and system based on computer graphics and twin networks. Background Technology

[0002] Currently, CAD drawings are widely used and have become an important part of engineering development and product design. Faced with a wide variety of CAD drawing data, how to quickly and accurately retrieve drawings that meet the specific needs of users has become a major problem and challenge for research and innovation in various fields.

[0003] In recent years, with the development of computer image processing technology and artificial intelligence technology, some solutions for drawing recognition and retrieval using artificial intelligence technology have emerged. However, in CAD drawing retrieval, since CAD drawings are usually composed of a fixed background color and lines, it is difficult to identify the main information of identical or similar drawings due to interference from the information in the attachments. This results in poor performance in finding similar or identical drawings from the drawing library.

[0004] Therefore, improving the accuracy of CAD drawing retrieval is an urgent problem to be solved. Summary of the Invention

[0005] In view of the technical deficiencies mentioned in the background art, the purpose of this invention is to provide a drawing retrieval method and system based on computer graphics and twin networks, so as to improve the accuracy of CAD drawing retrieval.

[0006] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a drawing retrieval method based on computer graphics and twin networks, the method comprising the following steps:

[0007] Obtain the CAD drawings to be retrieved; wherein, the CAD drawings are uploaded via an input device;

[0008] The CAD drawing is converted to obtain a converted image;

[0009] The converted image is processed based on a preset computer image processing algorithm to obtain the corresponding continuous image;

[0010] The CAD drawing is marked to obtain a marked drawing containing marking information; wherein, the marking includes marking the main body of the part in the CAD drawing;

[0011] The continuous image and the marked drawing are used to extract the main body of the part from the image using a flooding fill algorithm to obtain the main body of the part from the CAD drawing, which is then used for drawing retrieval.

[0012] The main body of the parts in the acquired drawings is used to retrieve the drawings from a pre-built database using a pre-trained twin network model; the number of retrieval results is multiple.

[0013] As a specific implementation of this application, the CAD drawing is converted to obtain a converted image, specifically including:

[0014] Convert the CAD drawings into image format;

[0015] Convert the resulting image into a binary image.

[0016] As one specific implementation of this application, the preset computer image processing algorithm includes image opening operations.

[0017] As a preferred implementation of this application, the method further includes:

[0018] Based on the obtained drawing attribute information, the search results are sorted and filtered to further improve search accuracy.

[0019] As one specific implementation of this application, the drawing attribute information includes dimensions, purpose, and keyword information.

[0020] Secondly, embodiments of the present invention also provide a drawing retrieval system based on computer graphics and twin networks, the drawing retrieval system comprising:

[0021] The drawing preprocessing module is used for:

[0022] Obtain the CAD drawings to be retrieved; wherein, the CAD drawings are uploaded via an input device;

[0023] The CAD drawing is converted to obtain a converted image;

[0024] The converted image is processed based on a preset computer image processing algorithm to obtain the corresponding continuous image;

[0025] The drawing recognition module is used for:

[0026] The CAD drawing is marked to obtain a marked drawing containing marking information; wherein, the marking includes marking the main body of the part in the CAD drawing;

[0027] The continuous image and the marked drawing are used to extract the main body of the part from the image using a flooding fill algorithm to obtain the main body of the part from the CAD drawing, which is then used for drawing retrieval.

[0028] The drawing retrieval module is used to retrieve the main body of the parts in the acquired drawings from a pre-built database using a pre-trained twin network model, and obtain retrieval results; wherein the number of retrieval results is multiple.

[0029] The technical solution provided by this invention first converts CAD drawings into images using computer graphics for processing, then extracts the main body of the parts in the CAD drawings by combining markers, thus eliminating the influence of annotations and drawing frames; at the same time, it applies a twin neural network to CAD drawing recognition to achieve accurate drawing recognition and retrieval; and further combines drawing attribute information to perform drawing retrieval, thereby improving retrieval accuracy. Attached Figure Description

[0030] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below.

[0031] Figure 1 This is a flowchart of a drawing retrieval method based on computer graphics and twin networks provided in an embodiment of the present invention;

[0032] Figure 2 This is a schematic diagram of a drawing retrieval system based on computer graphics and twin networks provided in an embodiment of the present invention. Detailed Implementation

[0033] The technical solutions of the embodiments of the present 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 the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0034] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0035] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0036] The CAD drawings refer to mechanical drawings; the main body of the part can be understood as the outline of the part in the CAD mechanical drawings.

[0037] The CAD drawings mentioned can also be understood as including CAD drawings, photographs, and CAD drawings converted to PDF; it also includes multiple categories such as architectural CAD drawings, electrical CAD drawings, and electronic CAD drawings; the photographs involved can also be optical images, which are just examples and not intended to limit the scope.

[0038] Please refer to Figure 1 This invention provides a drawing retrieval method based on computer graphics and twin networks, the method comprising the following steps:

[0039] S101, Obtain the CAD drawing to be retrieved; wherein, the CAD drawing is uploaded via an input device;

[0040] S102, The CAD drawing is converted to obtain a converted image;

[0041] S103, The converted image is processed based on a preset computer image processing algorithm to obtain the corresponding continuous image;

[0042] S104, mark the CAD drawing to obtain a marked drawing containing marking information; wherein, the marking includes marking the main body of the part in the CAD drawing;

[0043] S105, the continuous image and the marked drawing are used to extract the main body of the image part through the flooding and filling algorithm to obtain the main body of the part of the CAD drawing (that is, by marking the drawing, the main body of the part corresponding to the drawing is obtained), and it is used for drawing retrieval.

[0044] S106, the main body of the obtained drawing is used to retrieve the drawing from a pre-built database using a pre-trained twin network model, and the retrieval results are obtained; wherein, the number of retrieval results is multiple.

[0045] In practice, this drawing retrieval method can be applied to either the client or the server, and there are no restrictions here.

[0046] Meanwhile, to address the challenge of traditional natural image and artificial optical symbol recognition methods being insufficient for identifying and retrieving CAD drawings, this embodiment employs computer image processing technology (i.e., computer graphics) to preprocess CAD drawings, removing invalid and interfering information. Specifically, this includes:

[0047] Convert the CAD drawings into image format;

[0048] Convert the resulting image into a binary image.

[0049] In this embodiment, the drawing format is first standardized. If it is a CAD drawing, it will be converted into an image format. Then, the image size is adjusted to maintain the aspect ratio. The maximum and minimum sizes of the converted image are limited to ensure its usability.

[0050] Next, convert the image to a grayscale image with a white background; the first step is to calculate the background color of the drawing, and if the background color is dark, then perform color inversion; the second step is to convert the image to a binary image.

[0051] The preset computer image processing algorithm includes an image opening operation that makes the interrupted image contours of the binary image continuous; the image opening operation is a process in which the image is successively processed by erosion and dilation; after the image is eroded, noise is removed, and then the eroded image is dilated to remove noise and retain the original image.

[0052] It should be noted that the above computer image processing algorithms are merely examples and are not intended to limit the application of these algorithms.

[0053] In the subsequent processing of the marking, one implementation method is as follows:

[0054] Users mark the main body of the drawing parts on the pre-processed image using a pen.

[0055] By preprocessing the CAD drawings, the corresponding images and marked drawings are obtained and uploaded to the server. The main body of the parts in the image is extracted by the flooding filling algorithm and then returned to the user.

[0056] The user repeatedly marks the parts until all the main body parts have been marked.

[0057] After marking is completed, the main body of the part in the drawing is obtained for drawing retrieval.

[0058] In this embodiment, the training process of the Siamese network model is as follows:

[0059] 1. Identify and extract drawings from the CAD drawing library to generate corresponding images of the main parts of the drawings, forming the basic data for model training;

[0060] 2. Perform data enhancement on the drawings, mainly through rotation, stretching, and mirroring transformations;

[0061] 3. Tag the drawings (Xi, Yi, Li) according to the data in the drawing library, where Xi and Yi are image pairs and Li is a label indicating whether Xi and Yi are similar;

[0062] 4. Use a Siamese neural network to train a model for image feature extraction.

[0063] In this embodiment, to improve retrieval accuracy, based on the above technical solution, the method further includes:

[0064] Based on the obtained drawing attribute information, the search results are sorted and filtered to further improve search accuracy; wherein, the drawing attribute information includes size, purpose and keyword information.

[0065] During image retrieval, a trained model is used to identify the subject of the image, extract features, recall a candidate image set through vector retrieval, and use the candidate image set as the retrieval result.

[0066] Then, the data is sorted and filtered based on the dimensions, uses, and keywords provided by the user, thereby improving the accuracy and precision of drawing retrieval through drawing search and attribute information such as dimensions and keywords.

[0067] The above solution first converts CAD drawings into images using computer graphics, then extracts the main parts of the parts from the CAD drawings by combining them with markers, thus eliminating the influence of annotations and drawing frames. At the same time, it applies a twin neural network to CAD drawing recognition to achieve accurate drawing recognition and retrieval. Furthermore, it combines drawing attribute information to improve retrieval accuracy.

[0068] Reference Figure 2 Based on the same inventive concept, embodiments of the present invention also provide a drawing retrieval system based on computer graphics and twin networks, the drawing retrieval system comprising:

[0069] The drawing preprocessing module is used for:

[0070] Obtain the CAD drawings to be retrieved; wherein, the CAD drawings are uploaded via an input device;

[0071] The CAD drawing is converted to obtain a converted image;

[0072] The converted image is processed based on a preset computer image processing algorithm to obtain the corresponding continuous image;

[0073] The drawing recognition module is used for:

[0074] The CAD drawing is marked to obtain a marked drawing containing marking information; wherein, the marking includes marking the main body of the part in the CAD drawing;

[0075] The continuous image and the marked drawing are used to extract the main body of the part from the image using a flooding fill algorithm to obtain the main body of the part from the CAD drawing, which is then used for drawing retrieval.

[0076] The drawing retrieval module is used to retrieve the main body of the parts in the acquired drawings from a pre-built database using a pre-trained twin network model, and obtain retrieval results; wherein the number of retrieval results is multiple.

[0077] Further, the CAD drawing is converted to obtain a converted image, specifically including:

[0078] Convert the CAD drawings into image format;

[0079] Convert the resulting image into a binary image.

[0080] The drawing retrieval module is also used for:

[0081] Based on the obtained drawing attribute information, the search results are sorted and filtered to further improve search accuracy; the drawing attribute information includes size, purpose, and keyword information.

[0082] It should be noted that for a more detailed description of the workflow of the system implementation, please refer to the aforementioned method implementation section, which will not be repeated here.

[0083] The entire solution first converts CAD drawings into images using computer graphics, then extracts the main parts of the parts from the CAD drawings by combining them with markers to eliminate the influence of annotations and drawing frames. At the same time, it applies a twin neural network to CAD drawing recognition to achieve accurate drawing recognition and retrieval. Furthermore, it combines drawing attribute information to improve the accuracy of drawing retrieval.

[0084] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A drawing retrieval method based on computer graphics and twin networks, characterized in that, The method includes the following steps: Obtain the CAD drawings to be retrieved; wherein, the CAD drawings are uploaded via an input device; The CAD drawing is converted to obtain a converted image; The converted image is processed based on a preset computer image processing algorithm to obtain the corresponding continuous image; The CAD drawing is marked to obtain a marked drawing containing marking information; wherein, the marking includes marking the main body of the part in the CAD drawing; The continuous image and the marked drawing are used to extract the main body of the part from the image using a flooding fill algorithm to obtain the main body of the part from the CAD drawing, which is then used for drawing retrieval. The main body of the parts in the acquired drawings is used to retrieve the drawings from a pre-built database using a pre-trained twin network model; the number of retrieval results is multiple.

2. The drawing retrieval method based on computer graphics and twin networks as described in claim 1, characterized in that, The CAD drawing is converted to obtain a converted image, specifically including: Convert the CAD drawings into image format; Convert the resulting image into a binary image.

3. The drawing retrieval method based on computer graphics and twin networks as described in claim 2, characterized in that, The preset computer image processing algorithm includes the image opening operation.

4. A drawing retrieval method based on computer graphics and twin networks as described in any one of claims 1 to 3, characterized in that, The method further includes: Based on the obtained drawing attribute information, the search results are sorted and filtered to further improve search accuracy.

5. The drawing retrieval method based on computer graphics and twin networks as described in claim 4, characterized in that, The drawing attribute information includes dimensions, purpose, and keyword information.

6. A drawing retrieval system based on computer graphics and twin networks, characterized in that, The drawing retrieval system includes: The drawing preprocessing module is used for: Obtain the CAD drawings to be retrieved; wherein, the CAD drawings are uploaded via an input device; The CAD drawing is converted to obtain a converted image; The converted image is processed based on a preset computer image processing algorithm to obtain the corresponding continuous image; The drawing recognition module is used for: The CAD drawing is marked to obtain a marked drawing containing marking information; wherein, the marking includes marking the main body of the part in the CAD drawing; The continuous image and the marked drawing are used to extract the main body of the part from the image using a flooding fill algorithm to obtain the main body of the part from the CAD drawing, which is then used for drawing retrieval. The drawing retrieval module is used to retrieve the main body of the parts in the acquired drawings from a pre-built database using a pre-trained twin network model, and obtain retrieval results; wherein the number of retrieval results is multiple.

7. A drawing retrieval system based on computer graphics and twin networks as described in claim 6, characterized in that, The CAD drawing is converted to obtain a converted image, specifically including: Convert the CAD drawings into image format; Convert the resulting image into a binary image.

8. A drawing retrieval system based on computer graphics and twin networks as described in claim 7, characterized in that, The drawing retrieval module is also used for: Based on the obtained drawing attribute information, the search results are sorted and filtered to further improve search accuracy.

9. A drawing retrieval system based on computer graphics and twin networks as described in claim 8, characterized in that, The drawing attribute information includes dimensions, purpose, and keyword information.