A garment color generation system and method for human body images

By using generative adversarial network technology, a clothing color generation system was constructed, which solved the problem of color matching automation in clothing design, realized automatic rendering and personalized design of clothing colors, reduced design costs and time, and improved design efficiency.

CN115130390BActive Publication Date: 2026-05-29HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
Filing Date
2022-07-21
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In the current clothing design process, color matching requires manual operation, resulting in high labor costs, time costs, and information asymmetry, making it difficult to automate clothing color design and quickly respond to market trends.

Method used

A clothing color generation system is constructed using generative adversarial network (GAN) technology. Through a color feature extraction module and a generator-discriminator structure, automatic color rendering from reference materials to clothing areas is achieved. The system is trained using multiple auxiliary loss functions to generate realistic local color rendering images of the human body.

Benefits of technology

It automates and personalizes clothing color design, reduces design and time costs, preserves the texture features of clothing areas, supports color transfer between different patterns, and improves design efficiency and image generation quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130390B_ABST
    Figure CN115130390B_ABST
Patent Text Reader

Abstract

A garment color generation system and method for human body images belong to the field of garment auxiliary design. In view of the problem of garment automatic coloring, a human body image dataset is first constructed, including original human body images, local gray human body images and corresponding human body analysis images; then a locally controllable garment color generation system is designed, including a color feature extraction module and a color generation adversarial network. The color feature extraction module extracts the color matching scheme from the reference material and generates the color feature map, realizing the local controllability of color rendering. The color generation adversarial network includes a generator with a "double encoder-single decoder" structure and a discriminator, and the generator fuses human body features and color features to automatically color the garment area in the human body image. The color generation system adopts the generator and discriminator in an adversarial manner for training, and is matched with various auxiliary loss functions, realizing high-quality human body image generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of generative adversarial models and relates to the field of clothing auxiliary design. In particular, it relates to a method for generating clothing colors based on human body images. The method uses human body images, human body analysis diagrams, and reference materials as the most basic inputs. Background Technology

[0002] Today, with the improvement of people's living standards, the function of clothing is no longer just about keeping warm and covering the body; it also needs to meet the wearer's need to express their individuality in terms of design. A crucial task in clothing design is color selection. Color is the first impression clothing gives and determines its overall style and suitable occasion. In everyday life, color matching is also a major consideration for ordinary people pursuing fashion. In clothing color matching concepts, color harmony can improve the overall look, color contrast can highlight the visual focus, and the area of ​​color blocks can showcase the layering of the clothing. The overall tone of clothing can highlight the wearer's temperament and atmosphere, such as the gentleness of brown, the vibrancy of orange, or the fortitude of black. Color schemes are also closely related to the season and occasion; for example, cool colors are suitable for summer to convey a sense of coolness, while dark colors are preferred for meetings and ceremonies to convey solemnity. Mastering the use of primary, secondary, and accent colors in clothing is also a key point in color design. In the traditional design process, designers use design-aided software such as Photoshop or AutoCAD to manually fill in color matching materials onto sample garment sketches. However, this design process incurs certain labor costs, trial-and-error costs, and time costs. On the design service side, designers' creative efficiency, communication efficiency, and training costs are limited by the operational difficulty of professional R&D tools such as Photoshop. On the consumer side, market preferences and trends update very rapidly, easily causing information asymmetry between supply and demand, ultimately leading to inventory backlogs throughout the industry chain. Therefore, digital R&D in apparel design has broad development prospects. With the rapid development of artificial intelligence technology, applying relevant knowledge in the field of computer vision can simplify some steps in the apparel design process.

[0003] Generative adversarial networks (GANs) possess powerful image generation capabilities, and numerous studies have applied them to image transformation tasks, including image coloring. Currently, AI-based automated image coloring tasks can be divided into two types: coloring without guidance and coloring with guidance. Clothing color design can be considered a type of coloring with guidance. In traditional design processes, designers' color inspiration often comes from experience and historical materials. After inspiration is generated, professional software is used to fill in the color scheme onto the clothing. However, current coloring networks require manual addition of guidance information to the image and lack a conversion process from reference materials to color schemes, making it difficult to achieve complete automation of clothing color design. To automate the entire clothing coloring task, relevant image processing techniques can be used to extract color schemes from reference materials. Reference materials can be any selected image, such as natural landscapes or artistic images. Then, GAN technology is applied to automatically render the color scheme onto the clothing image. To achieve better clothing display effects, human model images can be used as the rendering object.

