Method, device and electronic equipment for recognizing a clothing design pattern
By generating feature vectors for components and parts and recognizing sequence models from garment design pattern files, the problem of non-standard naming in garment pattern making software is solved, achieving efficient structured processing of garment design patterns and ensuring the stability and integrity of downstream production data.
Patent Information
- Application Number
- CN202210255489.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-03-15
AI Technical Summary
The non-standard naming of parts in existing garment pattern making software leads to inconsistent and incomplete data in downstream automated production scenarios, making it impossible to effectively parse part information.
By parsing components and breaking down parts from clothing design pattern files, feature vectors are generated. Features are extracted using a value domain-frequency domain transformation algorithm, and combined with a sequence model to identify components and parts, providing structured information.
It improves the accuracy and efficiency of clothing design pattern recognition, ensures the consistency and integrity of downstream production data, and avoids the inefficiency of rasterization processing and the computational burden of convolution operations in traditional methods.
Smart Images

Figure CN114842495B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of graphic recognition technology, and in particular to methods, apparatus and electronic equipment for recognizing and processing clothing design patterns. Background Technology
[0002] In traditional garment pattern making, pattern makers use professional pattern making software to design 2D components of a garment and assign unique names to each component (piece). However, because the software offers no constraints on component naming, pattern makers often make inconsistencies in their naming, frequently resulting in different names for the same component due to varying personal experiences. For example, "front piece" might be written as "front panel" or "front body." Omissions and errors also occur, making it difficult to reliably rely on the pattern maker's input for standardized component naming. Furthermore, existing professional garment pattern making software does not support direct naming of parts (edges in the pieces), so part information cannot be directly parsed and obtained from the design software. This can lead to various problems in downstream automated production processes.
[0003] Therefore, how to provide clear and stable structured information for downstream production and ensure the uniformity and integrity of the data flowing downstream has become a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] This application provides a method, apparatus, and electronic device for recognizing and processing clothing design patterns, which can provide clear and stable structured information for downstream production, ensure the uniformity and integrity of data transferred downstream, and improve efficiency.
[0005] This application provides the following solution:
[0006] A method for recognizing and processing clothing design patterns includes:
[0007] At least one component is parsed from the design drawing file of the target garment, and multiple parts are separated from the same component to determine the sequential connection relationship between the multiple parts;
[0008] Generate feature vectors for the multiple regions respectively;
[0009] Based on the sequential connection relationship between the multiple parts, the feature vectors of the multiple parts are combined into a feature sequence;
[0010] Based on the feature sequence and sequence model, the identification results of the multiple parts and corresponding components are obtained.
[0011] The process of splitting multiple parts from the same component includes:
[0012] Calculate the angle between a point on the same component and its adjacent edge, and extract the vertices on the same component using a dynamic threshold.
[0013] The same component is divided into multiple parts based on the extracted vertices.
[0014] The step of generating feature vectors for the plurality of parts includes:
[0015] Feature extraction is performed on the multiple regions respectively to obtain local feature vectors corresponding to the multiple regions;
[0016] Feature extraction is performed on the components to which the multiple parts belong to obtain the global feature vector of the component;
[0017] By fusing the local feature vector of the part with the global feature vector of the component, a feature vector of the corresponding part is generated.
[0018] The step of extracting features from the plurality of regions to obtain local feature vectors corresponding to the plurality of regions includes:
[0019] Extract the first feature vector of the region according to the predefined geometric feature dimensions;
[0020] The second feature vector of the region is obtained by using a value domain-frequency domain transform algorithm to extract features from the region.
[0021] The first feature vector and the second feature vector are fused to obtain the local feature vector of the region.
[0022] Specifically, feature extraction is performed on the components to which the multiple parts belong to obtain the global feature vector of the component, including:
[0023] The component is subjected to feature extraction using a value domain-frequency domain transform algorithm to obtain the global feature vector of the component.
[0024] In the feature extraction process using the value domain-frequency domain transformation algorithm, the two-dimensional coordinates of the input signal are converted into complex numbers. Then, the complex numbers are converted into frequency domain complex numbers using the value domain-frequency domain transformation algorithm. The resulting frequency domain complex numbers are truncated to filter out the phase features, and the amplitude features are used to represent the features of the component.
[0025] This also includes:
[0026] After converting the complex number into a frequency domain complex number using the aforementioned range-frequency domain transformation algorithm, normalization is performed.
[0027] The normalization process includes: sorting the converted multiple frequency domain complex numbers according to frequency, using the amplitude characteristics of the frequency domain complex number with the lowest frequency as the normalization coefficient, and normalizing the other frequency domain complex numbers.
[0028] This also includes:
[0029] After converting the complex number into a frequency domain complex number using the value domain-frequency domain transformation algorithm, the multiple frequency domain complex numbers after conversion are sorted according to frequency, and the amplitude characteristics of the target number of frequency domain complex numbers with lower frequencies are selected as the features of the component.
[0030] If the design drawing file contains discrete data, then before using the value domain-frequency domain transformation algorithm to extract features from the component or part, the following steps are also included:
[0031] After obtaining a continuous curve by shape fitting of the component or part using the target algorithm, it is discretized again so that a fixed number of point information can be used as the input signal of the value domain-frequency domain transformation algorithm.
[0032] An apparatus for recognizing and processing clothing design patterns, comprising:
[0033] The disassembly unit is used to parse at least one component from the design drawing file of the target garment, and to separate multiple parts from the same component, and to determine the sequential connection relationship between the multiple parts;
[0034] A feature vector generation unit is used to generate feature vectors for the plurality of parts respectively;
[0035] A sequence generation unit is used to form a feature sequence from the feature vectors of the multiple parts according to the sequential connection relationship between the multiple parts;
[0036] The model processing unit is used to obtain the recognition results of the multiple parts and corresponding components based on the feature sequence and the sequence model.
[0037] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of any of the preceding methods.
[0038] An electronic device, comprising:
[0039] One or more processors; and
[0040] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any of the preceding descriptions.
[0041] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0042] This application utilizes the sequential connection relationship between multiple parts within the same component. By generating feature vectors for each part and assembling them into a feature sequence according to their specific sequential connections, the component and its parts can be identified using a sequence model. This yields structured information from the design drawing file, which can then be provided to downstream automated production scenarios. Since it eliminates the need for rasterization of the design drawing file and avoids convolution operations in convolutional neural network models, efficiency is improved, providing clear and stable structured information to downstream production and ensuring the consistency and integrity of the data transferred downstream.
[0043] Furthermore, during feature generation, global features of a component can be fused into local features of various parts. This can also include predefined features with specific geometric meanings in different dimensions, enriching the feature dimensions of each part and improving recognition accuracy. During feature extraction, a domain-to-frequency domain transformation algorithm can be used, retaining only the real numbers and removing the imaginary parts representing angular information, thus achieving rotation invariance. Scaling invariance is achieved by normalizing the transformed data.
[0044] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1-1 , 1-2 It is a schematic diagram of a clothing design;
[0047] Figure 2 This is a schematic diagram of the system architecture provided in the embodiments of this application;
[0048] Figure 3 This is a flowchart of the method provided in the embodiments of this application;
[0049] Figure 4 This is a schematic diagram of the parts disassembled according to an embodiment of this application;
[0050] Figure 5 This is a schematic diagram of the algorithm flow provided in the embodiments of this application;
[0051] Figure 6 This is a schematic diagram of the input and output information of the sequence model provided in the embodiments of this application;
[0052] Figure 7 This is a schematic diagram of the device provided in the embodiments of this application;
[0053] Figure 8 This is a schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0055] In this embodiment of the application, after a pattern maker completes the design of a garment and generates a design drawing file, a scheme for processing this design drawing file is provided in order to provide more explicit and stable structured information for downstream generation. To facilitate understanding of the specific implementation scheme provided in this embodiment of the application, some related concepts are briefly introduced below.
[0056] Design drawing files: These are typically files generated by pattern makers or other professional designers after they have created and drawn graphics using tools such as CAD (Computer-Aided Design). They are exported from these files, for example, in DXF format. These files can use various geometric elements to describe the shape of specific components.
[0057] Components: These refer to each piece of fabric in a design drawing. A design drawing file will include design drawings for all the components corresponding to the fabric pieces needed to make a garment. For example, if a garment requires four fabric pieces, including a front piece, a back piece, etc., then the corresponding design drawing file will include the geometric shapes for those four components. Specifically... Figure 1-1 As shown, it displays the design pattern file for a certain garment, which includes the geometric shapes of multiple components. During the design process, the pattern maker may name each component, but issues such as inconsistent and inaccurate naming exist.
[0058] Part: refers to each edge of a component, for example, such as Figure 1-2As shown, this diagram illustrates the various parts and their names within one component—the back panel of the trousers. For example, it includes the back panel lining, back panel hem, back panel side seam, etc. It should be noted that the labels on these parts in the diagram are merely for illustrative purposes. The actual design drawings do not contain specific names or other structured information about the parts, such as the coordinates of the start and end points of each edge.
[0059] In other words, after obtaining a design drawing file, which includes graphics of multiple components, the file contains little to no structured information other than potentially non-standard component naming. The objective of this application is to identify components and parts from such design drawing files and generate more standardized and accurate structured information, including names of each component and part, for use in downstream automated production scenarios.
[0060] Specifically, to achieve the above objectives, it is necessary to perform related processing for the recognition of graphic files. Several similar processing schemes exist in the existing technology. For example, in one type of scheme, rasterization is used to generate part images, which are then classified using an image classification model. However, rasterization preprocessing is time-consuming, and the recognition accuracy depends on the resolution of the generated image; furthermore, the input data is relatively large; assuming a binary image with a resolution of 512x512, it requires 32kB without compression. Additionally, network inference time is relatively long, convolution operations in image classification networks are relatively time-consuming, and part information cannot be directly output. Another type of scheme is a recognition scheme based on geometric features. Specifically, the angles between adjacent sides can be extracted, and geometric descriptions such as "angles," "lines," and "arcs" in the graphic can be calculated based on the distribution of these angles, and then classified according to predefined rules. However, the features extracted in this scheme are relatively basic, and the recognition ability is limited to simple geometric shapes. It is less effective at recognizing geometric shapes with more variations. In clothing design patterns, geometric shapes are diverse and may be very complex. Therefore, this recognition scheme based on geometric features and rules cannot be applied to the recognition of parts and components in clothing design patterns.
[0061] To address the above issues, this application provides a novel solution. This solution leverages the continuous connection sequence between multiple different parts within the same component (e.g., a component includes three edges A, B, and C, where A connects to B, B connects to C, and C connects to A, forming an ABCA connection sequence). Components and parts can be identified using a sequence model (e.g., a Transformer sequence model). Specifically, multiple components are first parsed from the design drawing file, and then multiple parts are extracted from each component. Feature vectors are then generated for each part to represent its shape characteristics within the component. The feature vectors of each part are then concatenated according to their connection sequence within the same component and input into a pre-trained sequence model to output the identification results of each part and its corresponding component. This method is highly efficient because it eliminates the need for rasterization and binarization of the input file, and the recognition accuracy is no longer affected by resolution. In addition, since it makes full use of the sequential connection between different parts, it can be identified by a sequence model without the need for a convolution model, thus avoiding a large number of convolution operations and further improving efficiency.
[0062] In generating feature vectors for each part, one approach is to extract features directly from the part itself. Alternatively, in a preferred approach, global features can be extracted from the component to which the specific part belongs. Furthermore, the global features of the component can be integrated into the feature vector of the part, thereby obtaining more dimensional features for the specific part, which helps improve the accuracy of recognition.
[0063] When extracting features from the location itself, in addition to using algorithms, some feature dimensions can be predefined. For example, these could include the length ratio of the current edge to its adjacent edge, the angle between the current edge and its adjacent edge, the average curvature, and so on. These features, with practical geometric meaning, can more accurately represent the geometric characteristics of the location.
[0064] Furthermore, in the preferred embodiment of this application, when extracting features from a part using an algorithm, a domain-frequency domain transformation algorithm can be employed, such as FFT (Fast Fourier Transform). Specifically, the coordinates of the input points (points on the shape from which feature extraction is required) can first be converted into complex numbers. Then, these complex numbers are input into an algorithm such as FFT to convert them into complex numbers in the frequency domain. For this complex number in the frequency domain, the real part typically represents the amplitude characteristics of the specific shape (i.e., features related to the specific shape), while the imaginary part mainly represents the phase characteristics (i.e., features related to rotation angle, starting point, etc.). In this way, during feature extraction, only the real part representing the amplitude characteristics in the frequency domain complex number can be retained, while the imaginary part representing the rotation angle can be removed, thereby enabling the algorithm to achieve "rotation invariance." That is, even if the image undergoes some angular rotation, the algorithm can still perform effective recognition.
[0065] Furthermore, normalization can be performed after the FFT transform to achieve "scaling invariance," meaning that effective recognition can still be performed even when the specific image is scaled. Additionally, some high-frequency signals can be filtered out after the FFT transform to reduce the number of features and filter out some noise. The normalization and high-frequency filtering processes described above will be explained in detail later.
[0066] Of course, when performing global feature extraction on components, related algorithms such as FFT can also be used to achieve the aforementioned purposes of "rotation invariance" and "scaling invariance".
[0067] From a system architecture perspective, see Figure 2 This application provides a system or service for structured recognition processing of clothing design pattern files. It takes a clothing design pattern file (specifically, a file in DXF or other formats) as input, and then performs a series of processes including component parsing, part decomposition, feature vector generation, and concatenating the feature vectors of multiple parts according to their sequential connection relationships. These processes are then input into a sequence model to output recognition results for the parts and components. These recognition results can be provided for use in downstream automated generation scenarios.
[0068] The specific implementation schemes provided in the embodiments of this application will be described in detail below.
[0069] First, this application provides a method for recognizing and processing clothing design patterns, see [link to relevant documentation]. Figure 3 The method may specifically include:
[0070] S301: Parse at least one component from the design drawing file of the target garment, and split multiple parts from the same component to determine the sequential connection relationship between the parts in the same component.
[0071] As mentioned earlier, the design drawing file can be a file exported from a design tool, such as a DXF file exported from a CAD drafting tool, etc. This includes the geometry of multiple components. In this embodiment, the design drawing file is first parsed to obtain a list of multiple components. It should be noted that this parsing step only determines which components are contained in the file and the shapes of the corresponding geometric figures of these components; that is, it obtains a list of components. The components in the list can be labeled with numbers, but at this point, the specific component names, categories, and other information cannot be identified.
[0072] After parsing the component list, this embodiment of the application can further extract multiple specific parts from a specific component. A specific part refers to an edge within a specific component; for example, if a component consists of three edges, it can be extracted into three parts. Through this step, a part list can be obtained for each component. Similarly, at this point, the geometric shape corresponding to each part can be determined; however, the structured information such as the name and category of the specific part cannot be identified at this stage.
[0073] Since the specific design drawings do not contain structured information about the parts, including the start and end points of each edge, this application also provides a specific implementation scheme for splitting a component into parts. For example, one specific implementation method is: first, calculate the angle formed by a point on the same component and its adjacent edges, and extract the vertices on the component using a dynamic threshold. Then, based on the extracted vertices, the same component is split into multiple parts. That is, first, the vertices in the specific component are determined based on the angle formed by adjacent edges, and then, based on the vertices, multiple parts are split from the component. For example, as... Figure 4 In the example shown, the specific "back piece" component can be identified by 5 vertices, which we'll label A, B, C, D, and E. Then, the curves between adjacent vertices can be separated as a specific part. For example, curves AB, BC, CD, DE, and EA can each be separated as a part.
[0074] During the process of segmenting parts, the sequential connection relationships between each part can also be recorded. For example, in the above... Figure 4In the example shown, the sequential connections between the parts can be: AB, BC, CD, DE, EA. Of course, since the parts usually form a closed loop, the starting point of the specific sequential connection does not have to be fixed. For example, Figure 4 In the example shown, the sequential connection between the various parts can also be: BC, CD, DE, EA, AB, etc.
[0075] S302: Generate feature vectors for the multiple parts respectively.
[0076] After separating a specific component into multiple parts, the components and parts can be identified on a per-component basis. Specifically, for a particular component, feature vectors can be generated for each of the multiple parts extracted from that component; that is, each part can be described using a separate feature vector.
[0077] Specifically, there are multiple ways to generate feature vectors for specific body parts. For example, one approach is to directly extract features from the body part itself to obtain its feature vector. When extracting features from the body part itself, various algorithms can be used, such as image invariant moment features, features based on curvature scale space, features based on centroid distance functions, and so on. In a preferred embodiment of this application, features can be expressed using a domain-frequency domain transformation algorithm (e.g., FFT algorithm). Specifically, the coordinate values of multiple points on the body part can be converted into complex numbers (e.g., the x-value as the real part and the y-value as the imaginary part, etc.), and then converted into frequency domain complex numbers using algorithms such as FFT. Afterward, the imaginary part of the frequency domain complex number can be removed, retaining only the real part. Since the imaginary part usually represents phase features, while the real part represents amplitude features, removing the imaginary part makes the extracted features rotationally invariant; that is, even if the shape is rotated by a certain angle, it will not affect the subsequent recognition accuracy.
[0078] In addition, in practical implementation, normalization can be performed after converting to complex numbers to achieve scaling invariance. That is, even if the specific shape is scaled, it will not affect the subsequent recognition accuracy. Specifically, one way to perform normalization is to sort the frequency domain complex numbers corresponding to each vertex of the FFT output according to frequency, use the amplitude feature of the point with the lowest frequency as the normalization coefficient, divide the amplitude features of the frequency domain complex numbers corresponding to other vertices by the above normalization coefficient, and then use the normalized amplitude features to represent the specific shape.
[0079] Furthermore, after performing an FFT transformation on the vertices of a specific shape (there are multiple vertices; different shapes can use the same number of vertices as input points), and sorting the transformed frequency domain complex numbers according to frequency, some high-frequency features can be filtered out, using only low-frequency features to represent the specific shape's characteristics. For example, suppose a shape has 1000 vertices input into the FFT algorithm, resulting in 1000 frequency domain complex numbers after the FFT transformation. These 1000 frequency domain complex numbers can then be sorted from low to high frequency, and a certain number of low-frequency complex numbers can be selected, for example, the top 100. This approach reduces the number of features, thus simplifying subsequent algorithms. On the other hand, some shapes may contain protruding corners, etc., whose points, after transformation to the frequency domain, usually have higher frequencies. However, this is generally not helpful in identifying specific shape categories and may even have a negative impact; therefore, it is referred to as noise. After the aforementioned FFT transformation, this noise can be filtered out based on the specific frequency information, which helps to improve the accuracy of subsequent algorithms.
[0080] In practical implementation, the aforementioned rotation invariance, scaling invariance, and noise filtering can be combined. For example, after converting the coordinates of M vertices of a shape into complex numbers and inputting them into an FFT algorithm, M frequency domain complex numbers are obtained. Then, these M frequency domain complex numbers are sorted, and N low-frequency complex numbers are selected to achieve noise filtering and reduce the number of features. Next, from these N low-frequency complex numbers, only the real-valued portions representing amplitude features are retained, ensuring that the extracted features meet the requirement of rotation invariance. Finally, the amplitude feature corresponding to the lowest frequency point can be used as a normalization coefficient to normalize the amplitude features of these N low-frequency complex numbers, thus satisfying the requirement of scaling invariance.
[0081] Furthermore, since the extracted features are often abstract and lack human-understandable meaning when using specific algorithms to extract features from body parts, to further improve the accuracy of the recognition results, we can define some human-understandable feature dimensions during feature extraction. Examples include length ratios, the angle between the current edge and its adjacent edges, and average curvature. This way, in addition to extracting abstract features through algorithms, we can also extract relatively concrete features and combine these two sets of features into a feature vector for the body part. For example, assuming a 20-dimensional feature vector is extracted using the FFT algorithm, and additional features with specific geometric meanings are extracted in five dimensions, the final feature vector for the body part could be a 25-dimensional vector, and so on.
[0082] In addition to feature extraction from the specific part itself, since the specific part is also part of the component, feature extraction can also be performed on the component to which the multiple parts belong to obtain the global feature vector of the component. Then, the feature vector of the corresponding part can be generated by fusing the local feature vector of the specific part with the global feature vector of the component to which it belongs.
[0083] In other words, features can be extracted from each part separately (including extraction using the aforementioned FFT algorithm, and feature extraction in dimensions with specific geometric meanings), resulting in local feature vectors corresponding to multiple parts. Additionally, features can be extracted from the entire component to obtain its global feature vector. Thus, for each part, the global feature vector of the specific component can be fused into its local feature vector, ultimately generating the feature vector of that specific part. Specifically, various algorithms can be used for global feature extraction of the component. For example, a domain-frequency domain transformation algorithm (such as the FFT algorithm) can be used to extract features from the component, obtaining its global feature vector. Furthermore, when using the domain-frequency domain transformation algorithm for global feature extraction, the two-dimensional coordinates of the input signal (multiple points on the component) can be converted into complex numbers, then into frequency domain complex numbers, and the resulting frequency domain complex numbers can be truncated to filter out the imaginary part representing phase features. The real part representing amplitude features can then be used for feature extraction to obtain rotation invariance. In addition, normalization is performed to obtain scaling invariance, noise is filtered out by removing high-frequency features, and the number of features is reduced, etc.
[0084] It's important to note that when extracting features from components or parts using algorithms like FFT, it's typically necessary to ensure consistent input signal length. However, DXF and similar formats usually represent data as discrete data, meaning a specific shape is described as a set of points. The number of points in this set can vary depending on the shape. For example, a regular rectangle might be represented by the coordinates of its four vertices, while a shape with more sides might require the coordinates of multiple vertices. A curve might require the coordinates of even more points, and so on. Directly using these point coordinates as FFT input would result in different input signal lengths for different shapes. Therefore, in this embodiment, before using the domain-frequency transform algorithm to extract features from the component or part, an algorithm (e.g., b-spline curve) can be used to fit the shape of the component or part to obtain a continuous curve. This curve is then re-discretized to use a fixed number of point values as the input signal for the domain-frequency transform algorithm. In other words, regardless of the shape of the specific component or part, and regardless of the number of points used to represent the shape in the DXF file, the shape of the specific component or part can first be fitted to obtain a continuous curve, and then discretized again. The discretization process involves resampling from the fitted continuous curve. For different shapes, the number of sampling points can be the same, thus ensuring that the signal length input into the FFT algorithm is the same for different shapes. Of course, since graphics are usually drawn in CAD and other tools in vector form, the data is continuous, and discretization is only performed when exporting to a DXF file. If continuous data can be directly exported from the design tool, sampling can be performed directly, and the above fitting and re-discretization processes are no longer needed.
[0085] It's also worth noting that before fusing the local feature vectors of the parts with the global feature vectors of the components, they can be encoded separately and then fused to obtain fixed-dimensional feature vectors for each part. Specifically, this encoding process can be implemented using an MLP Encoder (Multilayer Perceptron Encoder). An MLP Encoder uses an encoder composed of multiple fully connected layers to extract key information and activates it using SiLU (Sigmoid Linear Unit, a non-linear activation function in deep learning). Of course, other encoders can also be used for this encoding process, such as 1D convolutional encoders, etc.
[0086] S303: Based on the sequential connection relationship between the multiple parts, the feature vectors of the multiple parts are combined into a feature sequence.
[0087] Through the aforementioned steps, for multiple parts within the same component, feature vectors corresponding to each part can be obtained. In a preferred embodiment, the feature vector of each part can be generated by fusing local feature vectors extracted from the part itself with global feature vectors extracted from the component. Subsequently, since there is a sequential connection relationship between multiple parts of the same component, the feature vectors of these multiple parts can be combined into a feature sequence based on this sequential connection relationship. That is, this sequence not only includes the features of each part but also reflects the contextual relationships between different parts, ensuring that these features meet the input conditions of a sequence model.
[0088] S304: Based on the feature sequence and sequence model, obtain the identification results of the multiple parts and corresponding components.
[0089] After obtaining a feature sequence composed of feature vectors from multiple body parts, this feature sequence can be used as input to a sequence model to obtain recognition results for multiple body parts and their corresponding components. The specific sequence model can be varied, including, for example, the Transformer model, or other sequence models such as LSTM, BiLSTM, RNN, or CRF. The Transformer model is a neural network sequence model entirely based on an attention mechanism. During training, it actively learns the correlations between elements in the input sequence to produce the final output result.
[0090] In this embodiment, after selecting a sequence model, the model can be pre-trained. During training, a batch of training samples can be obtained. These training samples may include component graphics, graphics of the disassembled parts, and labels for each component / part (obtained through manual annotation, etc.). During training, feature vectors can be generated for each part, and these vectors are connected according to the order of the parts to form an input sequence, which is then input into the sequence model. The output of the sequence model is the label of the specific component / part. This is compared with the actual labeled labels, and the parameters of the sequence model are updated before proceeding to the next iteration. The training process ends when the algorithm converges.
[0091] After training is complete, specific sequence models can be used to identify parts and components. That is, the feature sequence composed of feature vectors from multiple parts obtained in step S303 is input into the trained sequence model, which then outputs labels for each part and component. In practice, the specific labels might be abstract numbers, etc. Therefore, a mapping relationship between labels and names with specific semantic meanings can be pre-established. For example, specific component labels can be expressed as 1, 2, 3, 4, etc., and the corresponding names with specific semantic meanings could be front piece, back piece, etc. In this way, after the specific sequence model outputs labels for specific parts and components, these labels can be converted into names with specific semantic meanings through this mapping relationship, and so on.
[0092] To better understand the solutions provided in the embodiments of this application, the following is combined with... Figure 5 The section introduces the processing flow in a specific implementation scheme.
[0093] 1. Obtain design drawing files in formats such as DXF;
[0094] 2: Parse the design drawing file to obtain multiple components;
[0095] 3: The component is split into multiple parts, and global features can be extracted from the component.
[0096] 4: Extract local features from the parts. This can include features extracted using algorithms such as FFT, as well as features extracted from dimensions with actual geometric meaning.
[0097] 5: The global features of the components are fused into the local features of each part, resulting in fused features for each part. Based on the sequential connection relationship between the parts, the feature vectors of each part are combined into a feature sequence.
[0098] 6: Specific feature sequences can be used as input for sequence models such as Transformer;
[0099] 7: The sequence model outputs the part identification results and component identification results (represented by labels at this time), and through mapping, the identification results of the part name and component name are obtained.
[0100] For the input information part of the sequence model, such as Figure 6As shown, after obtaining the local features of each part, the global features of the component are fused with the local features of each part. Before fusion, the global and local features can be encoded separately, and then fused. After fusion, according to the sequential connection relationship of each part in the same component, the fused feature vectors of each part are combined into a feature sequence, which is then input into the sequence model, so that the sequence model can output the classification results of the component and each part.
[0101] In summary, this application utilizes the sequential connection relationship between multiple parts within the same component. By generating feature vectors for each part and assembling them into a feature sequence according to their specific sequential connections, the component and its parts can be identified using a sequence model. This yields structured information from the design drawing file, which can then be provided to downstream automated production scenarios. Since rasterization of the design drawing file is not required, and convolution operations in convolutional neural network models are not involved, efficiency is improved. This provides clear and stable structured information for downstream production, ensuring the uniformity and integrity of the data transferred downstream.
[0102] Furthermore, during feature generation, global features of a component can be fused into local features of various parts. This can also include predefined features with specific geometric meanings in different dimensions, enriching the feature dimensions of each part and improving recognition accuracy. During feature extraction, a value domain-frequency domain transformation algorithm can be used, retaining only amplitude features and removing the imaginary part representing angular features to achieve rotation invariance. Scaling invariance is achieved by normalizing the transformed data. Noise filtering can also be achieved by removing high-frequency features.
[0103] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., with the user's explicit consent, with the user being properly notified, etc.).
[0104] Corresponding to the foregoing method embodiments, this application also provides an apparatus for recognizing and processing clothing design drawings, see [link to relevant documentation]. Figure 7 The device may include:
[0105] The disassembly unit 701 is used to parse at least one component from the design drawing file of the target garment, and to separate multiple parts from the same component, and to determine the sequential connection relationship between the multiple parts;
[0106] The feature vector generation unit 702 is used to generate feature vectors for the plurality of parts respectively;
[0107] The sequence generation unit 703 is used to form a feature sequence from the feature vectors of the plurality of parts according to the sequential connection relationship between the plurality of parts;
[0108] The model processing unit 704 is used to obtain the recognition results of the multiple parts and corresponding components based on the feature sequence and the sequence model.
[0109] Specifically, the disassembly unit can be used for:
[0110] Calculate the angle between a point on the same component and its adjacent edge, and extract the vertices on the same component using a dynamic threshold.
[0111] The same component is divided into multiple parts based on the extracted vertices.
[0112] Specifically, the feature vector generation unit may include:
[0113] The local feature acquisition subunit is used to extract features from the multiple parts respectively, and obtain the local feature vectors corresponding to the multiple parts respectively;
[0114] The global feature acquisition subunit is used to extract features from the components to which the multiple parts belong, and obtain the global feature vector of the component.
[0115] The feature fusion subunit is used to generate a feature vector for the corresponding part by fusing the local feature vector of the part with the global feature vector of the component to which it belongs.
[0116] Specifically, the local feature acquisition subunit can be used for:
[0117] Extract the first feature vector of the region according to the predefined geometric feature dimensions;
[0118] The second feature vector of the region is obtained by using a value domain-frequency domain transform algorithm to extract features from the region.
[0119] The first feature vector and the second feature vector are fused to obtain the local feature vector of the region.
[0120] The global feature acquisition subunit can be specifically used for:
[0121] The component is subjected to feature extraction using a value domain-frequency domain transform algorithm to obtain the global feature vector of the component.
[0122] In the feature extraction using the value domain-frequency domain transformation algorithm, the two-dimensional coordinates of the input signal can be converted into complex numbers. Then, the complex numbers can be converted into frequency domain complex numbers using the value domain-frequency domain transformation algorithm. The resulting frequency domain complex numbers are then truncated to filter out phase features, and amplitude features are used to represent the features of the component.
[0123] In addition, after converting the complex number into a frequency domain complex number using the aforementioned range-frequency domain transformation algorithm, normalization processing can be performed. The normalization processing includes: sorting the multiple frequency domain complex numbers after conversion according to frequency, using the amplitude characteristic of the frequency domain complex number with the lowest frequency as the normalization coefficient, and normalizing the other frequency domain complex numbers.
[0124] Furthermore, after converting the complex number into a frequency domain complex number using the aforementioned range-frequency domain transformation algorithm, the multiple converted frequency domain complex numbers are sorted according to frequency, and the amplitude characteristics of the target number of frequency domain complex numbers with lower frequencies are selected as the features of the component.
[0125] If the design drawing file contains discrete data, the device may further include:
[0126] The preprocessing unit is used to perform shape fitting on the component or part using the target algorithm to obtain a continuous curve before using the value domain-frequency domain transformation algorithm to extract features from the component or part. Then, it performs discretization processing again so that a fixed number of point information can be used as the input signal of the value domain-frequency domain transformation algorithm.
[0127] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.
[0128] And an electronic device, comprising:
[0129] One or more processors; and
[0130] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any of the foregoing method embodiments.
[0131] in, Figure 8An exemplary architecture of an electronic device is shown, which may include a processor 810, a video display adapter 811, a disk drive 812, an input / output interface 813, a network interface 814, and a memory 820. The processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, and memory 820 can communicate with each other via a communication bus 830.
[0132] The processor 810 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to achieve the technical solution provided in this application.
[0133] The memory 820 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 820 can store the operating system 821 for controlling the operation of the electronic device 800, and the basic input / output system (BIOS) for controlling the low-level operations of the electronic device 800. Additionally, it can store a web browser 823, a data storage management system 824, and an identification processing system 825, etc. The aforementioned identification processing system 825 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when implementing the technical solution provided in this application through software or firmware, the relevant program code is stored in the memory 820 and is called and executed by the processor 810.
[0134] The input / output interface 813 is used to connect input / output modules to enable information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0135] Network interface 814 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0136] Bus 830 includes a pathway for transmitting information between various components of the device, such as processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, and memory 820.
[0137] It should be noted that although the above-described device only shows the processor 810, video display adapter 811, disk drive 812, input / output interface 813, network interface 814, memory 820, bus 830, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.
[0138] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0139] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0140] The method, apparatus, and electronic device for recognizing and processing clothing design drawings provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for recognizing and processing clothing design patterns, characterized in that, include: At least one component is parsed from the design drawing file of the target garment, and multiple parts are separated from the same component to determine the sequential connection relationship between the multiple parts; Feature vectors are generated for the multiple parts in the following ways: feature extraction is performed on the multiple parts to obtain local feature vectors corresponding to the multiple parts; feature extraction is performed on the components to which the multiple parts belong to to obtain global feature vectors of the components; and feature vectors of the corresponding parts are generated by fusing the local feature vectors of the parts with the global feature vectors of the components to which they belong. Based on the sequential connection relationship between the multiple parts, the feature vectors of the multiple parts are combined into a feature sequence; Based on the feature sequence and sequence model, the identification results of the multiple parts and corresponding components are obtained.
2. The method according to claim 1, characterized in that, The step of extracting features from the multiple regions to obtain local feature vectors corresponding to the multiple regions includes: Extract the first feature vector of the region according to the predefined geometric feature dimensions; The second feature vector of the region is obtained by using a value domain-frequency domain transform algorithm to extract features from the region. The first feature vector and the second feature vector are fused to obtain the local feature vector of the region.
3. The method according to claim 1, characterized in that, Feature extraction is performed on the components to which the multiple parts belong to obtain the global feature vector of the component, including: The component is subjected to feature extraction using a value domain-frequency domain transform algorithm to obtain the global feature vector of the component.
4. The method according to claim 2 or 3, characterized in that, When using the value domain-frequency domain transformation algorithm for feature extraction, the two-dimensional coordinates of the input signal are converted into complex numbers. Then, the value domain-frequency domain transformation algorithm is used to convert the complex numbers into frequency domain complex numbers. The resulting frequency domain complex numbers are truncated to filter out the phase features, and the amplitude features are used to represent the features of the component.
5. The method according to claim 4, characterized in that, Also includes: After converting the complex number into a frequency domain complex number using the aforementioned range-frequency domain transformation algorithm, normalization is performed. The normalization process includes: sorting the converted multiple frequency domain complex numbers according to frequency, using the amplitude characteristics of the frequency domain complex number with the lowest frequency as the normalization coefficient, and normalizing the other frequency domain complex numbers.
6. The method according to claim 4, characterized in that, Also includes: After converting the complex number into a frequency domain complex number using the value domain-frequency domain transformation algorithm, the multiple frequency domain complex numbers after conversion are sorted according to frequency, and the amplitude characteristics of the target number of frequency domain complex numbers with lower frequencies are selected as the features of the component.
7. The method according to claim 2 or 3, characterized in that, If the design drawing file contains discrete data, then before using the value domain-frequency domain transformation algorithm to extract features from the component or part, the following steps are also included: After obtaining a continuous curve by shape fitting of the component or part using the target algorithm, it is discretized again so that a fixed number of point information can be used as the input signal of the value domain-frequency domain transformation algorithm.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1 to 7.
9. An electronic device, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
On-line identification method of compound pattern
CN101964053A
Character image recognition method and device, electronic equipment and storage medium
CN111275046A