An automatic extraction method of multi-level transform information of a design image

By automatically extracting basic design elements from design images using a neural network model, the problem of insufficient extraction of design image transformation information in existing technologies is solved, and efficient editing and generation of design elements are achieved.

CN117152476BActive Publication Date: 2025-12-19HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311186279.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2025-12-19
Estimated Expiration
2043-09-14

AI Technical Summary

Technical Problem

Existing technologies neglect the extraction of image transformation information when processing design images, resulting in low design efficiency, difficulty in ensuring the integrity and editability of the generated results, and inability to extract high-level structural information.

Method used

A neural network model is used to automatically extract basic design elements from the design image. Through clustering and transformation information prediction, multi-level transformation parameters are generated to realize the vectorization and structured reconstruction of the design elements.

Benefits of technology

It improves the flexibility and efficiency of editing design images, ensures the integrity and editability of the generated results, and can extract higher-level transformation information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152476B_ABST
    Figure CN117152476B_ABST
Patent Text Reader

Abstract

The application discloses an automatic extraction method of multi-level transformation information of design images, and the steps include: 1, detecting basic design elements of the design images; 2, matching all the extracted basic design elements and inputting into a target transformation parameter regression neural network to obtain first-level transformation parameters; 3, matching the same complex design elements and inputting into the same transformation parameter regression network to obtain second-level transformation parameters; 4, performing vectorization processing on the basic design elements to obtain vectorization expressions of the basic design elements; and 5, saving the vectorization expressions of the basic design elements and the multi-level transformation information into a parameterized description file. The application can automatically extract multi-level transformation information from complex pattern design images, so that the design elements can be modified or replaced more efficiently, and a new layout scheme is generated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing and information extraction, and particularly relates to an automatic extraction method of multi-level transformation information and vectorization information of design elements of an image. BACKGROUND

[0002] In planar art design, transformation information in a design image is rich. For a type of design image with a large number of graphic element reuse and affine transformation, the transformation information based on basic graphic elements contained in the design image is an important factor for constituting design elements of the design image. In a two-dimensional planar XOY coordinate system, a normalized homogeneous coordinate expression is introduced, and affine transformation information of a graphic element can be described by different 3*3 transformation matrices. Current technical problems in this field are as follows: 1. In a traditional design software, a process of processing design image information less emphasizes extraction of image transformation information, and structural information between design elements of an image is ignored, which makes work repeatability high when a design image with strong design reuse, rich transformation relationship, especially a design image with multi-level transformation relationship is designed, thereby leading to low design efficiency; 2. In a current method of generating a new image with similar structure by learning implicit structural information of an image, a Gram matrix feature similarity between images is often taken as an optimization target, it is difficult to guarantee integrity of an appearance of a design element in a generated result, and it is not conducive to editing of the generated result; 3. A method of optimizing and solving layout information of a target structural image based on complete basic design elements can guarantee easy editability of a result and integrity of an element, but often needs to give initialization parameters such as a basic design element set, an element instance number, an optimization number and the like, and cannot extract higher-level structural information possibly existing in a design image. SUMMARY

[0003] In view of the above status and existing problems, the present application provides an automatic extraction method of multi-level transformation information of a design image, so as to automatically extract multi-level transformation information from a complex pattern design image, and to more efficiently modify or replace design elements, thereby generating a new layout scheme.

[0004] In order to achieve the above application purposes, the present application adopts the following technical solutions:

[0005] The automatic extraction method of multi-level transformation information of design elements in a design image provided by the present application is characterized by comprising the following steps:

[0006] Step 1, inputting a design image I containing a plurality of basic design elements and a composite design element composed of the basic design elements into a neural network model M1 for processing, and outputting a set E of various basic design elements E1, E2, …, E i ,…,E n}, wherein E idenotes the set of the basic design elements of the i-th class, n denotes the total number of classes of the basic design elements, and wherein, denotes the s-th basic design element instance in the set of the basic design elements of the i-th class, S represents the number of the basic design element instances in the set of the basic design elements of the i-th class; and wherein, i represents the class index number of the instance , is the position rectangular frame of the basic design element instance in the design image I; is the segmentation mask image of the basic design element instance in the design image I, wherein the black background in the segmentation mask image is represented by binary code "0", and the white foreground in the segmentation mask image is represented by binary code "1";

