Intelligent auxiliary design method and system for batik drawing manuscript

CN123013679APending Publication Date: 2026-10-30BIJIE VOCATIONAL & TECH COLLEGE (BIJIE AGRI SCHOOL GUIZHOU PROVINCE)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611222015.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]因此,本发明提供了一种蜡染绘画稿智能辅助设计方法及系统,解决现有蜡染辅助设计技术中纹样元素缺乏语义解析与结构化编码、生成过程缺乏多层次风格约束机制的问题

Benefits of technology

[0021]本发明有益效果为:通过注意力机制与分层解码网络,实现了蜡染纹样的像素级语义分割与元素级实例定位,将整幅纹样解构为原子化的可编辑设计单元;通过跨模态对比学习将图像与文本映射至统一嵌入空间,实现了“视觉-语义”双模态的深度对齐与确定性检索;通过多层次风格编码驱动的扩散生成模型,解决了通用生成模型难以确保纹样符合传统蜡染构成规范的问题,在扩散损失之外引入风格Gram矩阵与边缘保持三重约束,实现了风格保真与形态创新的统一;通过条件生成式对抗网络驱动的染色物理预仿真与交互式迭代优化,将传统长周期试错转变为即时反馈闭环,降低了物料与时间成本,实现了设计构思到制作方案的全链条知识交付。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123013679A_ABST
    Figure CN123013679A_ABST
Patent Text Reader

Abstract

The application discloses a batik drawing manuscript intelligent auxiliary design method and system, relates to the technical field of batik digital design, and comprises the following steps: collecting a batik pattern image, preprocessing and structuring semantic labeling, and constructing a multi-level batik pattern database; based on the multi-level batik pattern database, performing pixel-level semantic segmentation and element-level instance positioning through an attention mechanism and a hierarchical decoding network, and outputting a structured pattern element instance database; according to the pattern element instance, extracting the visual features and semantic features of each element and fusing the features, performing cross-modal retrieval according to the fusion vector; extracting multi-level style encoding from the cross-modal retrieval result, driving a diffusion model with the style encoding as a constraint to generate a controllable pattern, and outputting a newly generated batik drawing manuscript; performing dyeing pre-simulation on the newly generated batik drawing manuscript through a conditional generative adversarial network, performing interactive iterative optimization according to the dyeing simulation result, and outputting a structured batik drawing manuscript design report.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital design technology for batik, and in particular to an intelligent assisted design method and system for batik drawings. Background Technology

[0002] Batik, a national intangible cultural heritage of China, is renowned at home and abroad for its simple and elegant blue and white artistic style and unique ice-crack texture. Traditional batik production involves more than ten processes, including designing the draft, melting and applying wax, indigo dyeing, and dewaxing to reveal the pattern. Among these, the design of the draft directly determines the pattern composition and cultural connotation of the final product. However, the design of traditional batik drafts is highly dependent on the personal experience and craftsmanship of the inheritors, resulting in a long design cycle, high trial and error costs, and the pattern style is limited by the individual's cognitive boundaries, making it difficult to meet the urgent needs of the contemporary cultural and creative industries for diversified and efficient design output. In recent years, digital technology has provided new possibilities for the protection and innovation of batik art. Existing research has made phased progress in the classification and storage of batik patterns, rule-based pattern generation, and physical simulation of the dyeing process, laying a preliminary foundation for the digital inheritance of batik art.

[0003] However, existing batik-aided design technologies still have the following shortcomings. First, most existing systems only provide general drawing tools or simple rule-based pattern recombination functions, lacking the ability to understand and model the deep stylistic features and cultural semantics of batik patterns. This leads to the generated patterns easily deviating from the compositional norms and symbolic system of traditional batik, posing a risk of cultural inappropriateness. Second, although a large amount of digital batik pattern data has been accumulated, it mostly remains at the level of simple classification and storage, failing to achieve element-level semantic analysis and structured encoding of patterns. The design reuse efficiency of pattern data is low. Third, existing pattern generation methods are mostly based on shape grammars or general style transfer networks. The former limits the diversity of generated patterns, while the latter lacks a multi-level constraint mechanism for the compositional rules of batik patterns (such as symmetry, curve rhythm, and color distribution), making it difficult to ensure the consistency of generated patterns with the style of traditional batik. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an intelligent assisted design method and system for batik painting drafts, which solves the problems of lack of semantic parsing and structured encoding of pattern elements and lack of multi-level style constraint mechanism in the existing batik assisted design technology.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides an intelligent assisted design method for batik painting drafts, comprising, Images of batik patterns were collected, preprocessed, and structurally semantically annotated to construct a multi-level batik pattern database. Based on a multi-level batik pattern database, pixel-level semantic segmentation and element-level instance localization are performed using an attention mechanism and a hierarchical decoding network, resulting in a structured pattern element instance database. Based on the pattern element instances, extract the visual and semantic features of each element and fuse them, then perform cross-modal retrieval based on the fused vector; Multi-level style codes are extracted from the cross-modal retrieval results. The style codes are used as constraints to drive the diffusion model to generate controllable patterns and output the newly generated batik painting draft. For the newly generated batik painting draft, a pre-simulation of dyeing is performed using a conditional generative adversarial network. Based on the dyeing simulation results, interactive iterative optimization is carried out, and a structured batik painting draft design report is output.

