Panoramic segmentation method and system for two-dimensional vector drawings
Through the combination of dense point sampling and Transformer structure, the element characteristics of two-dimensional vector drawings are extracted, which solves the scalability and generalization of panoramic segmentation in the prior art, and achieves higher quality panoramic segmentation and stronger versatility.
Patent Information
- Application Number
- CN202411800432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-01
AI Technical Summary
The prior art lacks scalability and generalization in the panoramic segmentation of two-dimensional vector drawings, and cannot effectively deal with graphics that are visually consistent but have different drawing methods.
The primitive feature extraction is performed using dense point sampling, the Point Transformer structure is used to extract dense points, and the panoramic segmentation is performed through the Transformer structure.
It improves the quality of panoramic segmentation, supports any variety of element types that can be sampled densely, has stronger versatility, and shows better generalization performance on large-area drawings.
Smart Images

Figure CN119741720A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image segmentation, and in particular relates to a method and system for panoramic segmentation of a two-dimensional vector drawing. Background Art
[0002] Architectural computer-aided design (CAD) drawings, especially those used for interior design, are detailed digital representations of a building's structure, layout, and details, conveying important information about the building. These drawings contain critical elements such as furniture layout, electrical wiring, and spatial organization, ensuring consistency and accuracy throughout the construction process. As CAD designs become increasingly complex, it becomes increasingly important to automatically detect symbols in these floor plans, which is critical for downstream tasks such as code checking and 3D interior modeling.
[0003] CAD drawings are usually expressed based on two-dimensional vector graphics. The mainstream panoramic segmentation methods for plane drawings are usually based on manually designed features, using neural networks to learn panoramic segmentation corresponding to primitive features. However, visually consistent vector graphics can be expressed in many different ways, and this approach lacks scalability and generalization. Summary of the invention
[0004] In order to solve the problems in the prior art, the present invention aims to provide a panoramic segmentation method and system for two-dimensional vector drawings, which improves the process of primitive feature extraction based on dense point sampling, thereby improving the final panoramic segmentation quality.
[0005] In order to achieve the above object, the present invention provides a panorama segmentation method of a two-dimensional vector drawing, comprising the steps of:
[0006] S1: dense point sampling step, sampling is performed at equal intervals on the contour of each vector element of a target vector graph to obtain dense points;
[0007] S2: dense point feature extraction step, using the Point Transformer structure to extract features from the dense points to obtain dense point features of each of the dense points;
[0008] S3: a dense point feature pooling step, pooling all the dense point features of each vector primitive to obtain primitive features;
[0009] S4: Panoramic segmentation step, using the Transformer structure and the primitive features to perform panoramic segmentation.
[0010] As an implementation manner, before the step S1, the method further includes the following steps:
[0011] S5: construct a first deep neural network model and a second deep neural network model;
[0012] S6: Collect training data sets to train the first deep neural network model and the second deep neural network model respectively, to obtain a dense point feature extraction model and a panoramic segmentation model;
[0013] In the step S2, the dense point feature extraction model is used to extract features from the dense points;
[0014] In the step S4, the panoramic segmentation model is used to perform panoramic segmentation.
[0015] As an implementation manner, before the step S1, the method further includes the following steps:
[0016] S7: Determine whether the size of the input original vector image exceeds the size of the vector image in the training data set by a preset threshold; if not, take the original vector image as the target vector image and proceed to step S1; if yes, proceed to step S8;
[0017] S8: Perform the panoptic segmentation by sliding window aggregation.
[0018] As an implementation manner, in the step S2, the input feature f of the dense point is constructed according to an input feature formula, and the input feature f is input into the Point Transformer structure and then output to obtain the dense point feature;
[0019] The input feature formula is:
[0020]
[0021] Where x and y are the two-dimensional coordinates of each dense point, and z is set to zero; (r, g, b) is the color of the primitive to which the dense point belongs; A six-dimensional vector set representing the dense points.
[0022] As an implementation mode, in the step S3, all the dense point features of each vector primitive are respectively subjected to average pooling and maximum pooling, and the feature vectors obtained by the two poolings are added to obtain the primitive features.
[0023] As an implementation manner, the primitive feature g in S3 i The cth dimension g i The expression of (c) is:
[0024]
[0025] Among them, P i is the set of all dense points belonging to the i-th vector primitive, whose number is |P i |;fp For the set P i The dense point feature corresponding to the midpoint p has the cth dimension f p (c).
[0026] As an implementation mode, the S4 further comprises the steps of:
[0027] S41: inputting the primitive features into the Transformer structure as key feature vectors and value feature vectors, and inputting a set of query vectors into the Transformer structure; the Transformer structure outputs a query feature vector having the same query quantity as the query vector;
[0028] The query vector includes a semantic query and an instance query; the query feature vector includes a semantic output and an instance output; the semantic query corresponds to the output of the semantic output; the instance query corresponds to the output of the instance output;
[0029] S42: Combining each of the semantic outputs with the primitive features to obtain a semantic segmentation result;
[0030] Filtering instance segmentation candidate segmentations corresponding to the instance output using non-maximum suppression to obtain an instance segmentation result;
[0031] S43: Fusing the semantic segmentation result with the instance segmentation result to obtain a panoramic segmentation result.
[0032] As an implementation mode, the step S8 further comprises the steps of:
[0033] S81: dividing the current vector map into a plurality of overlapping windows along the horizontal and vertical directions according to a preset window size and sliding step size;
[0034] S82: For each window, all the primitives in the current vector map that have an intersection with the current window are selected as the reasoning input of the window, and the vector map of each window is used as the target vector map to be reasoned independently according to the steps S1 to S3, and the window semantic segmentation result and the window instance segmentation result of each window are obtained using the Transformer structure respectively;
[0035] S83: Aggregate the window semantic segmentation results and the window instance segmentation results of all the windows to obtain a panoramic segmentation result.
[0036] A panoramic segmentation system of a two-dimensional vector drawing for implementing the panoramic segmentation method of the two-dimensional vector drawing of the present invention comprises:
[0037] A dense point sampling module, used for sampling at equal intervals on the contour of each vector element of the target vector image to obtain the dense points;
[0038] A dense point feature extraction module, used to use the Point Transformer structure to perform feature extraction on the dense points to obtain the dense point features of each of the dense points;
[0039] A dense point feature pooling module, used for pooling all the dense point features of each vector primitive to obtain the primitive features;
[0040] The panoramic segmentation module is used to use the Transformer structure to perform panoramic segmentation using the primitive features.
[0041] As an implementation method, it also includes:
[0042] A sliding window aggregation module is used to perform the panoptic segmentation through sliding window aggregation.
[0043] The present invention adopts the above technical solution, so it has the following beneficial effects:
[0044] The present invention improves the process of primitive feature extraction based on dense point sampling, thereby improving the final panoramic segmentation quality. The dense point sampling method adopted by the present invention obtains the features of each primitive and then completes the panoramic segmentation. Compared with the method of manually designing and extracting features, the present invention decouples primitive feature learning from the actual type of primitive, and can support any variety of primitive types that can be densely sampled, with stronger versatility.
[0045] For large-area drawings, the sliding window aggregation strategy in the present invention is additionally used to further improve the generalization performance on drawings of different sizes, improve the versatility and practicality of the present invention, and improve the segmentation quality of large-area drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 A flowchart of a method for panoramic segmentation of a two-dimensional vector drawing according to an embodiment of the present application;
[0048] Figure 2 A schematic diagram of dense point sampling according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0050] In the description of the present invention, it should be noted that the terms "upper", "lower", "left", "right", "center", "vertical", "horizontal", "inner", "outer", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0051] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "setting", "connection", "connection" and the like should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] See also Figure 1 and Figure 2 , a panorama segmentation method of a two-dimensional vector drawing according to a first embodiment of the present invention comprises the steps of:
[0053] S1: dense point sampling step, sampling is performed at equal intervals on the contour of each vector element of a target vector graph to obtain dense points;
[0054] Vector graphics can be regarded as a collection of vector graphics primitives. Vector graphics primitives are generally divided into line graphics primitives and shape graphics primitives. Line graphics primitives are generally straight line segments, (ellipse) arcs, Bezier curves, etc. Shape graphics primitives are generally (long) rectangles, (ellipse) circles, etc. For line graphics primitives, dense sampling is performed along the lines at a fixed spacing. For shape graphics primitives, their contours are taken and dense sampling is performed in the same way. In this embodiment, each graphics primitive is sampled equidistantly to generate dense point data for feature extraction. Different from the method of assigning fixed types to CAD graphics primitives and using manual features to represent them, the dense point sampling method of this embodiment provides higher efficiency and adaptability, making it suitable for various CAD graphics primitives and other vector graphics.
[0055] S2: dense point feature extraction step, using the Point Transformer structure to extract features from the dense points to obtain dense point features of each of the dense points;
[0056] Point Transformer inputs a set of feature vectors consisting of coordinates and other features, and outputs a set of feature vectors. The output features correspond one-to-one to the input three-dimensional points, that is, dense point features.
[0057] In the step S2, the input feature f of the dense point is constructed according to an input feature formula, and the input feature f is input into the Point Transformer structure and then output to obtain the dense point feature;
[0058] The input feature formula is:
[0059]
[0060] Where x and y are the two-dimensional coordinates of each dense point, and z is set to zero; (r, g, b) is the color of the primitive to which the dense point belongs; A six-dimensional vector set representing the dense points.
[0061] In this embodiment, Point Transformer is used as the backbone of feature extraction, and its design optimized for the disordered nature of point clouds is utilized to provide efficient and robust performance in feature extraction.
[0062] S3: a dense point feature pooling step, pooling all the dense point features of each vector primitive to obtain primitive features;
[0063] In order to obtain the final feature representation of vector graphics primitives such as CAD graphics, in this embodiment, primitive maximum pooling is applied to convert point-by-point features into primitive features.
[0064] All the dense point features of each vector primitive are respectively subjected to average pooling and maximum pooling, and the feature vectors obtained by the two poolings are added together to obtain the primitive features.
[0065] The primitive feature g in S3 i The cth dimension g i The expression of (c) is:
[0066]
[0067] Among them, P i is the set of all dense points belonging to the i-th vector primitive, whose number is |P i |;f p For the set Pi The dense point feature corresponding to the midpoint p has the cth dimension f p (c).
[0068] This pooling method compresses a large number of dense point features into a more compact set of primitive features, effectively reducing computational complexity and storage requirements. At the same time, primitive-level pooling retains the basic information of the contained points, maintains the global consistency of the primitive representation, and minimizes information loss. Loss calculation is also performed at the primitive level, which is consistent with the final vector map panoptic segmentation task goal.
[0069] S4: Panoramic segmentation step, using the Transformer structure and the primitive features to perform panoramic segmentation.
[0070] The input of Transformer consists of three parts: a set of key feature vectors, a set of value feature vectors, and a set of query vectors. The output is a set of feature vectors that matches the number of queries.
[0071] The S4 further comprises the steps of:
[0072] S41: inputting the primitive features into the Transformer structure as key feature vectors and value feature vectors, and inputting a set of query vectors into the Transformer structure; the Transformer structure outputs a query feature vector having the same query quantity as the query vector;
[0073] The query vector includes a semantic query and an instance query; the query feature vector includes a semantic output and an instance output; the semantic query corresponds to the output of the semantic output; the instance query corresponds to the output of the instance output;
[0074] S42: Combining each of the semantic outputs with the primitive features to obtain a semantic segmentation result;
[0075] Filtering instance segmentation candidate segmentations corresponding to the instance output using non-maximum suppression to obtain an instance segmentation result;
[0076] Each semantic query corresponds to a semantic category, and the instance output corresponds to the instance query one by one; different instance segmentation candidates may overlap, and non-maximum suppression is used to filter and remove the overlapping parts.
[0077] S43: Fusing the semantic segmentation result with the instance segmentation result to obtain a full segmentation result.
[0078] The dense point feature extraction module and the panoramic segmentation module require the use of deep neural networks. Before actual use, it is necessary to collect training data sets and train all network parameters.
[0079] In this embodiment, the following steps are included before step S1:
[0080] S5: construct a first deep neural network model and a second deep neural network model;
[0081] S6: Collect training data sets to train the first deep neural network model and the second deep neural network model respectively, to obtain a dense point feature extraction model and a panoramic segmentation model;
[0082] In the step S2, the dense point feature extraction model is used to extract features from the dense points;
[0083] In the step S4, the panoramic segmentation model is used to perform panoramic segmentation.
[0084] In this embodiment, the Transformer structure is used to extract semantic and instance segmentation information from the learned primitive features. In the panoramic segmentation model, the pooled primitive features are input as key feature vectors and value feature vectors to three consecutive Transformer decoder layers, where the self-attention mechanism effectively captures the dependencies between input features. The query vector is randomly initialized and optimized during training to calculate accurate self-attention scores with other features.
[0085] The panoptic segmentation model decoder output is divided into two parts: the first K ins The output represents the instance segmentation candidate, and then K sem The output corresponds to semantic segmentation. This configuration achieves panoramic segmentation by combining instance information and semantic information, thereby performing comprehensive scene understanding. Here, K ins is manually defined, K sem corresponds to the number of semantic categories.
[0086] The decoder output is converted into semantic segmentation and instance segmentation candidates. Semantic segmentation contains the log-likelihood of each primitive being classified into different semantic labels, and can be further thresholded to generate binary masks. Similarly, instance segmentation candidates also contain log-likelihood values, but these values represent the likelihood of each primitive being classified as a specific instance. During inference, the top k instance segmentation candidates with the highest confidence are selected, and matrix non-maximum suppression is applied to suppress non-maximum instance predictions.
[0087] The loss function L consists of classification loss and primitive mask loss. The classification loss is defined as multi-class cross entropy loss. The primitive element mask loss combines binary cross entropy loss and Dice loss to evaluate the correspondence between each predicted instance and its true label.
[0088] A panoramic segmentation system of a two-dimensional vector drawing for implementing the panoramic segmentation method of a two-dimensional vector drawing described in the first embodiment of the present invention includes:
[0089] A dense point sampling module, used for sampling at equal intervals on the contour of each vector element of the target vector image to obtain the dense points;
[0090] A dense point feature extraction module, used to use the Point Transformer structure to perform feature extraction on the dense points to obtain the dense point features of each of the dense points;
[0091] A dense point feature pooling module, used for pooling all the dense point features of each vector primitive to obtain the primitive features;
[0092] The panoramic segmentation module is used to use the Transformer structure to perform panoramic segmentation using the primitive features.
[0093] The steps of a panorama segmentation method of a two-dimensional vector drawing in the second embodiment of the present invention are basically the same as those in the first embodiment, except that the method further includes the following steps before the step S1:
[0094] S7: Determine whether the size of the input original vector image exceeds the size of the vector image in the training data set by a preset threshold; if not, take the original vector image as the target vector image and proceed to step S1; if yes, proceed to step S8;
[0095] S8: Perform the panoptic segmentation by sliding window aggregation.
[0096] In this embodiment, the step S8 further includes the steps of:
[0097] S81: dividing the current vector map into a plurality of overlapping windows along the horizontal and vertical directions according to a preset window size and sliding step size;
[0098] S82: For each window, all the primitives in the current vector map that have an intersection with the current window are selected as the reasoning input of the window, and the vector map of each window is used as the target vector map to be reasoned independently according to the steps S1 to S3, and the window semantic segmentation result and the window instance segmentation result of each window are obtained using the Transformer structure respectively;
[0099] S83: Aggregate the window semantic segmentation results and the window instance segmentation results of all the windows to obtain a panoramic segmentation result.
[0100] The structure of a panoramic segmentation system for a two-dimensional vector drawing in the second embodiment of the present invention is basically the same as that in the first embodiment, except that it further includes:
[0101] A sliding window aggregation module is used to perform the panoptic segmentation through sliding window aggregation.
[0102] For vector maps whose image size far exceeds that of the training data, a sliding window aggregation strategy is added during inference.
[0103] First, the input vector map is divided into several overlapping windows in the horizontal and vertical directions according to the pre-set window size and sliding step size. The window size is generally consistent with the training set data. The sliding step size is generally half of the window size.
[0104] For each window, all the primitives that intersect with it in the input vector map are selected as the reasoning input of the window. Then each window is reasoned independently to obtain the semantic segmentation and instance segmentation results of each window. To obtain the full panoptic segmentation of the final complete input vector map, the segmentation results of all windows need to be aggregated.
[0105] Specifically, to aggregate semantic segmentation, first count the semantic segmentation predictions obtained from different windows of each primitive, and then use the voting method to obtain the final semantic segmentation prediction of each primitive. The intersection size of the same primitive with the window is different in different windows. The weight of each window in voting is determined according to the ratio of the intersection size to the total length of the primitive.
[0106] For instance segmentation, due to the overlap between windows, instance segmentation of different windows may still overlap. Therefore, the non-maximum suppression method is used again to filter and obtain the final instance segmentation result.
[0107] A potential instance may be partially or completely observed in multiple windows. By ensuring a small enough sliding step size, each instance is fully captured in at least one window. Incomplete instance segmentation candidates from other windows are subsequently filtered out in the non-maximum suppression process.
[0108] On the FloorPlan dataset, the method of this embodiment is compared with the current mainstream panoramic segmentation method of floor plan drawings, and the results are shown in Table 1. PQ is the panoramic segmentation quality, SQ is the segmentation quality, and RQ is the recognition quality. The higher the value, the better the segmentation quality. It can be seen that the method of this embodiment has a higher segmentation accuracy.
[0109]
[0110]
[0111] Table 1. Segmentation quality comparison table
[0112] This method uses dense point sampling to obtain the features of each primitive and then completes panoramic segmentation. Compared with the method of manually designing feature extraction, this method decouples primitive feature learning from the actual type of primitive, can support any variety of primitive types that can be densely sampled, and has stronger versatility.
[0113] The sliding window aggregation strategy in the method of this embodiment further expands the application scenarios. Table 2 shows the comparison of the panoptic segmentation quality of the method of this embodiment combined with block partitioning on a large area drawing compared with SymPoint combined with block partitioning.
[0114]
[0115] Table 2. Comparison of large area drawing segmentation quality
[0116] It can be seen that the method of this embodiment using the sliding window aggregation (SWA) technology is comparable to the method of this embodiment using block reasoning (BlockPartitioning) in terms of results, with a slight decrease of only 0.8% in SQ. However, the method of this embodiment using the SWA technology significantly exceeds the method of this embodiment using block reasoning (BlockPartitioning) in terms of PQ and RQ, highlighting the effectiveness of the sliding window aggregation technology in the panoramic segmentation of large-scale CAD drawings.
[0117] The results show that the sliding window aggregation strategy improves the segmentation quality on large-area drawings.
[0118] It should be noted that the steps in the panoramic segmentation method of the two-dimensional vector drawing provided by the present invention can be implemented by using the corresponding modules, devices, units, etc. in the panoramic segmentation system of the two-dimensional vector drawing. Those skilled in the art can refer to the technical solution of the system to implement the step flow of the method, that is, the embodiments in the system can be understood as preferred examples for implementing the method, which will not be elaborated here.
[0119] Those skilled in the art know that, in addition to implementing the system and its various devices provided by the present invention in the form of program code, the system and its various devices provided by the present invention can be made to implement the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices provided by the present invention can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component; the devices for implementing various functions can also be considered as both software modules for implementing the method and structures within the hardware component.
[0120] It should be noted that the preferred embodiments of the present invention are given in the specification and drawings of the present invention. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. These embodiments are not intended to be additional limitations on the content of the present invention. The purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. In addition, the above-mentioned technical features continue to be combined with each other to form various embodiments not listed above, which are all considered to be within the scope of the present invention; further, for ordinary technicians in this field, they can be improved or transformed according to the above description, and all these improvements and transformations should belong to the scope of protection of the claims attached to the present invention.
[0121] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, certain details in the embodiments should not constitute a limitation of the present invention, and the scope of protection of the present invention shall be defined by the scope of the attached claims.
Claims
1. A panorama segmentation method for a two-dimensional vector drawing, comprising the steps of: S1: dense point sampling step, sampling is performed at equal intervals on the contour of each vector element of a target vector graph to obtain dense points; S2: dense point feature extraction step, using the Point Transformer structure to extract features from the dense points to obtain dense point features of each of the dense points; S3: a dense point feature pooling step, pooling all the dense point features of each vector primitive to obtain primitive features; S4: Panoramic segmentation step, using the Transformer structure and the primitive features to perform panoramic segmentation.
2. The method for panorama segmentation of a two-dimensional vector drawing according to claim 1, characterized in that: Before the S1 step, the method further includes the following steps: S5: construct a first deep neural network model and a second deep neural network model; S6: Collect training data sets to train the first deep neural network model and the second deep neural network model respectively, to obtain a dense point feature extraction model and a panoramic segmentation model; In the step S2, the dense point feature extraction model is used to extract features from the dense points; In the step S4, the panoramic segmentation model is used to perform panoramic segmentation.
3. The method for panorama segmentation of a two-dimensional vector drawing according to claim 2, characterized in that: Before the S1 step, the method further includes the following steps: S7: Determine whether the size of the input original vector image exceeds the size of the vector image in the training data set by a preset threshold; if not, take the original vector image as the target vector image and proceed to step S1; If yes, proceed to step S8; S8: Perform the panoptic segmentation by sliding window aggregation.
4. The method for panorama segmentation of a two-dimensional vector drawing according to claim 1, characterized in that: In the step S2, the input feature f of the dense point is constructed according to an input feature formula, and the input feature f is input into the PointTransformer structure and then output to obtain the dense point feature; The input feature formula is: Where x and y are the two-dimensional coordinates of each dense point, and z is set to zero; (r, g, b) is the color of the primitive to which the dense point belongs; A six-dimensional vector set representing the dense points.
5. The method for panorama segmentation of a two-dimensional vector drawing according to claim 1, characterized in that: In the step S3, all the dense point features of each vector primitive are respectively subjected to average pooling and maximum pooling, and the feature vectors obtained by the two poolings are added together to obtain the primitive features.
6. The method for panorama segmentation of a two-dimensional vector drawing according to claim 5, characterized in that: The expression of the c-th dimension gi(c) of the primitive feature gi in S3 is: Among them, P i is the set of all dense points belonging to the i-th vector primitive, whose number is |P i |;f p For the set P i The dense point feature corresponding to the midpoint p has the cth dimension f p (c).
7. The method for panorama segmentation of a two-dimensional vector drawing according to claim 1, characterized in that: The S4 further comprises the steps of: S41: inputting the primitive features into the Transformer structure as key feature vectors and value feature vectors, and inputting a set of query vectors into the Transformer structure; the Transformer structure outputs a query feature vector having the same query quantity as the query vector; The query vector includes a semantic query and an instance query; the query feature vector includes a semantic output and an instance output; the semantic query corresponds to the output of the semantic output; the instance query corresponds to the output of the instance output; S42: Combining each of the semantic outputs with the primitive features to obtain a semantic segmentation result; Filtering instance segmentation candidate segmentations corresponding to the instance output using non-maximum suppression to obtain an instance segmentation result; S43: Fusing the semantic segmentation result with the instance segmentation result to obtain a panoramic segmentation result.
8. The method for panorama segmentation of a two-dimensional vector drawing according to claim 1, characterized in that: The step S8 further comprises the steps of: S81: dividing the current vector map into a plurality of overlapping windows along the horizontal and vertical directions according to a preset window size and sliding step size; S82: For each window, all the primitives in the current vector map that have an intersection with the current window are selected as the reasoning input of the window, and the vector map of each window is used as the target vector map to be reasoned independently according to the steps S1 to S3, and the window semantic segmentation result and the window instance segmentation result of each window are obtained using the Transformer structure respectively; S83: Aggregate the window semantic segmentation results and the window instance segmentation results of all the windows to obtain a panoramic segmentation result.
9. A panoramic segmentation system for two-dimensional vector drawings for implementing the panoramic segmentation method for two-dimensional vector drawings according to any one of claims 1 to 8, characterized in that: include: A dense point sampling module, used for sampling at equal intervals on the contour of each vector element of the target vector image to obtain the dense points; A dense point feature extraction module, used to use the Point Transformer structure to perform feature extraction on the dense points to obtain the dense point features of each of the dense points; A dense point feature pooling module, used for pooling all the dense point features of each vector primitive to obtain the primitive features; The panoramic segmentation module is used to use the Transformer structure to perform panoramic segmentation using the primitive features.
10. The panoptic segmentation system of two-dimensional vector drawings according to claim 9, characterized in that: Also includes: A sliding window aggregation module is used to perform the panoptic segmentation through sliding window aggregation.