Processing of graphs representing images of technical drawings

A computer-implemented method processes technical drawing images using graph clustering and machine learning to reconstruct geometry and annotations, enabling efficient conversion to numerical models for manufacturing and defect detection.

JP2026022626APending Publication Date: 2026-02-12DASSAULT SYSTEMES SA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025125798
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-30
Filing Date
2025-07-28
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

There is a need for improved methods to detect technical data in images of technical drawings, such as machine parts or buildings, to facilitate their conversion into numerical models for manufacturing and defect detection.

Method used

A computer-implemented method processes a graph representation of a technical drawing image, clustering nodes and edges to reconstruct geometry and annotations, using machine learning to identify and associate technical annotations with geometry, enabling the creation of a numerical model.

Benefits of technology

The method efficiently extracts and associates technical data from drawing images, allowing for the reconstruction of numerical models suitable for manufacturing processes like laser cutting and 3D printing, and defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026022626000001_ABST
    Figure 2026022626000001_ABST
Patent Text Reader

Abstract

To provide a method, system and program for processing a graph representing an image of a drawing.SOLUTION: The method provides a graph for each view. The graph comprises nodes and edges. Each node corresponds to a classification of a pixel into one semantic class of a predetermined set. Each edge connects two nodes either if the two nodes represent adjacent pixels or if the two nodes represent pixels at a distance below a predetermined threshold. The predetermined set includes geometry, dimensions and dimension-related symbols. The method also clusters, based on a topology of the graph, nodes corresponding to a geometry class for reconstructing the geometry in the view and nodes corresponding to a dimension and dimension-related symbol class for reconstructing annotations of the view, and associates the reconstructed annotations with the reconstructed geometry based on locations of detecting the annotations and the topology of the graph.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to the field of computer programs and systems, and more particularly to methods, systems and programs for processing graphs representing images of technical drawings. [Background technology]

[0002] A technical drawing is a 2D representation of a technical object (e.g., a machine part, in which case the drawing is also called a "mechanical drawing," or a building) consisting of projections and cross-sections (a virtual cutaway representation of the object). The object can be a single machine part, an assembly of machine parts, or a building. All views allow the object to be recreated in 3D, for example, through reconstruction in CAD software. In a single-part or architectural drawing, the object's geometry can be dimensioned with tolerances to ensure the object is manufactured to the expected dimensions and quality. Assembly drawings allow the complete mechanical assembly to be understood. For decades, these drawings have been created by hand, then processed through 2D computer design and stored on paper, microfilm, or as pixelated scanned images. Figure 1A shows an example of a technical drawing, which is a mechanical drawing of a machine part.

[0003] Mechanical engineers / designers may need to convert photographs of technical drawing images into their numerical models (called digital technical drawings), for example, for manufacturing purposes. Conversion to a 2D numerical drawing can be the first step toward generating a 3D part. The reconstructed 3D part can be used to recreate a real object in any kind of manufacturing process, such as NC milling, 3D printing, or lost-wax casting. Another use case is comparing the generated numerical 3D part with a 3D scanned point cloud of the real part to detect defects and wear. Nevertheless, the numerical drawing itself can also be used, and is often sufficient. The drawing can serve as a reference and verification of the real mechanical object. For example, laser or waterjet cutting primarily focuses on 2D representations, allowing direct work by exporting the numerical drawing to DXF or other file formats. In many fields, technical drawings are used to extract similar patterns and elements. For example, architectural drawings are similar to the assembly of mechanical parts. In this case, applications include area and material consumption calculations based on accurate 2D geometry.

[0004] In this context, there remains a need for improved methods for detecting technical data in images of technical drawings. Summary of the Invention

[0005] Accordingly, a computer-implemented method for processing a graph is provided. The graph represents an image of a technical drawing comprising at least one view and at least one technical annotation. The method comprises providing the graph for each view of the at least one view. The graph comprises nodes and edges. Each node corresponds to a classification of one or more pixels in the view into one semantic class of a predetermined set of semantic classes. Each edge connects two nodes if the two nodes represent adjacent pixels or if the two nodes represent pixels that are at a distance below a predetermined threshold. The set of semantic classes includes at least classes of geometry, dimension, and dimension-related symbols. The method further comprises, for each view of the at least one view, clustering nodes corresponding to the geometry classes to reconstruct geometry in the view based on a topology of the graph, and clustering nodes corresponding to the dimension and dimension-related symbol classes to reconstruct technical annotations for the view. The method further comprises, for each view of the at least one view, associating a reconstructed technical annotation with a reconstructed geometry based on the detected position of the technical annotation and the topology of the graph.

[0006] The method may comprise one or more of the following: The step of providing a graph comprises: determining a skeleton for said view by making lines in said technical drawing thinner than a predetermined threshold; determining traces of the skeleton, each trace being a line that terminates at a junction point, the junction point being a pixel of the skeleton that has at least three neighboring pixels within the skeleton; defining each graph node as representing a respective trace; making the lines in the view thinner than a predetermined threshold comprises making the lines one pixel thick; providing the graph further comprises defining the edges of the graph; defining a first edge connecting the two nodes if the two traces represented by the two nodes are pixel-wise connected; defining a second edge connecting the two nodes if the two traces represented by the two nodes are not pixel-wise connected but are at a distance less than a predetermined number of pixels; providing the graph further comprises applying a machine-learned segmentation function configured to label each node of the graph with one semantic class of the set of semantic classes; the method further comprising machine learning the segmentation function before providing the graph; The step of clustering nodes corresponding to the geometry classes includes: dividing each node having said geometry class into candidate segments; grouping the candidate segments into either line or arc segments according to a grouping criterion that evaluates smallness of angular deviation for line segments and similarity of length and angular deviation for arc segments using a predetermined threshold; grouping line segments and / or arc segments linking pairs of connected nodes to reconstruct the geometry, where two line segments are grouped if they have the same axis and are connected at their endpoints, and two arc segments are grouped if they have the same center and radius and are connected at at least one endpoint of the arc; clustering the nodes corresponding to the dimension-related symbols and dimension classes comprises grouping the nodes of the dimension and dimension-related symbol classes according to a grouping criterion that evaluates similarity of position and / or orientation; the dimension-related symbol class includes subclasses of arrows, main dimension lines, and extension dimension lines, and the method further comprises filtering the clustered nodes of the dimension-related symbol class and dimension class according to the following rules: The arrowheads are in the same direction as or connected to the associated dimension line, Extension lines are perpendicular or locally perpendicular to the associated main dimension line or associated arrowhead, Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph comprises linking the reconstructed technical annotations with their corresponding reconstructed geometry according to the topology of the graph according to the following rules: For linear or angular dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead, if any, which is itself linked to the dimension extension line, if any, which is itself linked to the geometry, and For diameter or radius dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead, if any, which is itself linked to the geometry, Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph, - detecting text and / or symbols of said technical annotations and the positions of said detected text and / or symbols; for each reconstructed technical annotation, associating the detected text and / or symbols with a corresponding dimension line based on positional proximity; and / or Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph further comprises filtering the associated detected text and / or symbols of each reconstructed technical annotation according to the following rules: A linear or angular dimension text must be linked to two geometries, Radius or diameter dimension text must be linked to a single geometry.

[0007] Further provided is a computer program comprising instructions for carrying out the method.

[0008] Additionally, a computer readable data storage medium having a computer program recorded thereon is provided.

[0009] Further provided is a computer system comprising a processor and a memory coupled to the processor, the memory having a computer program stored therein. [Brief explanation of the drawings]

[0010] [Figure 1A-1] FIG. 1 is a diagram illustrating the method. [Figure 1A-2] FIG. 1 is a diagram illustrating the method. [Figure 1B] FIG. 1 is a diagram illustrating the method. [Figure 2] FIG. 1 is a diagram illustrating the method. [Figure 3] FIG. 1 is a diagram illustrating the method. [Figure 4-1] FIG. 1 is a diagram illustrating the method. [Figure 4-2] FIG. 1 is a diagram illustrating the method. [Figure 5] FIG. 1 is a diagram illustrating the method. [Figure 6] FIG. 1 is a diagram illustrating the method. [Figure 7] FIG. 1 is a diagram illustrating the method. [Figure 8] FIG. 1 is a diagram illustrating the method. [Figure 9] FIG. 1 is a diagram illustrating the method. [Figure 10] FIG. 1 is a diagram illustrating the method. [Figure 11] FIG. 1 is a diagram illustrating the method. [Figure 12] FIG. 1 is a diagram illustrating the method. [Figure 13] FIG. 1 is a diagram illustrating the method. [Figure 14] FIG. 1 is a diagram illustrating the method. [Figure 15] FIG. 1 is a diagram illustrating the method. [Figure 16] FIG. 1 is a diagram illustrating the method. [Figure 17] FIG. 1 is a diagram illustrating the method. [Figure 18] FIG. 1 is a diagram illustrating the method. [Figure 19] FIG. 1 is a diagram illustrating the method. [Figure 20] FIG. 1 is a diagram illustrating the method. [Figure 21] FIG. 1 is a diagram illustrating the method. [Figure 22] FIG. 1 is a diagram illustrating the method. [Figure 23-1] FIG. 1 is a diagram illustrating the method. [Figure 23-2] FIG. 1 is a diagram illustrating the method. [Figure 23-3] FIG. 1 is a diagram illustrating the method. [Figure 24] FIG. 1 is a diagram illustrating the method. [Figure 25] FIG. 1 is a diagram illustrating the method. [Figure 26] FIG. 1 is a diagram illustrating the method. [Figure 27] FIG. 1 is a diagram illustrating the method. [Figure 28-1] FIG. 1 is a diagram illustrating the method. [Figure 28-2] FIG. 1 is a diagram illustrating the method. [Figure 28-3] FIG. 1 is a diagram illustrating the method. [Figure 29-1] FIG. 1 is a diagram illustrating the method. [Figure 29-2] FIG. 1 is a diagram illustrating the method. [Figure 29-3] FIG. 1 is a diagram illustrating the method. [Figure 30] FIG. 1 illustrates an example of a computer system. DETAILED DESCRIPTION OF THE INVENTION

