An intelligent redrawing method and device for clothing texture replacement

By combining depth estimation and edge detection technology with the diffusion model and ControlNet network, the problems of visual artifacts and unnatural transitions in clothing texture replacement are solved, high-quality and diverse texture replacement effects are achieved, and the user experience of clothing design and online shopping is improved.

CN120411294BActive Publication Date: 2025-09-23ZHEJIANG SCI-TECH UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510912497.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-09-23
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

Existing clothing texture replacement technology is prone to visual artifacts and unnatural transition effects when dealing with complex geometric structures, and lacks understanding of three-dimensional geometric structures, resulting in poor texture replacement effects.

Method used

By introducing depth estimation and edge detection technology, combined with the diffusion model and ControlNet additional network, high-quality clothing texture replacement images are generated through four-way continuous texture stitching and super-resolution reconstruction, supporting multi-state input and user interactive adjustment.

Benefits of technology

The generated texture replacement images are visually realistic, rich in details, and have natural transitions, which improves the efficiency and flexibility of clothing design and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411294B_ABST
    Figure CN120411294B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent redrawing method and device for clothing texture replacement. The present invention adopts a structure-guided three-stage generation pipeline. First, the input structure map is enhanced through a super-resolution network to retain the clothing outline; secondly, a four-way continuous texture splicing strategy is introduced, combined with edge continuity loss to improve the seamlessness and naturalness of texture laying; finally, a conditional diffusion model is used to generate high-fidelity, personalized clothing images under the dual guidance of the depth map and the line drawing structure map and the spliced ​​texture map. Compared with the texture migration and virtual dressing methods, the present invention has higher structure retention and texture control capabilities, supports multi-modal input and diversified image editing, and improves the realism, controllability and application scalability of clothing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer graphics, image processing and clothing design, and in particular to an intelligent redrawing method and device for clothing texture replacement, which is used to efficiently generate high-quality clothing texture replacement images in a virtual environment to enhance the online shopping experience and improve clothing design efficiency. Background Art

[0002] In the field of apparel design and display, texture replacement technology has long been an important means of improving visual effects and design efficiency. Early texture replacement methods primarily relied on traditional image editing tools, such as Adobe Photoshop, which manually adjusted and synthesized images to achieve texture replacement. However, this method is not only time-consuming and labor-intensive, but also requires specialized image processing skills, making it difficult to meet the demands of large-scale production and rapid design iteration. With the development of computer graphics, automated texture replacement techniques based on image processing algorithms have gradually emerged. These techniques automatically map and replace textures by calculating the geometric and textural features of images, significantly improving efficiency. However, these early automated methods often suffer from distortion and unnatural transitions when dealing with complex 3D geometric structures and texture details, especially at the edges and wrinkles of clothing.

[0003] In recent years, with the rapid development of deep learning technology, deep learning-based texture replacement methods have gradually become a research hotspot. Leveraging technologies such as convolutional neural networks (CNNs) and generative adversarial networks (GANs), these methods can automatically achieve high-quality texture replacement results and, to a certain extent, address the limitations of traditional methods. For example, some studies have used the predicted normal information of clothing surfaces to guide texture mapping, thereby improving the realism and physical plausibility of texture replacement. Furthermore, GAN-based texture generation methods can generate a variety of texture styles, providing designers with more creative options. However, despite significant progress in texture generation quality and design flexibility, these methods still face several key challenges that need to be addressed.

[0004] In the field of clothing texture replacement, accurate UV map estimation is crucial for achieving realistic texture replacement and editing. Recent research utilizing dense UV map estimation has significantly improved the quality of clothing image generation and design flexibility. For example, the Color-Mood-Aware Clothing Re-texturing study uses an emotional classification algorithm to classify clothing textures and employs HSV color space transfer to effectively preserve the lighting and shading effects of the original photo. This approach not only enhances the visual expressiveness of textures but also considers emotional responses, introducing a new emotional dimension to clothing re-texturing technology. The Normal-guided Garment UV Prediction for Human Re-texturing study predicts surface normals to guide UV map estimation, enabling physically plausible editing without 3D reconstruction. This method captures the underlying geometry of clothing through self-supervised learning and predicts temporally coherent UV maps, significantly improving performance and achieving remarkable results on real-world images, providing a new technical path for this field. In addition, research such as DiffuseIT and DiffFashion has further improved the realism and diversity of texture replacement through techniques such as matching language attribute phrases with visual clothing parts, unsupervised structure-aware transmission, and feature modulation fusion. Although previous UV methods have shown potential in texture replacement, they often produce visual artifacts due to a lack of understanding of three-dimensional geometric structures, resulting in poor texture replacement results at the edges of clothing.