[0007] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the steps of acquiring batik pattern images, performing preprocessing and structured semantic annotation, and constructing a multi-level batik pattern database are as follows: High-resolution image data of batik samples were collected, and the images were scaled to a uniform size using bicubic interpolation. Perform color space conversion on the scaled image, converting it from RGB space to Lab space; Adaptive histogram equalization is performed on the converted image to obtain the preprocessed batik image; Semantic annotation is performed on the preprocessed batik images. The annotation dimensions include pattern category, cultural connotation, composition type and style period, which constitute the semantic encoding vector of batik pattern. High-resolution images of collected batik samples, preprocessed batik images, and semantic annotation information are integrated into a multi-level batik pattern database.

[0008] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the step of performing pixel-level semantic segmentation and element-level instance localization based on a multi-level batik pattern database through an attention mechanism and a hierarchical decoding network to output a structured pattern element instance database is as follows. A semantic segmentation network for batik patterns based on attention weighting and hierarchical decoding is constructed. The structure of the semantic segmentation network for batik patterns includes a feature extraction backbone network, a channel-space dual attention module, and a hierarchical decoding module. Using a ResNet-50 pre-trained on ImageNet as the backbone network for feature extraction, the preprocessed batik image is taken as input, and multi-scale feature maps are output. ,in This indicates the layer corresponding to the feature extraction backbone network; Channel-spatial dual attention module for multi-scale feature maps Calculate the channel attention weights and spatial attention weights, and then fuse them in a weighted manner to generate an enhanced feature map; The hierarchical decoding module restores the spatial resolution of the feature map step by step to obtain the decoded feature map; The decoded feature map output by the decoder is then processed through... Convolution is used to classify pixel-by-pixel pattern elements and output pixel-level semantic segmentation results; Based on pixel-level semantic segmentation results, instance separation is performed through connected component analysis to obtain pattern element instance localization results. For each instance, the bounding box, area, and centroid coordinates are calculated. Pattern element instances with original image source, element category label, spatial location mask, bounding box, area, and centroid coordinates are constructed into a pattern element instance database.

[0009] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the steps of extracting and fusing the visual and semantic features of each element based on pattern element instances, and performing cross-modal retrieval based on the fused vector, are as follows: The preprocessed batik image and semantically annotated text corresponding to each pattern element instance are used as input. The improved ResNet-50 is used to extract visual features from the preprocessed batik image. After global average pooling and fully connected mapping, the image embedding vector is obtained. The BERT pre-trained model is used to extract semantic features from the semantically annotated text. After fully connected mapping, the text embedding vector is obtained. Construct a cross-modal contrastive loss function; Cross-modal contrastive loss function is used to train the improved ResNet-50 and BERT pre-trained models for cross-modal contrastive learning. After training, the image embedding vector and text embedding vector corresponding to each pattern element instance are output, and a unified embedding vector for each pattern element instance is obtained by weighted averaging. When a user initiates a search, if the user input is a reference image, the improved ResNet-50 trained with cross-modal contrastive learning is used to map the reference image to a query embedding vector; if the user input is a text description, the BERT pre-trained model trained with cross-modal contrastive learning is used to map the text description to a query embedding vector. Calculate the cosine similarity between the query embedding vector and the uniform embedding vectors of all element instances in the pattern element instance database, sort them in descending order of similarity score, and output the top [previous] embedding vectors. Each pattern element instance is used as a cross-modal retrieval result.