[0011] Referring to the flowchart of FIG. 2, a computer-implemented method for detecting technical data in an image of a technical drawing is proposed. The technical drawing comprises at least one view of a technical object and at least one technical annotation. The method comprises a step (S10) of identifying one or more views in the technical drawing by applying a view splitting module configured for view identification in the technical drawing. The method further comprises a step (S20) of identifying one or more technical annotations in the view by applying, for each identified view, an annotation detection module configured for technical annotation identification in the view. The method further comprises a step (S30) of identifying characters in the technical annotation by applying, for each identified technical annotation, a text recognition module configured for character identification in the technical annotation. The method further comprises a step (S40) of determining, for each identified view, a graph representation of the view by applying a graph module configured for determining a graph representation of the view. The graph representation comprises nodes and edges. Each node corresponds to a classification of one or more pixels in the view into one semantic class of a set of predetermined semantic classes. Each edge connects two nodes either if they represent adjacent pixels or if they represent pixels that are at a distance below a predetermined threshold. The set of semantic classes includes at least the semantic classes of geometry, dimension, and dimension-related symbols. The method further comprises a step (S50) of associating, for each identified view, nodes corresponding to dimension-related symbols or dimension classes with nodes corresponding to geometry classes using the topology of the graph and the identified characters. The method may be referred to as a "reconstruction method" because it may form or form part of a method for reconstructing a numerical model of a technical drawing from an image.

[0012] The reconstruction method forms an improved solution for detecting technical data in images of technical drawings.

[0013] In particular, this method forms a step toward obtaining a numerical model of a technical drawing based solely on its image. In fact, the method identifies all the technical data necessary to obtain such a numerical model, namely, views, technical annotations, and characters within the annotations. The method also creates (numerically) associations between the geometry in the drawing and the annotations (symbols and dimensions). All of this identified technical data and the resulting associations can be processed to obtain a complete numerical model of the technical drawing. In particular, the associations can be used, for example, so that numerically modifying a dimension in the model causes a corresponding modification of the associated geometry and / or associated symbols (e.g., dimension arrows). Furthermore, each module can be equipped with a neural network trained to perform its respective task, so that the reconstruction of the numerical drawing can leverage the power of machine learning. Therefore, the method is an efficient tool to help users reconstruct meaningful numerical drawings from their photographs. Graphical methods, described below, may be part of the reconstruction method and are advantageous in this context, allowing for the determination and use of a graphical representation of the numerical drawing (or rather each of its views), which is an efficient tool for numerical drawing reconstruction.

[0014] The reconstruction method may in particular form or be part of a numerical drawing reconstruction process that receives as input an image of a technical drawing and outputs a numerical model thereof. To that end, the process may comprise applying the method and, as a further step, processing the views, annotations, and characters identified by the method, as well as the associations identified by the method between the geometry in the views and the technical annotations, to obtain a numerical model representing the drawing (which may be referred to as a "numerical drawing"). This numerical model may be a visual representation of the drawing and / or a file capturing such a visual representation (e.g., a file of specifications of the pixel locations of the identified geometry and technical annotations), where the technical annotations identified by the method (e.g., dimension text) are editable and the geometry and technical annotations are constrained by the dimensions and associations identified by the method (i.e., changing the dimension text causes the associated geometry and, if any, associated symbols (arrows, dimension main lines, dimension extension lines) to change accordingly). Processing the views, annotations, and characters identified by the method to obtain a numerical model may be performed by any suitable method (the compilation of those identified by the method into a numerical model is a matter of implementation), and the numerical model may be converted into a DXF file (e.g., as a further step of the method).

[0015] Additionally or alternatively, if the technical drawing is a mechanical drawing of a mechanical part, the numerical drawing reconstruction process may be included in a manufacturing process that may include performing the numerical drawing reconstruction process to obtain the numerical drawing, converting it into a DXF file of the technical drawing, and using the DXF file for manufacturing the mechanical part by laser cutting or water jet cutting. As known per se, manufacturing by laser cutting or water jet cutting may be performed using the DXF file directly by feeding the DXF file to a laser cutter or water jet cutter, which processes it to manufacture the mechanical part according to the specifications defined in the DXF file. Using the DXF file for manufacturing the mechanical part by laser cutting or water jet cutting may include: feeding the DXF file as input to a laser or water jet cutter; and Processing the DXF file to manufacture mechanical parts by means of a laser cutter or a water jet cutter, as known in the art of laser cutting / water jet cutting.

[0016] In addition to, or as an alternative to, including the reconstruction method in a numerical drawing reconstruction process or a laser or waterjet cutting manufacturing process, as described above, the method is also an image processing method for processing an image of a numerical drawing to identify technical data within the image. The image may be the result of a scan of a paper technical drawing. Alternatively, the image may be the result of a fully numerical design process of the technical drawing. In either case, the method processes the image, and in particular its pixels, to infer relevant technical data within the image.

[0017] As mentioned above, a technical drawing is a 2D representation of a technical object (e.g., a mechanical part, in which case the drawing is also called a "mechanical drawing," or a building) consisting of projections and cross-sections (a representation of a virtual cut through the object). The object may be a single mechanical part, an assembly of mechanical parts (an assembly of mechanical parts is also called a "mechanical part" because it is itself a mechanical part), or a building. All views allow the object to be recreated in 3D, for example, through reconstruction in CAD software. In a single-part or architectural drawing, the object's geometry may be dimensioned with tolerances to ensure the object is manufactured to the expected dimensions and quality. Assembly drawings allow the complete mechanical assembly to be understood. For decades, these drawings have been created by hand, then processed through 2D computer design and stored on paper, microfilm, or as pixelated scanned images. Figure 1A shows an example of a technical drawing 1, which is a mechanical drawing of a mechanical part. Figure 1B is a close-up of the view in Figure 1A with all of its technical annotations.

[0018] Any technical drawing in this disclosure comprises one or more views. Each view is a view of the technical object (machine part or building) represented in the technical drawing. Each view in a technical drawing may belong to one of the following view types: main view, isometric view, section view, title block, and other. An isometric view is a 3D view of an object. A section view is a cross-sectional view or partial cross-section of an object through one of the object's plane sections, a concept known per se. It consists of a 2D view of an object corresponding to a plane cut through the object. A main view, also called a principal projection view, is a 2D view of an object from one side (e.g., from above, below, back, front, or side) without a cross section but with dimensional annotations. The "other" type may include all other types of views that may be found in a technical drawing, such as text describing materials, title blocks, note blocks in a technical drawing, or detail views. A detail view is an enlarged view of an object or part of it. A detail view may contain or be associated with a section view. The example technical drawing 1 of FIG. 1A includes a main view 10, an isometric view 12, a title block 14, a notes block 16, and a detail view 18 associated with a cross-section.

[0019] Any technical drawing in this disclosure further includes one or more technical annotations. Each technical annotation here is associated with a respective view and may therefore be referred to as an “in-view” technical annotation. A technical annotation is a sequence of one or more characters (letters and / or numbers) and / or symbols that describe technical characteristics of an object, such as geometry, dimensions, construction features, and / or tolerances. Each annotation here may belong to any of the following types: dimension text (i.e., text that describes the dimensions of the geometry of the object depicted in the drawing), other text (i.e., any other text in the drawing that is not dimension text), and symbol. For example, the technical drawing 1 in FIG. 1A includes dimension annotation 100 and tolerance annotation 120 (i.e., belonging to the other text type). Any technical annotation herein, and in particular any dimension text, may comprise a main text and one or both of a lower tolerance (i.e., text located at the bottom of the annotation and indicating the tolerance value associated with the annotation, e.g., the minimum limiting tolerance value) and / or an upper tolerance (i.e., text located at the top of the annotation and indicating the tolerance value associated with the annotation, e.g., the maximum limiting tolerance value). A lower or upper tolerance is not the same object as a tolerance annotation (such as annotation 120 in Figure 2) and is not itself a technical annotation. It is part of the technical annotation and is associated with its main text. An example of an upper / lower tolerance is the "±threshold" for a dimension.

[0020] The reconstruction method is for the detection of technical data in images of technical drawings. This means that the method receives an image of a technical drawing as input and performs the detection of technical data in the image, i.e., related to the object (architecture or machine part) represented by the drawing. In particular, the method detects and outputs views (e.g., in the form of coordinates and dimensions of the bounding box of each view, as described below), technical annotations in the views (e.g., in the form of coordinates and dimensions of the bounding box of each annotation, as described below), technical characters forming the technical annotations (e.g., in any format for encoding the characters), and associations between geometry and annotations (e.g., any form of suitable indexing and association between indexing, or any other suitable implementation).

[0021] The method may comprise an initial step of providing an image of a technical drawing. As mentioned above, the technical drawing image may result from a design step of the drawing, for example, on CAD software or a CAD system. Providing the image of the drawing may include performing this design step and saving the drawing as an image. Alternatively, the technical drawing image may be a scan of the technical drawing (e.g., on paper). In this case, providing the image of the technical drawing may include scanning the technical drawing to obtain the image. As a further alternative, regardless of whether the image is obtained from a scan or from a previous design process, providing the image may simply include retrieving / downloading / obtaining the image from a (e.g., remote) memory, server, or database where the image is stored after being scanned or obtained through a previous design process.