[0007] Step 2, clustering E i according to the position rectangular frame of each basic design element instance in the i-th class, so as to cluster the basic design element instances with similar spatial distribution into a cluster, and combine the basic design element instances under the same cluster into a composite design element, thereby obtaining the set of composite design elements of the i-th class

[0008] wherein, denotes the k-th composite design element in the i-th class; K represents the number of clusters; and wherein, denotes the v-th basic design element instance in the k-th composite design element , V k represents the number of instances in the k-th cluster; thereby clustering the basic design element instances of all classes, and obtaining

[0009] Step 3, performing secondary classification on according to the similarity between the composite design elements in , thereby obtaining the secondary classification set of the i-th class wherein, F i,u denotes the u-th secondary classification result in the set of composite design elements of the i-th class, U i represents the number of secondary classifications of ; and wherein, is the w-th secondary composite design element in F i,u , W u is the number of secondary composite design elements in F i,u ;

[0010] Step 4, taking the set Fi,u The first secondary composite design element And based on the position rectangle of each basic design element instance in class i, The collection of basic design element instances contained By matching and combining, a set of combined image pairs is obtained. in, Indicates inclusion The first basic design element example in and The xth basic design element instance in Image pairs;

[0011] Will The input is processed into the regression neural network model M2 to obtain the first composite design element. The corresponding set of transformation parameters Among them, T1 i,u [x] represents The corresponding transformation parameters;

[0012] Step 5: Follow the process in Step 4 to process G. i The U secondary classification results are processed to obtain G. i First layer transformation parameter set Thus, the total set of transformation parameters for the first layer is obtained as T1 = {T11, T12, ..., T1}. i ,…,T1 n};

[0013] Step 6: Based on the position rectangle of each basic design element instance in the i-th class, for F... i,u By matching and combining the various secondary composite design elements, a set of image pairs after combining the composite design elements is obtained. in, Indicates that it contains F i,u The first secondary composite design element in China and the wth secondary composite design element Image pairs;

[0014] Will The input is processed in the regression neural network model M2, and the output is F. i,u The corresponding transformation parameter set T2 i,u ={T2 i,u [1],T2 i,u [2],…,T2 i,u [w],…,T2 i,u [W u ]}, where T2 i,u [w] indicates corresponding transformation parameters;

[0015] Step 7, according to the process of step 6, G i is processed by U secondary classification results to obtain G i a second layer transformation parameter set Thus, the second layer transformation parameter total set T2={T21,T22,…,T2 i ,…,T2 n};

[0016] Step 8, the first basic design element is taken out from each basic design element set E={E1,E2,…,E i ,…,E n} in turn and constitutes an image set Wherein, E1 represents the first basic design element in the i-th basic design element set;

[0017] Each basic design element in E is vectorized to obtain a vector information set S={S1,S2,…,S i ,…,S n}, wherein S i represents the vector information of E ;

[0018] Step 9, the vector information set S and T1, T2 are saved as a parameterized description file for subsequent modification editing or rendering operation.

[0019] The electronic device of the present application comprises a memory and a processor, characterized in that the memory is used to store a program supporting the processor to execute the automatic extraction method, and the processor is configured to execute the program stored in the memory.

[0020] The computer readable storage medium of the present application stores a computer program, characterized in that the computer program is executed by the processor to execute the steps of the automatic extraction method.

[0021] Compared with the prior art, the present application has the following advantages:

[0022] 1. The present application uses an instance detection and segmentation method to extract basic design element information in a design image, including the category, spatial bounding box and binary mask of the basic design element, then extracts the transformation information between elements based on the basic design element instance information, and vectorizes the basic design element to obtain a structured reconstruction result of the original design image information. Using the extracted structured reconstruction information, the repetitive labor in the design of a design image with multiple reuse elements is reduced.

[0023] 2、The present application directly clusters and divides individual basic design element instances through detection of basic design element information, and extracts explicit transformation information through transformation information prediction network, which can ensure the integrity of basic design elements in the result and is more conducive to editing operations such as modification of explicit transformation information, compared with a generation model based on optimization of Gram feature matrix.