[0010] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the steps for extracting multi-level style codes from cross-modal retrieval results are as follows: For each pattern element instance in the cross-modal retrieval results, the symmetry is calculated to obtain the composition style vector, the curvature of each contour curve in the pattern element is calculated to obtain the curve rhythm vector, and the main color set and proportion of the pattern element are extracted by K-means to obtain the color style vector. The style code is obtained by concatenating the style vector, curve rhythm vector, and color style vector.

[0011] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the steps of generating controllable patterns using a diffusion model driven by style coding as a constraint, and outputting the newly generated batik painting draft, are as follows: The style code is input into the style projection module and mapped to a style constraint vector that the diffusion model can understand. The style projection module consists of two fully connected network layers. A generative framework based on a diffusion model is adopted, with style constraint vectors as conditional inputs. Starting from the real pattern image, Gaussian noise is gradually added through a forward diffusion process to obtain a noisy image. A denoising network based on the U-Net architecture is constructed. The current noisy image and conditional vector are taken as input, the output is predicted noise, and the predicted noise is removed from the noisy image to obtain the generated image. Construct a diffusion loss function for inverse denoising; The generated image is input into the feature extraction backbone network to obtain the generated feature map. The covariance matrix of the generated feature map is used to construct the style Gram matrix. The average error between the generated image and the real image in the retrieval results in each layer of the style Gram matrix is ​​defined as the style loss function. Construct the edge-preserving loss function; The total loss function is obtained by weighted fusion of the diffusion loss function, style loss function, and structure edge preservation loss function; The diffusion model is trained using the total loss function. After training, the newly generated batik painting is output using the trained diffusion model.

[0012] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the steps for performing pre-simulation of dyeing on the newly generated batik painting draft using a conditional generative adversarial network are as follows: Image data of batik objects at different dyeing stages were collected to construct a batik dyeing dataset, and dyeing parameters including the number of immersions, dye concentration, immersion time and fabric material were recorded. A physical model for batik dyeing is established using a conditional generative adversarial network. The newly generated batik drawing and the custom dyeing parameters are used as inputs to the generator, and the output is a simulated dyeing image. Input the simulated dyeing image into the discriminator and output the probability that the simulated dyeing image is a real batik. An adversarial objective function is constructed, and a physical model for batik dyeing is trained using simulated dyeing images and batik dyeing datasets as training sets. The trained physical model for batik dyeing outputs simulated dyeing images of batik paintings.

[0013] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the interactive iterative optimization based on dyeing simulation results includes the following steps: Users can review the newly generated batik paintings and corresponding simulated dyeing images. They can adjust the style coding parameters and dyeing parameters, iteratively updating the new paintings and simulation effects until the user approves the final painting.

[0014] As a preferred embodiment of the intelligent assisted design method for batik painting drafts described in this invention, the steps for outputting a structured batik painting draft design report are as follows: After the user confirms the final artwork, a structured batik artwork design report is generated, which includes a high-resolution batik artwork image, a description of the pattern elements of the artwork, a dyeing parameter scheme, and an overview of the design iteration process.

[0015] Secondly, this invention provides an intelligent auxiliary design system for batik painting drafts, comprising, The data acquisition module collects batik pattern images, performs preprocessing and structured semantic annotation, and builds a multi-level batik pattern database to provide a data foundation for subsequent pattern analysis.

[0016] The element segmentation module, based on a multi-level batik pattern database, performs pixel-level semantic segmentation and element-level instance localization on pattern images through an attention mechanism and a hierarchical decoding network, and outputs a structured pattern element instance database.

[0017] The pattern retrieval module extracts the visual and semantic features of each pattern element instance and fuses them into a unified embedding vector. It supports cross-modal retrieval and returns matching pattern element instances.

[0018] The drawing generation module extracts multi-level style codes from cross-modal retrieval results, uses style codes as constraints to drive the diffusion model to generate controllable patterns, and outputs new pattern drawings that conform to the traditional batik composition specifications.

[0019] The dyeing simulation module performs pre-simulation of dyeing on newly generated batik paintings using a dyeing physical model constructed through a conditional generative adversarial network, and outputs simulated dyeing images.

[0020] The report output module performs interactive iterative optimization based on the dyeing simulation results, and finally summarizes the results to generate a structured batik painting design report.