[0022] Continuing with reference to the flowchart of FIG. 2 , the reconstruction method comprises a step (S10) of identifying one or more views (e.g., all views) in the technical drawing. This identification is performed by applying a view partitioning module. The view partitioning module is a function configured to receive an image as input and to perform view identification in the technical drawing, i.e., identifying views in the technical drawing. The view partitioning module may, for example, output, for each view, a (e.g., rectangular) bounding box around the view and / or output the coordinates of the bounding box (e.g., in the case of a rectangular bounding box, the 2D coordinates of the center of the box, its height and width). The view partitioning module may, for example, output the coordinates of the bounding box without a visual rendering of the box, or output a visual rendering of the box in addition to the coordinates (i.e., around the view). The view partitioning module may further output, for each view, a classification of the view (e.g., associated with the bounding box or its set of coordinates) in one of a set of predetermined semantic classes. The set of semantic classes includes main view, isometric view, section view, title block, and other (i.e., the view types described above) semantic classes. In other words, the view splitting module may be configured for view detection in the technical drawing and for classifying each detected view into one semantic class from the set of predetermined semantic classes. At S10, the view splitting module may optionally further output a visual rendering of the view identifications by outputting a drawing image including all bounding boxes around all identified views. For example, each semantic class may be associated with a color, such that each bounding box in the visual rendering is colored with the color of that class.

[0023] The view splitting module may comprise or include a neural network, also referred to as a view splitting neural network, and the reconstruction method may include training the view splitting neural network, for example as part of an initial training step (also referred to as an "offline phase" or fine-tuning of a pre-trained model). Training of a view splitting neural network is described below.

[0024] The reconstruction method further comprises, for each identified view, a step (S20) of identifying one or more technical annotations in the view (e.g., all technical annotations in the view). The identifying step S20 is performed by applying an annotation detection module. The annotation detection module is a function configured to receive a view as input and to perform technical annotation identification in the view, i.e., identifying all technical annotations in the view. The annotation detection module may, for example, for each technical annotation in the view, output a (e.g., rectangular) bounding box around the annotation and / or output the coordinates of the bounding box (e.g., in the case of a rectangular bounding box, the 2D coordinates of the center of the box, its height and width). The annotation detection module may, for example, output the coordinates of the bounding box without a visual rendering of the box, or output a visual rendering of the box (i.e., around the annotation) in addition to the coordinates. The annotation detection module may further output, for each annotation, a classification of the annotation (e.g., associated with a bounding box or a set of its coordinates) in one of a set of predetermined semantic classes. The set of semantic classes includes the semantic classes of dimension text, other text, and symbol (i.e., the types of technical annotations described above). In other words, the annotation detection module is configured to detect technical annotations in the views of the technical drawing and classify each detected technical annotation into one of the set of predetermined semantic classes including the semantic classes of dimension text, other text, and symbol. At S20, the annotation detection module may optionally further output a visual rendering of the annotation identifications by outputting, for each view, a drawing image including all bounding boxes around all identified annotations in all views. For example, each semantic class is associated with a color, such that each bounding box in the visual rendering is colored with the color of its class.

[0025] The annotation detection module may comprise or include a neural network, also referred to as an annotation detection neural network, and the reconstruction method may include training the annotation detection neural network, for example as part of an initial training step.

[0026] The method may include training the annotation detection neural network and / or training the view split neural network, or the training of the annotation detection neural network and / or the training of the view split neural network may be performed before the method is performed, i.e., in advance.

[0027] As known per se from the field of machine learning, processing an input by a neural network involves applying to the input an operation defined by data including weight values ​​or parameters. Thus, training a neural network involves determining values ​​for the weights / parameters based on a dataset configured for such training; such a dataset may be referred to as a learning dataset or training dataset. To that end, a dataset includes pieces of data, each of which forms a training sample or training example. The training samples / examples represent the diversity of situations in which the model will be used after learning. Any training dataset herein may include more than 1,000, 10,000, 100,000, or 1,000,000 training samples / examples. In the context of the present disclosure, "learning / training a neural network based on a dataset" means that the dataset is a learning / training dataset for the neural network, based on which the values ​​for the weights / parameters are set.

[0028] As known from machine learning, a neural network may be defined by its architecture, parameters, and hyperparameters. The architecture consists of layers, starting with an input layer, whose number of neurons may be determined by the dimensionality of the input data. This layer is followed by multiple hidden layers with a predetermined number of neurons and activation functions. These layers and neurons define the depth and width of the network, and the activation functions may introduce nonlinearity into the model. The output layer may have the same number of neurons as there are variables in the output data. The interconnections between these layers define the topology of the neural network. Neural network parameters are learnable weights and biases determined during the training process. In contrast, hyperparameters are predefined settings that are not learned from the training data. These include the number of hidden layers, the number of neurons per layer, etc. At least two settings may be defined to train a neural network. First, a loss function, which is a metric that measures the error between the training data and the model's predictions. Second, an optimizer, which modifies the model's weights and biases during the training process to minimize the loss function. Each optimizer has its own set of hyperparameters.

[0029] Training the annotation detection neural network and the view partitioning neural network may include forming training datasets for view partitioning training and annotation detection training. Alternatively, training these neural networks may include retrieving the training datasets, for example, from a (e.g., remote) memory, server, or database where they are created and then stored. The training datasets include training examples. Each training example includes technical drawings having view labels for each view in the technical drawing and annotation labels for each technical annotation in the drawing. Each training example may include, for example, for each view in the technical drawing, coordinates of a bounding box around the view (e.g., 2D coordinates of the center and dimensions of the bounding box) and a label indicating the classification of the view into one of the aforementioned semantic classes (primary view, isometric view, section view, title block, and other). Each training example may further include, for each annotation in the technical drawing, the coordinates of a bounding box around the annotation (e.g., the 2D coordinates of the center and the dimensions of the bounding box) and a label indicating the classification of the annotation into one of the aforementioned semantic classes (dimensional text, other text, and symbol). Each training example may optionally include a visual rendering of the bounding box, if it is to be output by the neural network as described above. For each training example, the technical drawing is the input (i.e., what is to be input to the corresponding neural network), and the label forms the output (i.e., the ground truth that the prediction of the corresponding neural network should approach). The visual rendering is also part of the output.

[0030] Forming the training dataset may include forming training examples by determining labels from DXF files of technical drawings for each training example. The method may include providing DXF files of technical drawings and applying an algorithm to extract labels from the DXF files. Figure 3 shows a flowchart of the algorithm. The algorithm may be implemented in Python based on the ezDXF package. This algorithm allows for the generation of over 2,000 randomly labeled technical drawings from 700 DXF templates. DXF is a file containing vectorized image data, such as the exact coordinates of each point, line, text, and other geometry in a technical drawing. However, because DXF files do not always have a consistent structure, extracting the desired information and regrouping primitive elements into more meaningful blocks of data may not be immediately feasible. Figure 4 shows an example DXF file with extracted entity and block information.

[0031] As shown in the flowchart in Figure 3, the algorithm comprises a first block which is the reader block. This block implements the reader algorithm. Figure 5 shows the flowchart of the reader algorithm. As can be seen in Figure 5, the reader algorithm takes the original DXF file as input and returns two json files with semantic information (entity information and block information) and a template version of the original DXF with no dimensions and with default colors set for all entities.

[0032] The reader algorithm begins with initialization, which involves reading the DXF with the readfile function from the ezDXF package and extracting all contents into variables. Initialization also involves assigning and applying default colors to the drawing entities according to their entity type (e.g., text = magenta, solid lines = green, dashed lines = teal).

[0033] The algorithm then comprises a content / information extraction step, as shown in Figure 5. The content extraction process can be quite heavy, as the expected information varies for each entity (LINE, TEXT, MTEXT, ELLIPSE, ARC, DIMENSION), some of which even have subtypes. The algorithm may look only at INSERT entities, which are blocks that contain other entities, sometimes even another INSERT. For each such block, the algorithm applies a series of tests to determine which one it is most likely to be depending on the entities inside. The tests return either True or False. The tests may be: (1) Hatch test: False if it contains anything other than line entities. Calculate the angle of all lines and group them. Returns True if 70% or more of the lines share the same angle. (2) Structural line test: Returns False if the object contains anything other than dashed lines or arcs, and does not contain two or fewer lines and one or fewer arcs. Returns True if there is only one line. If there are two lines, returns True only if they are perpendicular. (3) Reference test: True only if it contains one uppercase, one-character-long text and a small number of lines (either lines, polylines, or solids). Returns False if it contains any other type of entity. (4) Annotation test: True only if it contains two or more characters of text and some polylines. (5) Table Test: False if there is anything other than lines or text. All lines must be vertical or horizontal, and three or more lines must share the same length.

[0034] The information extraction step then comprises an SBlock processing step. When generating a DXF file from a numerical drawing, some elements may be manually grouped into layers. If such layers exist, the entities are grouped by an algorithm into so-called SBlocks in that step. These SBlocks are specific to the complex attachments present in the drawing.

[0035] The information extraction step then comprises a block0 processing step: since many entities (such as some dimensions) are not contained in any block, the algorithm groups them into an imaginary block called block0 in that step.

[0036] The information extraction step then comprises a dimension block conversion step, where some dimensions, such as cumulative dimensions, are generated directly as separate blocks with all extension lines, dimension lines, arrows and text cut off, which the algorithm separates and converts into standard dimension entities.