[0005] To address the above issues, the present invention proposes an intelligent redrawing method and device for clothing texture replacement. By introducing depth estimation and edge detection technology, the present invention can better understand the three-dimensional geometric structure of clothing, so that in the texture replacement process, these geometric information can be used to guide the generation and alignment of textures, avoiding visual artifacts and unnatural transitions. At the same time, a diffusion model is used for texture redrawing, and the generated texture is significantly superior to existing methods in terms of details and realism. By introducing The additional network further enhances the spatial consistency and structural consistency of the generated texture. The present invention supports polymorphic input, allowing users to quickly generate personalized texture replacement effects through simple parameter adjustments and input selection. Furthermore, the present invention provides an efficient image pre-processing and post-processing process, making the entire texture replacement process more automated and user-friendly.

[0006] This paper introduces a diffusion model and a ControlNet add-on network to propose an innovative method for replacing clothing textures. This method effectively addresses key challenges in existing technologies and achieves high-quality, diverse clothing texture replacement effects. This method allows consumers to more realistically experience the textures and effects of clothing in a virtual environment, while also enabling fashion designers to quickly generate multiple design options, improving design efficiency and creativity. This invention not only provides new technical solutions for clothing design and online shopping, but also offers new insights and methods for the development of computer graphics and image processing technologies. Summary of the Invention

[0007] The present invention aims to address the shortcomings of existing technologies by providing an intelligent redrawing method and device for clothing texture replacement, improving the realism, flexibility, and efficiency of clothing texture replacement while enhancing the user experience. By replacing the surface texture to redraw the image of a fashion item while preserving the geometric details of the original item, the present invention can efficiently generate high-quality clothing texture replacement images, meeting the demand for personalized and diversified design in the fields of clothing design and online shopping. This invention not only solves the problems existing in the existing technology but also provides new technical ideas and solutions for the field of clothing texture replacement.

[0008] The object of the present invention is achieved through the following technical solution: an intelligent redrawing method for clothing texture replacement, the method comprising the following steps:

[0009] Step 1: Obtain the original clothing image and its corresponding texture and structure guidance information;

[0010] Step 2: Perform image super-resolution processing on the original clothing. The original low-resolution image is enlarged to high-definition resolution through block processing and divided into multiple overlapping sub-regions, so that all enhanced sub-regions are seamlessly aggregated into the output at the target resolution.

[0011] Step 3: Perform four-way continuous texture splicing on the clothing area, and perform region division, texture mapping and edge fusion operations based on the four-way continuity principle;

[0012] Step 4: Generate a depth map and line drawing through edge detection and depth estimation, and input the results as control conditions into the diffusion model containing the ControlNet network to perform a multi-step diffusion process to generate a high-quality image;

[0013] Step 5: Process through CLIP integrator to generate descriptive prompts, use the text-based image model for texture remapping and output high-fidelity clothing images.

[0014] Furthermore, step one requires obtaining the original clothing image, replaceable related textures, keywords describing the target clothing type, and descriptive words used to enhance the generation effect.

[0015] Furthermore, in step 2, image super-resolution processing is performed to restore the fine-grained texture and structural elements of the low-resolution image; specifically, the original low-resolution image is first enlarged to a high-definition resolution by block processing. HD ; Divide the image into n×n blocks, the size of each block is pixels to meet the standard net size required for SDXL redrawing; the enlarged image is then divided into multiple overlapping sub-areas , each sub-region maintains a certain overlap ratio.

[0016] Furthermore, in step 2, all enhanced sub-regions are seamlessly aggregated. to HD resolution res HD High-definition image output under unified high definition I HD , enhanced high-definition image I HD The clothing mask M is obtained by semantic segmentation using the SAM method of item-specific descriptors. item And the alpha channel of the non-single-item area is set to be blurred to synthesize the clothing mask image I mask .