[0021] The beneficial effects of this invention are as follows: Through attention mechanisms and hierarchical decoding networks, pixel-level semantic segmentation and element-level instance localization of batik patterns are achieved, deconstructing the entire pattern into atomic, editable design units; through cross-modal contrastive learning, images and text are mapped to a unified embedding space, achieving deep alignment and deterministic retrieval of the "visual-semantic" dual modality; through a diffusion generation model driven by multi-level style encoding, the problem that general generation models cannot ensure that patterns conform to traditional batik composition specifications is solved, introducing a triple constraint of style Gram matrix and edge preservation in addition to diffusion loss, achieving a unity of style fidelity and morphological innovation; through conditional generative adversarial networks driven by dyeing physics pre-simulation and interactive iterative optimization, the traditional long-cycle trial and error is transformed into an instant feedback closed loop, reducing material and time costs and realizing full-chain knowledge delivery from design conception to production scheme. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of an intelligent assisted design method for batik painting drafts in Example 1.

[0024] Figure 2 This is a structural diagram of an intelligent auxiliary design system for batik painting drafts in Example 1.

[0025] Figure 3 This is a flowchart of cross-modal feature fusion and controllable diffusion generation in Example 1. Detailed Implementation

[0026] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0027] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0028] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0029] Example 1, referring to Figure 1 , Figure 2 and Figure 3 This is the first embodiment of the present invention, which provides an intelligent assisted design method for batik painting drafts, including the following steps: S1. Collect batik pattern images and perform preprocessing and structured semantic annotation to build a multi-level batik pattern database; Specifically, high-resolution image data of batik samples were collected, and bicubic interpolation was used to scale the images to a uniform size. Perform color space conversion on the scaled image, converting it from RGB space to Lab space; Adaptive histogram equalization is performed on the converted image to obtain the preprocessed batik image; Semantic annotation is performed on the preprocessed batik images. The annotation dimensions include pattern category, cultural connotation, composition type and style period, which constitute the semantic encoding vector of batik pattern. High-resolution images of collected batik samples, preprocessed batik images, and semantic annotation information are integrated into a multi-level batik pattern database.

[0030] S2. Based on a multi-level batik pattern database, pixel-level semantic segmentation and element-level instance localization are performed through an attention mechanism and a hierarchical decoding network to output a structured pattern element instance database. Specifically, a semantic segmentation network for batik patterns based on attention weighting and hierarchical decoding is constructed. The semantic segmentation network structure for batik patterns includes a feature extraction backbone network, a channel-space dual attention module, and a hierarchical decoding module. Using a ResNet-50 pre-trained on ImageNet as the backbone network for feature extraction, the preprocessed batik image is taken as input, and multi-scale feature maps are output. ,in This indicates the layer corresponding to the feature extraction backbone network; Channel-spatial dual attention module for multi-scale feature maps Calculate the channel attention weights and spatial attention weights, and then fuse them in a weighted manner to generate an enhanced feature map. The expression is as follows: ; ; ; in, Indicates the first Feature maps output by the layer Representation of feature map The corresponding channel attention weight tensor, This represents the Sigmoid activation function. Indicates global average pooling. Indicates global max pooling. This represents a multilayer perceptron. Representation of feature map The corresponding spatial attention weight tensor, This represents the convolution operation. Indicates the first Feature map after layer enhancement This represents element-wise multiplication; The hierarchical decoding module recovers the spatial resolution of the feature map step by step, resulting in the decoded feature map, expressed as: ; in, Indicates the first The decoded feature map output by the layer decoder. Indicates an upsampling operation. Indicates the first The decoded feature map output by the layer decoder. This represents element-wise addition. The decoded feature map output by the decoder is then processed through... Convolution is used to classify pixel-by-pixel pattern elements and output pixel-level semantic segmentation results; Based on pixel-level semantic segmentation results, instance separation is performed through connected component analysis to obtain pattern element instance localization results. For each instance, the bounding box, area, and centroid coordinates are calculated. Pattern element instances with original image source, element category label, spatial location mask, bounding box, area, and centroid coordinates are constructed into a pattern element instance database.

