CAD data generation device, method, and program
The CAD data generation device uses an inference model to automate layer separation and character extraction, addressing the complexity and accuracy issues in conventional methods, facilitating efficient CAD data creation from drawing images.
Patent Information
- Application Number
- JP2023043589
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Conventional methods for generating CAD data from drawing images are complicated due to the need for manual creation of vector data and poor accuracy in character extraction using OCR, especially when characters are diagonally written or lines are closely drawn.
A CAD data generation device that utilizes an inference model, generated through machine learning, to automatically identify and separate layers in an image of a drawing, converting raster data to vector data and extracting characters using OCR, thereby simplifying the generation of CAD data.
Enables easy and accurate generation of CAD data by automating the layer separation and character extraction process, reducing manual effort and improving accuracy.
Smart Images

Figure 2024132705000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for generating CAD data from image data of a drawing. [Background technology]
[0002] Conventionally, CAD (Computer Aided Design) data has been generated using an image of a drawing (see Patent Document 1). The image of the drawing contains a mixture of figures, characters, etc. On the other hand, CAD data is composed of multiple layers in which the figures and characters, etc. are separated. Therefore, conventionally, when generating CAD data from image data of a drawing, for characters, OCR (Optical Character Recognition) is used to extract the characters from the drawing and turn them into character data, and for figures, raster data of the figures in each layer is manually created and converted into vector data, and the data of each character and figure layer is integrated into the CAD data. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-133422 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the conventional method, the manual process of creating vector data for each layer was cumbersome, and the accuracy of character extraction by OCR was poor because characters in drawings were written diagonally or close to lines.
[0005] One objective of the present disclosure is to provide a technique that enables CAD data to be easily generated from an image of a drawing. [Means for solving the problem]
[0006] A CAD data generation device according to one embodiment of the present disclosure is a CAD data generation device that generates CAD data including multiple layer data from an image of a drawing, and has a memory and a processor, where the memory stores an inference model for identifying layer areas, which are areas having characteristics of each layer, from the image, and the processor uses the inference model to identify the layer areas of each layer from the image of the drawing, and generates CAD data including data of the layer areas as layer data for each layer. Effect of the Invention
[0007] According to one aspect of the present disclosure, it is possible to provide a technique that enables CAD data to be easily generated from an image of a drawing. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram showing a configuration of general CAD data. [Diagram 2] 1 is a functional block configuration diagram of a CAD data generating device according to an embodiment of the present disclosure. [Diagram 3] 1 is a conceptual diagram illustrating various data stored in a storage unit of a CAD data generation device according to an embodiment of the present disclosure. [Figure 4] 1 is a flowchart showing a process for implementing a CAD data generation method by a CAD data generation device according to an embodiment of the present disclosure. [Diagram 5] A figure showing the state in which a layer area decomposition unit of a CAD data generation device according to one embodiment of the present disclosure performs a process of dividing the image data of a drawing into image data for each layer area, and each layer area contained in the image data of the drawing is identified. [Figure 6] 13A is a diagram showing image data of a figure layer area and image data of a drawing frame layer area obtained by a layer area decomposition unit dividing the image data of a drawing into image data for each layer area. FIG. [Figure 7]This figure shows image data (c) of the dimension line sub-layer area, image data (d) of the dimension character sub-layer area, and image data (e) of the character layer area obtained by the layer area decomposition unit dividing the image data of the drawing into image data for each layer area. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0010] First, the structure of general CAD data will be described with reference to FIG. 1. As shown in FIG. 1, CAD data related to design drawings of mechanical structures, electric circuit wiring, etc. generally has a structure in which multiple data layers are superimposed. The multiple data layers of CAD data include, for example, a figure layer including a line drawing for drawing a design object, a drawing frame layer including an outer frame and ruled lines of the design drawing, a dimension layer including dimension lines and dimension numerical characters indicating the dimensions of each part of the design object drawn in the figure layer, and a character layer including characters written in the design drawing. Of the above-mentioned data layers, the dimension layer may be composed of a dimension line sublayer including dimension lines and a dimension character sublayer including numerical characters of dimensions. CAD data generally includes these multiple data layers in a superimposed manner. These data layers that may be included in CAD data are examples, and some of these data layers may be omitted, or data layers including other information may be added.
[0011] Next, a CAD data generating device according to an embodiment of the present disclosure will be described. Fig. 2 is a functional block diagram of the CAD data generating device according to an embodiment of the present disclosure. As shown in Fig. 2, the CAD data generating device 100 of this embodiment includes a control unit 110, a storage unit 120, and an input / output interface 130.
[0012] The control unit 110 controls the processing operation of the CAD data generation device 100 by executing a program stored in the storage unit 120, and is composed of one or more CPUs (Central Processing Units) and GPUs (Graphics Processing Units). The control unit 110 includes, as functional components, an image input unit 111, a layer region decomposition unit 112, a data conversion unit 113, a sub-layer combination unit 114, and a CAD data output unit 115. Each of these functional components included in the control unit 110 operates to realize the processing and functions performed by the CAD data generation device 100, as will be described with reference to FIG. 4 and the like.
[0013] The image input unit 111 executes a process of receiving image data of a drawing input via an input / output interface 130, which will be described later, from an external terminal of the CAD data generation device 100 or another functional configuration unit within the CAD data generation device 100. The image data of the drawing input from an external terminal or the like may be in any file format, such as JPEG or PNG.
[0014] The layer region decomposition unit 112 executes a process of dividing the image data received by the image input unit 111 into image data for each of the above-mentioned layer regions. The layer region decomposition unit 112 in this embodiment is configured to execute a process of dividing the image data for each layer region by using an inference model 122 stored in the storage unit 120 as described later.
[0015] The data conversion unit 113 executes a process of converting or extracting image data of each layer region divided by the layer region decomposition unit 112 in a manner suitable for each layer region.
[0016] More specifically, for a graphic layer area including a line drawing that depicts the design object, the data conversion unit 113 converts raster format data contained in the graphic layer area after division by the layer area decomposition unit 112 into vector format data, and for a drawing frame layer area including the outer frame and lines of the design drawing, the data conversion unit 113 converts raster format data contained in the drawing frame layer area after division by the layer area decomposition unit 112 into vector format data.
[0017] The data conversion unit 113 also converts raster data related to dimension lines included in the dimension line sub-layer area after division by the layer area decomposition unit 112 into vector data, and extracts character data of the numerical values of dimensions included in the dimension character sub-layer area after division, of the dimension layer including dimension lines and dimension numerical characters showing the dimensions of each part of the design object drawn in the figure layer, by any character recognition process such as OCR. Furthermore, for the character layer including characters written in the design drawing, the character data included in the character layer area after division by the layer area decomposition unit 112 is extracted by OCR.
[0018] The sub-layer combining unit 114 performs a process of combining multiple sub-layer data to generate one layer data for a layer that includes multiple sub-layers, such as a dimension layer that includes a dimension line sub-layer that includes dimension lines and a dimension text sub-layer that includes dimension numerical values (text).
[0019] The CAD data output unit 115 is configured to execute a process of generating one piece of CAD data by integrating a plurality of layer data generated by the data conversion unit 113 and the sub-layer combining unit 114. The CAD data output unit 115 outputs the generated CAD data to an external terminal of the CAD data generation device 100 or to another functional configuration unit within the CAD data generation device 100 via the input / output interface 130.
[0020] The storage unit 120 stores programs, input data, intermediate data, etc. for executing various control processes and functions of the control unit 110, and includes a main memory including a RAM (Random Access Memory) and a ROM (Read Only Memory), and a storage memory such as a HDD (Hard Disk Drive), an SSD (Solid State Drive), etc. Furthermore, the storage unit 120 stores an inference model 122 that is used by the control unit 110 to divide image data of a drawing input to the control unit 110 from an external terminal or a functional configuration unit into the above-mentioned layer regions, as described later.
[0021] The inference model 122 is an inference model generated by machine learning using image data of various drawings as training data. The training data used to generate the inference model 122 may be, for example, a plurality of image data including annotation information for labeling each layer area (figure layer area, drawing frame layer area, dimension line sublayer area, dimension character sublayer area, character layer area) in the drawing, or a plurality of CAD data each including data of the above-mentioned layer areas individually labeled. The inference model 122 can be created using any external computer device (not shown) as a learning device and stored in the storage unit 120.
[0022] In particular, the inference model 122 of this embodiment may be generated using a deep learning algorithm called semantic segmentation, which is a deep learning algorithm that associates a label or category with every pixel in an image. The inference model generated by semantic segmentation can be used to recognize a group of pixels that form a characteristic category. In particular, in this embodiment, the inference model generated by such semantic segmentation can be used to recognize a group of pixels that form each layer area (figure layer area, drawing frame layer area, dimension line sublayer area, dimension text sublayer area, text layer area) included in the image data of the drawing.
[0023] For example, the inference model 122 is generated by performing machine learning in a neural network composed of multiple layers including neurons in each layer. As such a neural network, a deep neural network such as a convolutional neural network (CNN) can be used.
[0024] Furthermore, the storage unit 120 at least temporarily stores various data generated by the control unit 110 executing processes (including intermediate data generated during the processes).
[0025] Fig. 3 is a conceptual diagram showing various data stored in the storage unit 120. As shown in Fig. 3, the storage unit 120 stores, as drawing image data, data of drawing images input from an external terminal of the CAD data generation device 100 or other functional configuration units in the CAD data generation device 100 via the input / output interface 130.
[0026] The storage unit 120 further stores, as image data by layer area, image data of a figure layer area, a drawing frame layer area, a dimension line layer area, a dimension value layer area, and a character layer area which are individually separated from the drawing image data by the layer area decomposition unit 112. The data of each of these layer areas stored as image data by layer area is raster format data before the data conversion or extraction process by the data conversion unit 113 is performed.
[0027] The storage unit 120 further stores, as CAD layer data, drawing layer data, drawing frame layer data, dimension layer data, and character layer data generated by data conversion or extraction processing and sub-layer data combination processing performed by the data conversion unit 113 and the sub-layer combination unit 114. Each of these layer data stored as CAD layer data is vector format data after data conversion or extraction processing by the data conversion unit 113, or character data extracted by OCR. The CAD data output unit 115 integrates each of these layer data stored as CAD layer data into one CAD data and outputs it.
[0028] The input / output interface 130 is an interface for transferring data between an external terminal of the CAD data generation device 100 or other functional components within the CAD data generation device 100. Devices conforming to various standards for data transfer can be used as the input / output interface 130.
[0029] Next, a CAD data generating method by the CAD data generating device according to this embodiment will be described with reference to Fig. 4 etc. Fig. 4 is a flowchart showing a process for implementing the CAD data generating method by the CAD data generating device according to this embodiment.
[0030] In the CAD data generating method of this embodiment, first, the image input unit 111 of the control unit 110 of the CAD data generating device 100 executes a process of receiving image data of a drawing input via the input / output interface 130 from an external terminal of the CAD data generating device 100 or another functional configuration unit within the CAD data generating device 100 (step S101). The image data of the drawing input from the external terminal or the like may be in any file format such as JPEG or PNG.
[0031] Next, the layer region decomposition unit 112 of the control unit 110 executes a process of dividing the image data received by the image input unit 111 into image data for each layer region based on the inference model 122 stored in the memory unit 120 (step S102).
[0032] As described above, examples of image data for each layer region include a figure layer region, a drawing frame layer region, a dimension line sublayer region, a dimension character sublayer region, and a character layer region. These image data are stored in a raster format in the storage unit 120 at least temporarily, as described with reference to FIG.
[0033] 5 shows a state in which each layer area included in the image data of the drawing is identified by executing a process of dividing the image data of the drawing into image data for each layer area by the layer area decomposition unit 112. The dotted lines shown in FIG. 5 are shown for the purpose of explaining the boundaries that define each layer area, and are not displayed in the image after processing by the layer area decomposition unit 112.
[0034] Each of the diagrams in Figures 6 and 7 shows image data of each region obtained by dividing the image data of the drawing into image data for each layer region by the layer region decomposition unit 112. More specifically, (a) in Figure 6 shows image data of the figure layer region, (b) in Figure 6 shows image data of the drawing frame layer region, (c) in Figure 7 shows image data of the dimension line sublayer region, (d) in Figure 7 shows image data of the dimension character sublayer region, and (e) in Figure 7 shows image data of the character layer region. The dotted lines shown in each of the diagrams in Figures 6 and 7 are also shown for the purpose of explaining the boundaries that define each layer region, and are not included in the image data of each layer region.
[0035] Next, the control unit 110 judges whether image data for all layer areas has been generated from the image data of the drawing received in step S101 (step S103). If it is judged that image data for all layer areas has not been generated (NO), the process proceeds to step S104, and if it is judged that image data for all layer areas has been generated (YES), the process proceeds to step S107.
[0036] If it is determined in step S103 that image data for all layer regions has not been generated (NO), the control unit 110 determines whether the image data to be processed is image data related to the dimension character sublayer region or image data related to the character layer region (step S104). If it is determined that the image data to be processed is image data related to the dimension character sublayer region or image data related to the character layer region (YES), the process proceeds to step S105, and if it is determined that the image data to be processed is not image data related to the dimension character sublayer region or image data related to the character layer region (NO), the process proceeds to step S106.
[0037] If it is determined in step S104 that the image data to be processed is image data related to the dimension character sublayer area or image data related to the character layer area (YES), the data conversion unit 113 of the control unit 110 extracts character data from the image data by any character recognition process such as OCR when the image data to be processed is image data related to the dimension character sublayer area, and generates dimension character sublayer data, or extracts character data from the image data by OCR when the image data to be processed is image data related to the character layer area, and generates character layer data (step S105). These dimension character sublayer data and character layer data are at least temporarily stored in the storage unit 120 as CAD layer-specific data as described with reference to FIG. 3.
[0038] On the other hand, if it is determined in step S104 that the image data to be processed is not image data relating to the dimension character sub-layer area or image data relating to the character layer area (NO), the data conversion unit 113 of the control unit 110 converts the raster format data contained in the image data of the layer area into vector format data to generate layer data for each layer area (step S106).
[0039] More specifically, in this embodiment, the data conversion unit 113 converts raster format data included in the image data of the figure layer area, drawing frame layer area, and dimension line sub-layer area into vector format data to generate figure layer data, drawing frame layer data, and dimension line sub-layer data, respectively. The figure layer data, drawing frame layer data, and dimension line sub-layer data generated as vector format data are at least temporarily stored in the storage unit 120 as CAD layer-specific data, as described with reference to FIG. 3.
[0040] Next, in step S107, the control unit 110 determines whether generation of all layer data has been completed. In the example of this embodiment, when the CAD data to be generated includes graphic layer data, drawing frame layer data, dimension layer data, and character layer data, the control unit 110 determines whether generation of all of these layer data has been completed. If it is determined that generation of all layer data has been completed (YES), the process proceeds to step S110, and if it is determined that generation of all layer data has not been completed (NO), the process proceeds to step S108.
[0041] If it is determined in step S107 that the generation of all layer data has not been completed (NO), the control unit 110 determines whether the target data determined to be the layer data for which generation has not been completed is dimension character sub-layer data or dimension line sub-layer data (step S108). If it is determined that the target data determined to be the layer data for which generation has not been completed is dimension character sub-layer data or dimension line sub-layer data (YES), the process proceeds to step S109, and if not (NO), the process returns to step S107.
[0042] If it is determined in step S108 that the target data determined to be layer data for which generation has not been completed is dimension character sublayer data or dimension line sublayer data (YES), the sublayer combining unit 114 of the control unit 110 combines the dimension character sublayer data and the dimension line sublayer data with the dimension layer data to complete generation of the dimension layer data (step S109). This completes the generation of all layer data contained in the CAD data to be generated, that is, the graphic layer data, drawing frame layer data, dimension layer data, and character layer data.
[0043] If it is determined in step S107 that generation of all layer data has been completed (YES), the process proceeds to step S110, where the CAD data output unit 115 of the control unit 110 executes a process of integrating all the layer data to generate one piece of CAD data. The CAD data output unit 115 outputs the generated CAD data via the input / output interface 130 to an external terminal of the CAD data generation device 100 or to another functional configuration unit within the CAD data generation device 100.
[0044] As described above, according to one aspect of the present disclosure, there is provided a CAD data generation device that generates CAD data including multiple layer data from an image of a drawing, the CAD data generation device having a memory and a processor, wherein the memory stores an inference model for identifying layer areas, which are areas having characteristics of each layer, from the image, and the processor uses the inference model to identify the layer areas of each layer from the image of the drawing, and generates CAD data including data of the layer areas as layer data for each layer.
[0045] According to the CAD data generation device of the present disclosure configured in this manner, an inference model is used to identify areas with characteristics of each layer, and CAD data including layer data for those layer areas is generated, making it possible to easily generate CAD data from an image of a drawing.
[0046] The CAD data generating device of the present disclosure may further be configured such that the inference model is a semantic segmentation model that divides an image into layer regions of each layer. As a result, each layer region is divided from image data of a drawing including various layer regions by a semantic segmentation model obtained by machine learning, making it possible to eliminate the need for region division by image processing that requires delicate setting of thresholds.
[0047] The CAD data generating device of the present disclosure may further be configured such that the CAD data includes a dimension layer showing dimensions by dimension lines and dimension characters, the inference model can identify a dimension line sublayer region having the characteristics of the dimension lines and a dimension character sublayer region having the characteristics of the dimension characters, and the processor can be configured to identify the dimension line sublayer region and the dimension character sublayer region from the image of the drawing, and combine data of the dimension character sublayer region and data of the dimension line sublayer region with the dimension layer. As a result, the lines and characters showing the dimensions are separated by different processes and identified by the inference model, so that it is possible to recognize the dimension lines and the dimension characters written in their vicinity separately, and layer data of the dimension layer including the dimension line sublayer region and the dimension character sublayer region can be appropriately created.
[0048] The CAD data generating device of the present disclosure may further be configured such that the CAD data includes a drawing frame layer in which a drawing frame is shown, the inference model can identify a drawing frame layer area having characteristics of the drawing frame, and the processor can identify the drawing frame layer area from an image of the drawing, convert raster data of the image of the drawing frame layer area into vector data, and make the vector data into the drawing frame layer. This allows the drawing frame layer area to be identified based on the inference model from image data of the drawing including various layer areas, and the drawing frame layer to be generated as vector data.
[0049] The CAD data generating device of the present disclosure may further be configured such that the CAD data includes a graphic layer including a graphic included in the drawing, the inference model can identify a graphic layer region having a feature of the graphic, and the processor can identify the graphic layer region from an image of the drawing, convert raster data of the image of the graphic layer region into vector data, and make the vector data into a graphic layer. This allows the graphic layer region to be identified based on the inference model from image data of the drawing including various layer regions, and the graphic layer to be generated as vector data.
[0050] The CAD data generating device of the present disclosure may further be configured such that the CAD data includes a character layer including characters included in the drawing, the inference model can identify a character layer area having characteristics of the character, and the processor can identify the character layer area from the image of the drawing, extract character data from the image of the character layer area by character recognition processing, and convert the character data into a character layer. This allows the character layer area to be identified based on the inference model from image data of the drawing including various layer areas, and the character layer to be generated as character data.
[0051] According to another aspect of the present disclosure, there is provided a method for generating CAD data including a plurality of layer data from an image of a drawing, executed by a CAD data generation device having a memory and a processor, wherein the memory stores an inference model for identifying layer areas, which are areas having characteristics of each layer, from the image, and the method includes the processor identifying layer areas of each layer from the image of the drawing using the inference model, and the processor generating CAD data including data of the layer areas as layer data for each layer.
[0052] According to yet another aspect of the present disclosure, there is provided a program for causing a computer having a processor and a memory to generate CAD data including multiple layer data from an image of a drawing, wherein the memory stores an inference model for identifying layer areas, which are areas having characteristics of each layer, from the image, and the program causes the processor to identify the layer areas of each layer from the image of the drawing using the inference model, and to generate CAD data including data of the layer areas as layer data for each layer.
[0053] The above-described embodiments of the present invention are merely illustrative examples of the present invention, and are not intended to limit the scope of the present invention to these embodiments. Those skilled in the art can implement the present invention in various other forms without departing from the scope of the present invention. [Explanation of symbols]
[0054] 100 CAD data generating device, 110 control unit, 120 storage unit, 130 input / output interface
Claims
1. A CAD data generating device that generates CAD data including a plurality of layer data from an image of a drawing, comprising: A memory and a processor are included. The memory stores an inference model for identifying a layer region, which is a region having characteristics of each layer, from an image; The processor uses the inference model to identify a layer area of each layer from the image of the drawing, and generates CAD data including data of the layer area as layer data of each layer. CAD data generation device.
2. The inference model is a semantic segmentation model that divides an image into layer regions for each layer.
2. The CAD data generating device according to claim 1.
3. The CAD data includes a dimension layer that indicates dimensions using dimension lines and dimension characters; The inference model may identify a dimension line sublayer region having a feature of the dimension line and a dimension text sublayer region having a feature of the dimension text; The processor, Identifying the dimension line sublayer region and the dimension character sublayer region from the image of the drawing; merging the data of the dimension text sublayer region and the data of the dimension line sublayer region into the dimension layer; 2. The CAD data generating device according to claim 1.
4. The processor, Converting raster data of the image of the dimension line sub-layer region into vector data; Extracting character data from the image of the dimension character sublayer region by character recognition processing; Merging the vector data and the character data into the dimension layer; 4. The CAD data generating device according to claim 3.
5. The CAD data includes a drawing frame layer in which a drawing frame is shown, the inference model is capable of identifying a drawing border layer region having characteristics of the drawing border; The processor, Identifying the drawing frame layer area from the image of the drawing; Converting raster data of the image in the drawing frame layer area into vector data; the vector data being the drawing border layer; 2. The CAD data generating device according to claim 1.
6. The CAD data includes a graphic layer including a graphic included in a drawing; the inference model is capable of identifying a region of a graphic layer having characteristics of the graphic; The processor, Identifying the graphics layer area from the image of the drawing; converting raster data of the image in the graphics layer area into vector data; the vector data is converted into the graphic layer; 2. The CAD data generating device according to claim 1.
7. The CAD data includes a character layer including characters included in the drawing, the inference model is capable of identifying character layer regions having characteristics of the character; The processor, Identifying the character layer area from the image of the drawing; extracting character data from the image of the character layer region by character recognition processing; forming the character data into the character layer; 2. The CAD data generating device according to claim 1.
8. A method for generating CAD data including a plurality of layer data from an image of a drawing, the method being executed by a CAD data generating device having a memory and a processor, the method comprising: The memory stores an inference model for identifying a layer region, which is a region having characteristics of each layer, from an image; The method comprises: the processor using the inference model to identify a layer region for each layer from the image of the drawing; The processor generates CAD data including data of the layer region as layer data of each layer; A method comprising:
9. A program for causing a computer having a processor and a memory to generate CAD data including a plurality of layer data from an image of a drawing, The memory stores an inference model for identifying a layer region, which is a region having characteristics of each layer, from an image; The program causes the processor to: Identifying a layer region of each layer from the image of the drawing using the inference model; generating CAD data including data of the layer area as layer data of each layer; A program to execute.
Citation Information
Patent Citations
Graphic input system
JP1987049575A
Drawing reader
JP1987260269A
Line segment determining method for machine drawing
JP1990268375A
Method and device for recognizing dimensional information on construction drawing
JP1997128418A
Architectural drawing data conversion program
JP2009003846A
