Cyclic generative adversarial network method for blue print cloth pattern generation

By introducing geometric morphological branches, style adaptation branches and blue printed fabric style encoder into the loop generation adversarial network, combining multi-scale feature fusion and dedicated loss functions, the problem of insufficient geometric feature capture and insufficient style details generated by blue printed fabric style in the prior art is solved, and efficient and fine blue printed fabric style image generation is achieved.

CN119918576APending Publication Date: 2025-05-02NANTONG COLLEGE OF SCIENCE & TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411982532.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

When the existing CycleGAN model is applied to the style generation of blue printed fabrics, there are insufficient geometric feature capture, insufficient style details, and lack of constraints on target domain characteristics.

Method used

A circular generation adversarial network method for blue calico pattern generation is proposed. Combining geometric morphology branches and style adaptation branches, using multi-scale feature fusion technology, the geometric structure and style characteristics of blue calico cloth are comprehensively captured, and a blue calico style encoder and a dedicated loss function are introduced to ensure that the texture, color and details of the generated image are consistent with the aesthetic characteristics of blue calico cloth.

Benefits of technology

It realizes efficient conversion from natural image to blue printed fabric style, improves the geometric feature capture ability and style detail precision of image generation, ensures that the artistic features of the generated image are consistent with blue printed fabric, and is suitable for digital protection and creative design of intangible cultural heritage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918576A_ABST
    Figure CN119918576A_ABST
Patent Text Reader

Abstract

The invention discloses a cyclic generative adversarial network method for blue print cloth pattern generation, and aims to realize conversion from a natural image to a blue print cloth style, fill the blank of a method for generating unique artistic features of blue print cloth by artificial intelligence, and improve a traditional style migration model at the same time. The method comprises the following steps: constructing a random image data set with a blue print cloth style, extracting basic elements from typical patterns to carry out random combination so as to maintain the diversity and geometric characteristics of the patterns, optimizing a CycleGAN generator structure, adopting a multi-scale feature fusion network of geometric body branches and style adaptive branches, capturing details from different scales, and carrying out multi-scale feature fusion. A blue print cloth style encoder is introduced, it is ensured that the generated image conforms to blue-white or blue-black tones, special loss functions including adversarial loss, cyclic consistency loss, style loss and color distribution loss are designed, the generation effect is improved from multiple angles, and it is ensured that details, colors and textures of the generated image conform to aesthetic characteristics of blue print cloth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and image generation technology, and specifically to a recurrent generative adversarial network method for generating blue print patterns, which is used to convert natural images into blue print style images and is widely used in the fields of digital protection of intangible cultural heritage, reproduction of traditional art styles, and cultural and creative design. Background Art

[0002] As a traditional intangible cultural heritage of China, blue printed cloth has a profound historical background and unique artistic style. Its patterns are characterized by geometric symmetry, repetitiveness and blue and white or blue and black colors. However, the design and production of traditional blue printed cloth patterns rely on manual craftsmanship, which is time-consuming, inefficient and has limited design styles, which to some extent limits its modern application and promotion.

[0003] In recent years, artificial intelligence technology, especially GAN, has made significant progress in the field of image generation and style transfer. As a GAN variant of unsupervised learning, Cycle Generative Adversarial Network (CycleGAN) can achieve style transfer between two unpaired datasets, providing new possibilities for the digital protection and re-creation of intangible cultural heritage. However, when the existing CycleGAN model is applied to the generation of blue print style, it has some shortcomings, such as insufficient geometric feature capture, insufficient style details, and lack of constraints on target domain characteristics.

[0004] In order to solve the above problems, this application proposes a recurrent generative adversarial network method for blue print pattern generation, combining the geometric morphology branch and the style adaptation branch, using multi-scale feature fusion technology to fully capture the geometric structure and style characteristics of blue print. At the same time, the blue print style encoder and dedicated loss function are introduced to ensure that the generated image is consistent with the aesthetic characteristics of blue print in terms of texture, color and details, providing efficient and scalable technical support for the digital protection and creative design of blue print. Summary of the invention

[0005] In view of the problems mentioned in the background technology, the purpose of the present invention is to provide a cyclic generative adversarial network method for blue print pattern generation, so as to solve the problems of insufficient geometric feature capture, insufficient style details, lack of constraints on target domain characteristics, etc. of the existing CycleGAN model mentioned in the background technology when applied to blue print style generation.