[0004] From initial inspiration to the creation of a digital sample garment, designers only need one short step, eliminating intermediate processes such as color picking and application, and avoiding the use of traditional design-aided software. This significantly shortens development time and avoids human error. Furthermore, the method proposed in this invention lowers the design threshold, achieving complete automation for simple color matching tasks and allowing for transfer between different garment patterns. This reduces design and time costs on the production side, freeing up resources for more advanced design tasks such as texture and printing. Summary of the Invention

[0005] This invention proposes a system and method for generating clothing colors from human images. This method achieves locally controllable color rendering of human images by altering only the color features of the clothing area without destroying its original texture characteristics. Based on generative adversarial networks (GANs), the method constructs a color generation system that takes a human image, a human anatomy diagram, and reference materials as input. The reference materials serve as the source of color features, while the human anatomy diagram can be used to specify the rendering area. The system outputs a human image with the clothing area rendered using the reference materials. Based on this system, not only can diverse human images with varied clothing colors be generated, but the specific areas for color generation can also be manually specified, such as tops, pants, and shoes.

[0006] The clothing color generation system includes a color feature extraction module and a color generative adversarial network (GAN). The color feature extraction module converts the reference material into a local color feature map based on the color distribution in the reference material and the location of clothing in the human body image. The GAN includes a generator and a discriminator. The generator, using a dual-encoder-single-decoder structure, fuses color features and human body features to achieve color rendering of the clothing area in the human body image. The discriminator predicts the realism of the human body image and, during network training, encourages the generator to improve the quality of the generated human body image.

[0007] Furthermore, the color feature extraction module comprises three parts: a color clustering module, a color feature encoder, and a color feature broadcasting module. The color clustering module uses the K-means algorithm to cluster the pixels of the reference material and extract the dominant color system, eliminating useless color information. The color feature encoder converts the dominant color system into a one-dimensional color feature vector. The color feature broadcasting module broadcasts the color feature vector to the target area, thereby establishing a spatial correspondence between the color features and the target clothing area, reducing the interference of color features on other areas during the generation of the target human body image, and obtaining a local color feature map with the same dimensions as the human body image but a different number of channels.

[0008] Furthermore, the generator comprises three parts: a dual encoder module, a residual network module, and a human feature decoder. The dual encoder module includes a human feature encoder and a color feature encoder, both with identical structures, consisting of four sets of downsampled convolutional layers. As the number of layers increases, the number of channels in the feature maps output by the convolutional layers also increases exponentially. Each layer output of the dual encoder undergoes bidirectional feature fusion via a SPADE module, which preserves semantic information during the image feature fusion process through a spatial adaptive normalization layer. The residual network module consists of eight residual blocks, each containing two sets of convolutional layers, an instance normalization layer, and a ReLU activation layer. A skip connection structure is used between the input and output of the residual blocks to enhance network performance and mitigate the gradient vanishing problem. The human feature decoder consists of four sets of upsampled deconvolutional layers. As the number of layers increases, the number of channels in the feature maps output by the deconvolutional layers decreases exponentially, decoding the human image of the clothing area after color rendering.

[0009] Furthermore, the discriminator consists of five sets of downsampled convolutional layers, outputting a two-dimensional matrix of size l×c. Each value in this matrix corresponds to a specific receptive field in the generated image, and the discriminator predicts the realism of its corresponding receptive field. Preferably, l is 16 and c is 12.

[0010] Furthermore, the color generative adversarial network is trained end-to-end. Through the game between the generator and the discriminator, the generative adversarial loss is continuously reduced, thereby generating realistic human images with local color rendering. In addition to the generative adversarial loss, the training process also includes reconstruction loss and perceptual loss to assist in generative adversarial training. The reconstruction loss is used to penalize the pixel distance between the generated human image and the original human image, and the perceptual loss penalizes the semantic information gap between the generated human image and the original human image.

