Embroidery-imitating design image reality evaluation method based on degraded image adversarial learning
Through the method based on degraded image adversarial learning, combined with multi-scale superpixel degradation technology and adversarial learning model, the problem of local realism evaluation and data collection of embroidered images is solved, and the local realism evaluation and objective quality evaluation of embroidered design images is achieved, which improves the efficiency and accuracy of evaluation.
Patent Information
- Application Number
- CN202510601789.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-05-12
AI Technical Summary
The prior art is difficult to evaluate the local reality of embroidered images, and it is difficult to collect data, making it difficult to conduct objective quality evaluation.
Using a method based on degenerated image adversarial learning, a multi-scale superpixel degradation technology combined with an adversarial learning model is used to develop a region division strategy and evaluation mechanism to achieve local realism evaluation of the designed image, and train the adversarial learning model to reduce dependence on the original data.
The local realism evaluation of embroidered design images is achieved, providing designers with more accurate problem positioning, and through automated model training, the dependence on real embroidered image data is reduced, and the evaluation efficiency and accuracy is improved.
Smart Images

Figure CN120107270A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for evaluating the sense of reality of an embroidery-like design image based on degraded image adversarial learning, and belongs to the technical field of digital printing. Background Art
[0002] As a form of textile art with a long history, embroidery's traditional production process is highly dependent on manual operation. With the rapid development of digital printing technology, this technology has become the mainstream way of modern printed fabric design with its efficient production capacity and resource-saving advantages. In this context, the Chinese patent with publication number CN119227549A proposes a method for generating editable conditional printing images based on deep learning, which brings new technological breakthroughs to the field of digital printing.
[0003] However, there are still technical problems that need to be solved in the evaluation of embroidery image design. First, the existing image realism evaluation methods are limited to global evaluation and lack the ability to analyze local areas. Embroidery design requires local realism evaluation to help designers accurately locate problem areas. Second, data is difficult to collect. The designer's flat draft data used as the input of the generative model has the problems of limited collection scale and difficulty in format standardization. The embroidery simulation images generated by the software used to evaluate the model are also difficult to collect on a large scale.
[0004] At present, there is no patent in the field of printed images that realizes the objective quality evaluation function. It is worth noting that in other related fields, researchers have proposed objective tactile quality evaluation methods, and these research results may provide valuable reference and reference for the objective quality evaluation of printed images.
[0005] A Chinese patent with publication number CN106023208A discloses an objective evaluation method for image quality. This method requires the input of a standard image and a distorted image at the same time, and through a preset distortion quantization algorithm, focuses on analyzing the consistency of the edge contour features between the two to evaluate the image degradation level. However, this evaluation method focuses on the authenticity of the graphic structure in the image. On the one hand, it cannot achieve regionalized realism evaluation, and on the other hand, it is not suitable for evaluating the color and texture of embroidery images. A Chinese patent with publication number CN118015383A discloses a training method for an image evaluation model, an image evaluation method, and related equipment. This method trains an image evaluation model, obtains a label after inputting the image to be evaluated, and generates an evaluation result. It is a general image evaluation model. However, for embroidery image evaluation, it is difficult to collect image data, and it is not possible to achieve a more detailed evaluation of local color and texture areas.
[0006] The Chinese patent with publication number CN106408035A discloses a method for evaluating the realism of force tactile reproduction based on human tactile perception characteristics. By comparing and collecting real force signals and virtual environment feedback data, it is converted into a computable "force tactile image". After being processed by the perception filter, similarity calculation is performed in the perception dimension space to evaluate the simulation effect. However, this scheme relies on the collection of a large amount of experimental data, and it is difficult to collect sample data of embroidery design images, so it is difficult to apply. The Chinese patent with publication number CN110764619A discloses a quantitative evaluation method for the apparent realism of tactile reproduction contours based on feature similarity. By constructing a feature matrix of real and virtual tactile experimental data, the core feature components are obtained by principal component extraction technology, and finally the quantitative evaluation of tactile rendering effects is realized by feature similarity calculation. It is suitable for the evaluation of three-dimensional raised rendering effects of electrostatic tactile devices. However, as a linear feature extraction method, the traditional principal component analysis method has limitations in feature expression ability when processing complex data such as embroidery images that contain nonlinear features.
[0007] In summary, the above practices are still immature in evaluating the realism of imitation embroidery design images. Summary of the invention
[0008] In order to solve the above problems existing in the current prior art, the present invention provides a method for evaluating the sense of reality of embroidery-like design images based on degraded image adversarial learning. The method aims at the above two problems. On the one hand, an evaluation mechanism based on regional division is developed, which can evaluate the local sense of reality of the design image, provide designers with more accurate problem positioning, and introduce a regional division strategy that conforms to the characteristics of real visual perception. By comprehensively considering visual elements such as color distribution, spatial relationship, and pattern boundary, a regional division effect that is more in line with human visual perception is achieved; on the other hand, multi-scale superpixel degradation technology is combined with an adversarial learning model, so that the method only needs to input a real embroidery image to complete the training of the evaluation model, which can effectively reduce the dependence of the method on the original data; the technical scheme adopted by the method is as follows: Step 1: Collect real embroidery images to build a real embroidery image dataset; Step 2: Construct an embroidery design image adversarial learning evaluation model, which includes a multi-scale superpixel degradation algorithm module, an embroidery design image generation sub-model and an embroidery design image evaluation sub-model; Step 3: Use the data set obtained in step 1 to train the adversarial learning evaluation model for the imitation embroidery design images; Step 4: construct the loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model, and optimize the embroidery design image generation sub-model and the embroidery design image evaluation sub-model respectively during the training process; Step 5: Input the imitation embroidery design image to be evaluated into the optimized embroidery design image evaluation sub-model to obtain the evaluation result.
[0009] The real embroidery image dataset constructed in step 1 is denoted as ,in , represents the serial number of the real embroidery image, represents the number of real embroidery images; The multi-scale super-pixel degradation algorithm module in step 2 simulates the human eye's attention to the edge of the object by using the edge intensity feature, and uses the multi-scale regional consistency feature to achieve a degradation effect with pattern size adaptability; and uses the multi-scale super-pixel segmentation algorithm to simulate the reverse design process from the real embroidery image to generate a super-pixel degraded image; in addition, by using the super-pixel region division, a set of regional coordinates that approximates the real embroidery pattern region division is obtained; The specific steps are as follows: Step S1: Execute large-scale superpixel degradation algorithm , and obtain a large-scale super-pixel image A; where is the large-scale parameter, which indicates the number of regions into which the real embroidery image is divided in the large-scale superpixel degradation algorithm; Step S2: Based on the large-scale superpixel image A, execute the small-scale superpixel degradation algorithm , get the super-pixel degraded image ;in, is a small-scale parameter, representing the number of regions into which the real embroidery image is divided in the small-scale superpixel degradation algorithm; Step S3: Degrade the image according to superpixels , and get each superpixel The pixel coordinate set of the area ,in , represents the superpixel number, Represents the number of superpixel regions.
[0010] Among them, the large-scale superpixel degradation algorithm and small-scale superpixel degradation algorithm The processing process includes: Step 1: Image feature extraction; a. Take the real embroidery image Each pixel in Coordinates is the spatial feature of the pixel, expressed as ; b. The real embroidery image Convert to Lab space and take the pixel point in Lab space Channel values at position Pixel The color feature is expressed as ; c. Process the input real embroidery image through the pre-trained UNet model , get the edge intensity feature map , take the pixel point The value at the position is the pixel point The edge strength feature is expressed as ; Among them, the UNet model is pre-trained by a dataset consisting of natural object images and their corresponding edge images; Step 2: Initialize the superpixel center; convert the real embroidery image Divide evenly into square grid area, which is the initial superpixel area, where , represents the scale parameter; let the central pixel of each grid area be the initial superpixel center , , The serial number representing the initial superpixel region; Step 3: Calculate the superpixel center feature; calculate the initial superpixel area The mean of the spatial and color features of the inner pixel is used as the spatial feature of the superpixel center. and color features ; Step 4: Calculate the distance between the pixel and the superpixel center; for the real embroidery image Each pixel in , with the pixel as the center, the length and width are In the window, calculate the pixel With each cluster center point within the window The comprehensive feature distance , whose expression is:
[0011] in, is the Euclidean distance between the two color features, is the Euclidean distance of the spatial features between the two, is the superpixel region consistency factor, It's a pixel The edge strength feature, They are the spatial feature distance weight parameter, the superpixel region consistency factor weight parameter, and the edge intensity feature weight parameter; Among them, when executing the large-scale superpixel degradation algorithm, the superpixel region consistency factor The value of is 0. When executing the small-scale superpixel degradation algorithm, the superpixel region consistency factor The values of are as follows:
[0012] Step 5: Update the superpixel center; let each pixel The superpixel center point with the smallest distance to its comprehensive feature is classified as the same superpixel to obtain the current superpixel image , if the current number of iterations does not reach the set value , then return to step 3; Step 6: Output the result; output the Iteration superpixel degraded image .
[0013] The expression of the embroidery design image generation sub-model in step 2 is:
[0014] It includes downsampling stage and upsampling stage, where: Represents the embroidery design image generation sub-model operation, represents the parameters of the embroidery design image generation sub-model; During the downsampling phase: Input superpixel artwork , deep region features are extracted through three layers of convolutional pooling modules with step-by-step downsampling, where each convolutional pooling module includes a convolutional layer, a batch normalization layer, an activation function layer and a pooling layer in sequence; In the upsampling stage: the deep region features extracted in the downsampling stage are gradually upsampled and reconstructed, and a three-layer upsampling module is used to restore the spatial resolution and generate a simulated design image , where each layer module includes an upsampling layer, a convolution layer, a batch normalization layer, and an activation function layer in sequence.
[0015] The expression of the embroidery design image evaluation sub-model in step 2 is:
[0016] The embroidery design image evaluation sub-model includes a texture feature extraction module and an embroidery design image evaluation module, wherein: Represents the embroidery design image evaluation sub-model operation, represents the parameters of the embroidery design image evaluation sub-model; The processing of the texture feature extraction module includes: Step a1: By adjusting the direction and scale parameters of the Gabor filter, a The filter bank of Gabor filters is used to filter the real embroidery image. and simulated design images Perform filtering processing respectively to obtain the real embroidery image texture filtered image and simulated design image texture filtering image ,in Indicates the filter number; Step a2: Use the real embroidery image texture to filter the image and simulated design image texture filtering image Computing texture features of real embroidery images and simulated design image texture features ; The texture feature calculation process is as follows: The pixel coordinate set corresponding to each superpixel region in ,in , Represents the superpixel region number, Represents the number of superpixel areas; extracts the real embroidery image texture filter image and simulated design image texture filtering image Corresponding area The pixel value mean and variance of Real embroidery image texture features and simulated design image texture features ; The processing of the embroidery design image evaluation module includes: The texture features of real embroidery fabric images are respectively and simulated design image texture features Input into a fully connected neural network with a sigmoid function as the output layer to obtain the real embroidery fabric image and simulated design images In each superpixel area Estimated sense of reality rating and , the closer it is to 1, the higher the authenticity of the area.
[0017] In step 2, for the imitation embroidery design images with different resolutions, the principle is to ensure that each superpixel contains no less than 400 pixels. The large-scale parameters in the multi-scale superpixel degradation algorithm module are and small-scale parameters In the application, the setting is flexibly based on this principle.
[0018] The training process of step three is: The embroidery design image generation sub-model and the embroidery design image evaluation sub-model realize the training of the adversarial learning evaluation model of the imitation embroidery design image through adversarial learning; The multi-scale super-pixel degradation algorithm module processes the real embroidery image to obtain the super-pixel degraded image and the super-pixel region division therein, the embroidery design image generation sub-model reconstructs the super-pixel degraded image to obtain the simulated design image, and the embroidery design image evaluation sub-model distinguishes the authenticity of the real embroidery image and the simulated design image region by region; For the divided superpixel areas, alternate training and optimization are performed by constructing the loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model.
[0019] In step 4: Loss function of the embroidery design image generation sub-model Designing images using simulation and real embroidery images The adversarial loss function And the reconstruction loss function Build; Adversarial loss function , reconstruction loss function and the loss function of the embroidery design image generation sub-model The expressions are:
[0020]
[0021]
[0022] in, Represents the adversarial loss function The weight coefficient of Represents the embroidery design image generation sub-model operation; represents the embroidery design image evaluation sub-model operation; Loss function of the sub-model generated by embroidery design image Update the parameters of the embroidery design image generation sub-model .
[0023] Loss function of the embroidery design image evaluation sub-model Through each superpixel area Estimated sense of reality rating and To calculate, the expression is:
[0024] in, represents the number of superpixel regions; The loss function of the sub-model evaluated by the embroidery design image Update the parameters of the embroidery design image evaluation sub-model .
[0025] When the embroidery design image generates the sub-model loss function And the loss function of the embroidery design image evaluation sub-model When it no longer decreases with the training process, the training of the adversarial learning evaluation model for the imitation embroidery design image is completed.
[0026] In step five: the imitation embroidery design image to be evaluated is input into the optimized embroidery design image evaluation sub-model to obtain the evaluation result.
[0027] The beneficial effects of the present invention are: The present invention proposes a method for evaluating the sense of reality of embroidery-like design images based on degraded image adversarial learning. On the one hand, by developing an evaluation mechanism based on region division, it is possible to perform local sense of reality evaluation on the design image, provide designers with more accurate problem positioning, and introduce a region division strategy that conforms to the characteristics of actual visual perception. By comprehensively considering visual elements such as color distribution, spatial relationship, and pattern boundaries, a region division effect that is more in line with human visual perception is achieved. On the other hand, by combining multi-scale superpixel degradation technology with an adversarial learning model, the method only needs to input a real embroidery fabric image to complete the training of the evaluation model, thereby solving the problem that it is difficult to obtain embroidery design drawings and real embroidery fabric image data in pairs. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 It is a flow chart of a method for evaluating the realism of an embroidery-like design image based on degraded image adversarial learning provided in the first embodiment of the present invention; Figure 2 is a schematic diagram of an embroidery design image to be evaluated input into a method for evaluating the realism of an embroidery design image based on degraded image adversarial learning provided in the second embodiment of the present invention; Figure 3 It is a schematic diagram of a superpixel degraded image in a method for evaluating the realism of an embroidery design image based on degraded image adversarial learning provided in the second embodiment of the present invention; Figure 4 It is a schematic diagram of the scoring results for each region in a method for evaluating the realism of an embroidery-like design image based on degraded image adversarial learning provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0031] Embodiment 1 This embodiment provides a method for evaluating the realism of embroidery design images based on degraded image adversarial learning, which is implemented by constructing an embroidery design image adversarial learning evaluation model. The workflow of the model is as follows: Figure 1 As shown, the model specifically includes a multi-scale superpixel degradation algorithm module, an embroidery design image generation sub-model and an embroidery design image evaluation sub-model; First, input the real embroidery image The super-pixel degraded image is obtained after being processed by the multi-scale super-pixel degradation algorithm module. And the super pixel area division therein; then the simulated design image is reconstructed by generating a sub-model through the embroidery design image ; Then extract the real embroidery fabric images respectively and simulated design images The texture features of the simulated design image are evaluated for authenticity region by region through the embroidery design image evaluation sub-model; then the generation sub-model and the evaluation sub-model are trained by adversarial learning, that is, for each divided image region, the generation sub-model constructs a generation loss function with the goal of making the generated embroidery texture generated image difficult to be distinguished by the evaluation sub-model, and the evaluation sub-model constructs an evaluation loss function with the goal of accurately distinguishing the real embroidery fabric image from the embroidery texture generated image, and then performs alternating training optimization; finally, the optimized embroidery design image evaluation sub-model is obtained.
[0032] The method specifically includes: Step 1: Collect real embroidery images to build a real embroidery image dataset; Step 2: constructing an embroidery design image adversarial learning evaluation model, wherein the embroidery design image adversarial learning evaluation model includes a multi-scale superpixel degradation algorithm module, an embroidery design image generation sub-model and an embroidery design image evaluation sub-model; Step 3: using the data set obtained in step 1 to train the adversarial learning evaluation model of the imitation embroidery design image; Step 4: construct the loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model, and optimize the embroidery design image generation sub-model and the embroidery design image evaluation sub-model respectively during the training process; Step 5: Input the imitation embroidery design image to be evaluated into the optimized embroidery design image evaluation sub-model to obtain the evaluation result.
[0033] The real embroidery image dataset constructed in step 1 is denoted as ,in , which means there are 200 images in the real embroidery image dataset. The real embroidery image dataset consists of embroidery fabric images taken by a color camera, and the image size is 512×512; The multi-scale super-pixel degradation algorithm module in step 2 simulates the human eye's attention to the edge of the object by using the edge intensity feature, and uses the multi-scale regional consistency feature to achieve a degradation effect with pattern size adaptability; and uses the multi-scale super-pixel segmentation algorithm to simulate the reverse design process from the real embroidery image to generate a super-pixel degraded image; in addition, by using the super-pixel region division, a set of regional coordinates that approximates the real embroidery pattern region division is obtained; The specific steps are as follows: Step S1: Execute large-scale superpixel degradation algorithm , and obtain a large-scale super-pixel image A; where is a large-scale parameter, which indicates the number of regions where the real embroidery image is divided in the large-scale superpixel degradation algorithm; Step S2: Based on the large-scale superpixel image A, execute the small-scale superpixel degradation algorithm , get the super-pixel degraded image ;in, is a small-scale parameter, representing the number of regions where the real embroidery image is divided in the small-scale superpixel degradation algorithm; Step S3: Degrade the image according to superpixels , and get each superpixel The pixel coordinate set of the area ,in , k represents the superpixel number, represents the number of superpixel regions; Among them, the large-scale superpixel degradation algorithm and small-scale superpixel degradation algorithm The processing process includes: Step S1: Execute large-scale superpixel degradation algorithm , and obtain a large-scale super-pixel image A; where is the large-scale parameter, which indicates the number of regions into which the real embroidery image is divided in the large-scale superpixel degradation algorithm; Step S2: Based on the large-scale superpixel image A, execute the small-scale superpixel degradation algorithm , get the super-pixel degraded image ;in, is a small-scale parameter, representing the number of regions into which the real embroidery image is divided in the small-scale superpixel degradation algorithm; Step S3: Degrade the image according to superpixels , and get each superpixel The pixel coordinate set of the area ,in , represents the superpixel number, Represents the number of superpixel regions.
[0034] Among them, the large-scale superpixel degradation algorithm and small-scale superpixel degradation algorithm The processing process includes: Step 1: Image feature extraction; a. Take the real embroidery image Each pixel in Coordinates is the spatial feature of the pixel, expressed as ; b. The real embroidery image Convert to Lab space and take the pixel point in Lab space Channel values at position Pixel The color feature is expressed as ; c. Process the input real embroidery image through the pre-trained UNet model , get the edge intensity feature map , take the pixel point The value at the position is the pixel point The edge strength feature is expressed as ; Among them, the UNet model is pre-trained by a dataset consisting of natural object images and their corresponding edge images; Step 2: Initialize the superpixel center; convert the real embroidery image Divide evenly into square grid area, which is the initial superpixel area, where , represents the scale parameter; let the central pixel of each grid area be the initial superpixel center , , The serial number representing the initial superpixel region; Step 3: Calculate the superpixel center feature; calculate the initial superpixel area The mean of the spatial and color features of the inner pixel is used as the spatial feature of the superpixel center. and color features ; Step 4: Calculate the distance between the pixel and the superpixel center; for the real embroidery image Each pixel in , with the pixel as the center, the length and width are In the window, calculate the pixel With each cluster center point within the window The comprehensive feature distance , whose expression is:
[0035] in, is the Euclidean distance between the two color features, is the Euclidean distance of the spatial features between the two, is the superpixel region consistency factor, It's a pixel The edge strength feature, They are the spatial feature distance weight parameter, the superpixel region consistency factor weight parameter and the edge intensity feature weight parameter; Among them, when executing the large-scale superpixel degradation algorithm, the superpixel region consistency factor The value of is 0. When executing the small-scale superpixel degradation algorithm, the superpixel region consistency factor The values of are as follows:
[0036] Step 5: Update the superpixel center; let each pixel The superpixel center point with the smallest distance to its comprehensive feature is classified as the same superpixel to obtain the current superpixel image , if the current number of iterations does not reach the set value , then return to step 3; Step 6: Output the result; output the Iteration superpixel degraded image .
[0037] The expression of the embroidery design image generation sub-model in step 2 is:
[0038] It includes downsampling stage and upsampling stage, where: Represents the embroidery design image generation sub-model operation, represents the parameters of the embroidery design image generation sub-model; During the downsampling phase: Input superpixel artwork , deep region features are extracted through three layers of convolutional pooling modules with step-by-step downsampling, where each convolutional pooling module includes a convolutional layer, a batch normalization layer, an activation function layer and a pooling layer in sequence; In the upsampling stage: the deep region features extracted in the downsampling stage are gradually upsampled and reconstructed, and a three-layer upsampling module is used to restore the spatial resolution and generate a simulated design image , where each layer module includes an upsampling layer, a convolution layer, a batch normalization layer, and an activation function layer in sequence.
[0039] The expression of the embroidery design image evaluation sub-model in step 2 is:
[0040] The embroidery design image evaluation sub-model includes a texture feature extraction module and an embroidery design image evaluation module, wherein: Represents the embroidery design image evaluation sub-model operation, represents the parameters of the embroidery design image evaluation sub-model; The processing of the texture feature extraction module includes: Step a1: By adjusting the direction and scale parameters of the Gabor filter, a The filter bank of Gabor filters is used to filter the real embroidery image. and simulated design images Perform filtering processing respectively to obtain the real embroidery image texture filtered image and simulated design image texture filtering image ,in Indicates the filter number; Step a2: Use the real embroidery image texture to filter the image and simulated design image texture filtering image Computing texture features of real embroidery images and simulated design image texture features ; The texture feature calculation process is as follows: The pixel coordinate set corresponding to each superpixel region in ,in , Represents the superpixel region number, Represents the number of superpixel areas; extracts the real embroidery image texture filter image and simulated design image texture filtering image Corresponding area The pixel value mean and variance of Real embroidery image texture features and simulated design image texture features ; The processing of the embroidery design image evaluation module includes: The texture features of real embroidery fabric images are respectively and simulated design image texture features Input into a fully connected neural network with a sigmoid function as the output layer to obtain the real embroidery fabric image and simulated design images In each superpixel area Estimated sense of reality rating and , the closer it is to 1, the higher the authenticity of the area.
[0041] In step 2, for the imitation embroidery design images with different resolutions, the principle is to ensure that each superpixel contains no less than 400 pixels. The large-scale parameters in the multi-scale superpixel degradation algorithm module are and small-scale parameters In the application, the setting is flexibly based on this principle.
[0042] The training process of step three is: The embroidery design image generation sub-model and the embroidery design image evaluation sub-model realize the training of the adversarial learning evaluation model of the imitation embroidery design image through adversarial learning; The multi-scale super-pixel degradation algorithm module processes the real embroidery image to obtain the super-pixel degraded image and the super-pixel region division therein, the embroidery design image generation sub-model reconstructs the super-pixel degraded image to obtain the simulated design image, and the embroidery design image evaluation sub-model distinguishes the authenticity of the real embroidery image and the simulated design image region by region; For the divided superpixel areas, alternate training and optimization are performed by constructing the loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model.
[0043] In step 4: Loss function of the embroidery design image generation sub-model Designing images using simulation and real embroidery images The adversarial loss function And the reconstruction loss function Build; Adversarial loss function , reconstruction loss function and the loss function of the embroidery design image generation sub-model The expressions are:
[0044]
[0045]
[0046] in, Represents the adversarial loss function The weight coefficient of Represents the embroidery design image generation sub-model operation; represents the embroidery design image evaluation sub-model operation; Loss function of the sub-model generated by embroidery design image Update the parameters of the embroidery design image generation sub-model .
[0047] Loss function of the embroidery design image evaluation sub-model Through each superpixel area Estimated sense of reality rating and To calculate, the expression is:
[0048] in, represents the number of superpixel regions; The loss function of the sub-model evaluated by the embroidery design image Update the parameters of the embroidery design image evaluation sub-model .
[0049] When the embroidery design image generates the sub-model loss function And the loss function of the embroidery design image evaluation sub-model When it no longer decreases with the training process, the training of the adversarial learning evaluation model for the imitation embroidery design image is completed.
[0050] In step five: the imitation embroidery design image to be evaluated is input into the optimized embroidery design image evaluation sub-model to obtain the evaluation result.
[0051] Embodiment 2 This embodiment provides a method for evaluating the realism of embroidery design images based on multi-scale superpixel adversarial learning. The method is implemented based on the model for evaluating the realism of embroidery design images described in Embodiment 1. The method specifically includes: The embroidery design image to be evaluated is input into the embroidery design image realism evaluation model. First, it is processed by the multi-scale super-pixel degradation algorithm module to obtain a super-pixel degraded image, where the embroidery design image and the super-pixel degraded image are respectively as follows: Figure 2 and Figure 3 As shown; Using the superpixel region coordinate set in the superpixel degraded image , , represents the superpixel number, represents the number of superpixel regions. The embroidery design image evaluation sub-model evaluates the realism of the embroidery design image region by region. The regional scoring results are shown in Figure 4 As shown, each superpixel The rating is , the average realism score calculation formula is:
[0052] According to the above average sense of reality score calculation formula, the average sense of reality score is 0.7120.
[0053] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for evaluating the realism of embroidery design images based on degraded image adversarial learning, characterized in that: The method comprises: Step 1: Collect real embroidery images to build a real embroidery image dataset, denoted as ,in , represents the serial number of the real embroidery fabric image, represents the number of real embroidered fabric images; Step 2: constructing an embroidery design image adversarial learning evaluation model, wherein the embroidery design image adversarial learning evaluation model includes a multi-scale superpixel degradation algorithm module, an embroidery design image generation sub-model and an embroidery design image evaluation sub-model; Step 3: using the data set obtained in step 1 to train the adversarial learning evaluation model of the imitation embroidery design image; Step 4: construct the loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model, and optimize the embroidery design image generation sub-model and the embroidery design image evaluation sub-model respectively during the training process; Step 5: inputting the imitation embroidery design image to be evaluated into the optimized embroidery design image evaluation sub-model to obtain the evaluation result; The multi-scale super-pixel degradation algorithm module processes the input real embroidery image in the following steps: Step S1: Execute large-scale superpixel degradation algorithm , and obtain a large-scale super-pixel image A; where, is the large-scale parameter, which indicates the number of regions into which the real embroidery image is divided in the large-scale superpixel degradation algorithm; Step S2: Based on the large-scale superpixel image A, execute the small-scale superpixel degradation algorithm , get the super-pixel degraded image ;in, is a small-scale parameter, representing the number of regions into which the real embroidery image is divided in the small-scale superpixel degradation algorithm; Step S3: Degrade the image according to superpixels , and get each superpixel The pixel coordinate set of the area ,in , k represents the superpixel number, Represents the number of superpixel regions.
2. The method according to claim 1, characterized in that The large-scale superpixel degradation algorithm and small-scale superpixel degradation algorithm The processing process includes: Step 1: Image feature extraction; a. Take the real embroidery image Each pixel in Coordinates is the spatial feature of the pixel, expressed as ; b. The real embroidery image Convert to Lab space and take the pixel point in Lab space Channel values at position Pixel The color feature is expressed as ; c. Process the input real embroidery image through the pre-trained UNet model , get the edge intensity feature map , take the pixel point The value at the position is the pixel point The edge strength feature is expressed as ; Wherein, the pre-trained UNet model is pre-trained using a dataset consisting of natural object images and their corresponding edge images; Step 2: Initialize the superpixel center; convert the real embroidery image Divide evenly into square grid area, which is the initial superpixel area, , represents the scale parameter; let the central pixel of each grid area be the initial superpixel center point , , The serial number representing the initial superpixel region; Step 3: Calculate the superpixel center feature; calculate the initial superpixel area The mean of the spatial and color features of the inner pixel is used as the spatial feature of the superpixel center. and color features ; Step 4: Calculate the distance between the pixel and the superpixel center; for the real embroidery image Each pixel in , with the pixel as the center, the length and width are In the window, calculate the pixel With each cluster center point within the window The comprehensive feature distance , whose expression is: in, is the Euclidean distance between the two color features, is the Euclidean distance of the spatial features between the two, is the superpixel region consistency factor, It's a pixel The edge strength feature, , and They are the spatial feature distance weight parameter, the superpixel region consistency factor weight parameter, and the edge intensity feature weight parameter; Among them, when executing the large-scale superpixel degradation algorithm, the superpixel region consistency factor The value of is 0. When executing the small-scale superpixel degradation algorithm, the superpixel region consistency factor The values of are as follows: Step 5: Update the superpixel center; let each pixel The superpixel center point with the smallest distance to its comprehensive feature is classified as the same superpixel to obtain the current superpixel image , if the current number of iterations does not reach the set value , then return to step 3; Step 6: Output the result; output the Iteration superpixel degraded image .
3. The method according to claim 1, characterized in that: The embroidery design image generation sub-model in step 2 includes a downsampling stage and an upsampling stage, and its expression is: in, Represents the embroidery design image generation sub-model operation, represents the parameters of the embroidery design image generation sub-model; In the downsampling stage: Input superpixel artwork , deep region features are extracted through three layers of convolutional pooling modules with step-by-step downsampling, where each convolutional pooling module includes a convolutional layer, a batch normalization layer, an activation function layer and a pooling layer in sequence; In the upsampling stage: the deep region features extracted in the downsampling stage are gradually upsampled and reconstructed, and a three-layer upsampling module is used to restore the spatial resolution and generate a simulated design image , where each layer module includes an upsampling layer, a convolution layer, a batch normalization layer, and an activation function layer in sequence.
4. The method according to claim 1, characterized in that The embroidery design image evaluation sub-model in step 2 includes a texture feature extraction module and an embroidery design image evaluation module, and its expression is: in, Represents the embroidery design image evaluation sub-model operation, represents the parameters of the embroidery design image evaluation sub-model; The processing process of the texture feature extraction module includes: Step a1: By adjusting the direction and scale parameters of the Gabor filter, a A filter bank of Gabor filters for real embroidery images and simulated design images Perform filtering processing respectively to obtain the real embroidery image texture filtered image and simulated design image texture filtering image ,in Indicates the parameter group number; Step a2: Use the real embroidery image texture to filter the image and simulated design image texture filtering image Computing texture features of real embroidery images and simulated design image texture features ; The texture feature calculation process is as follows: The pixel coordinate set corresponding to each superpixel region in ,in , Represents the superpixel region number, Represents the number of superpixel areas; extracts the real embroidery image texture filter image and simulated design image texture filtering image Corresponding area The pixel value mean and variance of Real embroidery image texture features and simulated design image texture features ; The processing process of the embroidery design image evaluation module includes: The texture features of real embroidery fabric images are respectively and simulated design image texture features Input into a fully connected neural network with a sigmoid function as the output layer to obtain the real embroidery fabric image and simulated design images In each superpixel area Estimated sense of reality rating and , the closer it is to 1, the higher the authenticity of the area.
5. The method according to claim 1, characterized in that The training process of step three is: the embroidery design image generation sub-model and the embroidery design image evaluation sub-model implement the training of the embroidery design image adversarial learning evaluation model through adversarial learning; The multi-scale super-pixel degradation algorithm module processes the real embroidery image to obtain the super-pixel degraded image and the super-pixel region division therein, the embroidery design image generation sub-model reconstructs the super-pixel degraded image to obtain the simulated design image, and the embroidery design image evaluation sub-model distinguishes the authenticity of the real embroidery image and the simulated design image region by region; For the divided superpixel areas, alternate training and optimization are performed by constructing the loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model.
6. The method according to claim 1, characterized in that The loss function of the embroidery design image generation sub-model Designing images using simulation and real embroidery images The adversarial loss function And the reconstruction loss function Build; Adversarial loss function , reconstruction loss function and the loss function of the embroidery design image generation sub-model The expressions are: in, Represents the adversarial loss function The weight coefficient of Represents the embroidery design image generation sub-model operation; represents the embroidery design image evaluation sub-model operation; Loss function of the sub-model generated by embroidery design image Update the parameters of the embroidery design image generation sub-model .
7. The method according to claim 1, characterized in that The loss function of the embroidery design image evaluation sub-model Through each superpixel area Estimated sense of reality rating and To calculate, the expression is: in, represents the number of superpixel regions; The loss function of the sub-model evaluated by the embroidery design image Update the parameters of the embroidery design image evaluation sub-model .
8. The method according to claim 1, characterized in that The loss function of the embroidery design image generation sub-model and the loss function of the embroidery design image evaluation sub-model When it no longer decreases with the training process, the training of the imitation embroidery design image adversarial learning evaluation model is completed.
Citation Information
Patent Citations
Objective evaluation method for image quality
CN106023208A
Haptic representation sense of reality objective evaluation method based on human haptic perception feature
CN106408035A
Tactile representation contour rendering reality sense quantitative evaluation method based on feature similarity
CN110764619A
Training method of image evaluation model, image evaluation method and related equipment
CN118015383A
Editable condition printing image generation method
CN119227549A
Cited By
AR-based embroidery method and system, AR glasses and storage medium
CN121433492A
AR-based embroidery method, system, ar glasses, and storage medium
CN121433492B