[0006] The above technical objectives of the present invention are achieved through the following technical solutions:

[0007] A recurrent generative adversarial network method for blue printed cloth pattern generation comprises the following steps:

[0008] S1. Construct a random image dataset of blue print style: extract basic elements from typical blue print patterns, perform scaling, mirror flipping and rotation transformations, and generate a variety of blue print images based on random combinations of constraint algorithms;

[0009] S2. Define the CycleGAN architecture, including the dual-module design of the generator and the discriminator.

[0010] S3. Design a dual-branch generator network, including a geometric morphology branch and a style adaptation branch, use a multi-scale feature fusion module to integrate branch features, and introduce a blue print style encoder;

[0011] S4. Define loss functions, including adversarial loss, cycle consistency loss, style loss, and color distribution loss;

[0012] S5. Model training: Input natural images (source domain) and blue print images (target domain) for unsupervised adversarial training, optimize the generator through the discriminator, and iteratively update the network weights;

[0013] S6. Generate blue print style images: Input a new natural image and use the trained generator network to generate an output image with blue print style.

[0014] The above-mentioned cyclic generative adversarial network method for generating blue printed cloth patterns, wherein step S1 specifically includes the following steps:

[0015] (1) Extracting basic pattern elements from typical blue print patterns, including geometric shapes, pattern textures, and symmetrical structures;

[0016] (2) performing random geometric transformations on the basic pattern elements, including scaling, rotation, and mirror flipping, to generate pattern elements with diversity and variability;

[0017] (3) Randomly combine the transformed pattern elements to generate diversified blue print patterns;

[0018] (4) During the combination process, a constraint algorithm is used to ensure that the generated pattern retains the unique symmetry and repetitive geometric features of indigo cloth.

[0019] The above-mentioned cyclic generative adversarial network method for blue printed cloth pattern generation, wherein: in step S3, a generator network structure having a geometric morphology branch and a style adaptation dual branch is constructed, and the generator network structure includes the following modules:

[0020] M1. Input layer: perform preliminary feature extraction on the original input image;

[0021] M2. Geometric morphology branch: used to extract the geometric structure features of blue printed cloth;

[0022] M3. Style adaptation branch: used to extract the color and texture features of blue printed cloth;

[0023] M4. Multi-scale feature fusion module: used to fuse the features of the geometric morphology branch and the style adaptation branch;

[0024] M5. Decoder module: used to reconstruct the fused feature map into a blue print style image.

[0025] The above-mentioned cyclic generative adversarial network method for blue printed cloth pattern generation, wherein: the network structure of the input layer (M1) is:

[0026] (1) Use a 7×7 convolutional layer to extract shallow features;

[0027] (2) Introducing nonlinear characteristics through the ReLU activation function and applying batch normalization (BN) to stabilize feature distribution;

[0028] (3) Output a feature map of size 256×256×64, which is shared by the subsequent geometric morphology branch and style adaptation dual branch.

[0029] The above-mentioned cyclic generative adversarial network method for blue printed cloth pattern generation, wherein: the network structure of the geometric morphology branch (M2) is:

[0030] (1) Extract primary geometric features through three layers of 3×3 depth-separated convolution;

[0031] (2) Extract geometric repetitive structural features of different scales through multiple convolution branches (with dilation rates of 1, 2, and 4 respectively), and fuse them after splicing in the channel dimension;

[0032] (3) Output geometric feature map of size 256×256×128.

[0033] The above-mentioned cyclic generative adversarial network method for blue printed cloth pattern generation, wherein: the network structure of the style adaptation branch (M3) is:

[0034] (1) Use three dense residual blocks (DRBs), each of which contains four layers of 3×3 convolutions to enhance the texture expression ability by concatenating the output and input;

[0035] (2) Blue print style encoder embedding, obtains the style vector from the pre-trained blue print samples, and adjusts the mean and variance of the feature map through conditional instance normalization (CIN) to make it consistent with the blue-white or blue-black tones of blue print;

[0036] (3) Output style feature map of size 256×256×128.

[0037] The above-mentioned cyclic generative adversarial network method for blue printed cloth pattern generation, wherein: the network structure of the multi-scale feature fusion module (M4) is:

[0038] (1) Extract local, mid-scale, and global features respectively through 3×3, 5×5, and 7×7 multi-scale convolution kernels;

[0039] (2) Setting up an attention mechanism (CBAM), including channel attention and spatial attention modules, to dynamically adjust feature channel weights and focus on key areas;

[0040] (3) The channel dimension is reduced through a 1×1 convolutional layer, and the fused feature map is output with a size of 256×256×256.

[0041] The above-mentioned cyclic generative adversarial network method for blue printed cloth pattern generation, wherein: the network structure of the decoder module (M5) is:

[0042] (1) Using skip connections, the low-level features of the geometric morphology branch are introduced into the decoding process to supplement the edges and geometric details;

[0043] (2) Output layer: Use 1×1 convolution to map features into RGB three-channel images, and use the Tanh activation function to normalize pixel values ​​to [-1, 1].

[0044] The above-mentioned cyclic generative adversarial network method for blue print pattern generation, wherein: in step S4, a special loss function is designed for blue print style pattern generation, and the special loss function includes adversarial loss LGAN, cycle consistency loss Lcyc, style loss Lstyle and color distribution loss Lcolor, and its total loss is Ltotal=λGANLGAN+λcycLcyc+λstyleLstyle+λcolorLcolor, wherein λGAN, λcyc, λstyle, λcolor are the weights of the loss terms, which are used to adjust the influence of each loss on the generator optimization.

[0045] The above-mentioned recurrent generative adversarial network method for blue print pattern generation, wherein: the loss function combination is used to ensure that the generated blue print style pattern has the characteristics of the blue print pattern in terms of geometry, color and texture.

[0046] In summary, the present invention mainly has the following beneficial effects:

[0047] The cyclic generative adversarial network method for blue print pattern generation provided by the present invention aims to realize the conversion from natural images to blue print style, fills the gap of artificial intelligence generation of unique artistic features of blue print, and improves the traditional style transfer model. First, a random image data set with blue print style is constructed, and basic elements are extracted from typical patterns for random combination, including scaling, mirror flipping and rotation, so as to maintain the diversity and geometric characteristics of the pattern. Secondly, the CycleGAN generator structure is optimized, and a multi-scale feature fusion network of geometric shape branches and style adaptation branches is adopted to capture details from different scales, and a blue print style encoder is introduced to ensure that the generated image conforms to the blue and white or blue and black tones. Finally, a special loss function is designed, including adversarial loss, cycle consistency loss, style loss and color distribution loss, to improve the generation effect from multiple angles, and ensure that the details, colors and textures of the generated image conform to the aesthetic characteristics of blue print. The present invention can efficiently and accurately reproduce the visual style of blue print, and is suitable for the digital protection and promotion of intangible cultural heritage. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of a cyclic generative adversarial network method for blue print pattern generation according to the present invention;

[0049] Figure 2 It is a schematic diagram of a random image data set of a blue printed cloth style in a cyclic generative adversarial network method for generating blue printed cloth patterns of the present invention;

[0050] Figure 3 It is a blue print style generation effect diagram in the recurrent generative adversarial network method for blue print pattern generation of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] refer to Figure 1 , Figure 2 and Figure 3This embodiment provides a cyclic generative adversarial network method for generating blue printed cloth patterns, and the specific scheme is as follows:

[0053] Extraction of basic elements: Extract basic elements from the traditional patterns of blue printed cloth, including geometric shapes (such as symmetrical circles, squares, diamonds, etc.), patterns and textures (such as plant and animal images) and symmetrical structures. The extraction of basic elements is based on the unique symmetry and repetitiveness of blue printed cloth, retaining its key artistic features.

[0054] The extracted basic pattern elements are subjected to random geometric transformations, including but not limited to: scaling, adjusting the size of the pattern elements to adapt to different blue print style design requirements; rotating, randomly rotating the pattern elements in the range of 0° to 360° to enhance data diversity; mirror flipping, mirror flipping the pattern elements horizontally and vertically to generate more symmetrical patterns.

[0055] On the basis of geometric transformation, the pattern elements are randomly combined to generate diversified blue printed cloth patterns. The combination methods include but are not limited to: superposition of pattern elements of different sizes; arrangement and splicing of multiple pattern elements.

[0056] To ensure that the generated pattern conforms to the traditional artistic style of blue printed cloth, constraint algorithms are added in the combination process, including symmetry constraints and repeatability constraints.