[0037] As shown in Figure 5, the next step in the reader algorithm is to interpret the extracted information. This step begins with identifying keypoints. Dimension entities contain keypoints located near the geometry they constrain. Then, for each block, the algorithm loops through all entities and updates the block's bounding box. If an entity-defining point (a line endpoint, a circle center) is near a dimension keypoint, this keypoint is saved in the block as a reference for future random dimension generation (though the dimension is not immediately assigned to this block). These keypoints are approximate and, in most cases, are insufficient to definitively say whether a dimension is part of a block. Next, the algorithm calculates the block size, which is the score associated with the block depending on its overall content. Higher scores are associated with blocks that likely represent view geometry, excluding isometric views, annotations, tolerances, and structural elements. Score = Number of key points + Number of lines (up to 10) + Number of circles x 3 + Number of arcs (up to 10) + Number of linear dimensions x 20 + Number of diameter dimensions x 20 + Number of angular dimensions x 20 - Number of text x 5 - Number of solids - Number of ellipses. Note that in most cases, blocks do not contain dimension entities. Isometric views consist mainly of ellipse entities. Annotations and tolerances contain text. Structural elements are dashed lines, so they do not increase or decrease the score. Knowing the block boundaries, the algorithm tests whether this block is likely to be the title block of the drawing. In most cases, the title block is exported to a separate INSERT entity, but sometimes its elements are scattered across block0. In such cases, the algorithm reconstructs the title block based on keywords, text density, and table lookup.

[0038] Because dimensions are not directly part of the block, the algorithm recreates this link to allow the lighter algorithm to correctly randomly generate dimensions (and not create dimensions in nearby isometric views). The link is established using the block size score and block area constraints. Blocks are sorted by size score, and if a dimension's keypoint is within a block's area, the dimension is associated with this block and the block is specifically considered view geometry. Section text is often isolated in block0, which causes the section bounding box to not include the text (e.g., "Section AA"). The algorithm recreates this link by finding a block with a hatch pattern near the section text that matches the section callout size, and assigning the section to that block.

[0039] The reader algorithm then includes an information saving step (i.e., saving the extracted and interpreted information), as shown in Figure 5. To save the information, the algorithm structures it into a dictionary and saves it in a json file. The algorithm then generates a template DXF. Tolerance symbols typically do not render correctly in images generated from DXF files using the ezDXF package. To address this issue, the algorithm adds small lines over the symbols to visually reconstruct them. The algorithm removes blocks and entities with impossible coordinates near infinity. The algorithm then saves the DXF without the dimension entities as a template DXF for future random dimension generation by the writer algorithm.

[0040] The algorithm then comprises a writer algorithm that is applied to the output of the reader algorithm, as shown in Figure 3. Figure 6 shows a flow chart of the writer algorithm.

[0041] The writer algorithm takes as input semantic information stored in a json file and a template DXF file, and outputs a modified DXF file with random dimensions placed around the geometry and an updated semantic information json file. From the semantic information, the algorithm creates a mask that indicates where there is space to generate new dimensions.

[0042] Next, the algorithm selects a predetermined number of random dimensions from the original. The dimension information was stored in the entity information json file. Drawing the dimensions involves several steps. First, the algorithm randomly shifts the position of the main dimension line, and then randomizes the text position, orientation, and value if possible. The algorithm tests whether the new dimension fits into the mask. If so, the algorithm adds it to the DXF, updates the block outline based on the dimension endpoints, and adds it to the mask.

[0043] To draw the new random dimension, the algorithm uses keypoints defined in the block info json file as anchors. From these keypoints, the algorithm determines the optimal orientation of the dimension so that the extension lines traverse the entire view and do not overlap too many objects. The algorithm draws the dimension following the same process as the original dimension.

[0044] The final step of the Reiter algorithm consists of modifying the color of the newly generated arrows, extension lines, and dimension lines.

[0045] The algorithm also comprises a visualizer algorithm, as shown in the flow chart of Figure 3. Figure 7 shows a flow chart of the visualizer algorithm.

[0046] The visualizer algorithm takes a modified DXF as input and outputs a black and white image and a color version of the same image. Since the modified DXF was colored, the algorithm replicates it and generates a black and white version. The algorithm creates a colored DXF for each semantic class it detects. For example, in the colored DXF for this semantic class, elements of the class are green and the others are red. Thus, using one modified DXF, the algorithm obtains one black and white DXF and eight green and red DXFs. Rendering is done using ezDXF package functions.

[0047] The algorithm also comprises a labeller algorithm, as shown in the flow chart of Figure 3. Figure 8 shows the flow chart of the labeller algorithm.

[0048] The labeler algorithm takes the modified DXF, the modified semantic information json file, and all generated images as input. It outputs a csv file for training the view segmentation and annotation detection neural network. Indirectly, it also generates view-focused images. The algorithm starts by obtaining a global boundary. The global boundary is the boundary of the frame (enclosing the view and / or annotations) or the boundary of the entire drawing. The frame boundary may later be used to convert DXF coordinates to pixel coordinates of the drawing. The frame includes a main frame or outer frame, which is the global frame of the entire drawing, and any drawing here may always have one.

[0049] For each annotation detected by the annotation detection neural network, the algorithm calculates its bounding box. Chamfers can cause problems because they are not stored directly as dimensions, but in their own specific block where all text is considered separately. To solve this, the algorithm merges them into a single dimension text. MTEXT is the default type for dimension text in DXF files; other text is of type TEXT.

[0050] A view may consist of multiple blocks because they have geometry, tolerances, patterns, etc. To merge blocks into views, section views, isometric views, title blocks, or other (view split classes), the algorithm applies an initial approximate classification of the blocks based on test results stored in the block information json file. Then, based on this classification and block boundaries, the algorithm establishes links between blocks, linking small blocks representing tolerances to larger blocks whose dimensions are the view's geometry. The algorithm then recursively merges blocks, recreating the view and deriving its boundaries from block boundaries.

[0051] On a black and white image of the drawing, the algorithm finds the frame boundary by considering the outer black pixels that form a rectangle. Now that the frame pixel locations and their positions in the DXF file coordinate system are precisely known, the algorithm can convert between the two. All entity bounding boxes calculated using the DXF coordinates are projected into the image coordinate system and saved in a CSV. The algorithm also generates an image with the calculated bounding boxes clearly visible to verify data generation.

[0052] To generate data for feature detection, the algorithm starts with monochrome and color images and crops them based on the view bounding boxes calculated for view splitting. Then, all feature bounding boxes are projected onto these view images.

[0053] Figure 9 shows a training example for training the view-segmentation neural network obtained by the above algorithm. Figure 10 shows a training example for training the annotation detection neural network obtained by the above algorithm.

[0054] This section describes the implementation of the view splitting module training. The task of the view splitting neural network is to detect all views, title blocks, and tables of interest on a drawing. There are many neural network models that can be used for this task. In this implementation, the view splitting neural network may be a Faster-RCNN model, a deep convolutional neural network. It operates in two steps: region proposal and classifier. The region proposal task is to quickly detect regions of interest that are most likely to contain objects. Next, the classifier focuses on the proposed regions and performs a deeper analysis of the image. Both use convolutional neural networks to learn patterns and features from images. In this implementation, the number of drawing images used for training is approximately 2,100 (synthetically generated). The images are divided into training (70%), validation (15%), and test (15%). Each time an image is called as input, the method may apply data augmentation transformations such as blurring, Gaussian noise, random cropping, random 90° rotation, and color jitter. Images are resized to a shape of (800, 800) and then normalized using a mean of 0.9077 and standard deviation of 0.1827 (the mean and deviation of the dataset). They are then grouped into batches of 48 images. The model is trained for 100 epochs, using a One Cycle learning rate scheduler (a warm-up strategy during the first 10 epochs followed by a sinusoidal decrease), with a learning rate of 10^(-4). The optimizer used for gradient descent is the Adam optimizer. Two losses are minimized during training: a Smooth L1-Loss for the regressor (L1Loss - PyTorch 2.2 documentation) and a Cross-Entropy loss for classification (CrossEntropyLoss - PyTorch 2.2 documentation).

[0055] The training results of these implementations are shown in the two tables below. All elements are detected, and those with large text annotations and tables are either ignored or classified independently as a fifth class (Other in dark teal). Title blocks are found in teal, cross sections in green, primary views in blue, and isometric views in dark blue.

[0056] The metrics used to measure the performance of the model are: Average Precision (MAP): Measures how accurate the prediction is. This is broken down into different sub-metrics: MAP 50, MAP 75, MAP (large), and MAP (medium), which measure the MAP for objects with 50% and 75% Intersection over Union (IoU) with the true region, and for large and medium region objects, respectively. The results are as follows: [Table 1] Average Recall (MAR): Measures how well the model finds all positives. We subdivide this into MAR 1, MAR 10, MAR 100, MAR (large), and MAR (medium), giving the average recall given 1, 10, and 100 detections per image, respectively, and the average precision for large and medium area objects. The results are shown below. [Table 2]

[0057] FIG. 13 shows an example of view detection achieved according to the above implementation.

[0058] We describe the implementation of training an annotation detection neural network. The neural network's task is to detect all text information classified as dimensional text, other types of text, and symbols. The Faster-RCNN model architecture is also used for this neural network, but it is specialized for this task. Each synthetic drawing contains multiple views, providing more input images for the element detection model. The images are divided into training (90%), validation (5%), and test (5%). Each time an image is called as input, the method applies data augmentation transformations such as blurring, Gaussian noise, random cropping, random 90° rotation, and color jitter. The images are resized to a shape of (800, 800) and then standardized using a mean of 0.958 and a standard deviation of 0.174 (the mean and standard deviation of the dataset). They are then grouped into batches of 48 images. The model is trained for 100 epochs, using a One Cycle learning rate scheduler (a warm-up strategy during the first 10 epochs followed by a sinusoidal decrease), with a learning rate of 10^(-3). The optimizer used for gradient descent is the Adam optimizer. Two losses are minimized during training: a Smooth L1-Loss for the regressor and a Cross-Entropy loss for classification.

[0059] The training results for these implementations are shown in the two tables below. [Table 3] [Table 4]