[0017] Furthermore, in step three, correlated texture diffusion is performed, and a four-way continuous texture splicing strategy is introduced, combined with edge continuity loss to improve the seamlessness and naturalness of texture paving; first, the four-way continuous texture is refined through partial enhanced redrawing, followed by adaptive tiling based on the optimized four-way continuous texture. At the same time, SDXL's constrained partial redrawing technology is deployed, and edge-aware operators are used to enable the original texture map to be grid-based segmented and reorganized through a computational transformation process. For non-isometric inputs, size normalization is achieved through adaptive centroid cropping, and then the tiling operation is performed.

[0018] Furthermore, in step 3, a composite grid is assembled from standardized texture units, and then squares based on the cropping size are extracted, and the transition area is regenerated at the boundary. In order to establish the spatial correspondence between the tiled texture and the target object, resolution matching is performed, which is formally expressed as:

[0019]

[0020] Among them, T processed is the texture pattern after processing, Represents adaptive geometric scaling, copying the grid matrix to generate a synthetic image I merge The shortest side of the image is proportionally matched to the high-definition image I HDThe longest dimension of , ensuring that the source texture covers more than the target area; the subsequent The operator extracts the image with the HD resolution res by sampling the center-aligned window. HD The area of ​​​​the image is overlapped to achieve dimensional consistency between the texture and the target object input; then, the mask-guided alpha channel synthesis is performed to obtain the overlapping image I overlay .

[0021] Furthermore, in step 4, the generation stage of the diffusion model first uses the Canny edge detection algorithm to detect the clothing mask image I mask Perform edge detection and generate texture line drawing C real ; High Definition Clothing Graphics I HD Perform depth estimation and generate depth map D real ; Then the texture line drawing C real and depth map D real Enter ControlNet for conditional synthesis.

[0022] Furthermore, in step 4, the generation phase of the diffusion model uses the ControlNet additional network to enhance the generation effect of the diffusion model and restore the details of the clothing; this architecture implements weight specialization between different ControlNet modules, where the edge processing branch adjusts the edge weight w through the parameter canny Optimize to keep the outline, the depth analysis branch passes the depth weight w depth Calibration is performed to achieve three-dimensional consistency; this two-branch conditional mechanism enables the diffusion model to perform spatially consistent remapping while maintaining the structural integrity of the original objects, ultimately achieving high-fidelity remapping through geometrically constrained synthesis.

[0023] Furthermore, in step 5, the texture is redrawn using the SDXL model, and the original texture image is processed by the CLIP integrator to generate a descriptive hint P prompt , encapsulating texture features; these semantic cues are then combined with the classification keyword K of the target item type item and enhanced instructions G for optimizing redraw strength boost Combined, through the structured text conditional pipeline , generate text conditions that enhance the redraw effect ; SDXL in overlapping image I overlay Clothing mask M item Perform local texture synthesis on the image, preserving non-target areas through latent space regularization:

[0024]

[0025]

[0026] in, Represents the central U-Net architecture in Stable Diffusion XL; the model receives the noisy latent representation z at time step t t , through the text conditions of ControlNet and spatial constraint enhancement, synthesis produces redrawn output I repaint .

[0027] On the other hand, the present invention also provides an intelligent redrawing device for replacing clothing textures, comprising a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, the intelligent redrawing method for replacing clothing textures is implemented.

[0028] The main advantages of the present invention include:

[0029] (a) High-quality texture replacement: By combining the diffusion model and ControlNet, the generated texture replacement images are more visually realistic, with rich details and natural transitions.

[0030] (b) Efficiency: The adoption of block processing and super-resolution reconstruction techniques significantly improves image processing efficiency and is suitable for large-scale clothing texture replacement tasks.

[0031] (c) Flexibility: Supports polymorphic input. Users can flexibly generate texture replacement effects of different styles by adjusting replaceable texture patterns, clothing keywords, and effect gain words.

[0032] (d) Enhanced user interaction experience: The present invention provides a user-friendly interface that allows users to adjust texture parameters such as texture density, color saturation, etc. in real time to meet the needs of different users. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The figure is a flowchart of an intelligent redrawing method for replacing clothing textures in one embodiment of the present invention.