[0057] The symmetry constraint is achieved by dividing the pattern into multiple angularly symmetrical partitions (for example, dividing the pattern into n equally divided fan-shaped regions) to ensure that the pixel values ​​of each partition are symmetrical. Let the center of the image be (c x ,c y) , the polar coordinates of a point in the image are I(r,θ), and its symmetric point is (r,θ+2π / n). First, convert the image from the Cartesian coordinate system (x,y) to the polar coordinate system (r,θ). The formula is: After dividing θ into n equally divided angle intervals, the symmetry constraint formula is used for constraint calculation. The symmetry constraint formula is: The symmetry constraint measures the difference between corresponding points in each symmetric partition, and ideally the symmetry loss is zero.

[0058] The repeatability constraint is achieved by periodically tiling the pattern cells to ensure global repeatability of the generated pattern while maintaining high symmetry within each cell. In implementation, the symmetry-optimized pattern cells I Base As a repeating unit. Let the basic unit size be W b ×H b , the generated pattern size is W×H, and the repeatability constraint formula is used to ensure that each point in the generated pattern is consistent with the corresponding point of the basic unit: Among them, I Generated(x, y) is the pixel value of the position (x, y) of the generated pattern in the global range; I Base (x modW b ,y modH b ) is the base unit in the relative position (x modW b ,y modH b )’s pixel value;

[0059] The resulting random blue print image dataset contains a variety of blue print patterns, covering different geometric structures, textures, and symmetry properties, providing high-quality and diverse training samples for the training of generative adversarial networks.

[0060] The technical solution of the generator network designed for blue print image style generation is as follows:

[0061] The first step is to design the input layer of the generator to perform shallow feature extraction on natural images (source domain) and provide a unified input for subsequent branches.

[0062] Specific implementation: Use a 7×7 convolutional layer to extract the edge and basic texture information of the image; introduce the ReLU activation function to improve the nonlinear modeling ability; use batch normalization (BatchNormalization, BN) to stabilize the feature distribution and accelerate training convergence. Output result: The generated feature map size is 256×256×64, which provides input for the subsequent geometric morphology branch and style adaptation branch.

[0063] In the second step, a parallel geometric morphology branch and a style adaptation branch are designed, whose input is the feature map 256×256×64 output by the input layer.

[0064] Among them, the design purpose of the geometric morphology branch is to extract geometric features such as symmetry and repeatability in the blue print pattern. Specific implementation: 1) Depthwise Separable Convolution Module: Use 3 layers of 3×3 depthwise separable convolution (DSConv) to separate the spatial features and channel features respectively, reduce the computational cost and enhance the ability to extract geometric features. Each layer is followed by BN and ReLU to ensure the stability and nonlinear expression of the features. 2) Multi-branch dilated convolution module: Use 3 parallel convolution branches, set the dilation rates (DilationRates) to 1, 2 and 4 respectively, to capture the multi-scale geometric structure features in the blue print, including small petals, large geometric patterns, etc. After the branch outputs are spliced ​​in the channel dimension, they are fused through 1×1 convolution to ensure the effectiveness of feature integration. Output result: The generated geometric feature map size is 256×256×128, which is input to the subsequent multi-scale feature fusion module.

[0065] The design purpose of the style adaptation branch is to extract the style features of the blue print pattern, including the typical blue-white or blue-black tones and texture details. Specific implementation: 1) Dense Residual Block (DRB) module: Each DRB contains 4 layers of 3×3 convolutions, and the convolution output is concatenated with the input features layer by layer to enhance the expression of style features. 2) Blue print style encoder: Extract the blue-white / blue-black tone style vector from the pre-trained blue print samples, and use conditional instance normalization (CIN) to dynamically adjust the mean and variance of the feature map to ensure that the generated image tone conforms to the blue print style. Output result: The generated style feature map is 256×256×128 in size and is input to the multi-scale feature fusion module.