[0060] 2 , the method further comprises, for each identified technical annotation, identifying characters (i.e., letters, numbers, and / or symbols) within the technical annotation (S30). This is done by applying a text recognition module configured to identify characters within the technical annotation. The text recognition module may be configured, given an input technical annotation, to detect the orientation of the technical annotation, horizontalize the technical annotation (if the detected orientation is not already horizontal), and then recognize the characters within the technical annotation. The text recognition module may be further configured, if the input technical annotation comprises an upper tolerance and / or a lower tolerance, to group the recognized characters into three groups: technical annotation text, upper tolerance, and lower tolerance.

[0061] The text recognition module may include a neural network, also referred to as a "text recognition neural network." This neural network performs the text recognition portion of the text recognition module, and orientation detection and annotation leveling may be performed by deterministic functions or algorithms. The method may include training the text recognition neural network, for example, offline. This may include creating a training dataset for text recognition. This may involve generating synthetic text images that visually resemble actual technical annotations, with the training dataset consisting of these synthetic text images. To this end, the method may apply a text generator capable of generating hundreds of thousands of text images in a few minutes. This generator covers all letters a-z, all digits 0-9, punctuation marks: %()*+°,-. / :[]<>, and mathematical symbols: \u00D8 (diameter o), \u00B1 (plus-minus ±), and \u007C (vertical bar |). Into a blank image, the generator writes random text, either words from a word dictionary composed of common drawing vocabulary or dimensional text. Dimensional text consists of a prefix, a main dimension, a tolerance, and a suffix. The prefix and suffix may be mathematical symbols or words. The main dimension is a random number possibly with a dot. The tolerance may be either horizontal or vertical using plus and minus signs. Figure 12 shows the training data for text recognition.

[0062] We describe the implementation of the Text Recognition module, whose task is to recognize characters from the text detected in the Element Detection task, and then create readable text, upper and lower thresholds from these characters depending on their position on the image. The module combines different architectures and components. First, a Pytorch implementation of the Character-Region Awareness For Text detection (CRAFT) model to detect text orientation by finding an oriented box around the text. Algorithm that makes text horizontal when it knows the text orientation. · Faster-RCNN model architecture for text recognition neural network to recognize characters. An algorithm that groups characters as text, upper tolerance, or lower tolerance depending on their position on the image. This is shown in Figure 14.

[0063] In these implementations, the training dataset for text recognition consists of 50,000 generated texts, with or without tolerances. Characters range from alphabets (lowercase and uppercase) and numbers to special characters such as "±", "O", and "°", as well as various arithmetic symbols and parentheses. Images are divided into training (90%), validation (5%), and test (5%). Each time an image is called as input, the method applies data augmentation transformations such as blurring, Gaussian noise, padding, random brightness and contrast changes, low-angle rotation, and color jitter. In these implementations, the method considers 83 classes, one for each possible character: " ", "%", "(", ")", "*", "+", ",", "-", ".", " / ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", "<", ">", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "]", "^", "a", "b", "c", "d", The following are the values: "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "|", "°", "±", "×", "O". The images are resized to a shape of (156, 96) and then normalized using a mean of 0.902 and a standard deviation of 0.197 (the mean and deviation of the dataset). They are then grouped into batches of 32 images. The model is trained for 30 epochs using a Step learning rate scheduler (dividing the learning rate by 10 every 10 epochs) with a learning rate of 10^-4. The optimizer used for gradient descent is the Adam optimizer. Two losses are minimized during training: Smooth L1-Loss for the regressor and Cross-Entropy loss for classification.

[0064] In these implementations, the different metrics used to measure the performance of the text recognition model are MAP, MAR, word accuracy (which measures the number of correctly predicted text), and character accuracy (which measures the number of correctly predicted characters in the text). The results are shown below. [Table 5] [Table 6] Accuracy rate when image is not rotated: [Table 7] Accuracy rate when image is rotated and angle corrected afterwards: [Table 8]

[0065] Figure 15 shows the inputs and outputs of the text recognition module.

[0066] The method further comprises a step (S40) of determining, for each identified view, a graph representation of the view. This is performed by applying a graph module configured to determine a graph representation of a view. The graph representation comprises nodes and edges. Each node corresponds to a classification of one or more pixels in the view into one semantic class of a predetermined set of semantic classes. Each edge connects two nodes either if the two nodes represent adjacent pixels or if the two nodes represent pixels that are at a distance below a predetermined threshold. The set of semantic classes includes at least the semantic classes of geometry, dimension, and dimension-related symbols. The method further comprises a step (S50) of associating, for each identified view, nodes corresponding to dimension-related symbols or dimension classes with nodes corresponding to geometry classes using the topology of the graph and the identified characters. Using the graph topology and the identified characters to perform this association S50 may include identifying geometry and technical annotations in the view (each formed of one or more nodes with the same classification and appropriate connections and / or proximity in the graph) based on the node classification and graph topology, determining correspondences between the geometry and annotations, and making associations according to these correspondences.

[0067] The following method, referred to as the "graph method," for processing a graph representing an image of a technical drawing including at least one view and at least one technical annotation is also proposed. Steps S40 and S50 may actually include applying the graph method to each view identified in S10. The graph method is a computer-implemented method for processing a graph. The graph represents an image of a technical drawing. The technical drawing includes at least one view and at least one technical annotation. For each view of the at least one view, the graph method includes providing a graph. The graph includes nodes and edges. Each node corresponds to a classification of one or more pixels in the view into one semantic class of a predetermined set of semantic classes. In other words, each node represents a set of one or more pixels and includes the classification (e.g., label) of this set into one of the semantic classes. This means that the set represents at least part of a geometry, dimension, or dimension-related symbol. Each edge connects two nodes either if they represent adjacent pixels (e.g., pixels connected by a pixel) or if they represent pixels that are located at a distance below a predetermined threshold. The set of semantic classes includes at least classes of geometry, dimension, and dimension-related symbols. The graph method further includes clustering nodes corresponding to the geometry classes to reconstruct the geometry in the at least one view based on the topology of the graph, and clustering nodes corresponding to the dimension and dimension-related symbol classes to reconstruct the technical annotations of the at least one view. The graph method further includes associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph.

[0068] The graphical method is a method for processing a graph representing an image of a technical drawing that includes at least one view and at least one technical annotation. Specifically, the graphical method processes each of the at least one view (i.e., the steps of the method are applied to each of the at least one view), provides a graph for it, and performs clustering and association steps. Based on this graph, the method then processes the graph to obtain a reconstruction of the geometry and annotations in the view and the technical links between these reconstructed annotations and the geometry. The graphical method may receive as input the processed numerical drawing resulting from steps S10-S20-S30 of the reconstruction method, in which all views, annotations, and characters have been identified and, optionally, pixels have been assigned colors (for subsequent assignment of colors to nodes, as described below).

[0069] The correspondence between S40 to S50 and the graph is as follows: The graph method is applied to each view (hence, this is the "view" referred to in the graph method), and each application of the providing step of the graph method to this view corresponds to step S40, and each application of the clustering and associating steps corresponds to the implementation of step S50 (in other words, in the reconstruction method, for each identified view, step S50 of associating nodes corresponding to dimensional relations or dimensional classes with nodes corresponding to geometry classes using the topology of the graph and the identified characters may include the execution of these clustering and associating steps). The step S40 of determining a graphical representation of a view by applying a graph module consists in providing a graph of this view according to a graphical method, this provision being therefore carried out by a graph module (which may therefore include a graph neural network as described below); and The identified characters (identified in S30) and the identified technical annotations in S20 include data (e.g. the aforementioned bounding box data) that form the “detected locations” of the technical annotations used in the association step in the graph method.

[0070] The graphical method includes providing a graph (i.e., of a view of the considered numerical drawing). Providing the graph may include retrieving the graph from a (e.g., remote) memory, server, or database where the graph is created and then stored. Alternatively, providing the graph may include constructing / determining the graph based on the considered view. Providing the graph may include constructing the topology of the graph (i.e., nodes and edges) and then determining the classification of the nodes.

[0071] Providing a graph may include determining a skeleton of the view by making lines in the technical drawing thinner than a predetermined threshold. This step is also called "skeletonization" and is the first step in constructing the graph topology. Skeletonization therefore consists of applying a matrix that performs an operation to trim the boundaries of lines in the drawing until they are thinner than a predetermined threshold (e.g., one pixel thick). The lines are formed by pixels of the view, each of which represents a part of the technical information (geometry or annotations), i.e., pixels that are not in the white space of the view. Making lines in the view thinner than a predetermined threshold may include making the lines one pixel thick.

[0072] Skeletonization may be preceded by a step of performing binarization, in which an adaptive threshold compares the value of each pixel with its surrounding region. Depending on the difference value, the pixel is considered True or False. The result is a binarized version of the image with a clear difference between the background (false) and the lines in the view (true). The view image may be noisy, and this binarization allows pixels corresponding to the noise (e.g., outliers) to be discarded. Skeletonization may then include making all lines one pixel thick. While there are multiple skeletonization algorithms, Zhang's method from the skimage.morphology.skeletonize package may be used, as it provides the best approximation in the context of this disclosure and is fast enough to obtain a skeleton in the order of 0.1 seconds. Because the skeleton removes information about line thickness, the method may also include saving data describing previous thicknesses in parallel for later use as node features. Local line thicknesses may be calculated by comparing the skeleton with the original image. The method may further comprise removing isolated pixels from the skeleton as they may be due to noise.

[0073] Providing the graph may then further include determining traces of the skeleton. Each trace is a line (straight or curved) that ends at a junction point. A junction point is a pixel of the skeleton that has at least three neighboring pixels in the skeleton. The method identifies these junction points and then traces (which are lines of the skeleton that end at the identified junction points).

[0074] Pixels are one adjacent pixel if it is the start or end of a line, Two adjacent pixels if they are a line sequence, - Three or more adjacent pixels if it is a junction, have one of the following:

[0075] Some pixels may be removed at the junctions, e.g. [Table 9] @0058