[0011] In addition, the present invention provides a method for generating clothing colors based on human body images, comprising the following steps:

[0012] A. Constructing a human image dataset: Construct a human image dataset containing original human information, local grayscale human information, and human analysis information.

[0013] B. Design Color Feature Extraction Module: The color feature extraction module converts the reference material into a local color feature map based on the color distribution in the reference material and the position of clothing in the human body analysis diagram.

[0014] C. Design of a color generation adversarial network: The color generation adversarial network includes a generator and a discriminator. The generator uses a "dual encoder-single decoder" structure to fuse color features and human body features to achieve color rendering of clothing areas in human body images. The discriminator predicts the realism of human body images and prompts the generator to improve the generation quality of human body images during network training.

[0015] D. Color Generation Adversarial Network Training: The color generation adversarial network is trained end-to-end. Through the game between the generator and the discriminator, the adversarial loss function is continuously reduced, thereby generating realistic human images with local color rendering. Furthermore, to improve the quality of the generated images, reconstruction loss and perceptual loss are added to assist in the overall generative adversarial training.

[0016] Specifically, step A includes:

[0017] A1. Using web crawling technology, high-resolution model images are crawled from fashion clothing websites, and the resolution of the model images is adjusted to M×N; using a human body analysis model, an analytical map of the human body corresponding to each human body image is constructed. Preferably, M is 256 or M is 192.

[0018] A2. Using the human body analysis image, select a specific clothing item area in the human body image and convert it to grayscale; then perform grayscale compression on the grayscale area, compressing it from 256 grayscale levels to d grayscale levels, preserving the basic texture and pattern information of the original image, and enhancing the difference between the original image and the local grayscale image. Preferably, d is set to 20.

[0019] Specifically, the color feature extraction module includes a color clustering module, a color feature encoder, and a color feature broadcasting module. Step B includes:

[0020] B1. The color clustering module extracts pixels from the target clothing item area based on the human body analysis map and the original human body image, and uses the K-means algorithm to cluster the pixels; it sorts the cluster centers, selects the r cluster centers with the most associated pixels as the main color system of the clothing item area, and constructs the main color system image.

[0021] B2. The color feature encoder consists of a downsampled fully convolutional network that encodes the dominant color image into a one-dimensional color feature vector. The last convolutional layer of the color encoding module has 256 kernels, therefore the length of the color feature vector is 256.

[0022] B3. The color feature broadcasting module broadcasts the color feature vector to the pixel positions of the target clothing item area based on the human body analysis image, and assigns a value of 0 to the other positions, thereby establishing a spatial correspondence between the color features and the target clothing area, reducing the interference of color features on other areas during the generation of the target human body image, and obtaining a local color feature map with the same length and width as the human body image but a different number of channels; in the model testing stage, the color feature broadcasting module realizes the local controllability of the color generation of the human body image.

[0023] Specifically, the generator comprises three parts: a dual encoder module, a residual network module, and a human feature decoder. Step C includes:

[0024] C1. The dual encoder contains two identical encoder structures: a human feature encoder and a color feature encoder. Both encoders consist of four sets of downsampled convolutional layers. The output of each layer of the dual encoder is subjected to bidirectional feature fusion through the SPADE module. The SPADE module retains the semantic information in the image feature fusion process through a spatial adaptive normalization layer.

[0025] C2. The residual network module consists of eight residual blocks. Each residual block contains two sets of convolutional layers, instance normalization layers, and ReLU activation layers. A skip connection structure is used between the input and output of the residual block.

[0026] C3. The human body feature decoder consists of four sets of upsampled deconvolutional layers. As the number of layers increases, the number of channels in the output feature map of the deconvolutional layer decreases exponentially. The decoder decodes the human body image after color rendering of the clothing area. The human body image has the same size and the same number of channels as the original human body image.

[0027] C4. The discriminator receives a human image after local color rendering and predicts the realism of the image. The discriminator consists of five sets of downsampled convolutional layers and outputs a two-dimensional matrix of size l×c. Each value in the matrix corresponds to a specific receptive field in the generated image, and the discriminator predicts the realism of the corresponding receptive field.