[0066] The style encoder introduced in the style adaptation branch is responsible for converting the input blue printed cloth sample I style Converted to style vector (γ style ,β style) , the specific implementation is: 1) Input: blue printed cloth sample image I style (256×256×3); 2) Convolutional layer stacking: Use 5 convolutional layers to gradually downsample the feature map to extract the key texture and color information of the blue print. Each convolution layer is followed by a ReLU activation function and a BN layer to stabilize feature learning, and a maximum pooling layer is used to achieve feature downsampling; 3) Global average pooling (GAP): The convolutional features are compressed into a global feature vector through global average pooling; 3) Fully connected layer: Output two style vectors: scaling factor γ style and the offset coefficient β style , which are used to adjust the mean and variance of the feature map respectively.

[0067] The conditional normalization (CIN) introduced in the style adaptation branch is divided into two steps: first, the input feature map is normalized, and then dynamically adjusted according to the style vector. The specific implementation is as follows: 1) For the input feature map x, the mean μ(x) and standard σ(x) are calculated channel by channel through feature normalization. The formula is: Where H and W are the height and width of the feature map, respectively, and ε is a numerical stability term; 2) The style vector (γ style ,β style) , scale and offset the normalized feature map: CIN(x) = γ style (x-μ(x)) / σ(x)+β style .

[0068] The third step is to design a multi-scale feature fusion module to fuse the features of the geometric morphology branch and the style adaptation branch to generate a complete blue print style feature map.

[0069] Specific implementation: 1) Multi-scale convolution fusion: Use 3×3, 5×5, 7×7 multi-scale convolution kernels to extract global and local features, splice multi-scale features in the channel dimension, and enhance the detail and structure expression ability of the pattern; 2) Attention mechanism (CBAM): Introduce the channel attention module to dynamically adjust the weights of different channel features to highlight key geometric and style features; Use the spatial attention module to focus on the key areas of the blue print pattern; 3) Channel dimensionality reduction: Use 1×1 convolution to reduce the channel dimension of the fused feature to the input dimension of the adaptive decoder. Output result: The size of the generated fused feature map is 256×256×256.

[0070] The fourth step is to design a decoder module to decode the fused feature map into a complete blue print style image.

[0071] Specific implementation: 1) Use SkipConnections to introduce low-level features from the geometric morphology branch to supplement the details that may be lost during the decoding process. 2) Set the output layer, use 1×1 convolution to map the fused features into an RGB three-channel image, and use the Tanh activation function to normalize the pixel values ​​to the range of [-1,1]. The final output image generated is an RGB image that conforms to the style of blue print.

[0072] Aiming at the task of generating blue print style patterns, this paper designs a special loss function, combines adversarial loss, cycle consistency loss, style loss and color distribution loss, optimizes the training effect of the generator from multiple angles, and ensures that the generated image meets the aesthetic characteristics of blue print in terms of geometry, texture and color distribution. The specific implementation is as follows:

[0073] (1) Adversarial loss L GAN : Adversarial loss is used to optimize the adversarial training between the generator and the discriminator, and its expression is: L GAN (G,D)=Ε y~Pdata(y) [logD(y)]+Ε x~Pdata(x) [log(1 - D(G(x)))], where G(x) is the image generated by the generator; D(y) is the discriminant output of the discriminator for the real image y; D(Gx) is the discriminant output of the discriminator for the generated image.

[0074] (2) Cycle consistency loss Lcyc: Cycle consistency loss constrains the reversibility of the mapping from the source domain to the target domain, and is expressed as:

[0075] L cyc (G,F)=E x~pdata(x) [||F(G(x))-x||1]+E y~pdata(y)[||F(G(y))-y||1], where F is the inverse generator from the target domain to the source domain; ||·||1 represents the pixel difference between the generated image and the original image.

[0076] (3) Style loss L style : The style loss relies on the pre-trained VGG network, whose task is to quantify the style similarity between the generated image G(x) and the target blue print image y, based on the Gram matrix difference at a specific feature layer of the VGG network.

[0077] Among them, the VGG network is a convolutional neural network pre-trained with a large-scale image dataset and has a strong feature expression capability. Different layers of the VGG network (such as conv1_2, conv2_2, conv3_3, conv4_3) are selected as layers for extracting features. Gram matrix calculation: The output of the lth layer of the VGG network is used as the given feature map φ l , the Gram matrix is ​​defined as: G l (F) = φ l (F)·φ l (F) T ,in To flatten the feature map into C l channels, each channel size is H×W, is the Gram matrix, which is used to measure the similarity between feature channels.

[0078] Finally, we use the style loss formula to calculate L style : in is the Frobenius norm, which is used to measure the difference between two Gram matrices;