[0031] S3. Based on the pattern element instances, extract the visual and semantic features of each element and fuse them, and perform cross-modal retrieval based on the fused vector; Specifically, the preprocessed batik image and semantically labeled text corresponding to each pattern element instance are used as input. The improved ResNet-50 is used to extract visual features from the preprocessed batik image. After global average pooling and fully connected mapping, the image embedding vector is obtained. The BERT pre-trained model is used to extract semantic features from the semantically labeled text. After fully connected mapping, the text embedding vector is obtained. Construct a cross-modal contrastive loss function, the expression of which is: ; in, This represents a cross-modal contrastive loss function that brings image and text embeddings of the same element closer together, while widening the distance between embeddings of different elements. Indicates the total number of pattern element instances. Indicates the first Image embedding vectors of each pattern element instance Indicates the first Text embedding vector of each pattern element instance. Indicates temperature parameter, Indicates cosine similarity; Cross-modal contrastive loss function is used to train the improved ResNet-50 and BERT pre-trained models for cross-modal contrastive learning. After training, the image embedding vector and text embedding vector corresponding to each pattern element instance are output. Then, a weighted average is used to obtain the unified embedding vector of each pattern element instance, expressed as: ; in, Indicates the first A uniform embedding vector for each pattern element instance; When a user initiates a search, if the user input is a reference image, the improved ResNet-50 trained with cross-modal contrastive learning is used to map the reference image to a query embedding vector; if the user input is a text description, the BERT pre-trained model trained with cross-modal contrastive learning is used to map the text description to a query embedding vector. Calculate the cosine similarity between the query embedding vector and the uniform embedding vectors of all element instances in the pattern element instance database, sort them in descending order of similarity score, and output the top [previous] embedding vectors. Each pattern element instance is used as a cross-modal retrieval result.

[0032] S4. Extract multi-level style codes from cross-modal retrieval results, use style codes as constraints to drive diffusion models to generate controllable patterns, and output newly generated batik paintings. Specifically, for each pattern element instance in the cross-modal retrieval results, the symmetry is calculated to obtain the composition style vector, the curvature of each contour curve in the pattern element is calculated to obtain the curve rhythm vector, and the main color set and proportion of the pattern element are extracted by K-means to obtain the color style vector. The style vector, curve rhythm vector, and color style vector are concatenated to obtain the style code. Furthermore, the style encoding is input into the style projection module and mapped to a style constraint vector that the diffusion model can understand. The style projection module consists of two fully connected network layers. A diffusion-based generative framework is adopted, using style constraint vectors as input. Starting from a real pattern image, Gaussian noise is gradually added through a forward diffusion process to obtain a noisy image, expressed as: ; in, Indicates the first The noisy image after adding noise. This represents the signal attenuation coefficient, used to control the signal attenuation of the real texture image in the first... The proportion of remaining steps The images represent the actual patterns and are obtained by randomly sampling and preprocessing batik images from a multi-level batik pattern database. This represents the noise enhancement factor, used to control the intensity of noise added to the image. This represents the standard Gaussian noise tensor, which is sampled from a standard normal distribution. A denoising network based on the U-Net architecture is constructed. It takes the current noisy image and conditional vector as input, outputs predicted noise, and removes the predicted noise from the noisy image to obtain the generated image. The expression is as follows: ; in, Indicates prediction noise. This represents a denoising network. This represents the noisy image at the current moment. Indicates the current moment. Represents the style constraint vector; Construct the diffusion loss function for inverse denoising, with the expression: ; in, This represents the value of the diffusion loss function. Represents the relationship between random variables , and The mathematical expectation, This represents the predicted noise output by the denoising network at time step 1. Represents the square of the L2 norm; The generated image is input into the feature extraction backbone network to obtain the generated feature map. The covariance matrix of the generated feature map is used to construct the style Gram matrix. The average error between the generated image and the real image in the retrieval results in the style Gram matrix of each layer is defined as the style loss function, and its expression is: ; ; in, Indicates the first Style Gram matrix of layer feature maps, matrix elements Indicates the first The first layer of feature map The characteristics of the first channel and the first The degree of overall co-occurrence of individual channel features across the entire spatial range Indicates the first The number of channels in the layer feature map. Indicates the first The height of the layer feature map, in pixels. Indicates the first The width of the layer feature map, in pixels. and Indicates spatial location index, and Indicates the channel index. Indicates the first The first layer feature map The spatial location of each channel Activation value at that location, Indicates the first The first layer feature map The spatial location of each channel Activation value at that location, This represents the style loss function value, used to quantify the degree of stylistic difference between the generated image and the reference image. Indicates the generated image In the The Gram matrix of the layer, Indicates reference image In the The Gram matrix of the layer is determined by referring to the image as the highest-ranked image in the cross-modal retrieval results; Construct the structure edge preservation loss function, the expression of which is: ; in, This represents the value of the loss function for preserving the structural edges. This indicates the Canny edge detection operator, which sequentially performs Gaussian filtering smoothing, gradient magnitude and direction calculation, non-maximum suppression, and double threshold hysteresis processing. The total loss function is obtained by weighted fusion of the diffusion loss function, style loss function, and structure edge preservation loss function, and its expression is: ; in, This represents the total loss function value. and The weighting coefficients for style loss and structural edge preservation loss are respectively determined through cross-validation; The diffusion model is trained using the total loss function. After training, the newly generated batik painting is output using the trained diffusion model.