[0034] Figure 2 The present invention provides an explanation of splicing and cropping texture images in an intelligent redrawing method for clothing texture replacement in one embodiment of the present invention.

[0035] Figure 3 The present invention provides an architecture for synthesizing quadrilateral continuous textures in an intelligent redrawing method for clothing texture replacement according to an embodiment of the present invention.

[0036] Figure 4 This is a comparison result of recreating a fashion item using multiple texture images in one embodiment of the present invention.

[0037] Figure 5 The retexturing results using different scaling sizes in one embodiment of the present invention are shown.

[0038] Figure 6 This is a structural diagram of an intelligent redrawing device for replacing clothing textures according to the present invention. DETAILED DESCRIPTION

[0039] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. It should be noted that, in the claims and specification of the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment comprising a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "comprising a" do not exclude the presence of other identical elements in the process, method, article or equipment comprising the elements.

[0040] All documents mentioned in this application are incorporated herein by reference, just as if each document were incorporated herein by reference individually. It should also be understood that after reading the above teachings of the present invention, those skilled in the art may make various changes or modifications to the present invention, and that such equivalents also fall within the scope of the claims appended hereto.

[0041] The present invention proposes an intelligent redrawing method for clothing texture replacement, which can be used in the fields of clothing design, virtual fitting, online shopping, etc. to enhance the visual effects and user experience of clothing images. This technology uses innovative image redrawing technology to replace the target texture pattern with the specified area of ​​the clothing model image, generating a high-quality clothing image with new texture details. Taking clothing texture replacement as an example, the present invention specifically includes: inputting a clothing model image and a target texture pattern; preprocessing the input image, including super-resolution reconstruction, semantic segmentation and other operations; performing four-way continuous processing and tiling processing on the target texture pattern to adapt it to the characteristics of the clothing image; overlaying the processed texture pattern with the clothing image to generate a model base image with texture features; and redrawing the model base image with texture features using a diffusion model to generate a clothing model image with new texture details.

[0042] Figure 1This is a flowchart of an intelligent redrawing method for clothing texture replacement in one embodiment of the present invention. The method includes the following steps: Step 1: Inputting a clothing model image and a target texture pattern; Step 2: Super-resolution reconstruction of the input image, semantic segmentation of the super-resolution reconstructed image, and obtaining a clothing mask; Step 3: Four-way continuous processing and tiling of the target texture pattern, and overlaying the processed texture pattern with the clothing image; Step 4: Inputting the depth map and line drawing image as control conditions into a ControlNet-based diffusion model, executing a multi-step diffusion process to generate a high-quality image; Step 5: Redrawing the overlaid image using the diffusion model to generate a clothing model image with new texture details.

[0043] Specifically, the present invention provides an intelligent redrawing method for clothing texture replacement. Figure 1 The embodiment includes the following steps:

[0044] Step 1: The user selects a high-definition clothing model image and a target texture pattern. For example, the user selects a shoe image I low With texture pattern I texture These two inputs are the basis for subsequent processing. The model image provides the shape and structure information of the clothing, while the texture pattern provides the texture details that need to be replaced.

[0045] Step 2: In step 2, since the pre-processing of fashion item images prioritizes improving data quality to achieve clear semantic segmentation results, in order to obtain accurate mask areas for specified fashion items and ensure segmentation accuracy, the present invention first addresses the basic need of improving the resolution of the input image. This quality enhancement is crucial because high-definition images retain basic visual details that support better boundary detection and semantic interpretation. To this end, in this resolution refinement process, the present invention uses SDXL redrawing technology to perform image super-resolution (SR) processing, so that fine-grained texture and structural elements can be successfully restored in low-quality input images. Super-resolution is crucial for quality enhancement when processing low-resolution images of fashion items. The present invention uses a super-resolution algorithm to stretch the original low-resolution image to a high-definition resolution res HD , and generates high-quality HD images through block processing and noise reduction redrawing.

[0046] By default, the present invention is based on res HD Divide the image into n×n blocks, aligned with the standard size required by SDXL. Divide the stretched image into several overlapping blocks , each block contains an overlap ratio r overlap , for each small block I iUse super-resolution models and pre-trained parameters for low-noise redrawing to generate high-quality patches In the super-resolution task, the present invention adopts the conditional diffusion model to perform joint noise reduction and block reconstruction, and the low-resolution small block I i It is used as a conditional input and gradually generates high-resolution small blocks through the back-diffusion process. .