[0076] In the above example, 1 is a line pixel and 0 is a background pixel. p is the pixel at the center of the junction. p has three neighbors, but so do p's neighbors (including diagonal neighbors). Therefore, stopping the trace at the first pixel with three or more neighbors may result in some pixels being excluded (here, p does not belong to any trace). To counter this, if the next pixel has the same direction as the previous pixel, it is kept in the trace by our method, in order to favor straight lines. Keeping p is very important when calculating the connection edges in future graphs. Here is another example where removing a pixel named p will remove a trace connection: [Table 10] @0059

[0077] Providing the graph may then further include defining each graph node as representing a respective trace, in other words, each graph node representing a respective set of pixels forming a respective trace.

[0078] The graph method may optionally perform trace processing, which is post-processing of the determined traces. This may include splitting the traces at sharp angles. To do so, the method may use the Douglas Peucker algorithm, which smooths the traces and simplifies them into a few keypoints that form segments. This process is advantageous because it makes the computation of node features (described below) much easier. However, because the traces are split into small segments, it can add many small nodes to text or arcs. Therefore, this step may be performed to compute node features, but not to compute the traces or define the nodes of the graph.

[0079] Providing the graph may further include calculating node features. Each node may comprise or be associated with one or more node features, which are data describing characteristics of the pixel represented by the node. The node features used in this disclosure may consist of the following set (i.e., each node may comprise one or any combination, for example all, of the following features): Average position of traced pixels (minimum required) Number of segments obtained from the Douglas Peucker algorithm -Segment size average, maximum, minimum, and variance · Mean, max, min, and variance of the cosine of the angle between each segment pair Test to see if the trace is a circular arc, and if so, the radius and center position Length and thickness of the trace in pixels Trace orientation with Boolean values ​​for common orientations (0, 90, 30, 45, 60) - When the trace passes through the center of an arc (due to a structural line) A trace is between two other traces and has the same direction (symmetry) When multiple traces are aligned and at the same distance (due to hatching)

[0080] Providing the graph may further include calculating graph features (ie, characteristics of the graph), which may include one or any combination, for example all, of the following features: When a view overlaps another view (left, right, above, below) When a view overlaps with a frame overlap (left, right, top, bottom) If the view is a section

[0081] The overlap test can help the model because if there is an overlap with the frame, there is a high probability that shapes like tables will appear near the boundaries of the view image. Similarly for view overlaps, there is a high probability that some dimensions or text will be present, cutting away from the central geometry shape. The cross section test looks for hatching.

[0082] Providing a graph may further include defining edges of the graph by defining first and second edges. Each first edge is an edge that connects two nodes if the two traces represented by the two nodes are pixel-wise connected, i.e., if the two traces are connected pixel-to-pixel (meaning that all curves split at a junction point create multiple traces connected to each other by an edge). For skeletonization purposes, a distance of two pixels is considered to still create a pixel-wise connection between the two traces. Each second edge is an edge that connects two nodes if the two traces represented by the two nodes are not pixel-wise connected but are separated by less than a predetermined number of pixels (e.g., 10 pixels). To identify these second edges, the method may search for pixel proximity not only at the start and end points of the trace, but also at the midpoint, first quartile, and third quartile of the trace depending on its pixel length for optimization. These considered pixels are called key pixels of the trace. They may be used several times during graph processing (featurization and labeling). Each first edge may be referred to as a "connecting edge," and each second edge may be referred to as a "neighboring edge." Each connecting edge may be associated with a particular color in the graph, for example, green. Each neighboring edge may be associated with another particular color in the graph, for example, orange.

[0083] To limit the number of nearby edges for a cluster of nodes (where many nodes are very close in pixel distance), the method may do the following: Before adding a nearby edge, the method checks the graph neighborhood of the two nodes. If they share a neighborhood, it means that the two nodes under consideration are two edges away from each other. In that case, the method does not add a nearby edge. This process takes the newly added nearby edge into account. As a result, the number of possible edges is dramatically reduced, sometimes by a factor of five, greatly simplifying the graph. When adding an edge, the method may also calculate the angle between the two traces. This information is saved as an edge feature. Because some traces are not straight, the angle may be approximate, so the angle is calculated by taking only the start and end points of both traces. The angle indicates whether the traces are perpendicular or parallel. This is useful for either graph neural networks (discussed below) or the numerical reconstruction step of drawings.

[0084] Providing the graph may further include applying a machine-learned graph function (which may be a neural network referred to as a "graph neural network") configured to label each node of the graph with one semantic class from a set of semantic classes. The substeps of the providing graph step up to the further substep of applying the machine-learned graph function may be referred to as a segmentation step, collectively referred to as "segmentation step 2" (to distinguish it from segmentation step 1, described below). As described above, the set of semantic classes includes at least the classes of geometry, dimension, and dimension-related symbols. The set of semantic classes may consist of the following classes (e.g., each associated with a respective color in the graph): geometry (e.g., associated with green), extension lines (e.g., associated with blue), main lines (e.g., associated with red), text (e.g., associated with pink), arrows (e.g., associated with black), structural lines (e.g., associated with turquoise), section indicators (e.g., associated with gray), and others (tolerance, frame, table, unknown) (e.g., associated with yellow).

[0085] The method may further include machine learning the graph function before providing the graph. This may include forming a training dataset for graph function learning and then learning the graph function. Alternatively, the training dataset may be pre-formed and retrieved by the method only from a (e.g., remote) memory, server, or database where it is created and then stored. The training datasets comprise graphs, each representing a respective view of the technical drawing, with nodes and edges as described above, and a classification of each node into one of a set of predetermined semantic classes including geometry, dimensions, and dimension-related symbols. Forming the training dataset (whether the graph function learning includes this step or not) may include providing these graphs and labeling them with a classification. Providing the graphs may include providing a graph by performing, for each graph, the "providing graph" step of the graph method described above (i.e., from an initial dataset of views of the technical drawing, which may be obtained from S10 previously described). The feature computing step may further include data augmentation, which may include one or any combination of the following data augmentation steps (applied to one or more already formed graphs): Rotate the graph by 90 degrees. · Invert the graph. Remove some unimportant nodes (text, tolerance). Adding new non-essential nodes by copying existing ones. Remove / add edges.

[0086] This data augmentation does not alter the future labeling process as long as the initial node order is kept in memory, since the new graph nodes share the exact same labels. Note that most node features are invariant to typical data augmentation processes such as resizing and rotation.

[0087] The labeling of each graph will now be described. This labeling is preceded, for each graph, by a segmentation step called "Segmentation Step 1." This segmentation step will now be described. Segmentation Step 1 is applied to each view (e.g., obtained from S10 as described above) corresponding to each graph in the training dataset, using technical annotations within the view (e.g., identified by S20 as described above). Segmentation Step 1 may include the following steps: For each drawing image used to create the training dataset (resulting in a view corresponding to the graph in the dataset), obtain a black and white image and a color image (with the default DXF colors). This may be done by applying the visualizer algorithm described above. · Crops the view using the view's bounding box (i.e., obtained from S10). For each color image, create a binary color (e.g., red and green) image by changing the default DXF colors as follows: For each graph / view, for each semantic class contained in the view represented by the graph, a color image is created in which the pixels of this semantic class are assigned a specific color (e.g., green) and the other pixels (i.e., non-background pixels) are another specific color (e.g., red). · For each color image, change the default colors in the DXF and create one new color image for each semantic class included in the view represented by the graph, so that all pixels of this semantic class are assigned the respective color and background pixels are kept white / colorless.

[0088] In other words, the inputs to segmentation step 1 are the DXFs of the drawings in the training dataset and the bounding boxes detected by S10, and the outputs are the black and white image, the binary color image, and the new color image described above. Figure 11 shows an example of this first segmentation step.

[0089] Labeling each graph in the training dataset may then involve using a binary color image (obtained from segmentation step 1) of the view represented by the graph. For each trace, labeling may involve going through its key pixels and checking all color images (i.e., for each semantic class) at each pixel location. As mentioned above, there is one image per class to ensure a clear distinction between pixels of that class and other pixels. This yields better results than using a single image with as many colors as classes, since there is always ambiguity at the junctions where colors tend to blend. For each key pixel, the method may process the color image to obtain a list of Boolean values ​​indicating whether the pixel was colored a particular color (e.g., green) or another color (e.g., red), and infer the trace class from the class that received the most green votes. This is shown in Figure 16. Figure 17 shows an example of a colored graph pixel representation, and Figure 18 shows the corresponding colored graph node representation. It should be understood that the binary color diagrams (e.g., green and red) are used only to determine labels during the creation of the training dataset. During training, a graph neural network (also called a "graph classification neural network" or "classification neural network") receives as input each non-color graph (i.e., for each training example) and as a corresponding target (i.e., the output it learns to predict) the corresponding color graph (i.e., with only the labels of each node), so that the neural network learns to predict the class of each node from the non-color graph (i.e., learns to generate a list of corresponding labels). During use, the neural network receives a non-color graph as input and predicts its labels.

[0090] We now explain the implementation of learning / training. The task of the graph neural network / function is to classify lines in the view. In effect, it classifies the nodes of the graph representing the view. Then, from the classified graph, the method can convert the view image back into a view image. The inputs of the function are node features, edges, and graph features. The output consists of node classes. The task is graph node classification. To achieve this, the neural network may have an architecture consisting of GraphSage convolutional layers for aggregating node information and linear layers for further interpreting the features. Graph features are concatenated immediately after the node convolutional layers. In every graph convolutional layer, a node aggregates information from its direct neighbors. This means that a node will see information from a maximum of n other nodes hops away, where n is the number of graph convolutional layers. Finding the optimal number of layers is not trivial, as increasing it significantly increases the number of training parameters and does not necessarily lead to better results. From multiple trials, the optimal number of layers is between 3 and 7. The results shown here use 5 layers. In the training dataset, images are split into training (90%), validation (5%), and test (5%). The neural network is trained to classify within the eight semantic classes described above. The graphs are grouped into 15 batches. The model is trained for 1500 epochs, using a Step learning rate scheduler (dividing the learning rate by 15% every 100 epochs) with a starting learning rate of 10^(-3). The optimizer used for gradient descent is the Adam optimizer. Cross-Entropy loss is used for training. Training results are shown in Figures 19 and 20. Figures 21-22 show example classification results. A node classification accuracy of 79% is obtained in testing.