[0033] S5. For the newly generated batik painting draft, perform pre-simulation of dyeing through a conditional generative adversarial network, and perform interactive iterative optimization based on the dyeing simulation results to output a structured batik painting draft design report.

[0034] Specifically, image data of batik objects at different dyeing stages were collected to construct a batik dyeing dataset, and dyeing parameters including the number of immersions, dye concentration, immersion time and fabric material were recorded. A physical model for batik dyeing is established using a conditional generative adversarial network. The newly generated batik drawing and the custom dyeing parameters are used as inputs to the generator, and the output is a simulated dyeing image. Input the simulated dyeing image into the discriminator and output the probability that the simulated dyeing image is a real batik. An adversarial objective function is constructed, and a physical model for batik dyeing is trained using simulated dyeing images and batik dyeing datasets as training sets. The trained physical model for batik dyeing outputs simulated dyeing images of batik paintings. Furthermore, users can review the newly generated batik paintings and corresponding simulated dyeing images. They can adjust the style coding parameters and dyeing parameters to iteratively update the new paintings and simulation effects until the user approves the final painting. Furthermore, once the user finalizes the artwork, a structured batik artwork design report is generated, which includes a high-resolution batik artwork image, a description of the artwork's pattern elements, a dyeing parameter scheme, and an overview of the design iteration process.

[0035] This embodiment also provides an intelligent auxiliary design system for batik painting drafts, including: The data acquisition module collects batik pattern images, performs preprocessing and structured semantic annotation, and builds a multi-level batik pattern database to provide a data foundation for subsequent pattern analysis.

[0036] The element segmentation module, based on a multi-level batik pattern database, performs pixel-level semantic segmentation and element-level instance localization on pattern images through an attention mechanism and a hierarchical decoding network, and outputs a structured pattern element instance database.

[0037] The pattern retrieval module extracts the visual and semantic features of each pattern element instance and fuses them into a unified embedding vector. It supports cross-modal retrieval and returns matching pattern element instances.

[0038] The drawing generation module extracts multi-level style codes from cross-modal retrieval results, uses style codes as constraints to drive the diffusion model to generate controllable patterns, and outputs new pattern drawings that conform to the traditional batik composition specifications.

[0039] The dyeing simulation module performs pre-simulation of dyeing on newly generated batik paintings using a dyeing physical model constructed through a conditional generative adversarial network, and outputs simulated dyeing images.

[0040] The report output module performs interactive iterative optimization based on the dyeing simulation results, and finally summarizes the results to generate a structured batik painting design report.

[0041] This embodiment also provides a computer device applicable to the intelligent auxiliary design method for batik painting drafts, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the intelligent auxiliary design method for batik painting drafts as proposed in the above embodiment.

[0042] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0043] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the intelligent assisted design method for batik painting drafts as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0044] In summary, this invention achieves pixel-level semantic segmentation and element-level instance localization of batik patterns through attention mechanisms and hierarchical decoding networks, deconstructing the entire pattern into atomic, editable design units. By mapping images and text to a unified embedding space through cross-modal contrastive learning, it achieves deep alignment and deterministic retrieval of the "visual-semantic" dual modality. Through a diffusion generation model driven by multi-level style encoding, it solves the problem that general generation models cannot ensure patterns conform to traditional batik compositional norms. In addition to diffusion loss, it introduces a triple constraint of style Gram matrix and edge preservation, achieving a unity of style fidelity and morphological innovation. Through conditional generative adversarial networks driving dyeing physics pre-simulation and interactive iterative optimization, it transforms traditional long-cycle trial-and-error into an instant feedback closed loop, reducing material and time costs and realizing full-chain knowledge delivery from design conception to production plan.