[0047] This process can be expressed mathematically as:

[0048]

[0049] in, represents the high-resolution image patch obtained by super-resolution reconstruction, x LR Represents the low-resolution image block I i Conditional probability High-resolution reconstruction is modeled using a super-resolution network. Description from x LR To the intermediate state x t The forward noise addition process.

[0050] The generation workflow consists of two stages: first, through forward diffusion from x LR To x t Noise is injected gradually and then diffused from x t to x LR Iterative noise removal is performed. Governed by the above formula, this two-stage mechanism ensures structural consistency with the original input while enhancing texture details, effectively solving the blurring and detail loss problems inherent in traditional super-resolution methods.

[0051] All processed pieces Stitched into a complete high-definition image HD :

[0052]

[0053] Through the above steps, the high-definition image I HD This method achieves higher resolution and better image quality, providing high-quality input for subsequent semantic segmentation and texture replacement. The algorithm strategically combines block processing and intelligent splicing mechanisms to optimize computational efficiency for large-scale images. The conditional diffusion process effectively leverages low-resolution structural priors while supplementing high-frequency details to achieve fidelity-preserving super-resolution.

[0054] Enhanced I HD By using the item-specific descriptor K item The SAM method for semantic segmentation is formally expressed as:

[0055]

[0056] Two key outputs are then generated: the binary segmentation mask and the clothing mask M item Accurately locate the target fashion item, and the alpha channel composite clothing mask image I with the non-single item area blurred mask These processed elements then serve as the primary input to downstream algorithm components.

[0057] Step 3: Continuous and tiling of the texture pattern in four directions.

[0058] According to the result of step 2, the related texture diffusion is carried out, and the four-way continuous texture connection strategy is introduced. The edge continuity loss is combined to improve the seamlessness and naturalness of the texture laying. texture Four-dimensional continuity and tiling are performed to adapt the texture to the characteristics of the clothing image. Four-dimensional continuity is a key geometric constraint in pattern design and texture synthesis, aiming to produce seamless, stretchable patterns. This method divides the design into four staggered regions, eliminating visible seam artifacts when the pattern repeats. It enforces first-order continuity by aligning texture values ​​at boundaries and can be extended to higher-order continuity. Figure 2 are instructions for stitching and cropping texture images, Figure 3 This is an architecture for synthesizing quad-continuous textures. It achieves refinement of quad-continuous textures through partial redrawing, and adaptive tiling based on optimized quad-continuous textures. The specific process is as follows:

[0059] The processed textures were precisely aligned with the masked areas of the HD Fashion project through geometric overlay, creating a structure-preserving texture integration that enabled subsequent design modifications. The texture pattern was then stitched together in a four-dimensionally continuous pattern to meet the four-dimensional continuity requirement. The original texture pattern may have unnatural transitions at seams, with noticeable abrupt changes in pixel values, failing to meet the four-dimensional continuity requirement. A diffusion model was used to locally redraw the original texture pattern, ensuring a smooth transition at the seams.

[0060] This paper deploys SDXL's constrained partial redrawing technology and uses edge-aware operators to systematically resolve inter-region discontinuities while maintaining global texture consistency and color uniformity. texture A systematic grid-based segmentation and reassembly is performed through a computational transformation pipeline. For non-isotropic inputs, adaptive centroid cropping is used to normalize the size to L. square × L square , and then perform a tiling operation.

[0061] Assemble the composite mesh from the normalized texture cells and then extract the extended L containing the strategic overlapping regions.square +D splicing The size of the square, the boundary constraint of the transition area regeneration. Through empirical verification, the optimal parameter is determined to be L square = 1024 pixels and D splicing = 252 pixels. This method systematically solves the boundary discontinuity problem through edge-aware denoising and establishes the quaternary continuity that is crucial for texture tiling. texture Perform cutting and splicing to repair the continuity of the texture so that it is seamless when repeated , the texture image is divided into multiple parts, and then the divided texture parts are merged to generate the final texture image I merge Consider an m×n input image, denoted as I ij , where i and j represent the row and column indices of the image in the splicing grid, and the value range is i,j∈{0,1,2,…,m-1,n-1}. The size of each image is W×H, which represents the width and height respectively. Define the output image as I merge , whose size is W total ×H total For any pixel position (x, y) in the output image, it can be mapped by the following formula:

[0062]

[0063] Define (x,y) as the location of a specific pixel in the output image. By using integer division operations i = [y / H] and j = [x / W], we determine the row and column of the input image corresponding to each pixel location in the output image. Then, by subtracting the corresponding offsets jW and iH, we convert the coordinates in the output image to the corresponding input image coordinates, achieving accurate stitching.

[0064] Based on cropping and splicing, the style transfer model is used to denoise and redraw the seam area to generate a flower pattern image with square continuity. By denoising and redrawing the seam area, the unnatural transition at the seam can be effectively eliminated, making the texture pattern have a better visual effect after splicing.

[0065] The processed texture pattern is tiled to adapt it to the characteristics of the clothing image and stretched to the resolution res HD , and the tiled image is cropped according to the resolution of the character image to obtain a processed texture pattern of uniform size.

[0066] In order to establish the spatial correspondence between the tiled texture and the target fashion item, the present invention implements a resolution matching protocol, which can be formally expressed as:

[0067]

[0068] Among them, Φ scale Implement adaptive geometric scaling and merge The shortest side of I is matched proportionally HD The longest dimension of , ensures that the source texture covers more than the target area. crop The operator extracts the image with size res by sampling the center-aligned window HD The processed texture pattern is compared with the HD image I HD Perform overlay processing to generate a model base map with texture features. Using the layer overlay method, the processed texture pattern T processed With high-definition images HD Clothing mask image obtained by combining semantic segmentation Perform texture overlay processing to generate a real clothing model image with a textured base image after overlay:

[0069]

[0070] Among them, Ω mask Perform mask-guided channel-by-channel synthesis to create a hybrid input that encodes the geometry and texture details of fashion items. Ensure that the texture pattern only covers the clothing area and generate a model base image with texture features.

[0071] Step 4: Use the diffusion model to redraw the model base image with texture features, generating a clothing model image with new texture details. To make the texture replacement result more realistic and consistent with the original clothing structure details, the ControlNet additional network is introduced to enhance the generative expression of the diffusion model.

[0072] The ControlNet additional network is used to enhance the generation effect of the diffusion model and restore the details of the clothing. Through the architecture that combines the conditional diffusion model Stable Diffusion with ControlNet, the diffusion generation process is divided into forward noise addition (forward process) and reverse reconstruction process (reverse process).

[0073] First, the clothing mask image I is detected by the Canny edge detection algorithm. mask Perform edge detection and generate texture line drawing C real ; High Definition Clothing Graphics I HD Perform depth estimation and generate depth map D realThese complementary feature representations are then directed to a dedicated ControlNet branch for conditional synthesis. This architecture implements weight specialization between different ControlNet modules to generate texture line drawings C real and depth map D real Enter the ControlNet additional network and adjust the edge weights w canny and depth weight w depth , combined to achieve image redrawing, where the edge processing branch adjusts the parameter w canny Optimize to maintain the outline, deep analysis branch through w depth Calibrated for three-dimensional consistency, this dual-branch conditional mechanism enables the diffusion model to perform spatially consistent remapping while maintaining the structural integrity of the original objects, ultimately achieving high-fidelity remapping through geometrically constrained synthesis.

[0074] Step 5: In the diffusion model redrawing stage, the SDXL model is used for texture redrawing, and the texture overlay clothing and ControlNet preprocessing results are combined to generate a clothing model image with new texture details. The specific process is as follows:

[0075] Combine original replaceable texture patterns with specific clothing category keywords and effect gain word G boost , through the CLIP integrated prompt word generator to generate the prompt word P prompt。 These semantic cues are then combined with the classification keywords K item (Specify fashion item type) and Enhancement Command G boost (Optimize redraw intensity) Combined with structured text conditional pipeline , generate text conditions that enhance the redraw effect ; This method integrates these text controls with the spatial constraints from ControlNet, enabling SDXL to perform geometric constraint redrawing. prompt and ControlNet output feature F ControlNet As the positive condition input; VAE encoding is performed on the model base image with texture features to generate the latent space representation; as a diffusion architecture, SDXL is used in overlapping images I overlay Clothing mask area M item Perform local texture synthesis on the image, preserving non-target areas through latent space regularization:

[0076]

[0077]

[0078] in, Represents the central U-Net architecture in Stable Diffusion XL. The model receives the noisy latent representation z at time step t t , through the text condition τ of ControlNet ControlNet And spatial constraint enhancement, according to the input frontal condition and the encoded potential representation, the texture of the target clothing area is redrawn in the diffusion model to generate a redrawing result I repaint , according to the redraw result I repaint The result with a good sense of space and preserved original texture characteristics is selected as the final output or enters the subsequent optimization and redrawing process. This process requires not only precise image processing technology but also a deep understanding of user needs and design intent to ensure that the generated image meets both technical requirements and artistic and aesthetic standards. Through the above steps, the diffusion model is used to redraw the model base image with texture features to generate a clothing model image with new texture details. This image not only retains the structure and shape of the original clothing but also introduces new details of the target texture pattern, improving the image's realism and visual quality.

[0079] To validate the effectiveness of our method, we conducted extensive experiments. The experimental dataset, sourced from the e-commerce field, encompasses a variety of professionally captured, high-resolution clothing images. Comparisons with existing advanced texture transfer and virtual try-on algorithms revealed significant advantages across multiple key metrics.

[0080] Figure 4 shows the application of the proposed clothing texture replacement intelligent redrawing method on a variety of fashion items, demonstrating the versatility of the framework in handling clothing of different styles, textures, and complexity, and further highlighting its robustness in diverse real-world scenarios. In addition, the present invention achieves dynamic texture scaling through tile size editing. Figure 5 This capability is demonstrated using a multi-scale checkerboard input. The re-blended output exhibits accurate density preservation compared to the source texture, maintaining consistency in texture density. This scale-aware synthesis mechanism ensures geometric fidelity across spatial resolutions.

[0081] Corresponding to the aforementioned embodiment of an intelligent redrawing method for replacing clothing texture, the present invention also provides an embodiment of an intelligent redrawing device for replacing clothing texture.

[0082] See also Figure 6 An embodiment of the present invention provides an intelligent redrawing device for replacing clothing textures, comprising a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it is used to implement an intelligent redrawing method for replacing clothing textures in the above embodiment.

[0083] The embodiment of the intelligent redrawing device for replacing clothing texture provided by the present invention can be applied to any device with data processing capability, and the device with data processing capability can be a device or apparatus such as a computer. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capability in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, if Figure 6 As shown in the figure, it is a hardware structure diagram of any device with data processing capability in which an intelligent redrawing device for replacing clothing texture provided by the present invention is located. Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0084] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0085] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention. A person of ordinary skill in the art can understand and implement the present invention without inventive work.

[0086] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the intelligent redrawing method for replacing clothing texture in the above embodiment is implemented.

[0087] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.

[0088] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the intelligent redrawing method for replacing clothing textures.

[0089] The above embodiments are used to illustrate the present invention rather than to limit the present invention. Any modifications and changes made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.

Claims

1. An intelligent redrawing method for clothing texture replacement, characterized in that: The method comprises the following steps: Step 1: Obtain the original clothing image and its corresponding texture and structure guidance information; and obtain the original clothing image, replaceable related textures, keywords describing the target clothing type, and descriptive words used to enhance the generation effect; Step 2: Perform image super-resolution processing on the original clothing. The original low-resolution image is enlarged to high-definition resolution through block processing and divided into multiple overlapping sub-regions, so that all enhanced sub-regions are seamlessly aggregated into the output at the target resolution. Step 3: Perform four-way continuous texture splicing on the clothing area, and perform region division, texture mapping and edge fusion operations based on the four-way continuity principle; Step 4: Generate a depth map and line drawing through edge detection and depth estimation, and input the results as control conditions into the diffusion model containing the ControlNet network to perform a multi-step diffusion process to generate a high-quality image; Step 5: Process the original texture image through the CLIP integrator to generate descriptive hints, use the Wensheng graph model to redraw the texture and output a high-fidelity clothing image; specifically: use the SDXL model to redraw the texture, and process the original texture image through the CLIP integrator to generate descriptive hints P prompt ,encapsulates texture features; These semantic cues are then combined with the categorical keywords K of the target item type. item and enhanced instructions G for optimizing redraw strength boost Combined, through the structured text conditional pipeline , generate text conditions that enhance the redraw effect ; SDXL in overlapping image I overlay Clothing mask M item Perform local texture synthesis on the image, preserving non-target areas through latent space regularization: in, represents the central U-Net architecture in Stable Diffusion XL, w canny represents the edge weight, w depth represents the depth weight; The model receives the noisy latent representation z at time step t t , through the text conditions of ControlNet and spatial constraint enhancement, synthesis produces redrawn output I repaint .