[0091] The graph method further includes a step of clustering nodes corresponding to (i.e., classified into) geometry classes to reconstruct the geometry in the view based on the topology of the graph, which means using the node classification and connections by edges in the graph to find and group nodes representing pixels that form the same geometry.

[0092] Clustering nodes corresponding to geometry classes may include partitioning each node with a geometry class into candidate segments. In other words, from nodes classified as geometry, the method reconstructs line segments and arc segments, and therefore performs this partitioning step first. Due to the way the graph is constructed, a single node may represent multiple segments and arcs. Therefore, the method partitions all nodes into curves representing line segments and portions of arcs. The partitioning may be performed by approximating the trace into a series of segments (line segments and arc segments) using the Douglas Peucker algorithm. The segments resulting from these partitions are called "candidate segments."

[0093] The method may then project these segments into tangent space and group them based on a threshold applied to their length and deviation from the next segment. Specifically, clustering the geometry class nodes may further include grouping the candidate segments into either line segments or arc segments according to a grouping criterion. The grouping criterion uses a predetermined threshold to evaluate the smallness of the angular deviation of the line segments and the similarity of the length and angular deviation of the arc segments. In other words, candidate line segments are grouped if their angular deviation is less than the predetermined threshold, i.e., the segments are substantially aligned. Candidate arc segments are grouped if they have similar lengths (e.g., the difference between their lengths is less than the predetermined threshold) and similar angular deviations (e.g., the difference between their angular deviations is less than the predetermined threshold, i.e., the arcs follow substantially the same curvature). Comparison with these thresholds may be performed on the segments projected into tangent space.

[0094] Clustering the geometry class nodes may then involve reconstructing the geometry by grouping together line segments and / or arc segments that link pairs of connected nodes (i.e., segments connecting pixels that form pairs of connected nodes in the graph are iteratively grouped based on the following criteria): Two line segments are grouped if they have the same axis and are connected at the endpoints of the segments. Two arc segments are grouped if they have the same center and radius and are connected at at least one endpoint of the arc.

[0095] The clustering may then further comprise calculating keypoints from the grouped segments that are junctions between two segments or two arc centers. In other words, keypoints are calculated for each group of segments, and for each group, they represent the junctions between the segments of the group. The role of these keypoints is to represent the geometry more accurately with fewer variables.

[0096] Figure 23 shows the workflow of the clustering step for the Geometry Class node.

[0097] Clustering also includes clustering nodes corresponding to dimension and dimension-related symbol classes to reconstruct technical annotations for at least one view, which means using node classifications and connections by edges in a graph to find and group nodes representing pixels that form the same dimension or the same dimension-related symbol.

[0098] Clustering nodes corresponding to dimension-related symbols and dimension classes may involve grouping nodes of dimension and dimension-related symbol classes according to a grouping criterion. The grouping criterion evaluates the similarity of position and / or orientation. In other words, two nodes of these classes are grouped if they represent elements of a view with similar orientation and / or position, i.e., if the difference between their positions is less than a predetermined threshold and / or the difference between their orientations is less than a predetermined threshold. The dimension-related symbol class includes subclasses of arrows, dimension main lines, and dimension extension lines. Nodes in the "arrow" class may be grouped based solely on their position. Because arrows tend to split into many small traces (many nodes), their orientation may be unusable. Using their position can result in errors, such as two arrows being merged into the same cluster, but this may be corrected in a later step by accurately finding candidate arrowheads for each arrow cluster. Nodes in the dimension line and extension line classes may be grouped based on their position and orientation. The specific threshold used may differ between the two classes because extension lines tend to split into far-away traces when passing through geometric segments. New merging criteria are applied to these basic clusters, allowing for further cluster merging. This new merging is very similar to the previous one, but having several clusters already helps to calculate more accurate axes, as the global clusters are less susceptible to joining noise. Figures 24-25 show the clustering results corresponding to the dimension-related symbols and dimension classes.

[0099] The method further comprises filtering the clustered nodes (nodes resulting from the clustering) of the dimension-related symbol classes and dimension classes according to the following rules: The arrowhead is in the same direction as or connected to the associated dimension line; and · Dimension extension lines are perpendicular or locally perpendicular to the associated dimension main line or associated arrowhead.

[0100] Filtering means suppressing an edge connecting two nodes that does not satisfy these rules. In other words, if a clustered node representing an arrow is connected by an edge to a clustered node representing a dimension main line, but the arrow is not connected to the dimension main line and does not have the same direction, the edge is suppressed. If a clustered node representing a dimension extension line is connected by an edge to a clustered node representing a dimension main line or arrow, but the extension line is not perpendicular or locally perpendicular to the dimension main line or arrow, the edge is suppressed. For each rule, the method may consider a threshold and margin (i.e., to evaluate perpendicularity, local perpendicularity, or the same direction) because the transformation of the view into a graph may not be pixel-perfect. For the distance between nodes, the method may use connecting edges and nearby edges, or recalculate the distance using node keypoints and a point cloud distance algorithm.

[0101] A cluster inherits its nodes' links, i.e., edge connections to other nodes. The method may use scores calculated from axial distances and angular deviations to filter node clusters based on the most likely candidates, with at most one link between any pair of clusters. Link scores from arrow clusters to auxiliary line clusters may be adjusted using the exact arrowhead point and direction to filter backward connections between the two, which may occur when two dimension sets intersect each other.

[0102] The graph method further includes associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph, which means that the method finds appropriate annotations to associate with appropriate geometry based on positional proximity and connections in the topology of the graph.

[0103] Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph may include linking the reconstructed technical annotations to the corresponding reconstructed geometry according to the topology of the graph, according to the following rules: For linear or angular dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead if any, which is itself linked to the dimension extension line if any, which is itself linked to the geometry, and For diameter or radius dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead, if any, which is itself linked to the geometry.

[0104] Linking the reconstructed technical annotations to the corresponding reconstructed geometry according to the topology of the graph may include detecting node-to-node interactions (i.e., edge connections in the graph) between each extension line (if any) and geometry, each main line and geometry, and each arrow (if any) and geometry. Constrained geometry is actually always connected (by an edge in the graph) to either an arrow (if any), an extension line (if any), or a main line. However, unconstrained geometry (not all geometries are constrained by dimensions) may not be linked to an arrow, extension line, or main line. However, a main line is always connected to an arrow or extension line. Because the geometry nodes have been decomposed into geometry shapes, the method may link the arrow and extension line nodes to the correct geometry shapes based on the location of their connection points. A score calculated from the distance and axis deviation may be associated with each link. Then, for each cluster, only the best links (those with the best scores) are retained.

[0105] Once the arrow / extension line is linked to the geometry, the link to the dimension text is created according to the rules above. To reiterate for clarity: For linear or angular dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead if any, which is itself linked to the dimension extension line if any, which is itself linked to the geometry, and For diameter or radius dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead, if any, which is itself linked to the geometry.

[0106] In other words, the method uses the graph to find, for each node (similar to linking arrowheads / extension lines to geometry), the main dimension line that should be connected to the already created arrowhead / extension line-to-geometry link, and the dimension text that should be linked to the dimension line. For angular or linear dimension annotations, the geometry is a line segment or a set of two line segments. For diametric or radial dimension annotations, the geometry is an arc segment.

[0107] Figure 26 shows the rules for associating clustered nodes. The annotation semantic classes "Other", "Extension Line", "Section Indicator", and "Structural Line" are also represented. The method may consider drawings without these annotations. However, if these annotations are at least partially considered, the rules regarding them are as follows, as shown in the figure: Section indications, dimension extension lines, etc. are linked to the associated geometry or to the geometric structure lines (which are themselves linked to the geometry), if any; and The dimension main line or arrow is linked to the dimension extension line.

[0108] The dimension text points to either geometry or structural elements (represented by discontinuous lines for axes, or possibly absent in the case of circle centers), as shown in Figure 26. There are two main path types from the dimension text to the structural lines or geometry: (1) Linear / Angular Dimension: Dimension Text → Dimension Main Line → Dimension Extension Line Structural Line / Geometry (2) Diameter / Radius Dimension: Dimension Text → Dimension Main Line → Structural Line / Geometry

[0109] The arrow element is not always present. For linear and angular dimensions, this is not a problem because you are sure where the dimension main line is pointing. However, the arrow element may be essential for diameter dimensions, as it indicates the exact geometric arc.

[0110] FIG. 27 shows an example of a graph with completed links.

[0111] Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the graph topology may further include detecting the text and / or symbols of the technical annotations and the positions of the detected text and / or symbols. In other words, for each technical annotation, the method detects the annotation's text and / or symbols and their positions. This can be done, for example, by applying the reconstruction method S20 or, if a graph method is part of the reconstruction method, by simply using the results of this step if it has already been applied, which, for example, provides the center of the bounding box of the text and / or symbols as the position for each dimension text technical annotation. Then, for such technical annotations, the method associates / links the detected text and / or symbols to the corresponding dimension lines (principal dimension lines) based on their positional proximity. To link the text to the dimension lines, the method may split the text into either linear / angular dimension text or radial / diameter dimension text depending on the text value (including °, R, or o). This may be done based on the detection performed in S30 of the reconstruction method, or by simply using the results of this step if it has already been applied (as is the case if Graph Method 2 is part of the reconstruction method). The method may then calculate the distance between the text and the dimension line clusters and recursively select the best candidate (i.e., the closest one, i.e., dimension text is associated with the closest dimension line).