[0028] Specifically, step D includes:

[0029] D1. Training the discriminator; during this process, the generator weights are fixed; the discriminator judges the authenticity of the original human image and the generated human image, and tries to judge the original image as real and the generated image as fake; during the discriminator training process, the generative adversarial loss is calculated and the Adam optimizer is used to update the discriminator weights.

[0030] D2. Training the generator; during this process, the discriminator weights are fixed, and the generative adversarial loss, reconstruction loss, and perceptual loss are calculated; wherein, the generative adversarial loss is used to guide the generator to generate more realistic human images, so that the discriminator will judge the generated images as real as possible; the reconstruction loss represents the pixel distance between the generated human image and the original human image, and the perceptual loss represents the distance between the feature maps of the two calculated by VGG19; the reconstruction loss and the perceptual loss are used to assist in generative adversarial training; during the discriminator training process, the Adam optimizer is used to update the generator weights.

[0031] The beneficial effects of this invention are as follows: This invention designs a color generation system and, based on the system, proposes a method for generating clothing colors from human images. Given a human image and a reference image, this color generation system can generate a locally color-rendered human image, where the rendered clothing area can be manually specified. By changing the reference image, the color scheme of the clothing can be arbitrarily customized, achieving personalized clothing color design. In particular, to achieve local controllability of the rendering area, a color feature extraction module is introduced as a preprocessing module for the reference image. To fuse color features and human features, a generative adversarial network structure of "dual encoder-single decoder" is used. This structure can effectively preserve the texture and pattern information of the original human image, rendering only the local color features of the human image. Training is performed through a game between the generator and the discriminator, and various auxiliary loss functions are introduced to improve the quality of the generated human image. Attached Figure Description

[0032] Figure 1 This is a framework diagram of the clothing color generation system based on human body images according to the present invention.

[0033] Figure 2 This is a flowchart of the clothing color generation method based on human body images according to the present invention. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0035] Appendix Figure 1 This is a framework diagram of the clothing color generation system based on human body images according to the present invention, with appended... Figure 2 A flowchart of the clothing color generation method for human body images provided by the present invention is shown, and its details are as follows.

[0036] Step S1: Constructing a human image dataset. The human image dataset used in this invention comes from the website www.zalando.com, a large online e-commerce platform mainly selling clothing and shoes. Over 60,000 high-resolution model images were crawled from this website, cleaned, and used to construct a dataset containing 19,323 model images. The upper body clothing in the model images consists of single items, including shirts, T-shirts, and sweaters. The ratio of male to female model images is approximately 2:1. To reduce memory usage during training, the resolution of all model images was adjusted to 256×192.

[0037] The MMAN network was used to parse the human image dataset, obtaining a human anatomy map for each image. Each anatomy map contains 18 labels, including parts such as tops, pants, and skirts, with each label represented by a different RGB pixel value. Based on the anatomy map, the top area of ​​the human image was grayscaled, and then grayscale compression was performed on the grayscale area, reducing it from 256 grayscale levels to 20 grayscale levels. This step ultimately constructs a set of anatomy maps X = {x} from the original human images. 1 x 2 , ..., x n Localized grayscale human body image and human body analysis images The training dataset consists of n, where n represents the number of human images in the dataset.

[0038] Step S2: Design the color feature extraction module. The function of the color feature extraction module is to generate local color feature maps corresponding to the locally grayscale human body image. This module consists of three sub-parts: a color clustering module, a color feature encoder, and a color feature broadcasting module. For example... Figure 1 As shown, the color feature extraction module can convert any reference material into a local color feature map, represented as... Where Y = {y 1 y 2 , ..., y n} represents a set of reference materials. It is represented as a set of local color feature maps.

[0039] First, the color clustering module in C performs K-means clustering on the pixels in y, sorts the cluster centers to obtain the dominant color scheme in y, and constructs a dominant color scheme image according to the proportions. Then, the color encoder in C converts the dominant color scheme image into a one-dimensional feature vector of length 256. Finally, the color feature broadcasting module in C finds x. p The target region is selected, the color feature vector is broadcast to that region, and the values ​​of other regions are set to 0, resulting in an image with a size of x. p The same, a local color feature map with 256 channels.