[0079] (4) Color distribution loss L color : Constrain the color distribution of the generated image to ensure that it conforms to the tonal characteristics of the indigo cloth. This loss compares the color histogram of the generated image with the target indigo cloth image to measure the difference in color distribution between the two, so as to optimize the generator's ability to learn color features.

[0080] The above histogram H(I) is a statistical representation of the pixel color distribution: convert the image I from RGB space to HSV space, divide each color channel (H, S, V) into several fixed range intervals (bins), and count the number of pixels in each interval. Normalize the histogram so that its sum is 1, which represents the probability density of color distribution. For image I, its color histogram is expressed as: H(I) = [h1,h2,L h B ], where B is the total number of intervals in the histogram, h i represents the normalized frequency of the ith interval.

[0081] Color distribution loss L color It is expressed as the color histogram difference between the generated image G(x) and the target blue print image y, and its expression is Where c is the color channel.

[0082] (5) Total loss function L total : The total loss function combines adversarial loss, cycle consistency loss, style loss and color distribution loss to perform multi-objective optimization on the generator, expressed as: L total =λ GAN L GAN +λ cyc L cyc +λ style L style +λ color L color , where λ GAN ,λ cyc ,λ style ,λ color are the weight coefficients of each loss term.

[0083] The overall process of the present invention is as follows:

[0084] The present invention constructs a random image dataset in the style of blue print, defines a cyclic generative adversarial network architecture, designs a generator network and a loss function, and performs model training, thereby ultimately realizing the generation of an output image in the style of blue print by inputting a natural image.

[0085] exist Figure 1 In step S1, a random image dataset in the style of blue print is constructed. This step extracts basic elements from typical blue print patterns, including geometric shapes (such as circles, squares, diamonds, etc.) and texture features (such as plant and animal patterns), and performs random geometric transformations on them. The transformation methods include: scaling, adjusting the size of pattern elements; rotating, randomly selecting angles for rotation operations; mirror flipping, mirroring the pattern horizontally or vertically to generate more diverse symmetrical patterns. On this basis, a variety of blue print style patterns are generated by randomly superimposing, arranging and splicing pattern elements. At the same time, in order to ensure that the generated pattern retains the unique artistic style of blue prints, symmetry constraints and repeatability constraints algorithms are combined. Symmetry constraints ensure that the pixel values ​​of each partition are symmetrical by dividing the pattern into multiple equally divided fan-shaped areas; repeatability constraints optimize the global repeatability of the generated pattern through periodic tiling. The final generated blue print random image dataset provides a variety of high-quality samples for subsequent model training, and generates random images such as Figure 2 shown.

[0086] exist Figure 1In step S2, the CycleGAN architecture is defined. The CycleGAN architecture consists of a generator and a discriminator, where the generator includes a dual-branch design of a geometric morphology branch and a style adaptation branch, responsible for generating images that conform to the style of blue prints; the discriminator is used to distinguish between the generated image and the target blue print image, optimizing the authenticity and style consistency of the generator output.

[0087] exist Figure 1 In the step S3, a dual-branch generator network is designed. The specific generator network structure is shown in FIG. Figure 3 As shown in the figure. The generator includes a geometric morphology branch and a style adaptation branch. The features of the two are integrated through a multi-scale feature fusion module, and an indigo style encoder is introduced to ensure that the tone and texture of the generated image conform to the artistic characteristics of indigo. Among them, the geometric morphology branch is used to extract the geometric features of indigo, such as symmetry and repeatability; the style adaptation branch extracts the style features of indigo, including blue-white or blue-black tones and texture details. After the features of the two branches are fused, a complete indigo style feature map is generated.

[0088] exist Figure 1 In step S4, a special loss function is defined, including adversarial loss, cycle consistency loss, style loss and color distribution loss. The adversarial loss optimizes the authenticity of the generated image through the game between the generator and the discriminator;

[0089] exist Figure 1 In the step S5, model training is performed. The present invention performs unsupervised adversarial training on the generator and the discriminator by inputting natural images (source domain) and blue print images (target domain). The generator continuously optimizes the geometric structure, style details and tonal characteristics of the generated image according to the loss function, and the discriminator continuously improves the ability to distinguish between real images and generated images. During the training process, the generator and the discriminator are optimized alternately, so that the generator gradually generates images with the style of blue print.

