Intelligent generation and auxiliary embroidering system and method for non-inherited embroidery pattern
Patent Information
- Application Number
- CN202511726191.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2045-11-24
AI Technical Summary
这一过程不仅繁琐、专业性要求高,而且严重依赖于操作者的刺绣知识,自动化与智能化程度低,无法实现从智能生成图案到自动化绣制的无缝衔接
与现有技术相比,本方案通过采用基于强化学习的生成模型并设计包含细节奖励的复合奖励函数,能够显式地引导模型在生成过程中关注并优化图案的高频信息,如精细线条、复杂纹理和边缘清晰度。特别是通过“由粗到细的序列化生成策略”,模拟了刺绣艺人从轮廓到细节的创作过程,使得最终生成的数字刺绣图案在细节上更为丰富、精致,线条更为流畅、准确,有效克服了现有通用生成模型在细节表现上的模糊与粗糙问题,生成了更符合非遗刺绣高标准艺术要求的图案。
Smart Images

Figure CN121505065B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pattern generation technology, and in particular to an intelligent generation and assisted embroidery system and method for intangible cultural heritage embroidery patterns. Background Technology
[0002] Embroidery, an intangible cultural heritage, including Suzhou embroidery, Hunan embroidery, Sichuan embroidery, Guangdong embroidery, Dong embroidery, Yao embroidery, and Miao embroidery, is a treasure of traditional embroidery culture. Its essence lies in using needles as pens and threads as ink, creating highly artistic patterns and textures through varied needlework and meticulous lines. However, in contemporary society, the inheritance and development of intangible cultural heritage embroidery face severe challenges: on the one hand, the number of inheritors with exquisite skills is decreasing, and the training period is long, leading to a talent gap; on the other hand, traditional pattern creation highly relies on the embroiderer's personal artistic cultivation and experience, resulting in low design efficiency and difficulty in meeting the modern market's demand for personalized and innovative cultural and creative products. To address these challenges, existing technologies have attempted to apply computer technology to the field of embroidery, mainly focusing on the following two directions: First, there's pattern generation based on traditional computer-aided design (CAD). This method allows designers to draw and color patterns in software, but it's essentially a drawing tool and cannot automatically understand and generate patterns that conform to the unique aesthetic standards of intangible cultural heritage embroidery (such as the texture and luster of silk corresponding to specific stitches). The generated patterns often remain at the visual level, lacking consideration for the underlying embroidery techniques, resulting in a significant gap between the design draft and the final embroidered product. This still requires embroiderers to rely on their experience to perform extensive and complex secondary creations and transformations.
[0003] Second, deep learning-based AI image generation technologies, especially Generative Adversarial Networks (GANs) and Diffusion Models, have been attempted for generating stylized images. However, when these general-purpose models are directly applied to the generation of intangible cultural heritage embroidery patterns, significant limitations exist. These models are typically trained on large natural image datasets, and their optimization objectives focus on the global semantic correctness and stylistic similarity of the generated content, but they cannot precisely control and process the extremely complex local details and fine lines in intangible cultural heritage embroidery patterns. Specifically, the generated patterns may have a certain "embroidery style" overall, but upon closer inspection, the lines are blurry, the texture lacks the unique sense of order and three-dimensionality of the stitches, and the details are not rich or refined enough. The fundamental reason is that general image generation loss functions (such as mean squared error and adversarial loss) are difficult to effectively characterize and incentivize the model to learn the subtle textures and precise boundaries created by the stitches.
[0004] Furthermore, in the auxiliary embroidery stage, existing computerized embroidery machines typically require manual conversion of the design drawing into an embroidery file (such as DST format), and manual specification of the embroidery sequence and stitch type. This process is not only tedious and highly specialized, but also heavily reliant on the operator's embroidery knowledge, resulting in low levels of automation and intelligence, and failing to achieve a seamless transition from intelligent pattern generation to automated embroidery.
[0005] Therefore, there is an urgent need in existing technologies: a method and system that can deeply integrate knowledge of intangible cultural heritage embroidery techniques, intelligently generate intricate digital patterns that conform to needlework standards, and automatically convert them into executable embroidery instructions. This method aims to overcome the current limitations of AI-generated content in terms of detail, providing technological empowerment for the inheritance, innovation, and industrialization of intangible cultural heritage embroidery. To this end, an intelligent generation and assisted embroidery system and method for intangible cultural heritage embroidery patterns are proposed. Summary of the Invention
[0006] The main objective of this invention is to provide an intelligent generation and assisted embroidery system and method for intangible cultural heritage embroidery patterns. By deeply coupling intelligent technologies such as reinforcement learning, computer vision, and augmented reality with professional knowledge in the field of intangible cultural heritage embroidery, the problems in the background technology can be effectively solved.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for intelligent generation and assisted embroidery of intangible cultural heritage embroidery patterns includes the following steps: Construct a priori knowledge base for intangible cultural heritage embroidery, which includes at least a pattern library, a color system library, and a needlework rule library; A pattern generation model is constructed based on a reinforcement learning framework. The pattern generation model models the image generation process as a Markov decision process and optimizes it through a composite reward function that includes detail rewards. Receive condition information input by the user, and use the pattern generation model to generate a digital embroidery pattern that meets the condition information and has fine details; The generated digital embroidery pattern is used to plan the stitches and embroidery paths, and executable embroidery instructions are generated. Based on the embroidery instructions, the auxiliary embroidery equipment is driven to complete the embroidery.
[0008] A smart generation and assisted embroidery system for intangible cultural heritage embroidery patterns, comprising: The knowledge base construction module 100 is used to store and manage prior knowledge in the field of intangible cultural heritage embroidery. The prior knowledge includes at least a digital pattern library, an intangible cultural heritage color system library, and a needlework rule library. The needlework rule library defines the visual features and embroidery parameters corresponding to different needlework techniques. The intelligent pattern generation module 200 is communicatively connected to the knowledge base construction module 100 and is used to receive conditional information input by the user and generate high-detail digital embroidery patterns. The intelligent pattern generation module 200 is used to perform a coarse-to-fine sequential image generation process. The generator, as a policy network, makes decisions and executes actions to add the next level of detail based on state information including the current generation state, noise vector, and condition vector. The intelligent pattern generation module 200 is a generation model trained by reinforcement learning. The generation model is optimized by a composite reward function, which includes at least an adversarial reward provided by the discriminator and a detail reward calculated based on the difference in high-frequency features between the generated image and the real image, so as to drive the model to generate embroidery patterns with rich details and delicate lines. The embroidery planning and instruction generation module 300, communicatively connected to the intelligent pattern generation module 200 and the knowledge base construction module 100, is used for automated embroidery planning of the generated digital embroidery patterns, including: The region segmentation and stitch assignment unit 310 is used to divide the digital embroidery pattern into multiple regions and automatically assign appropriate intangible cultural heritage embroidery stitches to each region according to the stitch rule library. The embroidery path planning unit 320 is used to calculate the optimal embroidery sequence and stitch path for the assigned stitches and generate a machine-readable embroidery instruction file. The auxiliary embroidery execution module 400 is communicatively connected to the embroidery planning and instruction generation module 300, and is used to receive the embroidery instruction file and drive the auxiliary embroidery equipment to complete the physical embroidery. The auxiliary embroidery execution module 400 is configured in at least one of the following two modes: The automated embroidery mode 410 is used to import the embroidery instruction file into the computer embroidery machine and control it to perform automated embroidery. Augmented Reality Assist Mode 420 is used to overlay and project the outline of the digital embroidery pattern, stitch guidance, and embroidery step information onto the real embroidery fabric in real time through an augmented reality display device, assisting the user in performing manual embroidery.
[0009] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a method for intelligent generation and assisted embroidery of intangible cultural heritage embroidery patterns.
[0010] Furthermore, the construction of the pattern generation model based on the reinforcement learning framework specifically includes: Define the generator as a policy network, with the following policy: ,in, For state, For action, For strategy parameters; The state Includes the intermediate generated image at the current time step and a random noise vector. and condition vector ; The action Defined as an operation that upsamples the current intermediate generated image and adds details at the current scale; The composite reward function is calculated at the end of the generation process, and its expression is: = + + ; in, To counter the reward, For detailed rewards, To perceive rewards, and These are the weighting coefficients.
[0011] Furthermore, the detailed rewards This is achieved by calculating the difference between the generated image and the real reference image in the high-frequency feature space, specifically as follows: = ,in, Shallow features for edge detection operators or pre-trained feature extraction networks. For the first Image generation at each time step, This is a real reference image.
[0012] Furthermore, the pattern generation model employs a coarse-to-fine generation strategy, and the generation process is divided into... Each time step generates a low-resolution global graph, while subsequent time steps gradually add high-resolution fine details, with the details being rewarded. The calculations are performed and transmitted back in stages at the intermediate and final time steps.
[0013] Furthermore, the condition vector It includes one or more combinations of text descriptions, style tags, edge sketches, or stitch layout diagrams; the stitch layout diagram is a semantic map with the same resolution as the output image, used to identify the recommended intangible cultural heritage embroidery stitch types for different image regions.
[0014] Furthermore, the composite reward function also includes a needle-matching reward. This is used to encourage the generated image to generate a texture that conforms to the visual characteristics of the corresponding stitch in the specified area of the stitch layout diagram.
[0015] Furthermore, the step of planning the stitches and embroidery paths for the generated digital embroidery pattern specifically includes: The digital embroidery pattern is divided into different regions using an image segmentation network; Based on the needlework rule base in the prior knowledge base, an appropriate intangible cultural heritage embroidery needlework is automatically assigned to each region; For each assigned stitch pattern, the optimal embroidery sequence and path are calculated to generate a machine-readable embroidery instruction file.
[0016] Furthermore, the drive-assisted embroidery device completes the embroidery process, specifically as follows: Import the embroidery instruction file into a computerized embroidery machine for automated embroidery; Augmented reality devices are used to overlay and project the embroidery outline, steps, and stitch instructions of the digital embroidery pattern onto the real embroidery fabric to assist in hand embroidery.
[0017] The present invention has the following beneficial effects: Compared to existing technologies, this solution employs a reinforcement learning-based generative model and designs a composite reward function that includes detail rewards. This explicitly guides the model to focus on and optimize high-frequency information of the pattern during the generation process, such as fine lines, complex textures, and edge sharpness. In particular, by using a "coarse-to-fine sequential generation strategy," it simulates the creative process of an embroidery artist from outline to detail. This results in digital embroidery patterns that are richer and more refined in detail, with smoother and more accurate lines. It effectively overcomes the blurriness and coarseness in detail representation of existing general generative models, generating patterns that better meet the high artistic standards of intangible cultural heritage embroidery.
[0018] Compared with existing technologies, this solution introduces a "needle matching reward" and builds a "needle rule base" in the prior knowledge base. This allows the intelligent generation model to not only learn the visual appearance of the pattern, but also to learn the unique visual texture and physical implementation logic corresponding to different needlework techniques (such as satin stitch, rolling stitch, and seed stitch). This makes the texture of the generated pattern no longer random visual noise, but has clear needlework directionality and embroidery capability. This ensures that the digital design solution can be seamlessly integrated with the physical embroidery process, guaranteeing the authenticity of the generated work's craftsmanship from the source.
[0019] Compared to existing technologies, this solution streamlines the entire process from "design-planning-embroidery," achieving a true end-to-end solution. The system automatically segments the generated digital pattern into regions and assigns stitches, further planning the embroidery path and generating instruction files that directly drive the equipment. This significantly reduces the technical barriers and time costs from digital design to physical embroidery, avoiding the cumbersome process and potential errors introduced by manual experience in traditional workflows, thus achieving high-efficiency, high-fidelity production.
[0020] Compared with existing technologies, this solution constructs a priori knowledge base of intangible cultural heritage embroidery, which includes patterns, colors, and stitches. In essence, it is a structured digital asset library. It not only applies existing knowledge but also, through the generation process of AI models, can explore the deep connections between patterns, colors, and stitches, creating patterns that retain traditional genes while possessing novelty. This realizes the "living" inheritance and creative transformation of intangible cultural heritage and provides unlimited possibilities for developing cultural and creative products that meet modern aesthetics. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating a method for intelligent generation and assisted embroidery of intangible cultural heritage embroidery patterns according to the present invention. Figure 2 This is a schematic diagram of the structure of an intelligent generation and assisted embroidery system for intangible cultural heritage embroidery patterns according to the present invention.
[0022] In the diagram, 100 is the knowledge base construction module; 200 is the intelligent pattern generation module; 300 is the embroidery planning and instruction generation module; 310 is the area segmentation and stitch allocation unit; 320 is the embroidery path planning unit; 400 is the assisted embroidery execution module; 410 is the automated embroidery mode; and 420 is the augmented reality assisted mode. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0024] See Figure 1 The flowchart shown is a method for intelligent generation and assisted embroidery of intangible cultural heritage embroidery patterns according to the present invention, which includes the following steps: Construct a priori knowledge base for intangible cultural heritage embroidery, which should include at least a pattern library, a color system library, and a needlework rule library; A pattern generation model is constructed based on a reinforcement learning framework. The pattern generation model models the image generation process as a Markov decision process and optimizes it through a composite reward function that includes detailed rewards. Receive conditional information input by the user and use a pattern generation model to generate a digital embroidery pattern that meets the conditional information; The generated digital embroidery pattern is used to plan the stitches and embroidery paths, and executable embroidery instructions are generated. Based on the embroidery instructions, the auxiliary embroidery equipment is driven to complete the embroidery.
[0025] In this pattern generation model based on a reinforcement learning framework, the generator G is treated as an agent whose action is to generate pixels or regions in an image, and its policy is defined by the generator's parameters. The discriminator D and the environment jointly provide a reward signal.
[0026] The construction process is as follows: 1. Problem Definition and Markov Decision Process First, we formalize the image generation process as a Markov decision process: state At step t of the generation process, the state is... It can be defined as: The currently generated portion of the image (a hidden representation or a low-resolution image).
[0027] A random noise vector , as a source of content.
[0028] A condition vector (For example, a text description such as "peony in the style of Suzhou embroidery", or an edge sketch) is used to control the generated content.
[0029] In conclusion, =( , , ),in, It is the hidden state at time t.
[0030] action The operation performed by the generator in step t. Specifically, it can be defined as: In spatial terms: generate the next image patch.
[0031] At the level of detail: a coarse-to-fine generation strategy is adopted. Actions It can be defined as: "How to add a new level of detail to a lower-resolution image generated in the previous step." It simulates the process of an embroidery artist first outlining the shape and then gradually filling in the details.
[0032] Strategy The generator G itself is a policy network. Given the current state Decide how to perform the action (i.e., how to add details). The policy parameter θ is the weight of the generator G.
[0033] award This is crucial for the model's success. At the end of generation (time T), the generator receives a reward from the discriminator and a specially designed detail rewarder.
[0034] 2. Mathematical Model A. Generator as a policy network Generator G receives state Output an action In the context of image generation, actions essentially involve modifying or adding to image data. The generator is designed as a recursive network that progressively "draws" the image. The goal is to find the optimal policy parameters θ. * To maximize expected cumulative reward: = Where γ is the discount factor, representing our emphasis on long-term rewards.
[0035] B. Reward Function Design Design a composite reward function, and the composite reward... The calculation is performed at the end of generation (t=T), using the following formula: = + +
[0036] in, To counter the reward, For detailed rewards, To perceive rewards, and Weighting coefficients, detailed rewards This is achieved by calculating the difference between the generated image and the real reference image in the high-frequency feature space. The calculation method is as follows: = ,in, Shallow features for edge detection operators or pre-trained feature extraction networks. For the first Image generation at each time step, Realistic reference images; adversarial rewards To encourage generators to produce works that are sufficiently realistic and conform to the actual data distribution, the calculation method is as follows: = , For discriminators; perceptual reward To ensure that the generated image maintains consistency with the real image in terms of high-level semantics and content, and to prevent the pursuit of detail from compromising the overall structure, the calculation method is as follows: = ,in, This refers to deep feature maps from pre-trained networks such as VGG. The composite reward function also includes a needle-matching reward. This feature encourages generated images to produce textures that conform to the visual characteristics of the corresponding needlework pattern within a specified area of the needlework layout diagram. The reward is calculated by comparing the similarity between the texture features of the generated image in the specified area and the standard features of the target needlework pattern. Higher similarity results in a greater reward.
[0037] C. Training and Optimization: Policy Gradient Update the generator using the policy gradient method.
[0038] The gradient estimation formula is: ≈ ,in: This represents the cumulative discount reward starting from step t. It is a benchmark value used to reduce variance and is typically estimated by a value network.
[0039] The training loop is as follows: Sampling: Using the current generator According to the strategy Generate a batch of images (from) arrive ).
[0040] Evaluation: The generated image Input the discriminator D and the detail rewarder, and calculate the final reward.
[0041] Estimated Return: Calculate the cumulative return for each step. .
[0042] Update the discriminator: Update the discriminator using real and generated images. In order to maintain its ability to distinguish.
[0043] Update the generator: Update the generator using the policy gradient formula described above. The parameters make it inclined to produce high-reward actions (i.e., generate more detailed images).
[0044] Based on the above process steps, in a possible implementation, a specific operational procedure is provided, including the following steps: Phase 1: Data Preparation and Knowledge Base Construction Step 1.1: Data Collection of Intangible Cultural Heritage Embroidery Content: Systematically collect high-definition digital resources of intangible cultural heritage embroidery.
[0045] Operation method: Use a high-resolution professional scanner or camera to capture front views and close-up details of classic embroidery works under standard lighting conditions.
[0046] Collect line drawings, design sketches, and related literature records of embroidery works.
[0047] Record demonstration videos by experienced embroiderers on different stitching techniques, especially showing the direction of the stitches, the overlap of the stitches, and the final texture effect.
[0048] Output: Original image, video, and text database.
[0049] Step 1.2: Data Preprocessing and Labeling Operation method: Image processing: Denoising, color correction, and background separation (image cutout) are performed on the acquired images to ensure that the main subject of the pattern is clear.
[0050] Key information annotation: The images are annotated by experts in the field (such as inheritors of intangible cultural heritage).
[0051] Theme tags: such as "peony", "dragon and phoenix", "landscape".
[0052] Style tags: such as "Suzhou embroidery", "Sichuan embroidery", "Guangdong embroidery".
[0053] Needle technique labels: Divide the image into regions and label the main needle techniques used in each region, such as "tapered needle region" or "seed needle region".
[0054] Color extraction: Extract the primary and secondary colors from representative works to form a standardized color swatch for this embroidery style.
[0055] Output: A cleaned, structured dataset with multi-dimensional annotations.
[0056] Step 1.3: Digital Construction of the Prior Knowledge Base Operation method: Pattern Library: Using vector drawing software or automatic vectorization tools, classic patterns are converted into scalable, editable vector graphics (such as SVG format) and tagged with semantic tags.
[0057] Color system library: Digitize the color swatches extracted in step 1.2, establish a color database, and record the LAB / RGB values of each color, as well as its cultural meaning and usage scenarios in embroidery styles.
[0058] Needle technique rule base: Match the labeled needlework image areas with the needlework names.
[0059] Analyze the visual features of each stitch (such as directionality, texture granularity, and density) and quantify them into feature vectors.
[0060] Record the recommended embroidery parameters for each stitch (such as default line spacing and suitable objects to represent).
[0061] Output: A structured prior knowledge base (database or knowledge graph) of intangible cultural heritage embroidery.
[0062] Phase Two: Intelligent Pattern Generation Step 2.1: Model Initialization and Training Operation method: Environment setup: Use deep learning frameworks such as PyTorch or TensorFlow to build a reinforcement learning training environment based on PPO or A3C.
[0063] Model Design: Generator: Design a neural network consisting of multiple upsampling modules, each responsible for generating details at one resolution.
[0064] Discriminator: Design a convolutional neural network to determine the authenticity of an image and its style conformity.
[0065] Reward calculator: A VGG network is pre-trained for perceptual reward, and an edge detection function is written for detail reward.
[0066] Model training: Input the dataset from step 1.2 into the model.
[0067] The generator generates an action (high-resolution image) based on the current state (low-resolution image + conditions).
[0068] Calculate the composite reward (adversarial reward + detail reward + perception reward).
[0069] Update the generator parameters using the policy gradient algorithm to make it more inclined to adopt generation policies that yield high rewards.
[0070] Output: A trained intelligent generative model that can understand intangible cultural heritage styles and generate intricate patterns.
[0071] Step 2.2: Interactive Pattern Generation Operation method: Users input generation conditions through a graphical interface, for example: Text description: Enter "a Suzhou embroidery style painting of hibiscus under the moon" in the input box.
[0072] Style selection: Select "Hunan Embroidery" from the drop-down menu.
[0073] Upload sketch: Upload a simple line drawing of a hibiscus flower.
[0074] Stitch layout: Roughly outline different areas on the canvas and specify the desired stitch (optional).
[0075] The user input is encoded as a conditional vector c, combined with random noise z, and then input into the trained generative model.
[0076] The model undergoes a generation process from coarse to fine, with the generated effect gradually displayed on the interface from blurry to clear.
[0077] Generate the final high-resolution digital embroidery pattern.
[0078] Output: A detailed digital embroidery pattern (e.g., in PNG format) that matches the user's intent.
[0079] Phase Three: Embroidery Planning and Instruction Generation Step 3.1: Automatic Region Segmentation and Needle Allocation Operation method: A pre-trained image segmentation network (such as U-Net) is invoked to perform semantic segmentation on the generated pattern, automatically identifying regions such as "petals", "leaves", "branches", and "background".
[0080] The system queries the needlework rule base in the knowledge base and automatically recommends the most suitable needlework for a region based on its shape, size, and semantic information. For example, it assigns "strip needle" to a large area of petals and "rolling needle" to a leaf vein.
[0081] Designers can manually fine-tune the results of the automatic allocation at this stage.
[0082] Output: A region segmentation map with needlework annotation information.
[0083] Step 3.2: Embroidery Path Planning Operation method: Based on the needle type of each region, the corresponding path planning algorithm is invoked.
[0084] For "seamless stitching", the algorithm will plan a parallel line path that is embroidered in layers from the outside in.
[0085] For "roller needles", the algorithm plans a smooth curved path and determines the start and end points of the needles.
[0086] The algorithm globally optimizes the thread changing sequence and embroidery direction to minimize the idle distance of the embroidery machine head or the repetitive actions of manual embroidery.
[0087] The system generates machine instruction files (such as DST and EXP formats) containing parameters such as coordinates, stitch type, color change order, and embroidery speed.
[0088] Output: A machine-readable, optimized embroidery instruction file.
[0089] Phase Four: Assisting with Embroidery Production Step 4.1a: Automated embroidery (for mass production) Operation method: Import the embroidery instruction file into the computerized embroidery machine.
[0090] The operator selects the appropriate color of embroidery thread on the machine according to the thread number suggested by the system.
[0091] Secure the embroidery fabric and start the machine. The embroidery machine will automatically execute the instructions to complete the embroidery.
[0092] Step 4.1b: Augmented Reality Assisted Hand Embroidery (for high-end custom orders or creations by inheritors of traditional crafts) Operation method: Secure the embroidery fabric to the embroidery frame and calibrate the spatial position of the camera of the AR device (such as AR glasses or a tablet) relative to the embroidery fabric.
[0093] Activate the AR-assisted system, which will overlay the outline of the digital pattern onto the real embroidery fabric in real time and with precision.
[0094] When the embroiderer is embroidering: The AR system will highlight the area that should be embroidered.
[0095] An animated diagram of the specified stitch pattern in the designated area is dynamically displayed in the sidebar of the interface.
[0096] After completing one step, the embroiderer can switch to the next step via voice or gesture commands.
[0097] The system uses a camera to identify the embroidery progress and provides real-time feedback.
[0098] Output: A completed physical embroidery piece.
[0099] Example 2: This invention also provides an intelligent generation and assisted embroidery system for intangible cultural heritage embroidery patterns, see [link to relevant documentation]. Figure 2 The diagram shown illustrates the structure of the system, which is used to implement the aforementioned intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns, including: The knowledge base construction module 100 is used to store and manage prior knowledge in the field of intangible cultural heritage embroidery. Prior knowledge includes at least a digital pattern library, an intangible cultural heritage color system library, and a needlework rule library. The needlework rule library defines the visual features and embroidery parameters corresponding to different needlework techniques. The intelligent pattern generation module 200 is communicatively connected to the knowledge base construction module 100, and is used to receive conditional information input by the user and generate high-detail digital embroidery patterns. The intelligent pattern generation module 200 is used to perform a coarse-to-fine sequential image generation process. The generator acts as a policy network, which makes decisions and executes actions to add the next level of detail based on state information including the current generation state, noise vector, and condition vector. The intelligent pattern generation module 200 is a generation model trained by reinforcement learning. The generation model is optimized through a composite reward function, which includes at least an adversarial reward provided by the discriminator and a detail reward calculated based on the difference in high-frequency features between the generated image and the real image, so as to drive the model to generate embroidery patterns with rich details and delicate lines. The embroidery planning and instruction generation module 300 is communicatively connected to the intelligent pattern generation module 200 and the knowledge base construction module 100, and is used for automated embroidery planning of the generated digital embroidery patterns, including: The area segmentation and stitch assignment unit 310 is used to divide the digital embroidery pattern into multiple areas and automatically assign appropriate intangible cultural heritage embroidery stitches to each area according to the stitch rule library. The embroidery path planning unit 320 is used to calculate the optimal embroidery sequence and stitch path for the assigned stitches and generate a machine-readable embroidery instruction file. The auxiliary embroidery execution module 400 is communicatively connected to the embroidery planning and instruction generation module 300, and is used to receive embroidery instruction files and drive the auxiliary embroidery equipment to complete physical embroidery. The embroidery assistance module 400 is configured in at least one of the following two modes: The automated embroidery mode 410 is used to import embroidery instruction files into a computerized embroidery machine and control it to perform automated embroidery. Augmented Reality Assist Mode 420 is used to overlay and project the outline of the digital embroidery pattern, stitch guides, and embroidery steps onto the real embroidery fabric in real time through an augmented reality display device, assisting users in hand embroidery.
[0100] Example 3: The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns.
[0101] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for intelligent generation and assisted embroidery of intangible cultural heritage embroidery patterns, characterized in that, Includes the following steps: Construct a priori knowledge base for intangible cultural heritage embroidery, which includes at least a pattern library, a color system library, and a needlework rule library; A pattern generation model is constructed based on a reinforcement learning framework. The pattern generation model models the image generation process as a Markov decision process and optimizes it through a composite reward function that includes detail rewards. Receive condition information input by the user, and use the pattern generation model to generate a digital embroidery pattern that conforms to the condition information; The generated digital embroidery pattern is used to plan the stitches and embroidery paths, and executable embroidery instructions are generated. Based on the embroidery instructions, drive the auxiliary embroidery equipment to complete the embroidery; The pattern generation model built based on the reinforcement learning framework specifically includes: Define the generator as a policy network, with the following policy: ,in, For state, For action, For strategy parameters; The state Includes the intermediate generated image at the current time step and a random noise vector. and condition vector ; The action Defined as an operation that upsamples the current intermediate generated image and adds details at the current scale; The composite reward function is calculated at the end of the generation process, and its expression is: = + + , in, To counter the reward, For detailed rewards, To perceive rewards, and These are the weighting coefficients.
2. The intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns according to claim 1, characterized in that, The detailed rewards This is achieved by calculating the difference between the generated image and the real reference image in the high-frequency feature space, specifically as follows: = ,in, Shallow features for edge detection operators or pre-trained feature extraction networks. For the first Image generation at each time step, This is a real reference image.
3. The intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns according to claim 1, characterized in that, The pattern generation model employs a coarse-to-fine generation strategy, and the generation process is divided into: Each time step generates a low-resolution global graph, while subsequent time steps gradually add high-resolution fine details, with the details being rewarded. The calculations are performed and transmitted back in stages at the intermediate and final time steps.
4. The intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns according to claim 1, characterized in that, The condition vector Includes one or more combinations of text descriptions, style tags, edge sketches, or stitch layout diagrams; the stitch layout diagram is a semantic map with the same resolution as the output image, used to identify the recommended intangible cultural heritage embroidery stitch types for different image regions; The composite reward function also includes a needle matching reward. This is used to encourage the generated image to generate a texture that conforms to the visual characteristics of the corresponding stitch in the specified area of the stitch layout diagram.
5. The intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns according to claim 1, characterized in that, The process of planning stitches and embroidery paths for the generated digital embroidery pattern specifically includes: The digital embroidery pattern is divided into different regions using an image segmentation network; Based on the needlework rule base in the prior knowledge base, an appropriate intangible cultural heritage embroidery needlework is automatically assigned to each region; For each assigned stitch pattern, the optimal embroidery sequence and path are calculated to generate a machine-readable embroidery instruction file.
6. The intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns according to claim 1, characterized in that, The drive-assisted embroidery device completes the embroidery process as follows: Import the embroidery instruction file into a computerized embroidery machine for automated embroidery; Augmented reality devices are used to overlay and project the embroidery outline, steps, and stitch instructions of the digital embroidery pattern onto the real embroidery fabric to assist in hand embroidery.
7. An intelligent generation and assisted embroidery system for intangible cultural heritage embroidery patterns, used to implement the intelligent generation and assisted embroidery method for intangible cultural heritage embroidery patterns as described in any one of claims 1-6, characterized in that, include: The knowledge base construction module (100) is used to store and manage prior knowledge in the field of intangible cultural heritage embroidery. The prior knowledge includes at least a digital pattern library, an intangible cultural heritage color system library, and a needlework rule library. The needlework rule library defines the visual features and embroidery parameters corresponding to different needlework techniques. The intelligent pattern generation module (200) is communicatively connected to the knowledge base construction module (100) and is used to receive conditional information input by the user and generate a high-detail digital embroidery pattern; The intelligent pattern generation module (200) is used to perform a coarse-to-fine sequential image generation process. The generator, as a policy network, makes decisions and executes actions to add the next level of detail based on state information including the current generation state, noise vector, and condition vector. The intelligent pattern generation module (200) is a generation model trained by reinforcement learning. The generation model is optimized by a composite reward function, which includes at least an adversarial reward provided by the discriminator and a detail reward calculated based on the difference in high-frequency features between the generated image and the real image, so as to drive the model to generate embroidery patterns with rich details and delicate lines. An embroidery planning and instruction generation module (300), communicatively connected to the intelligent pattern generation module (200) and the knowledge base construction module (100), is used for automated embroidery planning of the generated digital embroidery patterns, including: The region segmentation and stitch assignment unit (310) is used to divide the digital embroidery pattern into multiple regions and automatically assign appropriate intangible cultural heritage embroidery stitches to each region according to the stitch rule library; The embroidery path planning unit (320) is used to calculate the optimal embroidery sequence and stitch path for the assigned stitches and generate a machine-readable embroidery instruction file. The auxiliary embroidery execution module (400) is communicatively connected to the embroidery planning and instruction generation module (300) and is used to receive the embroidery instruction file and drive the auxiliary embroidery equipment to complete the physical embroidery. The auxiliary embroidery execution module (400) is configured in at least one of the following two modes: The automated embroidery mode (410) is used to import the embroidery instruction file into the computer embroidery machine and control it to perform automated embroidery. Augmented Reality Assist Mode (420) is used to overlay and project the outline of the digital embroidery pattern, stitch guidance and embroidery step information onto the real embroidery fabric in real time through an augmented reality display device to assist the user in embroidering by hand.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a method for intelligent generation and assisted embroidery of intangible cultural heritage embroidery patterns as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Computer-assisted disordered needlework manufacture method based on reaction diffusion process
CN103473433A
Deep learning-based embroidery stitch backstepping and dynamic reproduction method
CN120030910A