[0040] Step S3: Design a color generation adversarial network. This invention proposes a color generation adversarial network, comprising a generator G and a discriminator D, the network structure of which is as follows: Figure 1 As shown in the diagram, the generator G is designed based on the structure of an autoencoder. It first embeds human body features and color features into a low-dimensional feature space, and then reconstructs high-dimensional image features from the low-dimensional features. Specifically, the generator G is a "dual encoder-single decoder" structure, consisting of three parts: a dual encoder module e, a residual network module R, and a human body feature decoder F. p The dual encoder module E can also be divided into a human feature encoder E. p A color feature encoder E c And the SPADE module. The dual encoder module receives the local color feature map y. c and local grayscale human body image x gray E c and E p Feature encoding is performed on both separately. c and E p Each convolutional layer's output feature map undergoes feature fusion via the SPADE module, ensuring a high degree of integration between shallow semantic features and deep detail features of the human body and color features. The final output of the dual encoder is then combined with the color-fused human body features w.p The entire process can be represented as w p =E(y) c x gray Next, the residual network module receives human features w. p And further feature extraction is performed on it. F p The final feature decoding will be performed, resulting in a human image with the clothing area rendered in color. The entire decoding process can be represented as A set of original human body images X = {x 1 x 2 , ..., x n Finally, a set of color-rendered human body images is generated.

[0041] Discriminator D is used to determine the generated image The authenticity. D will be on Perform a full convolution operation. After five convolutional layers, output a two-dimensional matrix of size 16×12. Each value in the matrix represents the real probability of the corresponding receptive field, ranging from 0 to 1.

[0042] Step S4: Color Generation Adversarial Network Training. The color generation adversarial network proposed in this invention is trained through a game and adversarial process between the generator and the discriminator. Its objective function is mainly an adversarial loss function, with additional reconstruction loss and perceptual loss to assist in training.

[0043] The purpose of the adversarial loss function is to improve the image generation quality of the generator G and enhance the discriminator D's ability to distinguish between real and fake data. During training, both continuously learn and improve, prompting the generator G to generate highly realistic human images. The adversarial loss function can be expressed as:

[0044]

[0045] Where D(x) represents the discriminator D's prediction of the authenticity of the original human image x. This indicates that the discriminator D generates human images. True predicted value, x ~ p data (X) indicates that x is sampled from the distribution of X. express from Sampling from the distribution, It indicates a desire for the expected value.

[0046] The reconstruction loss is calculated based on the pixel distance between the generated image and the target image. It can penalize the color difference between the generated image and the target image, and its specific form is as follows:

[0047]

[0048] in, Represents the original human body image x and the generated human body image x. The L1 norm distance between them.

[0049] The perceptual loss calculates the perceptual feature distance between the generated image and the target image. These perceptual features are extracted using a pre-trained VGG19 network. The perceptual loss penalizes the semantic information gap between the generated and target images, and its specific calculation method is as follows:

[0050]

[0051] Where, φ j (x) represents the feature map output by the j-th layer of the network after x is input into VGG19.

[0052] The final overall objective loss function can be expressed as:

[0053]

[0054] Where λ1 and λ2 represent the proportions of reconstruction loss and perception loss in the overall loss, respectively.

[0055] During training, both the generator G and the discriminator D use the Adam optimizer to update the network weights, with a learning rate of 5×10⁻⁶. -5 In each training round, the same batch of data is input into the network twice. The first time, the discriminator D is trained, and its weights are updated. The second time, the generator G is trained, and its weights are updated. Through continuous iteration, the target loss function is eventually minimized.

[0056] The main contributions of this invention are as follows: (1) This invention constructs a human image dataset, crawls model images from fashion clothing websites using web crawling technology, and constructs human image analysis maps and locally grayscale human images corresponding to the model images using a human image analysis model. (2) This invention proposes a method for generating clothing colors based on human images for designer-assisted design. The color feature extraction module can extract color schemes from reference materials and generate color feature maps, avoiding the tedious steps of manual color selection. The dual-input color generative adversarial network can fuse human images with color feature maps and control color rendering onto any clothing item in the human image, realizing automatic color filling. The entire color generation system is trained using a generative adversarial strategy and is equipped with various auxiliary loss functions to achieve high-quality human image generation.