[0024] 3、The present application automatically extracts basic design element information through a detection model, and performs multiple clustering and division operations on the basic design element information, and obtains the final structured expression of the design image through transformation information extraction of the result of each clustering and division, which can extract higher-level transformation information or layout information in the design image compared with a method based on pre-defined basic design elements for layout information optimization, thereby improving the flexibility of secondary editing. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 The processing flowchart corresponding to the method of the present application is shown in the figure.

[0026] Figure 2 The flowchart corresponding to the method of the present application is shown in the figure.

[0027] Figure 3 The training flowchart of the design element transformation information regression model of the method of the present application is shown in the figure.

[0028] Figure 4 The multi-level transformation information extraction process schematic diagram provided by the application embodiment is shown in the figure. DETAILED DESCRIPTION

[0029] In this embodiment, a design element multi-level transformation information automatic extraction method mainly includes the following steps:

[0030] S1) Detecting basic design elements of a design image, processing to obtain the category, spatial position and mask information of all elements, clustering and analyzing the same category basic design elements according to the spatial density, and the same basic design elements under each density clustering cluster constitute a composite design element.

[0031] In step S1), the spatial distance clustering analysis method is a density clustering algorithm taking the bounding box center coordinate value of the same basic design element as the clustering object, and the spatial clustering cluster division of the basic design elements is obtained by setting the clustering threshold.

[0032] S2) Similarity judgment processing is performed on the composite design elements obtained in step S1), secondary clustering is performed according to the similarity indexes calculated on the basis of traditional feature descriptors or high-level semantic features between the composite design elements, the first composite design element instance in each cluster is taken as a reference object for transformation, then the basic design element instances contained in the reference object are matched and combined, and the combined image is input into a transformation parameter regression neural network model, and the transformation parameter regression neural network model outputs the corresponding first-level transformation parameters between each matched image group;

[0033] In step S2), the transformation parameter regression neural network is based on a residual convolutional network structure with a channel attention mechanism, which is used to predict the parameters of the transformation matrix corresponding to a pair of design elements contained in an image.

[0034] S3) The same type of composite design elements obtained in step S2) are matched and combined, and the composite design element combined image is input into the same transformation parameter regression neural network model in step S2), and the transformation parameter regression neural network model outputs the corresponding second-level transformation parameters between each matched image group.

[0035] S4) The basic design element images of each type output by the detection model in step S1) are automatically vectorized to obtain the vectorized expression of each type of basic design element, and the vector parameters are saved in a certain structure format for reusable vectorized basic design element information.

[0036] S5) Finally, the basic design element vectorized expression obtained in step S4) and the multi-level transformation information output in steps S2) and S3) are saved as parameterized description information for generation and editing operations in vector pattern design.

[0037] The final parameterized description information takes json text language as a carrier, and the json file contains the vector information of the basic design elements and the corresponding multi-level transformation information, thereby supporting efficient modification and replacement of the design elements in the parameterized description file to generate new design images.

[0038] The key processes in the application are described in more detail in combination with the drawings and specific embodiments.

[0039] Step 1: Detection of basic design elements. Figure 1In the basic design element detection process, this invention uses a neural network-based detection model as an example to illustrate the detection process for extracting basic design elements. This detection step can select different detection algorithms according to different application scenarios. In this embodiment, the basic design element detection neural network model adopts a target detection and segmentation model with a Mask R-CNN structure. It adds a deconvolutional branch network to the Faster R-CNN structure to predict the target object mask in each candidate region, and introduces RoI Align constraints to perform bilinear interpolation on the feature grid to reduce the prediction error of the mask.

[0040] Step 1.1: This invention obtains a dataset of basic design element images through web retrieval and manual creation, and labels the basic design elements with bounding boxes and masks. The neural network model is fine-tuned on a pre-trained model using the basic design element image data to improve its detection performance and accuracy.

[0041] Step 1.2: During the training process of the detection neural network model, the dataset is divided into a training set and a test set, which are used to update model parameters and evaluate model performance, respectively. Through multiple iterations of training, the errors on the training set and the test set are brought to the expected level, thus obtaining a usable basic design element detection model M1.