2. The intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that: In step 2, image super-resolution processing is performed to restore the fine-grained texture and structural elements of the low-resolution image. Specifically, the original low-resolution image is first enlarged to a high-resolution resolution by block processing. HD ; Divide the image into n×n blocks, the size of each block is pixels to meet the standard net size required for SDXL redrawing; the enlarged image is then divided into multiple overlapping sub-areas , each sub-region maintains a certain overlap ratio.

3. The intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that: In step 2, all enhanced sub-regions are seamlessly aggregated. to HD resolution res HD High-definition image output under unified high definition I HD , enhanced high-definition image I HD The clothing mask M is obtained by semantic segmentation using the SAM method of item-specific descriptors. item And the alpha channel of the non-single-item area is set to be blurred to synthesize the clothing mask image I mask .

4. The intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that: In step three, correlated texture diffusion is performed, and a four-way continuous texture splicing strategy is introduced, combined with edge continuity loss to improve the seamlessness and naturalness of texture paving. First, the four-way continuous texture is refined through partial enhancement redrawing, followed by adaptive tiling based on the optimized four-way continuous texture. At the same time, SDXL's constrained partial redrawing technology is deployed, and edge-aware operators are used to enable the original texture map to be grid-based segmented and reorganized through a computational transformation process. For non-isometric inputs, size normalization is achieved through adaptive centroid cropping, and then the tiling operation is performed.

5. The intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that: In step 3, a composite grid is assembled from standardized texture units, followed by extracting squares based on the cropping size and regenerating the transition area at the boundary. In order to establish the spatial correspondence between the tiled texture and the target object, resolution matching is performed, which is formally expressed as: Among them, T processed is the texture pattern after processing, Represents adaptive geometric scaling, copying the grid matrix to generate a synthetic image I merge The shortest side of the image is proportionally matched to the high-definition image I HD The longest dimension of , ensuring that the source texture covers more than the target area; the subsequent The operator extracts the image with the HD resolution res by sampling the center-aligned window. HD The area of ​​​​the image is overlapped to achieve dimensional consistency between the texture and the target object input; then, the mask-guided alpha channel synthesis is performed to obtain the overlapping image I overlay .

6. The intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that: In step 4, the diffusion model generation stage first uses the Canny edge detection algorithm to detect the clothing mask image I mask Perform edge detection and generate texture line drawing C real ; High Definition Clothing Graphics I HD Perform depth estimation and generate depth map D real ; Then the texture line drawing C real and depth map D real Enter ControlNet for conditional synthesis.

7. The intelligent redrawing method for clothing texture replacement according to claim 6, characterized in that: In step 4, the generation phase of the diffusion model uses the ControlNet additional network to enhance the generation effect of the diffusion model and restore the details of the clothing; the diffusion model realizes weight specialization between different ControlNet modules, in which the edge processing branch adjusts the edge weight w through the parameter canny Optimize to keep the outline, the depth analysis branch passes the depth weight w depth Calibration is performed to achieve three-dimensional consistency; this two-branch conditional mechanism enables the diffusion model to perform spatially consistent remapping while maintaining the structural integrity of the original objects, ultimately achieving high-fidelity remapping through geometrically constrained synthesis.

8. An intelligent redrawing device for replacing clothing textures, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, an intelligent redrawing method for clothing texture replacement according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • AI photographing method, device and equipment based on diffusion model

    CN118261780A

  • Text to 3D via sparse multi-view generation and reconstruction

    US20250104349A1