[0057] 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, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A clothing color generation system based on human body images, characterized in that, It includes a color feature extraction module and a color generative adversarial network. The color feature extraction module converts the reference material into a local color feature map based on the color distribution in the reference material and the clothing position in the human body analysis diagram. The color feature extraction module includes a color clustering module, a color feature encoder and a color feature broadcasting module. The color clustering module extracts the main color distribution of the reference material using the K-means algorithm and excludes useless color information. This includes: the color clustering module extracts the pixels of the target clothing item area based on the human body analysis diagram and the original human body image, and uses the K-means algorithm to cluster the pixels; the cluster centers are sorted, and the r cluster centers with the most associated pixels are taken as the main color system of the clothing item area, and a main color system image is constructed. The color feature encoder consists of a downsampled fully convolutional network that encodes the dominant color image into a one-dimensional color feature vector. The color feature broadcasting module broadcasts color feature vectors to the pixel positions of the target clothing item area based on the human body analysis image, and assigns a value of 0 to the remaining positions, establishing a spatial correspondence between the color features and the target clothing area. This reduces the interference of color features on other areas during the generation of the target human body image, and obtains a local color feature map with the same length and width as the human body image but a different number of channels. During the model testing phase, the color feature broadcasting module realizes the local controllability of human body image color generation. The color generative adversarial network includes a generator and a discriminator. The generator uses a dual encoder-single decoder structure to fuse color features and human body features to render the color of clothing areas in human body images. During network training, the discriminator predicts the realism of human body images.

2. The clothing color generation system as described in claim 1, characterized in that, The generator comprises three parts: a dual encoder module, a residual network module, and a human feature decoder. The dual encoder module includes a human feature encoder and a color feature encoder, both with identical structures consisting of four downsampled convolutional layers. The output of each layer of the dual encoder undergoes bidirectional feature fusion via a SPADE module, which preserves semantic information during the image feature fusion process through a spatial adaptive normalization layer. The residual network module consists of eight residual blocks, each containing two convolutional layers, an instance normalization layer, and a ReLU activation layer. The input and output of the residual blocks use a skip connection structure. The human feature decoder consists of four upsampled deconvolutional layers. As the number of layers increases, the number of channels in the deconvolutional layer output feature map decreases exponentially. It decodes the human image of the clothing area after color rendering, ensuring that the human image has the same size and number of channels as the original human image.

3. The clothing color generation system as described in claim 1, characterized in that, The discriminator receives a human image after local color rendering and predicts the realism of the image. The discriminator consists of five sets of downsampled convolutional layers and outputs a two-dimensional matrix of size l×c. Each value in the matrix corresponds to a specific receptive field in the generated image, and the discriminator predicts the realism of the corresponding receptive field.

4. The clothing color generation system as described in claim 1, characterized in that, The color generative adversarial network is trained end-to-end. Through the game between the generator and the discriminator, the generative adversarial loss is continuously reduced to generate realistic human images with local color rendering. In addition to the generative adversarial loss, the training process also includes reconstruction loss and perceptual loss to assist in generative adversarial training. The reconstruction loss is used to penalize the pixel distance between the generated human image and the original human image, and the perceptual loss penalizes the semantic information gap between the generated human image and the original human image.