[0042] Step 1.3: Basic Design Element Detection Implementation Stage. First, a design image I is input into the basic design element detection model M1 for basic design element detection. Model M1 consists of three parts: a backbone network, a region proposal network, and a head network. The design image I is first processed by the residual-structure-based feature pyramid backbone network ResNet-FPN in M1 to obtain the features of I at multiple resolutions. Then, the region proposal network in M1 processes the feature information to obtain candidate regions. Finally, the candidate regions are processed by the head network in M1 to output the basic design elements corresponding to the candidate regions. Category, position rectangle in input design image I and instance segmentation mask Right now Let E = {E1, E2, ..., E} be the set of basic design elements for all categories. i ,…,E n}, where E i Let represent the set of basic design elements of the i-th category, and n represent the total number of categories of basic design elements. in, represents the s-th basic design element instance in the i-th basic design element set, and S represents the number of basic design element instances in the i-th basic design element set.

[0043] Step 2: All basic design element information E = {E1, E2, …, E i ,…,E n} output by the basic design element detection segmentation model are obtained, and basic design elements of the same category are grouped. Density clustering is performed according to the spatial distance between elements. The spatial distance density clustering method performs clustering operation on the basic design element central coordinate value The clustering process considers the connectivity of element distribution from the spatial distribution density of basic design elements, and continuously expands the clustering cluster to obtain the final basic design element set division according to the connectivity.

[0044] Step 2.1: the distance between basic design elements with index i is defined as the distance of element edges

[0045]

[0046] Let the neighborhood threshold of the element be ∈, then the neighborhood of any element is defined as the set:

[0047]

[0048] Step 2.2: the maximum set formed by the neighborhood relationship between elements constitutes a density clustering cluster, and the clustering cluster is denoted as where i is the category index of the basic design element, and k represents the k-th division set. Figure 4 The dashed box part is the result of basic design element density clustering, and each density clustering result corresponds to a composite design element, and each dashed box in the figure contains three basic design elements of the same category.

[0049] Step 3: solving the first layer transformation information between basic design elements

[0050] Step 3.1: for a composite design element the basic design element set in the division set corresponding to the composite design element , the first basic design element instance in the set is selected as the reference object of transformation, and it is matched with the remaining design elements in the division set to obtain a basic design element pair combination image under the division set, denoted as the tuple

[0051] Step 3.2: The regression neural network required to solve the transformation parameters is M2, and the backbone of the regression neural network is based on a convolutional residual network with ResNet18 as the backbone.

[0052] Step 3.2.1: The input of the network is the combined image to be extracted for transformation information with dimensions w x h x c, as shown in Figure 2 The M2 network contains a convolutional pooling layer, 3 residual network blocks, and a fully connected layer, with a kernel size of kernel_size = 5 x 5 and a stride of stride = 2.

[0053] Step 3.2.2: To more effectively utilize the feature maps of different channels and improve prediction accuracy, a feature channel attention mechanism SE is introduced into the network. The feature channel attention mechanism SE is a module used to enhance the inter-channel dependency relationship in a convolutional neural network, which can adaptively adjust the importance of each channel to improve image recognition performance. The SE module realizes channel attention through two steps:

[0054] Squeeze: Use a global average pooling layer F Average pool to compress the spatial information of the input feature map into a channel descriptor, i.e., a one-dimensional vector This vector contains global information for each channel.

[0055] Excitation: Use two fully connected layers and a Sigmoid activation function to generate a channel weight vector from the channel descriptor as input, which represents the importance of each channel. Then multiply the vector with the input feature map to get the weighted feature map

[0056] Step 3.2.3: Figure 3 The training step flow chart for the transformation information regression network M2. The training data for the transformation information regression network can be generated by randomly generating two affine transformation images between basic design elements of the same type, and recording the randomly applied transformation parameters as the label of the training image. After scaling the size of the training image and the transformation parameter information to w x h x c, the target parameter regression network is trained to obtain a usable transformation parameter regression model.

