Miao cross-stitch pattern element extraction application system based on artificial intelligence
By adopting lightweight convolutional neural networks and specific image processing technology in the Miao pattern processing, the problem of difficulty in extracting complex design elements in the existing technology is solved, and efficient and accurate feature extraction effect is achieved.
Patent Information
- Application Number
- CN202510383007.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively extract and analyze complex design elements in Miao pick patterns, especially in resource-constrained environments and in the presence of irregular shapes and low contrast in images.
A feature extraction model based on lightweight convolutional neural network (ConvNets) is adopted, combined with Gabor filter and grayscale image processing, and dynamic kernel technology, inverted bottleneck overlapping blocking and dimensional segmentation single-head self-attention mechanism is used to enhance the model's ability to identify texture, shape and structural features.
It significantly improves the accuracy and efficiency of extracting Miao pick pattern features, ensures efficient operation in resource-constrained environments, and can effectively identify complex design elements.
Smart Images

Figure CN119888258A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of pattern image processing, in particular to an application system for extracting Miao ethnic group embroidery pattern elements based on artificial intelligence. Background Art
[0002] As an important part of China's intangible cultural heritage, Miao embroidery has attracted widespread attention for its unique artistic style and rich cultural connotations. However, traditional manual recording and analysis methods are inefficient and cannot meet the needs of modern society for the rapid and accurate acquisition and utilization of these precious cultural resources. Existing image feature extraction models have technical problems such as large model scale and overly complex network structure, which cannot be applied to edge devices in real life. There may be various irregular shapes and unique textures in embroidery patterns, especially in the absence of clear boundaries or low color contrast. Existing models may not be able to effectively distinguish and extract design elements. Miao embroidery patterns usually contain very fine and complex patterns, which may include subtle changes, overlapping design elements, and highly abstract expressions. However, current AI algorithms have difficulty accurately capturing and parsing these details. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides an artificial intelligence-based Miao embroidery pattern element extraction application system. In view of the technical problems that the existing image feature extraction model has a large model scale and an overly complex network structure, and cannot be applied to edge devices in actual use, this solution constructs a feature extraction model based on lightweight convolutional neural networks (ConvNets). ConvNets can not only accelerate the reasoning process, but also run efficiently in a resource-constrained environment; in view of the fact that there may be various irregular shapes and unique textures in embroidery patterns, the existing model may not be able to effectively distinguish and extract design elements. In the constructed feature extraction model, the method uses Gabor filters and grayscale image processing methods to extract texture, shape and structural features in the image, thereby enhancing the model's recognition ability of these complex design elements; in addition, in order to more accurately capture the fine and complex pattern details in the Miao embroidery patterns, dynamic kernel technology, inverted bottleneck overlapping block division and dimension segmentation single-head self-attention mechanism are used in the constructed feature extraction model to construct a feature extraction model based on ConvNets, which significantly improves the feature extraction accuracy of the embroidery patterns while ensuring its practicality and efficiency.
[0004] The Miao ethnic group embroidery pattern element extraction application system based on artificial intelligence provided by the present invention comprises a data acquisition module, a preprocessing module, a feature extraction module, a database management module, a creative design auxiliary module and a user interaction interface; The data acquisition module collects high-quality image data of Miao ethnic group's embroidery patterns through high-resolution scanners and digital camera equipment to obtain original images; The preprocessing module preprocesses the collected original image to optimize the image quality and obtain a preprocessed image; The feature extraction module uses a feature extraction model based on ConvNets to automatically identify and extract design element features from the preprocessed image to obtain the Miao ethnic group embroidery pattern element features; The database management module establishes a structured database system to store and manage all data resources in the system, including original images and Miao ethnic group embroidery pattern element features; The creative design auxiliary module integrates graphic editing tools and creative generation algorithms to provide inspiration and support for designers, allowing users to create new design works based on the extracted Miao embroidery pattern element features; The user interaction interface develops an intuitive and easy-to-use graphical user interface, allowing researchers, designers and ordinary users to easily use the various functions of the system.
[0005] Furthermore, the feature extraction module uses a feature extraction model based on ConvNets to automatically identify and extract design element features from the preprocessed image, specifically including the following steps: Step S1: RGB global feature stream, using Gabor filter to extract details and texture information in the preprocessed image to obtain texture features; Step S2: Grayscale image stream, using the grayscale image to extract the structure and shape information in the preprocessed image to obtain structural features and shape features; Step S3: Inverted bottleneck overlapping block division, using ConvNets as the backbone network, using inverted bottleneck blocks without skip connections in ConvNets to construct inverted bottleneck overlapping block division, down-sampling the pre-processed image to obtain down-sampled features; Step S4: construct a dynamic kernel and set dynamic kernels of different sizes to capture multi-scale features; Step S5: Attention mechanism, using dimension splitting single-head self-attention mechanism to extract features and obtain attention map features; Step S6: feature fusion, fusing and splicing texture features, structural features, shape features and attention map features to obtain the element features of Miao embroidery patterns; Furthermore, in step S3, the bottleneck overlap is inverted and divided into blocks, which specifically includes the following steps: Step S31: Use 3×3 small convolutional block patches in ConvNets to capture low-level feature information; Step S32: Use the inverted bottleneck block without skip connection to construct the inverted bottleneck overlapping block, and apply depth convolution and 1×1 convolution to process the preprocessed image to obtain downsampled features and reduce the number of model parameters. The formula used is as follows: ; In the formula, represents the preprocessed image, is a 1×1 convolution operation, Indicates the step length is A 3×3 depthwise convolution operation, is the down-sampled feature; Step S33: Setting the expansion factor of the inverted bottleneck overlapping block to , optimize the number of parameters of the inverted bottleneck block; Furthermore, in step S4, a dynamic core is constructed, which specifically includes the following steps: Step S41: Determine the initial kernel size, select a dynamic kernel with an odd initial size to downsample the preprocessed image, and calculate the cumulative downsampling rate. The formula used is as follows: ; In the formula, Indicates The downsampling rate of the stage, and is the stage index, From the first stage to the The product of all downsampling rates in the stage, is the logarithm with base 2, Indicates that the accumulation reaches The sum of the downsampling rates of the stages; Step S42: Calculate the growth factor to obtain the growth factor of each stage. The growth factor determines whether to increase the size of the dynamic core. The formula used is as follows: ; In the formula, For the modulo operation, is the logical AND operator, Indicates a round-down operation. represents the growth factor; Step S43: Adjust the size of the dynamic kernel. Adjust the size of the dynamic kernel according to the growth factor of the current stage to capture multi-scale features. The formula used is as follows: ; In the formula, and Respectively represent Stage and Dynamic kernel size of the stage; Furthermore, the dimension segmentation single-head self-attention mechanism extracts features, specifically including the following steps: Step 51: Image processing, use depth-separable convolution, batch normalization and SiLU activation function to process the downsampled features and generate a weight vector. The formula used is as follows: ; In the formula, represents the weight vector, Indicates that the dynamic kernel size is The depth convolution operation, is the batch normalization operation, for Activation function; Step S52: split the feature tensor, split the weight vector into two parts along the channel dimension, as the query vector Q and the key vector K respectively; Step S53: Generate position coding, process the downsampled features using a depth-separable convolution with a dynamic kernel, generate position coding, and add the position coding to the downsampled features to generate a value vector V. The formula used is as follows: ; In the formula, represents the value vector V; Step S54: self-attention operation, using the generated query vector Q, key vector K and value vector V to perform self-attention operation to generate attention map features. The formula used is as follows: ; In the formula, is the transpose operation, is the scale factor, is the Softmax function, represents the attention map feature, represents the query vector Q, Denotes the key vector K.
[0006] The beneficial effects achieved by the present invention using the above scheme are as follows: (1) To address the problem that existing image feature extraction models are too large and complex to be applied to edge devices in real applications, this method builds a feature extraction model based on ConvNets. ConvNets can not only accelerate the inference process, but also run efficiently in resource-constrained environments; (2) In view of the problem that there may be various irregular shapes and unique textures in the embroidery pattern, the existing model may not be able to effectively distinguish and extract the design elements. In the constructed feature extraction model, this method uses Gabor filter and grayscale image processing method to extract the texture, shape and structural features in the image, thereby enhancing the model's recognition ability of these complex design elements; (3) In order to more accurately capture the fine and complex pattern details in the Miao embroidery patterns, dynamic kernel technology, inverted bottleneck overlapping blockization and dimension splitting single-head self-attention mechanism were used in the constructed feature extraction model. The dynamic kernel allows the model to automatically adjust the convolution kernel size according to the input data to better adapt to patterns of different scales; the inverted bottleneck structure helps to reduce the number of parameters while maintaining high expressiveness; and the dimension splitting single-head self-attention mechanism can effectively capture the relationship between local and global features and enhance the model's sensitivity to subtle differences. Through the above optimization measures, a feature extraction model based on ConvNets was constructed, which significantly improves the feature extraction accuracy of embroidery patterns while ensuring its practicality and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 This is a flow chart of the Miao ethnic group embroidery pattern element extraction application system based on artificial intelligence proposed by the present invention; Figure 2 Schematic diagram of the feature extraction process of the feature extraction model based on ConvNets; The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0008] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0009] Example 1, see Figure 1 The Miao ethnic group embroidery pattern element extraction application system based on artificial intelligence provided by the present invention includes a data acquisition module, a preprocessing module, a feature extraction module, a database management module, a creative design auxiliary module and a user interaction interface; The data acquisition module collects high-quality image data of Miao ethnic group's embroidery patterns through a high-resolution scanner of model Canon CanoScan 9000F Mark II and a Nikon D850 digital camera to obtain an original image; The preprocessing module preprocesses the collected original image to optimize the image quality and obtain a preprocessed image; The feature extraction module uses a feature extraction model based on ConvNets to automatically identify and extract design element features from the preprocessed image to obtain the element features of the Miao embroidery pattern. The extracted design element features include geometric figures, animal and plant images, human figures, symbols and totems, as well as the color matching of the design elements and the special techniques used in the Miao embroidery pattern. The database management module establishes a structured database system to store and manage all data resources in the system, including original images and Miao ethnic group embroidery pattern element features; The creative design auxiliary module integrates graphic editing tools and creative generation algorithms to provide inspiration and support for designers, allowing users to create new design works based on the extracted Miao embroidery pattern element features, including adjusting the color, size and even recombining different elements according to the designer's needs; The user interaction interface develops an intuitive and easy-to-use graphical user interface, allowing researchers, designers and ordinary users to easily use the various functions of the system.
[0010] Embodiment 2: Based on the above embodiment, the preprocessing module preprocesses the collected original image, specifically comprising the following steps: Step A1: Denoising, using mean filtering, median filtering and Gaussian filtering methods to process the noise generated during the image shooting and scanning process; Step A2: Contrast enhancement, using the adaptive histogram equalization method to locally adjust the contrast of the image to avoid noise amplification caused by over-enhancement; Step A3: Normalization: normalize the image to the range of [0, 255] to obtain a normalized image; Step A4: edge detection, using the Sobel operator to calculate the gradient of the image and detect the edge, which is used to highlight the edge information in the image and facilitate the subsequent extraction of pattern elements; Step A5: Output the image. Perform the operations from step A1 to step A4 above on all the original images, and finally output the pre-processed image.
[0011] Example 3, see Figure 1This embodiment is based on the above embodiment. The database management module uses a hybrid storage solution of a relational database and a NoSQL database to store all data of the original image and the extracted Miao embroidery pattern element features, and supports data storage in multiple formats. The user queries the data of the Miao embroidery pattern element features of the database management module through the user interaction interface, and provides a quick retrieval function based on different conditions.
[0012] Example 4, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. The feature extraction module uses a feature extraction model based on ConvNets to automatically identify and extract design element features from the preprocessed image. Specifically, the following steps are included: Step S1: RGB global feature stream, using Gabor filter to extract details and texture information in the preprocessed image to obtain texture features; Step S2: Grayscale image stream, binarizing the preprocessed image to obtain a binarized grayscale image, and using the grayscale image to extract structure and shape information in the preprocessed image to obtain structural features and shape features; Step S3: Inverted bottleneck overlapping block division, using ConvNets as the backbone network, using inverted bottleneck blocks without skip connections in ConvNets to construct inverted bottleneck overlapping block division, down-sampling the pre-processed image to obtain down-sampled features; Step S4: construct a dynamic kernel and set dynamic kernels of different sizes to capture multi-scale features; Step S5: Attention mechanism, using dimension splitting single-head self-attention mechanism to extract features and obtain attention map features; Step S6: feature fusion, fusing and splicing texture features, structural features, shape features and attention map features to obtain the element features of Miao embroidery patterns.
[0013] To address the problem that most existing image feature extraction models are too large and complex to be applied to edge devices for real-world applications, this method constructs a feature extraction model based on ConvNets. ConvNets can not only accelerate the inference process, but also run efficiently in resource-constrained environments. To address the problem that there may be various irregular shapes and unique textures in embroidery patterns, and existing models may not be able to effectively distinguish and extract design elements, this method uses Gabor filters and grayscale image processing methods in the constructed feature extraction model, which is specifically used to extract texture, shape and structural features in images, thereby enhancing the model's recognition ability for these complex design elements.
[0014] Example 5, see Figure 1This embodiment is based on the above embodiment. In step S3, the bottleneck overlap is inverted and divided into blocks, which specifically includes the following steps: Step S31: Use 3×3 small convolutional block patches in ConvNets to capture low-level feature information; Step S32: Use the inverted bottleneck block without skip connection to construct the inverted bottleneck overlapping block, and apply depth convolution and 1×1 convolution to process the preprocessed image to obtain down-sampled features, reduce the number of model parameters, and improve efficiency. The formula used is as follows: ; In the formula, represents the preprocessed image, is a 1×1 convolution operation, Indicates the step length is A 3×3 depthwise convolution operation, is the down-sampled feature; Step S33: Setting the expansion factor of the inverted bottleneck overlapping block to ,Optimize the number of parameters of the inverted bottleneck block to ensure parameter efficiency.
[0015] Embodiment 6: This embodiment is based on the above embodiment. In step S4, a dynamic core is constructed, which specifically includes the following steps: Step S41: Determine the initial kernel size, select a dynamic kernel with an odd initial size to downsample the preprocessed image, and calculate the cumulative downsampling rate. The formula used is as follows: ; In the formula, Indicates The downsampling rate of the stage, and is the stage index, From the first stage to the The product of all downsampling rates in the stage, is the logarithm with base 2, Indicates that the accumulation reaches The sum of the downsampling rates of the stages; Step S42: Calculate the growth factor to obtain the growth factor of each stage. The growth factor determines whether to increase the size of the dynamic core. The formula used is as follows: ; In the formula, For the modulo operation, is the logical AND operator, Indicates a round-down operation. represents the growth factor; Step S43: Adjust the size of the dynamic kernel. Adjust the size of the dynamic kernel according to the growth factor of the current stage to capture multi-scale features. The formula used is as follows: ; In the formula, and Respectively represent Stage and Dynamic kernel size of the stage.
[0016] Embodiment 7, based on the above embodiment, the dimension segmentation single-head self-attention mechanism extracts features, specifically comprising the following steps: Step 51: Image processing, use depth-separable convolution, batch normalization and SiLU activation function to process the downsampled features and generate a weight vector. The formula used is as follows: ; In the formula, represents the weight vector, Indicates that the dynamic kernel size is The depth convolution operation, is the batch normalization operation, for Activation function; Step S52: split the feature tensor, split the weight vector into two parts along the channel dimension, as the query vector Q and the key vector K respectively; Step S53: Generate position coding, process the downsampled features using a depth-separable convolution with a dynamic kernel, generate position coding, and add the position coding to the downsampled features to generate a value vector V. The formula used is as follows: ; In the formula, represents the value vector V; Step S54: self-attention operation, using the generated query vector Q, key vector K and value vector V to perform self-attention operation to generate attention map features. The formula used is as follows: ; In the formula, is the transpose operation, is the scale factor, is the Softmax function, represents the attention map feature, represents the query vector Q, Denotes the key vector K.
[0017] By performing the above operations, in order to more accurately capture the fine and complex pattern details in the Miao embroidery patterns, dynamic kernel technology, inverted bottleneck overlapping blockization and dimension segmentation single-head self-attention mechanism are adopted in the constructed feature extraction model. The dynamic kernel allows the model to automatically adjust the convolution kernel size according to the input data to better adapt to patterns of different scales; the inverted bottleneck structure helps to maintain high expressiveness while reducing the number of parameters; and the dimension segmentation single-head self-attention mechanism can effectively capture the correlation between local and global features and enhance the model's sensitivity to subtle differences. Through the above optimization measures, a feature extraction model based on ConvNets is constructed, which significantly improves the feature extraction accuracy of embroidery patterns while ensuring its practicality and efficiency.
[0018] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0019] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0020] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. The Miao ethnic group embroidery pattern element extraction application system based on artificial intelligence is characterized by: It includes data acquisition module, preprocessing module, feature extraction module, database management module, creative design auxiliary module and user interaction interface; The data acquisition module collects high-quality image data of Miao ethnic group's embroidery patterns through high-resolution scanners and digital camera equipment to obtain original images; The preprocessing module preprocesses the collected original image to optimize the image quality and obtain a preprocessed image; The feature extraction module uses a feature extraction model based on ConvNets to automatically identify and extract design element features from the preprocessed image to obtain the Miao ethnic group embroidery pattern element features; The database management module establishes a structured database system to store and manage all data resources in the system, including original images and Miao ethnic group embroidery pattern element features; The creative design auxiliary module integrates graphic editing tools and creative generation algorithms to provide inspiration and support for designers, allowing users to create new design works based on the extracted Miao embroidery pattern element features; The user interaction interface develops an intuitive and easy-to-use graphical user interface, allowing researchers, designers and ordinary users to easily use the various functions of the system.
2. The artificial intelligence-based Miao embroidery pattern element extraction application system according to claim 1 is characterized by: The feature extraction module uses a feature extraction model based on ConvNets to automatically identify and extract design element features from the preprocessed image, specifically including the following steps: Step S1: RGB global feature stream, using Gabor filter to extract details and texture information in the preprocessed image to obtain texture features; Step S2: Grayscale image stream, using the grayscale image to extract the structure and shape information in the preprocessed image to obtain structural features and shape features; Step S3: Inverted bottleneck overlapping block division, using ConvNets as the backbone network, using inverted bottleneck blocks without skip connections in ConvNets to construct inverted bottleneck overlapping block division, down-sampling the pre-processed image to obtain down-sampled features; Step S4: construct a dynamic kernel and set dynamic kernels of different sizes to capture multi-scale features; Step S5: Attention mechanism, using dimension splitting single-head self-attention mechanism to extract features and obtain attention map features; Step S6: feature fusion, fusing and splicing texture features, structural features, shape features and attention map features to obtain the element features of Miao embroidery patterns.
3. The artificial intelligence-based Miao embroidery pattern element extraction application system according to claim 2 is characterized by: In step S3, the bottleneck overlap is inverted and divided into blocks, which specifically includes the following steps: Step S31: Use 3×3 small convolutional block patches in ConvNets to capture low-level feature information; Step S32: construct an inverted bottleneck overlapping block using an inverted bottleneck block without skip connection, and apply depthwise convolution and 1×1 convolution to process the preprocessed image to obtain downsampled features; Step S33: Setting the expansion factor of the inverted bottleneck overlapping block to , optimize the number of parameters of the inverted bottleneck block.
4. The artificial intelligence-based Miao embroidery pattern element extraction application system according to claim 2 is characterized by: In step S4, a dynamic core is constructed, which specifically includes the following steps: Step S41: Determine the initial kernel size, select a dynamic kernel with an odd initial size to downsample the preprocessed image, and calculate the cumulative downsampling rate. The formula used is as follows: ; In the formula, Indicates The downsampling rate of the stage, and is the stage index, From the first stage to the The product of all downsampling rates in the stage, is the logarithm with base 2, Indicates that the accumulation reaches The sum of the downsampling rates of the stages; Step S42: Calculate the growth factor to obtain the growth factor of each stage. The growth factor determines whether to increase the size of the dynamic core. The formula used is as follows: ; In the formula, For the modulo operation, is the logical AND operator, Indicates a round-down operation. represents the growth factor; Step S43: Adjust the size of the dynamic kernel. Adjust the size of the dynamic kernel according to the growth factor of the current stage to capture multi-scale features. The formula used is as follows: ; In the formula, and Respectively represent Stage and Dynamic kernel size of the stage.