5. A method for generating clothing colors based on human body images, comprising the following steps: A. Constructing a human image dataset: Constructing a human image dataset containing original human information, local grayscale human information, and human analysis information; B. Design Color Feature Extraction Module: The color feature extraction module converts the reference material into a local color feature map based on the color distribution in the reference material and the position of clothing in the human body analysis diagram; The color feature extraction module includes a color clustering module, a color feature encoder, and a color feature broadcasting module; Step B includes: B1. The color clustering module extracts the main color distribution of the reference material using the K-means algorithm and excludes useless color information. This includes: the color clustering module extracts the pixels of the target clothing item area based on the human body analysis diagram and the original human body image, and uses the K-means algorithm to cluster the pixels; the cluster centers are sorted, and the r cluster centers with the most associated pixels are taken as the main color system of the clothing item area, and a main color system image is constructed. B2. The color feature encoder consists of a downsampled fully convolutional network that encodes the dominant color image into a one-dimensional color feature vector. B3. The color feature broadcasting module broadcasts the color feature vector to the pixel positions of the target clothing item area based on the human body analysis image, and assigns a value of 0 to the remaining positions, establishing a spatial correspondence between the color features and the target clothing area, reducing the interference of color features on other areas during the generation of the target human body image, and obtaining a local color feature map with the same length and width as the human body image but a different number of channels; in the model testing phase, the color feature broadcasting module realizes the local controllability of the color generation of the human body image; C. Design of a color generative adversarial network: The color generative adversarial network includes a generator and a discriminator. The generator uses a "dual encoder-single decoder" structure to fuse color features and human body features to achieve color rendering of clothing areas in human body images. During network training, the discriminator predicts the realism of human body images. D. Color Generation Adversarial Network Training: The color generation adversarial network is trained in an end-to-end manner. Through the game between the generator and the discriminator, the generation adversarial loss is continuously reduced to generate realistic human images with local color rendering. In addition, to improve the quality of the generated images, reconstruction loss and perceptual loss are added to assist the overall generation adversarial training.

6. The clothing color generation method as described in claim 5, characterized in that, Step A includes: A1. Use web crawling technology to crawl high-resolution model images from fashion clothing websites and adjust the resolution of the model images to M×N; use human body analysis models to construct the human body analysis map corresponding to each human body image. A2. Using the human body analysis image, select a clothing item area in the human body image and convert it to grayscale; compress the grayscale area from 256 grayscale levels to d grayscale levels, retaining the basic texture and pattern information of the original image, and enhancing the difference between the original image and the local grayscale image.

7. The clothing color generation method as described in claim 5, characterized in that, The generator comprises three parts: a dual encoder module, a residual network module, and a human feature decoder. Step C includes: C1. The dual encoder contains two identical encoder structures: a human body feature encoder and a color feature encoder. Both encoders consist of four sets of downsampled convolutional layers. The output of each layer of the dual encoder is used for bidirectional feature fusion through the SPADE module. The SPADE module retains the semantic information in the image feature fusion process through a spatial adaptive normalization layer. C2. The residual network module consists of eight residual blocks. Each residual block contains two sets of convolutional layers, instance normalization layers, and ReLU activation layers. A skip connection structure is used between the input and output of the residual block. C3. The human body feature decoder consists of four sets of upsampled deconvolutional layers. As the number of layers increases, the number of channels in the output feature map of the deconvolutional layer decreases exponentially. The decoder decodes the human body image after color rendering of the clothing area. The human body image has the same size and the same number of channels as the original human body image. C4. The discriminator receives a human image after local color rendering and predicts the realism of the image. The discriminator consists of five sets of downsampled convolutional layers and outputs a two-dimensional matrix of size l×c. Each value in the matrix corresponds to a specific receptive field in the generated image, and the discriminator predicts the realism of the corresponding receptive field.

8. The clothing color generation method as described in claim 5, characterized in that, Step D includes: D1. Training the discriminator; during this process, the generator weights are fixed; the discriminator judges the authenticity of the original human image and the generated human image, with the goal of judging the original image as real and the generated image as fake; during the discriminator training process, the generative adversarial loss is calculated and the Adam optimizer is used to update the discriminator weights; D2. Training the generator; during this process, the discriminator weights are fixed, and the generative adversarial loss, reconstruction loss, and perceptual loss are calculated. The generative adversarial loss guides the generator to produce more realistic human images, aiming to make the discriminator classify the generated image as real. The reconstruction loss represents the pixel distance between the generated human image and the original human image, and the perceptual loss represents the distance between their feature maps calculated by VGG19. The reconstruction loss and the perceptual loss are used to assist in generative adversarial training. During the discriminator training process, the Adam optimizer is used to update the generator weights.