[0112] Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph may further include filtering the associated detected text and / or symbols of each reconstructed technical annotation according to the following rules: A linear or angular dimension text must be linked to two geometries, and Radius or diameter dimension text must be linked to a single geometry. If there are multiple candidates, the method may select the geometry that is closest to the arrow element connected to the dimension line and farthest from the dimension text.

[0113] The method suppresses associations if these rules are not respected.

[0114] Figure 28 shows a workflow illustrating the graphical method, and Figure 29 shows a flowchart illustrating the reconstruction method.

[0115] Once the associations between nodes are completed (by the reconstruction or graph method), the final result is a simplified directed graph. The previous graph nodes are grouped into clusters, and only the main edge connections are retained. The geometry is constrained by dimensions. Based on this output graph, the reconstruction or graph method may further include recreating a numerical drawing of the input view / technical drawing. The conversion of the graph into a numerical drawing may be done by any known method known in the art and configured for that purpose. The numerical drawing is composed of the identified simple geometric shapes. The expected numerical drawing is at least as accurate as the directed semantic graph, and because the geometry is constrained, the dimensions of the shapes are accurate and editable.

[0116] The numerical drawings may be used in one or any combination of the following further steps (which the method may include): Visually check the results of the transformation by transparently overlaying the numerical drawing with the pixel image drawing. Designers may verify or correct the results with interactive drawing tools. Recreate the 3D of the technical object represented by the numerical drawing (2D) by projecting its geometry into 3D. This 3D geometry can include 3D planes, points, lines, circles, or any 2D profile with dimensions and positions, which may also be modified. This geometry may be used completely or partially to create 3D CAD features such as pads, pockets, holes, etc. Automatically locate structural axes and profiles in 3D space that form the 3D part skeleton. Features are applied using these axes and profiles to efficiently generate the 3D. The advantage of using structural axes is that it gives the user some freedom in the reconstruction process, depending on their specific needs and habits. Skeleton axes may be created by intersecting views with each other and estimating holes and rotation axes, major pads and pockets.

[0117] The method is computer-implemented. This means that the steps (or substantially all steps) of the method are performed by at least one computer, or any similar system. The steps of the method are therefore performed by a computer, possibly fully automatically or semi-automatically. In an example, triggering of at least some steps of the method may be performed through user-computer interaction. The level of user-computer interaction required may depend on the level of automation foreseen and balanced with the need to implement the user's wishes. In an example, this level may be user-defined and / or predefined.

[0118] A typical example of a computer implementation of the method is executing the method on a system adapted for this purpose. The system comprises a processor coupled to a memory and a graphical user interface (GUI), the memory having recorded thereon a computer program containing instructions for carrying out the method. The memory may also store a database. The memory is any hardware suitable for such storage, possibly including multiple physically distinct parts (e.g., one for the program and possibly one for the database).

[0119] FIG. 30 shows an example of a system, where the system is a client computer system, eg, a user's workstation.

[0120] The client computer in this example includes a central processing unit (CPU) 1010 connected to an internal communication bus 1000 and a random access memory (RAM) 1070 also connected to the bus. The client computer further includes a graphical processing unit (GPU) 1110 associated with a video random access memory 1100 connected to the bus. The video RAM 1100 is also known as a frame buffer. A mass storage controller 1020 manages access to mass memory devices such as a hard drive 1030. Mass memory devices suitable for embodied computer program instructions and data include all forms of non-volatile memory, such as semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic disks such as internal hard disks and removable disks, and magneto-optical disks. Any of the above may be supplemented by or incorporated into specially designed application-specific integrated circuits (ASICs). A network adapter 1050 manages access to a network 1060. The client computer may also include a haptic device 1090, such as a cursor control device, keyboard, etc. The cursor control device is used in the client computer to allow a user to selectively position a cursor at any location on the display 1080. Additionally, a cursor control device allows a user to select various commands and input control signals. The cursor control device includes multiple signal generating devices for inputting control signals to the system. Typically, the cursor control device may be a mouse, with the mouse buttons used to generate the signals. Alternatively, or in addition, the client computer system may include a pressure-sensitive pad and / or a pressure-sensitive screen.

[0121] A computer program comprises computer-executable instructions, including means for causing the system to perform the method. The program may be recordable on any data storage medium, including the system's memory. The program may be implemented, for example, in digital electronic circuitry, or computer hardware, firmware, software, or a combination thereof. The program may also be implemented as an apparatus, for example, as an article of manufacture tangibly embodied in a machine-readable storage device for execution by a programmable processor. The method steps may be performed by a programmable processor executing a program of instructions that performs the functions of the method by manipulating input data and generating output. The processor is thus programmable and may be coupled to receive data and instructions from, and transmit data and instructions to, a data storage system, at least one input device, and at least one output device. The application program may be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language if desired. In either case, the language may be a compiled or interpreted language. The program may also be a complete installation or update program. Application of the program on a system, in either case, results in instructions for performing the method. The computer program may alternatively be stored and executed on a server in a cloud computing environment, the server being in communication with one or more clients via a network, in which case the processing unit executes the instructions contained in the program, thereby performing the method on the cloud computing environment.

Claims

1. 1. A computer-implemented method for processing a graph representing an image of a technical drawing comprising at least one view and at least one technical annotation, the method comprising: providing, for each view of the at least one view, the graph comprising nodes and edges, each node corresponding to a classification of one or more pixels in the view into one semantic class of a predetermined set of semantic classes, each edge connecting two nodes either if the two nodes represent adjacent pixels or if the two nodes represent pixels that are at a distance below a predetermined threshold, the set of semantic classes including at least classes of geometry, dimension, and dimension-related symbols; Based on the topology of the graph, a node corresponding to the geometry class for reconstructing geometry within the view; and nodes corresponding to the dimension and dimension-related symbol classes to reconstruct technical annotations of the view; and clustering the associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph; A computer-implemented method comprising:

2. The step of providing a graph comprises: determining a skeleton for said view by making lines in said technical drawing thinner than a predetermined threshold; determining traces of the skeleton, each trace being a line that terminates at a junction point, the junction point being a pixel of the skeleton that has at least three neighboring pixels within the skeleton; defining each graph node as representing a respective trace; The computer-implemented method of claim 1 , comprising:

3. Making the lines in the view thinner than a predetermined threshold comprises making the lines one pixel thick.

3. The computer-implemented method of claim 2.

4. The step of providing a graph comprises: defining a first edge connecting two nodes if the two traces represented by the two nodes are pixel-wise connected; defining a second edge connecting the two nodes if the two traces represented by the two nodes are not pixel-wise connected but are at a distance less than a predetermined number of pixels; defining the edges of the graph by 4. A computer-implemented method according to claim 2 or 3.

5. providing the graph further comprises applying a machine-learned segmentation function configured to label each node of the graph with one semantic class of the set of semantic classes; A computer-implemented method according to any one of claims 2 to 4.

6. machine learning the segmentation function before providing the graph. The computer-implemented method of claim 5 further comprising:

7. The step of clustering nodes corresponding to the geometry classes includes: dividing each node having said geometry class into candidate segments; grouping the candidate segments into either line or arc segments according to a grouping criterion that evaluates smallness of angular deviation for line segments and similarity of length and angular deviation for arc segments using a predetermined threshold; grouping line segments and / or arc segments linking pairs of connected nodes to reconstruct the geometry, where two line segments are grouped if they have the same axis and are connected at their endpoints, and two arc segments are grouped if they have the same center and radius and are connected at at least one endpoint of the arc; 7. A computer-implemented method according to any one of claims 1 to 6, comprising:

8. Clustering the nodes corresponding to the dimension and dimension-related symbol classes includes grouping the nodes of the dimension and dimension-related symbol classes according to a grouping criterion that evaluates similarity of position and / or orientation. A computer-implemented method according to any one of claims 1 to 7.

9. The dimension-related symbol class includes subclasses of arrows, main dimension lines, and extension dimension lines, and the method further comprises filtering the clustered nodes of the dimension-related symbol class and dimension class according to the following rules: The arrowheads are in the same direction as or connected to the associated dimension line, Extension lines are perpendicular or locally perpendicular to the associated main dimension line or associated arrowhead A computer-implemented method according to any one of claims 1 to 8.

10. Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph comprises linking the reconstructed technical annotations to their corresponding reconstructed geometry according to the topology of the graph according to the following rules: For linear or angular dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead, if any, which is itself linked to the dimension extension line, if any, which is itself linked to the geometry, and For diameter or radius dimension annotations, the dimension text is linked to the dimension main line, which is itself linked to the arrowhead, if any, which is itself linked to the geometry.

10. The computer-implemented method of claim 9.

11. associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph, - detecting text and / or symbols of said technical annotations and the positions of said detected text and / or symbols; for each reconstructed technical annotation, associating the detected text and / or symbols with a corresponding dimension line based on positional proximity; The computer-implemented method of claim 10, further comprising:

12. Associating the reconstructed technical annotations with the reconstructed geometry based on the detected positions of the technical annotations and the topology of the graph further comprises filtering the associated detected text and / or symbols of each reconstructed technical annotation according to the following rules: A linear or angular dimension text must be linked to two geometries, and Radius or diameter dimension text must be linked to a single geometry 12. The computer-implemented method of claim 11.

13. A computer program comprising instructions which, when executed by a computer system, cause the system to carry out the method of any one of claims 1 to 12.

14. A computer-readable data storage medium having the computer program of claim 13 recorded thereon.

15. 14. A computer system comprising a processor and a memory coupled to said processor, said memory having the computer program of claim 13 recorded thereon.