[0057] Step 3.3: Tuple The transformations between design element instances can be viewed as a superposition of a series of affine transformations. In the Cartesian two-dimensional coordinate system, a basic affine transformation is a transformation from one two-dimensional coordinate system to another, including operations such as scaling, translation, rotation, reflection, and shearing. A key characteristic of affine transformations is that they preserve the straightness and parallelism of lines; that is, lines before and after the transformation remain straight lines, and lines that were originally parallel remain parallel.

[0058] Affine transformations in two-dimensional coordinates can be represented by a 3×3 matrix, i.e.

[0059]

[0060] Here, x1, x2, tx, y1, y2, and ty are six free parameters that determine the type and extent of the transformation. Multiple superpositions of affine transformations cover most transformations between the target design elements. The superposition transformation matrix of the affine transformations can be obtained by left multiplying multiple 3×3 matrices, resulting in a 3×3 matrix. The fully connected layer of the regression network outputs the parameters (x1, x2, tx, y1, y2, ty) of the predicted six transformation matrices, which, together with the fixed matrix parameters [0, 0, 1], constitute the design elements. and The transformation matrix between them is denoted as T1. i,k [v].

[0061] Step 3.4: As attached Figure 1 and attached Figure 2 As shown, the matched combined image is input into the target transformation parameter regression model M2 to solve for the set of transformation matrices between the basic design elements within all composite design elements. The first layer of transformation information is denoted as T1 = {T11, T12, ..., T1...} i ,…,T1 n},in T1 i,u ={T1 i,u [1],T1 i,u [2],…,T1 i,u [x],…,T1 i,u [X u ]}. Figure 4 The middle part illustrates the process of using a basic design element from a composite design element as a reference object, matching it with other basic design elements within the composite design element to obtain two combined images, and then solving the corresponding first-layer transformation information through the transformation parameter regression network M2.

[0062] Step 4: Similarity division of composite design elements and solution of second-level transformation information.

[0063] Step 4.1: The set of composite design elements formed by the i-th type of basic design elements. Composite design elements within a set may still have a certain visual similarity. By setting a similarity threshold τ, we can further analyze these similarities. The composite design elements in the model perform secondary classification. The similarity metric for composite design elements can be based on image feature descriptions such as Scale Invariant Filtering (SIFT) and Speed-Up Robust Filtering (SURF) as comparison standards. SIFT features respond to and compute local maxima in both image and scale spaces using a Laplacian filter; SURF features are a simplified version of SIFT, which computes the Hessian matrix of each pixel at different scales using a simplified Laplacian filter. The determinant of the Hessian matrix is ​​used to determine whether a point is a feature point; the similarity index between composite design elements can also be obtained by extracting the visual information feature vectors c1 and c2 of two composite design elements through a convolutional neural network, and outputting the cosine value between the feature vectors. This serves as a reference standard for comparing the similarity of targets to determine the similarity between composite design elements. The similarity index `similar` takes values ​​of [0,1]. Composite design elements that satisfy `similar>τ` are considered similar composite design elements. Similar composite design elements constitute a new classification denoted as G. i ={F i,1 ,F i,2 ,…,F i,u ,…,F i,U},in yes A subset of U, where U is a set The number of partitions, the partition subset F i,u Composite design elements The relationships between them can also be described by defined transformation relationships.

[0064] Step 4.3: Divide the detected subsets Example of composite design elements in the first song Using the base element of the transformation, sequentially with set F i,u The composite design elements in the image are matched together to form a combined image, denoted as a tuple. Combining composite design elements in images As the input to the transformation parameter regression neural network M2, such as Figure 1 and Figure 2 As shown, the output obtained after processing by model M2 is The corresponding transformation parameter matrix T2 i,u[w], sequentially process the combined images in the secondary classification sets of all categories, and solve for the transformation matrix between composite design elements under the n basic element categories, which serves as the second-level transformation matrix, denoted as T2={T21,T22,…,T2 i ,…,T2 n},in T2 i,u ={T2 i,u [1],T2 i,u [2],…,T2 i,u [w],…,T2 i,u [W u ]}. Figure 4 The last part illustrates the process of using one composite design element as a reference element to match other composite design elements in the same partition to obtain a combined image, and then processing it with M2 to obtain the corresponding second-layer transformation information.

[0065] Step 5: Vectorize the basic design elements