[0045] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for intelligent assisted design of batik painting drafts, characterized in that: include, Images of batik patterns were collected, preprocessed, and structurally semantically annotated to construct a multi-level batik pattern database. Based on a multi-level batik pattern database, pixel-level semantic segmentation and element-level instance localization are performed using an attention mechanism and a hierarchical decoding network, resulting in a structured pattern element instance database. Based on the pattern element instances, extract the visual and semantic features of each element and fuse them, then perform cross-modal retrieval based on the fused vector; Multi-level style codes are extracted from the cross-modal retrieval results. The style codes are used as constraints to drive the diffusion model to generate controllable patterns and output the newly generated batik painting draft. For the newly generated batik painting draft, a pre-simulation of dyeing is performed using a conditional generative adversarial network. Based on the dyeing simulation results, interactive iterative optimization is carried out, and a structured batik painting draft design report is output.

2. The intelligent assisted design method for batik painting drafts as described in claim 1, characterized in that: The steps for collecting batik pattern images, preprocessing them, and performing structured semantic annotation to construct a multi-level batik pattern database are as follows. High-resolution image data of batik samples were collected, and the images were scaled to a uniform size using bicubic interpolation. Perform color space conversion on the scaled image, converting it from RGB space to Lab space; Adaptive histogram equalization is performed on the converted image to obtain the preprocessed batik image; Semantic annotation is performed on the preprocessed batik images. The annotation dimensions include pattern category, cultural connotation, composition type and style period, which constitute the semantic encoding vector of batik pattern. High-resolution images of collected batik samples, preprocessed batik images, and semantic annotation information are integrated into a multi-level batik pattern database.

3. The intelligent assisted design method for batik painting drafts as described in claim 2, characterized in that: The method based on a multi-level batik pattern database uses an attention mechanism and a hierarchical decoding network to perform pixel-level semantic segmentation and element-level instance localization, outputting a structured pattern element instance database. The steps are as follows. A semantic segmentation network for batik patterns based on attention weighting and hierarchical decoding is constructed. The structure of the semantic segmentation network for batik patterns includes a feature extraction backbone network, a channel-space dual attention module, and a hierarchical decoding module. Using a ResNet-50 pre-trained on ImageNet as the backbone network for feature extraction, the preprocessed batik image is taken as input, and multi-scale feature maps are output. ,in This indicates the layer corresponding to the feature extraction backbone network; Channel-spatial dual attention module for multi-scale feature maps Calculate the channel attention weights and spatial attention weights, and then fuse them in a weighted manner to generate an enhanced feature map; The hierarchical decoding module recovers the spatial resolution of the feature map step by step to obtain the decoded feature map; The decoded feature map output by the decoder is then processed through... Convolution is used to classify pixel-by-pixel pattern elements and output pixel-level semantic segmentation results; Based on pixel-level semantic segmentation results, instance separation is performed through connected component analysis to obtain pattern element instance localization results. For each instance, the bounding box, area, and centroid coordinates are calculated. Pattern element instances with original image source, element category label, spatial location mask, bounding box, area, and centroid coordinates are constructed into a pattern element instance database.

4. The intelligent assisted design method for batik painting drafts as described in claim 3, characterized in that: The steps are as follows: extracting and fusing the visual and semantic features of each pattern element instance, and then performing cross-modal retrieval based on the fused vector. The preprocessed batik image and semantically annotated text corresponding to each pattern element instance are used as input. The improved ResNet-50 is used to extract visual features from the preprocessed batik image. After global average pooling and fully connected mapping, the image embedding vector is obtained. The BERT pre-trained model is used to extract semantic features from the semantically annotated text. After fully connected mapping, the text embedding vector is obtained. Construct a cross-modal contrastive loss function; Cross-modal contrastive loss function is used to train the improved ResNet-50 and BERT pre-trained models for cross-modal contrastive learning. After training, the image embedding vector and text embedding vector corresponding to each pattern element instance are output, and a unified embedding vector for each pattern element instance is obtained by weighted averaging. When a user initiates a search, if the user input is a reference image, the improved ResNet-50 trained with cross-modal contrastive learning is used to map the reference image to a query embedding vector; if the user input is a text description, the BERT pre-trained model trained with cross-modal contrastive learning is used to map the text description to a query embedding vector. Calculate the cosine similarity between the query embedding vector and the uniform embedding vectors of all element instances in the pattern element instance database, sort them in descending order of similarity score, and output the top [previous] embedding vectors. Each pattern element instance is used as a cross-modal retrieval result.