[0090] exist Figure 1 In step S6, a blue printed cloth style image is generated, and the generated effect is as follows: Figure 2 The invention can directly generate an output image in accordance with the style of blue print cloth by using a trained generator network after inputting a new natural image, and the output image is highly similar to the target blue print cloth style in terms of geometric form, texture and tone.

[0091] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A recurrent generative adversarial network method for blue print pattern generation, characterized in that: The following steps are involved: S1. Construct a random image dataset of blue print style: extract basic elements from typical blue print patterns, perform scaling, mirror flipping and rotation transformations, and generate a variety of blue print images based on random combinations of constraint algorithms; S2. Define the recurrent generative adversarial network architecture, including the dual-module design of the generator and the discriminator; S3. Design a dual-branch generator network, including a geometric morphology branch and a style adaptation branch, use a multi-scale feature fusion module to integrate branch features, and introduce a blue print style encoder; S4. Define loss functions, including adversarial loss, cycle consistency loss, style loss, and color distribution loss; S5. Model training: Input natural images and blue print images for unsupervised adversarial training, optimize the generator through the discriminator, and iteratively update the network weights; S6. Generate blue print style images: Input a new natural image and use the trained generator network to generate an output image with blue print style.

2. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 1, characterized in that: Step S1 specifically includes the following steps: (1) Extracting basic pattern elements from typical blue print patterns, including geometric shapes, pattern textures, and symmetrical structures; (2) performing random geometric transformations on the basic pattern elements, including scaling, rotation, and mirror flipping, to generate pattern elements with diversity and variability; (3) Randomly combine the transformed pattern elements to generate diverse blue print patterns; (4) During the combination process, a constraint algorithm is used to ensure that the generated pattern retains the unique symmetry and repetitive geometric features of indigo cloth.

3. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 1, characterized in that: In step S3, a generator network structure having a geometric morphology branch and a style adaptation dual branch is constructed, and the generator network structure includes the following modules: M1. Input layer: perform preliminary feature extraction on the original input image; M2. Geometric morphology branch: used to extract the geometric structure features of blue printed cloth; M3. Style adaptation branch: used to extract the color and texture features of blue printed cloth; M4. Multi-scale feature fusion module: used to fuse the features of the geometric morphology branch and the style adaptation branch; M5. Decoder module: used to reconstruct the fused feature map into a blue print style image.

4. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 3, characterized in that: The network structure of the geometric branch M2 is: (1) Extracting primary geometric features through 3 layers of 3×3 depth-separated convolution; (2) Extract geometric repetitive structural features of different scales through multiple convolution branches and fuse them after splicing in the channel dimension; (3) Output geometric feature map of size 256×256×128.

5. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 3, characterized in that: The network structure of the pattern adaptation branch M3 is: (1) Use three dense residual blocks (DRBs), each of which contains four layers of 3×3 convolutions to enhance the texture expression ability by concatenating the output with the input; (2) Blue print style encoder embedding, which obtains the style vector from the pre-trained blue print samples and adjusts the mean and variance of the feature map through conditional normalization (CIN) to make it consistent with the blue-white or blue-black tones of blue print; (3) Output style feature map of size 256×256×128.

6. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 3, characterized in that: The network structure of the decoder module M5 is: (1) Using skip connections, the low-level features of the geometric morphology branch are introduced into the decoding process to supplement the edges and geometric details; (2) Output layer: Use 1×1 convolution to map features into RGB three-channel images, and use the Tanh activation function to normalize pixel values ​​to [−1, 1].

7. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 1, characterized in that: In step S4, a special loss function is designed for blue print style pattern generation. The special loss function includes adversarial loss LGAN, cycle consistency loss Lcyc, style loss Lstyle and color distribution loss Lcolor. The total loss is Ltotal=λGANLGAN+λcycLcyc+λstyleLstyle+λcolorLcolor, where λGAN, λcyc, λstyle, and λcolor are the weights of the loss terms, which are used to adjust the influence of each loss on the generator optimization.

8. The recurrent generative adversarial network method for blue printed cloth pattern generation according to claim 7, characterized in that: The combination of loss functions is used to ensure that the generated blue calico style pattern has the characteristics of the blue calico pattern in terms of geometry, color and texture.