[0066] As attached Figure 2 The flowchart illustrates the output of the basic design element detection step. As input to an image vectorization algorithm, the processed result is a vectorized bitmap of basic design elements, S = {S1, S2, ..., S...}. i ,…,S n The basic processing steps of the vectorization algorithm are as follows:

[0067] Step 5.1: Create a bitmap of the basic design elements. The process decomposes the data into paths using edge detection operators such as Canny or k-means clustering, which form the boundaries between black and white regions. The process involves moving along pixel edges and determining whether to turn left or right at corners based on a steering guideline. Each time a closed path is found, it is removed from the bitmap, and the search continues until no black pixels remain.

[0068] Step 5.2: Approximate each path as an optimal polygon. This step is achieved using a dynamic programming algorithm to find the polygon approximation that minimizes the error in polynomial time. The specific process of the algorithm is as follows:

[0069] Step 5.2.1: Define the error function The error in approximating the subsequence from point i to point j on a path using a straight line segment is measured by the sum of the distances from all points in the subsequence to the straight line segment, where j→i+1 represents the number of points traversed on the path from point i to point j. Representing point v kto straight lines Euclidean distance.

[0070] Step 5.2.2: Define the optimal function OPT(i,j) as the minimum error produced by approximating the sub-sequence of the path from the ith point to the jth point with a polygon. This minimum error can be solved by dynamic programming, i.e.:

[0071] OPT(i,j) = min{Error(i,k) + OPT(k,j)}

[0072] where i < k < j. Define the global optimal function Global(n,m) as the minimum error produced by approximating n points on the path with m straight line segments. This minimum error can also be solved by dynamic programming, i.e.:

[0073] Global(n,m) = min{Global(k,m-1) + Error(k,n)}

[0074] where 1 < k < n. With the above three functions, we can get the basic design elements the optimal polygonal approximation of all points on the contour path

[0075] Step 5.3: Take the polygon with the end points of the cubic Bezier curve, and perform control point calculation and optimization on the polygon. Let a contour be represented as the sequence of points segment ij = [p i ,p i+1 ,…,p j ], and the Bernstein function of the cubic Bezier curve be where t ∈ [0,1], p t0 , p t3 represent the end points of the contour segment segment ij , and pt1, pt2 be the coordinates of the cubic Bezier curve control points to be solved, with t = 0, 1 / 3, 2 / 3, 1 respectively, and let B(t) = segment ij [i + t × (j-i)], and write it in matrix form as Solve for , thus converting the polygon into a smooth contour S = {S1, S2, …, S i , …, S n}.

[0076] Step 5.5: Finally output the vectorized curve information {S1, S2, …, S i , …, S n} to the SVG file.

[0077] Step 6: output the vector information of the basic design elements and the multi-level transformation information;

[0078] Through steps 1-5, the first layer transformation parameter T1 between the basic design elements, the second layer transformation parameter T2 between the composite design elements, and the vector information S of the basic design elements are obtained respectively. A data record form is defined to organize the above information extracted to re-describe the original design image.

[0079] The following is an example of a json text description of the design image containing multi-level transformation information according to the extraction method:

[0080]

[0081]

[0082] The structured description of the design image is in the following form: the basic information project-properties of the design image, which contains the basic attributes such as width, height, background color, etc.; the elements node contains all the basic design element and composite design element template information extracted, wherein the data attribute is the reference position index of the design element; the root-layer records the reference information of the template elements in the set elements based on the transformation information of all elements in the image, and the transform attribute of each reference records the transformation matrix information of the corresponding different level; the root-layer contains all the composite design element nodes, and each composite design element node contains the reference of the basic design elements in the elements node in the attribute children.

[0083] In this embodiment, an electronic device includes a memory for storing a program supporting the processor to execute the above method, and a processor configured to execute the program stored in the memory.

[0084] In this embodiment, a computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to perform the steps of the above method.

Claims