5. The intelligent assisted design method for batik painting drafts as described in claim 4, characterized in that: The steps for extracting multi-level style codes from cross-modal retrieval results are as follows: For each pattern element instance in the cross-modal retrieval results, the symmetry is calculated to obtain the composition style vector, the curvature of each contour curve in the pattern element is calculated to obtain the curve rhythm vector, and the main color set and proportion of the pattern element are extracted by K-means to obtain the color style vector. The style code is obtained by concatenating the style vector, curve rhythm vector, and color style vector.

6. The intelligent assisted design method for batik painting drafts as described in claim 5, characterized in that: The process of generating controllable patterns using a diffusion model driven by style encoding as a constraint, and outputting a newly generated batik painting draft, involves the following steps. The style code is input into the style projection module and mapped to a style constraint vector that the diffusion model can understand. The style projection module consists of two fully connected network layers. A generative framework based on a diffusion model is adopted, with style constraint vectors as conditional inputs. Starting from the real pattern image, Gaussian noise is gradually added through a forward diffusion process to obtain a noisy image. A denoising network based on the U-Net architecture is constructed. The current noisy image and conditional vector are taken as input, the output is predicted noise, and the predicted noise is removed from the noisy image to obtain the generated image. Construct a diffusion loss function for inverse denoising; The generated image is input into the feature extraction backbone network to obtain the generated feature map. The covariance matrix of the generated feature map is used to construct the style Gram matrix. The average error between the generated image and the real image in the retrieval results in each layer of the style Gram matrix is ​​defined as the style loss function. Construct the edge-preserving loss function; The total loss function is obtained by weighted fusion of the diffusion loss function, style loss function, and structure edge preservation loss function; The diffusion model is trained using the total loss function. After training, the newly generated batik painting is output using the trained diffusion model.

7. The intelligent assisted design method for batik painting drafts as described in claim 6, characterized in that: The process of performing pre-simulation of dyeing on the newly generated batik painting draft using a conditional generative adversarial network is as follows: Image data of batik objects at different dyeing stages were collected to construct a batik dyeing dataset, and dyeing parameters including the number of immersions, dye concentration, immersion time and fabric material were recorded. A physical model for batik dyeing is established using a conditional generative adversarial network. The newly generated batik drawing and the custom dyeing parameters are used as inputs to the generator, and the output is a simulated dyeing image. Input the simulated dyeing image into the discriminator and output the probability that the simulated dyeing image is a real batik. An adversarial objective function is constructed, and a physical model for batik dyeing is trained using simulated dyeing images and batik dyeing datasets as training sets. The trained physical model for batik dyeing outputs simulated dyeing images of batik paintings.

8. The intelligent assisted design method for batik painting drafts as described in claim 7, characterized in that: The interactive iterative optimization based on the staining simulation results involves the following steps. Users can review the newly generated batik paintings and corresponding simulated dyeing images. They can adjust the style coding parameters and dyeing parameters, iteratively updating the new paintings and simulation effects until the user approves the final painting.

9. The intelligent assisted design method for batik painting drafts as described in claim 8, characterized in that: The steps for outputting the structured batik painting design report are as follows: After the user confirms the final artwork, a structured batik artwork design report is generated, which includes a high-resolution batik artwork image, a description of the pattern elements of the artwork, a dyeing parameter scheme, and an overview of the design iteration process.

10. A batik drawing design intelligent auxiliary system, based on the batik drawing design intelligent auxiliary method according to any one of claims 1 to 9, characterized in that: include, The data acquisition module collects batik pattern images and performs preprocessing and structured semantic annotation to build a multi-level batik pattern database, providing a data foundation for subsequent pattern analysis. The element segmentation module, based on a multi-level batik pattern database, performs pixel-level semantic segmentation and element-level instance localization on pattern images through an attention mechanism and a hierarchical decoding network, and outputs a structured pattern element instance database. The pattern retrieval module extracts the visual and semantic features of each element based on the pattern element instance and fuses them into a unified embedding vector. It supports cross-modal retrieval and returns the matching pattern element instance. The drawing generation module extracts multi-level style codes from cross-modal retrieval results, uses style codes as constraints to drive the diffusion model to generate controllable patterns, and outputs new pattern drawings that conform to the traditional batik composition specifications. The dyeing simulation module performs pre-simulation of dyeing on newly generated batik paintings using a dyeing physical model constructed through a conditional generative adversarial network, and outputs simulated dyeing images. The report output module performs interactive iterative optimization based on the dyeing simulation results, and finally summarizes the results to generate a structured batik painting design report.