1. A method for automatically extracting multi-level transform information of a design image, characterized by, The method comprises the following steps: Step 1, input the design image I containing several basic design elements and composite design elements composed of the basic design elements into the neural network model M1 for processing, and output the set E = {E1, E2, …, En} of each type of basic design elements, wherein Ei represents the set of the i-th type of basic design elements, n represents the total number of types of basic design elements, and i … n i wherein, wherein, represents the s-th basic design element instance in the i-th type of basic design element set, and S represents the number of basic design element instances in the i-th type of basic design element set; and wherein, i represents the class index number of the instance , and is the position rectangular frame of the basic design element instance in the design image I; is the segmentation mask image of the basic design element instance in the design image I, wherein the black background in the segmentation mask image is represented by binary code "0", and the white foreground in the segmentation mask image is represented by binary code "1".​ Step 2, according to the position rectangular frame of each basic design element instance in the i-th class, F i perform clustering, so as to cluster the basic design element instances with similar spatial distribution into a cluster, and combine the basic design element instances under the same cluster into a composite design element, so as to obtain the i-th class composite design element set wherein, denotes the k-th composite design element in the i-th class; K denotes the number of clusters; and wherein, denotes the v-th basic design element instance in the k-th composite design element denotes the v-th basic design element instance in the k-th composite design element k denotes the number of instances in the k-th cluster; so as to cluster the basic design element instances of all classes, and obtain Step 3, according to The similarity between various composite design elements in the design, Perform a secondary classification to obtain the secondary classification set of the i-th class. Among them, F i,u U represents the u-th secondary classification result in the i-th set of composite design elements. i express The number of categories in the secondary classification; and in, It is F i,u The wth secondary composite design element in the design, W u It is F i,u The number of secondary composite design elements; Step 4, take the set F i,u the first secondary composite design element in the i-th class and according to the position rectangular frame of each basic design element instance in the i-th class the set of basic design element instances contained perform matching and combination to obtain the set of combined image pairs wherein, denotes the image pair containing the first basic design element instance in the i-th class and the x-th basic design element instance in the i-th class ​ Will be input into the regression neural network model M2 for processing to obtain the first composite design element The corresponding transformation parameter set T1 i,u = {T1 i,u [1], T1 i,u [2], …, T1 i,u [x], …, T1 i,u [X u ]}; wherein T1 i,u [x] represents The corresponding transformation parameter; Step 5, process G i and U secondary classification results to obtain G i the first layer transformation parameter set to obtain the first layer transformation parameter total set T1 = {T11, T12, …, T1 i , …, T1 n}; Step 6, according to the position rectangular frame of each basic design element instance in the i-th category, match and combine the image pair sets of each secondary composite design element in the i-th category to obtain the image pair set of the composite design element after combination i,u Step 6, according to the position rectangular frame of each basic design element instance in the i-th category, match and combine the image pair sets of each secondary composite design element in the i-th category to obtain the image pair set of the composite design element after combination Wherein, represents the image pair of the first secondary composite design element i,u and the w-th secondary composite design element in the i-th category​ Will be input into the regression neural network model M2 for processing, output F i,u The corresponding set of transformation parameters T2 i,u = {T2 i,u [1], T2 i,u [2], …, T2 i,u [w], …, T2 i,u [w u ]}, wherein T2 i,u [w] represents The corresponding transformation parameter; Step 7, process G i middle U secondary classification results to obtain G i second layer transformation parameter set of G Thus, the second layer transformation parameter total set T2 = {T21, T22, …, T2 i , …, T2 n}; Step 8, sequentially taking out the first basic design element from each set of basic design elements E = {E1, E2,..., En} and constituting an image set i n Step 8, sequentially taking out the first basic design element from each set of basic design elements E = {E1, E2,..., En} and constituting an image set wherein, denotes the first basic design element in the i-th set of basic design elements.​ The vectorization of each basic design element in the i n i indicates the vector information of​​​​​ Step 9, saving the vector information set S and T1, T2 as a parameterized description file for subsequent modification editing or rendering operation.

2. An electronic device comprising a memory and a processor, characterized in that The memory is configured to store a program supporting the processor to execute the automatic extraction method in claim 1.

3. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, performs the steps of the automatic extraction method in claim 1. The computer program, when executed by the processor, performs the steps of the automatic extraction method in claim 1.

Citation Information

Patent Citations

  • Graph feature identifying and redesigning method based on embroidery ornamentation

    CN108509631A

  • Mask-RCNN-based multi-target detection method in indoor complex environment

    CN115937659A