Intelligent redrawing method and device for clothing texture replacement
Through depth estimation and edge detection technology combined with 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.
Patent Information
- Application Number
- CN202510912497.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-03
AI Technical Summary
Existing clothing texture replacement technologies are prone to visual artifacts and unnatural transition effects when dealing with complex three-dimensional geometric structures, and lack understanding of three-dimensional geometric structures, resulting in poor texture replacement effects.
Depth estimation and edge detection technology are introduced, combined with diffusion model and ControlNet additional network, and through four-party continuous texture stitching and edge perception operators, high-quality clothing texture replacement images are generated, supporting polymorphic input and user interaction adjustment.
The generated texture replacement images are visually realistic, with rich details and natural transitions, improving the efficiency and user experience of clothing design and supporting personalized and diverse design needs.
Smart Images

Figure CN120411294A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer graphics, image processing, and clothing design, and particularly to an intelligent redrawing method and device for clothing texture replacement, which are used to efficiently generate high-quality clothing texture replacement images in a virtual environment to enhance the online shopping experience and improve the clothing design efficiency. Background Art
[0002] In the field of clothing design and display, texture replacement technology has always been an important means to enhance visual effects and design efficiency. Early texture replacement methods mainly relied on traditional image editing tools, such as Adobe Photoshop, which achieved texture replacement by manually adjusting and synthesizing images. However, this method is not only time-consuming and laborious, but also requires professional image processing skills, making it difficult to meet the design requirements of mass production and rapid iteration. With the development of computer graphics, automated texture replacement technologies based on image processing algorithms have gradually emerged. These technologies automatically complete texture mapping and replacement by calculating the geometric and texture features of images, greatly improving the efficiency. However, when dealing with complex three-dimensional geometric structures and texture details, these early automated methods often exhibit distortion and unnatural transition effects, especially in clothing edge and fold areas.
[0003] In recent years, with the rapid development of deep learning technology, deep learning-based texture replacement methods have gradually become a research hotspot. These methods utilize technologies such as convolutional neural networks (CNNs) and generative adversarial networks (GANs) to automatically achieve high-quality texture replacement effects and, to a certain extent, solve the limitations of traditional methods. For example, some studies guide texture mapping by predicting the normal information on the clothing surface, thereby improving the realism and physical credibility of texture replacement. In addition, GAN-based texture generation methods can generate diverse texture styles, also providing more creative space for designers. However, although these methods have made significant progress in texture generation quality and design flexibility, there are still some key problems that need to be solved.
[0004] In the field of clothing texture replacement, accurate UV map estimation technology is crucial for achieving realistic texture replacement and editing. Recent research using dense UV map estimation technology has significantly improved the generation quality and design flexibility of clothing images. For example, the Color-Mood-Aware Clothing Re-texturing research classifies clothing textures through an emotion classification algorithm and adopts HSV color space transfer technology to effectively maintain the lighting and shadow effects of the original photo. This method not only enhances the visual expressiveness of the texture but also considers emotional responses, introducing a new emotional dimension to the clothing re-texturing technology. The Normal-guided Garment UV Prediction for Human Re-texturing research guides UV map estimation by predicting surface normals, enabling physically plausible editing without 3D reconstruction. This method captures the underlying geometry of the clothing through self-supervised learning, predicts temporally coherent UV maps, significantly improves performance, and achieves remarkable results on real-world images, providing a new technical path for this field. In addition, studies such as DiffuseIT and DiffFashion further enhance the realism and diversity of texture replacement through technical means such as matching language attribute phrases with visual clothing components, unsupervised structure-aware transmission, and feature modulation fusion. Although previous UV methods have potential in texture replacement effects, due to the lack of understanding of three-dimensional geometry, visual artifacts often occur, resulting in poor texture replacement effects at the clothing edges.
[0005] To address the above problems, the present invention proposes an intelligent re-drawing method and device for clothing texture replacement. By introducing depth estimation and edge detection technologies, the present invention can better understand the three-dimensional geometry of clothing, enabling the use of this geometric information to guide the generation and alignment of textures during texture replacement, avoiding visual artifacts and unnatural transitions. At the same time, a diffusion model is used for texture re-drawing, and the generated textures are significantly superior to existing methods in terms of detail and realism. By introducing an additional network, the spatial consistency of the generated textures and the consistency of the texture structure are further enhanced. The present invention supports polymorphic input, and users can quickly generate personalized texture replacement effects through simple parameter adjustment and input selection. In addition, the present invention also provides an efficient image preprocessing and postprocessing process, making the entire texture replacement process more automated and user-friendly.
[0006] The present invention proposes an innovative method for generating clothing texture replacement by introducing a diffusion model and a ControlNet additional network, which can effectively solve the key problems in the prior art and achieve high-quality and diverse clothing texture replacement effects. Through the present invention, consumers can more realistically experience the texture and effect of clothing in a virtual environment, and clothing designers can also quickly generate various design schemes, improving design efficiency and creativity. The present invention not only provides a new technical solution for the fields of clothing design and online shopping, but also provides new ideas and methods for the development of computer graphics and image processing technologies. Summary of the Invention
[0007] The object of the present invention is to provide an intelligent redrawing method and device for clothing texture replacement in view of the deficiencies of the prior art, to improve the realism, flexibility and generation efficiency of clothing texture replacement, and at the same time enhance the user interaction experience. By replacing the surface texture to redraw the fashion item image while retaining the geometric details of the original item, the present invention can efficiently generate high-quality clothing texture replacement images, meeting the needs of personalized and diverse designs in the fields of clothing design and online shopping. The present invention not only solves the problems existing in the prior art, but also provides new technical ideas and solutions for the field of clothing texture replacement.
[0008] The object of the present invention is achieved by the following technical solutions: 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, magnify the original low-resolution image to high-definition resolution through block processing and divide it into multiple overlapping sub-regions, and realize seamless aggregation of all enhanced sub-regions into the output at the target resolution;
[0011] Step 3: Perform four-way continuous texture stitching on the clothing area, and perform area division, texture mapping and edge fusion operations based on the four-way continuity principle;
[0012] Step 4: Generate a depth map and a line drawing through edge detection and depth estimation, and input the results as control conditions into a diffusion model containing a ControlNet network to perform a multi-step diffusion process to generate a high-quality image;
[0013] Step 5: Process through a CLIP integrator to generate a descriptive prompt, use a text-to-image model to perform texture redrawing and output a high-fidelity clothing image.
[0014] Further, in step one, it is necessary to obtain the original clothing image, replaceable relevant textures, keywords describing the target clothing type, and descriptors for enhancing the generation effect.
[0015] Further, in step two, image super-resolution processing is performed to restore the fine-grained textures and structural elements of the low-resolution image; specifically, first, the original low-resolution image is enlarged to high-definition resolution res HD ; the image is divided into n×n blocks, and 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-regions , and each sub-region maintains a certain overlapping ratio.
[0016] Further, in step two, all enhanced sub-regions are seamlessly aggregated to a unified high-definition output high-definition image I at high-definition resolution res HD ; the enhanced high-definition image I HD is semantically segmented by the SAM method using item-specific descriptors to obtain the clothing mask M HD , and the alpha channel where the non-single-item regions are blurred is combined to synthesize the clothing mask image I item mask mask .
[0017] Further, in step three, relevant texture diffusion is performed, introducing a four-way continuous texture splicing strategy and combining edge continuity loss to enhance the seamlessness and naturalness of texture laying; first, the four-way continuous texture is refined through partial enhanced redrawing, and then based on the adaptive tiling of the optimized four-way continuous texture, while deploying the constrained partial redrawing technology of SDXL and using an edge-aware operator, the original texture map is segmented and recombined based on a grid through a computational transformation process. For non-uniform input, size normalization is achieved through adaptive centroid cropping, and then tiling operations are performed.
[0018] Further, in step three, a composite grid is assembled from standardized texture units, and then squares based on the cropped size are extracted, and a transition region is regenerated at the boundary; in order to establish the spatial correspondence between the tiled texture and the target item, resolution matching is performed, formally expressed as:
[0019]
[0020] where T processed is the processed texture pattern, represents adaptive geometric scaling, and the shortest side of the grid matrix copy-generated synthetic image I merge is proportionally matched to the high-definition image I HDThe longest dimension is ensured so that the source texture coverage exceeds the target area; subsequently, the operator extracts an area with a size of high-definition resolution res through center-aligned window sampling HD to achieve dimensional consistency between the texture and the target object input; then, mask-guided alpha-channel synthesis is implemented to obtain the overlapping image I overlay .
[0021] Furthermore, in step four, in the generation stage of the diffusion model, first, edge detection is performed on the clothing mask image I mask using the Canny edge detection algorithm to generate a texture line drawing C real ; depth estimation is performed on the high-definition clothing graphic I HD to generate a depth map D real ; subsequently, the texture line drawing C real and the depth map D real are input into ControlNet for conditional synthesis.
[0022] Furthermore, in step four, in the generation stage of the diffusion model, the ControlNet additional network is used to enhance the generation effect of the diffusion model and restore clothing details; this architecture achieves weight specialization between different ControlNet modules, where the edge processing branch adjusts the edge weight w canny for optimization to maintain the contour, and the depth analysis branch calibrates through the depth weight w depth to achieve three-dimensional consistency; this dual-branch conditional mechanism enables the diffusion model to perform spatially consistent redrawing while maintaining the structural integrity of the original object, and finally achieves high-fidelity redrawing through geometric constraint synthesis.
[0023] Furthermore, in step five, the SDXL model is used for texture redrawing. The original texture map is processed by the CLIP integrator to generate a descriptive prompt P prompt , encapsulating the texture features; these semantic prompts are then combined with the classification keyword K item of the target object type and the enhancement instruction G boost for optimizing the redrawing intensity, and through the structured text conditioning pipeline , generate a text condition that enhances the redrawing effect; SDXL performs local texture synthesis on the clothing mask M overlay of the overlapping image I item , and retains the non-target area through latent space regularization:
[0024]
[0025]
[0026] Among them, represents the central U-Net architecture in Stable Diffusion XL; the model receives the noise latent representation z at time step t t , enhanced by the text condition and spatial constraints of ControlNet, and synthesizes to generate the redrawn output I repaint .
[0027] On the other hand, the present invention also provides an intelligent redrawing device for clothing texture replacement, including a memory and one or more processors. Executable code is stored in the memory, and when the processor executes the executable code, the intelligent redrawing method for clothing texture replacement as described above 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, rich in details and natural in transition.
[0030] (b) Efficiency: By adopting block processing and super-resolution reconstruction technologies, the image processing efficiency is significantly improved, which is suitable for large-scale clothing texture replacement tasks.
[0031] (c) Flexibility: Supports polymorphic input. Users can flexibly generate different styles of texture replacement effects 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 in real time, such as texture density, color saturation, etc., to meet the needs of different users. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flowchart of an intelligent redrawing method for clothing texture replacement in an embodiment of the present invention.
[0034] Figure 2 is an illustration of splicing and cropping texture images in an intelligent redrawing method for clothing texture replacement in an embodiment of the present invention.
[0035] Figure 3 is the architecture of synthesizing a four-way continuous texture in an intelligent redrawing method for clothing texture replacement in an embodiment of the present invention.
[0036] Figure 4 is the comparison result of reconstructing fashion items with multiple texture images in an embodiment of the present invention.
[0037] Figure 5 The result of re-texturing using different scaling sizes in an embodiment of the present invention.
[0038] Figure 6 It is a structural diagram of an intelligent redrawing device for clothing texture replacement according to the present invention. Detailed implementation manners
[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 not to limit the scope of the present invention. It should be noted that in the claims and the specification of the present invention, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one" does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0040] All documents mentioned in the present invention are incorporated herein by reference as if each document was individually incorporated by reference. In addition, it should be understood that after reading the above teachings of the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of this application.
[0041] The present invention proposes an intelligent redrawing method for clothing texture replacement, which can be used in fields such as clothing design, virtual fitting, and online shopping to enhance the visual effect and user experience of clothing images. Through innovative image redrawing technology, this technology replaces the target texture pattern into the specified area of the clothing model image to generate 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 operations such as super-resolution reconstruction and semantic segmentation; performing a four-way continuous process and tiling process on the target texture pattern to make it adapt to the characteristics of the clothing image; performing an overlay process on the processed texture pattern and the clothing image to generate a model base map with texture features; using a diffusion model to redraw the model base map with texture features to generate a clothing model image with new texture details.
[0042] Figure 1It is a flowchart of an intelligent redrawing method for clothing texture replacement in an embodiment of the present invention. The method includes the following steps: Step 1: Input a clothing model image and a target texture pattern; Step 2: Perform super-resolution reconstruction on the input image, perform semantic segmentation on the super-resolution reconstructed image, and obtain a clothing mask; Step 3: Perform four-way continuous processing and tiling processing on the target texture pattern, and perform overlay processing on the processed texture pattern and the clothing image; Step 4: Input the depth map and line drawing as control conditions into the diffusion model based on ControlNet, and perform a multi-step diffusion process to generate a high-quality image; Step 5: Use the diffusion model to redraw the overlaid image to generate a clothing model image with new texture details.
[0043] Specifically, the present invention provides an intelligent redrawing method for clothing texture replacement to Figure 1 be a specific implementation process. 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 picture of a pair of shoes I low and texture pattern I texture as inputs. 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 to be replaced.
[0045] Step 2: In Step 2, since the preprocessing of fashion item images gives priority to improving data quality to achieve clear semantic segmentation results, in order to obtain the precise mask area of the specified fashion item and ensure segmentation accuracy, the present invention first addresses the basic need to improve the resolution of the input image. This quality enhancement is crucial because high-definition images can retain the basic visual details that support better boundary detection and semantic interpretation. To this end, in this resolution refinement process, the present invention uses the SDXL redrawing technology for image super-resolution (SR) processing, so as to successfully recover fine-grained textures and structural elements 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 picture to a high-definition resolution res HD , and through block processing and noise reduction redrawing, generates a high-quality high-definition image.
[0046] By default, the present invention divides the image into n×n blocks according to res HD to align with the standard size required by SDXL. The stretched image is cut into several overlapping small blocks , each block containing an overlapping ratio r overlap , and for each small block I iUsing a super-resolution model and pre-trained parameters for low-noise reduction redrawing to generate high-quality small patches In the super-resolution task, the present invention uses a conditional diffusion model for joint noise reduction and block reconstruction. The low-resolution small patch I i is used as the conditional input, and through the reverse diffusion process, high-resolution small patches are gradually generated .
[0047] This process can be expressed by the following mathematical formula:
[0048]
[0049] where represents the high-resolution image patch obtained through super-resolution reconstruction, and x LR represents the low-resolution image patch I i . The conditional probability uses a super-resolution network to model the high-resolution reconstruction, while describes the forward noise addition process from x LR to the intermediate state x t .
[0050] The generation workflow includes two stages: First, noise is gradually injected from x LR to x t through forward diffusion, and then iterative noise removal is performed from x t to x LR through reverse diffusion. Controlled by the above formula, this two-stage mechanism ensures structural consistency with the original input while enhancing texture details, effectively solving the blur and detail loss problems inherent in traditional super-resolution methods.
[0051] All processed small patches are stitched into a complete high-definition image I HD :
[0052]
[0053] Through the above steps, the high-definition image I HD after super-resolution reconstruction has a higher resolution and better image quality, providing high-quality input for subsequent semantic segmentation and texture replacement. The algorithm of the present invention strategically combines block processing and intelligent stitching mechanisms to optimize the computational efficiency of large-scale images. The conditional diffusion process effectively utilizes the structural prior knowledge of low resolution while supplementing high-frequency details to achieve fidelity-preserving super-resolution.
[0054] The enhanced I HD is semantically segmented by using the SAM method with the item-specific descriptor K item , which is formally expressed as:
[0055]
[0056] Two key outputs will then be generated: the clothing mask M of the binary segmentation mask, item the accurately located target fashion item, and the clothing mask image I of the alpha-channel synthesis where the non-single-item areas are blurred. mask These processed elements then serve as the main inputs for downstream algorithm components.
[0057] Step 3: Four-way continuous processing and tiling of texture patterns.
[0058] Perform relevant texture diffusion based on the results of Step 2, introduce the four-way continuous texture connection strategy, and combine the edge continuity loss to enhance the seamlessness and naturalness of texture tiling. For the texture pattern I texture perform four-way continuous processing and tiling to adapt to the characteristics of the clothing image. Four-way continuity is a key geometric constraint in pattern design and texture synthesis, aiming to generate seamless and stretchable patterns. This method divides the design into four interleaved regions to ensure the elimination of visible seam artifacts when the pattern repeats. It enforces first-order continuity by aligning texture values at the boundaries and can be extended to higher-order continuity. Figure 2 is the instruction for stitching and cropping texture images, Figure 3 is the architecture for synthesizing four-way continuous textures. Refinement of four-way continuous textures is achieved through partial redrawing, and adaptive tiling based on the optimized four-way continuous textures. The specific process is as follows:
[0059] The processed texture is precisely aligned with the masked area of the high-definition fashion item through geometric superposition to establish structure-preserving texture integration, thus enabling subsequent design modifications. The texture pattern is stitched with four-way continuous textures to meet the requirements of four-way continuity. The original texture pattern may have unnatural transitions at the seams, with obvious mutations in pixel values, not meeting the requirements of four-way continuity. The original texture pattern is processed using the method of local redrawing with a diffusion model to make the transition natural at the seams.
[0060] The present invention deploys the constrained partial redrawing technique of SDXL, uses edge-aware operators, and systematically solves the discontinuity between regions while maintaining global texture consistency and chromaticity uniformity. The original texture map I texture is systematically grid-based segmented and reorganized through the calculation conversion process. For non-equidistant inputs, size normalization to L square × L square is achieved through adaptive centroid cropping, and then tiling operations are performed.
[0061] Assemble a composite grid from the standardized texture units, and then extract the extended L containing strategically overlapping regionssquare +D splicing A square of size splicing , regeneration of the boundary-constrained transition region. Through empirical verification, the optimal parameters are determined to be L square = 1024 pixels and D splicing = 252 pixels. This method systematically solves the boundary discontinuity problem through edge-aware denoising, establishing the four-way continuity crucial for texture tiling. The texture pattern I texture is cropped and spliced to repair the continuity of the texture, making it seamlessly dock when repeated to obtain , the texture image is segmented into multiple parts, and then the segmented texture parts are merged to generate the final texture image I merge . Considering m×n input images, denoted as I ij , where i and j represent the row and column indices of the image in the splicing grid, and the value ranges are i,j∈{0,1,2,…,m - 1,n - 1}. The size of each image is W×H, representing 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 through the following formula:
[0062]
[0063] Define (x,y) as the position of a specific pixel in the output image. Through integer division operations i = [y / H] and j = [x / W], determine the row and column of the input image corresponding to each pixel position in the output image. Subsequently, by subtracting the corresponding offsets jW and iH, convert the coordinates in the output image to the corresponding input image coordinates, thus achieving precise splicing.
[0064] Based on the cropping and splicing, use the style transfer model to denoise and redraw the seam area to generate a flower pattern image with the property of four-way continuity; through the denoising and redrawing of 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] Tile the processed texture pattern to adapt to the characteristics of the clothing image, stretch it to the resolution res HD , and crop the tiled image according to the resolution of the person image to obtain a processed texture pattern of uniform size.
[0066] To establish the spatial correspondence between the tiled texture and the target fashion item, the present invention implements a resolution matching protocol, formally expressed as:
[0067]
[0068] Among them, Φ scale realizes adaptive geometric scaling, and scales the shortest side of I merge proportionally to match the longest dimension of I HD to ensure that the source texture coverage exceeds the target area. Subsequently, Ψ crop extracts a region of size res HD through window sampling with central alignment to achieve dimensional consistency between the texture and the fashion item input. The processed texture pattern is overlaid with the high-definition image I HD to generate a model base map with texture features. Using the layer overlay method, the processed texture pattern T processed is combined with the high-definition image I HD and the clothing mask image obtained by semantic segmentation to perform texture overlay processing to generate a real clothing model image with a textured base map after overlay:
[0069]
[0070] Among them, Ω mask performs mask-guided per-channel synthesis to create a mixed input that encodes the geometric shape and texture details of the fashion item. During the texture overlay process, through the clothing mask image ensures that the texture pattern only covers the clothing area to generate a model base map with texture features.
[0071] Step 4: Use a diffusion model to redraw the model base map with texture features to generate a clothing model image with new texture details. To make the result after texture replacement more realistic and conform to the original clothing structure details, the ControlNet additional network is introduced to enhance the generation expression effect of the diffusion model.
[0072] Use the ControlNet additional network to enhance the generation effect of the diffusion model and restore clothing details. Through the architecture combining the conditional diffusion model Stable Diffusion and ControlNet, the diffusion generation process is divided into a forward noise addition (forward process) and a reverse reconstruction process (reverse process).
[0073] First, perform edge detection on the clothing mask image I mask using the Canny edge detection algorithm to generate a texture line drawing C real ; perform depth estimation on the high-definition clothing graphic I HD to generate a depth map D real; Subsequently, these complementary feature representations are then directed to a specialized ControlNet branch for conditional synthesis. The architecture implements weight specialization among different ControlNet modules, generating the texture line drawing C real and the depth map D real are input into the ControlNet additional network, and by adjusting the edge weight w canny and the depth weight w depth , image redrawing is achieved in combination. Among them, the edge processing branch is optimized through parameter adjustment w canny to maintain the contour, and the depth analysis branch is calibrated through w depth to achieve three-dimensional consistency. This dual-branch conditional mechanism enables the diffusion model to perform spatially consistent redrawing while maintaining the structural integrity of the original item, and finally achieves high-fidelity redrawing through geometric constraint synthesis.
[0074] Step Five: In the diffusion model redrawing stage, the SDXL model is used for texture redrawing, combining the texture-overlaid clothing and the ControlNet preprocessing results to generate a clothing model image with new texture details. The specific process is as follows:
[0075] Combining the original replaceable texture pattern with specific clothing classification keywords and the effect gain word G boost , the prompt word P is inversely generated through the prompt word generator integrated with CLIP prompt。 These semantic prompts are then combined with the classification keyword K item (specifying the fashion item type) and the enhancement instruction G boost (optimizing the redrawing intensity), and through the structured text conditioning pipeline , the text conditioning for enhancing the redrawing effect is generated ; This method integrates these text controls with the spatial constraints from ControlNet, enabling SDXL to perform geometric constraint redrawing. The generated prompt word P prompt and the ControlNet output feature F ControlNet are input as positive conditions; the model base map with texture features is VAE-encoded to generate a latent space representation; as a diffusion architecture, SDXL performs local texture synthesis on the clothing mask area M overlay of the overlapping image I item , and retains the non-target area through latent space regularization:
[0076]
[0077]
[0078] Among them, Represents the central U-Net architecture in Stable Diffusion XL. The model receives the noisy latent representation z at time step t t , enhanced by the text condition τ of ControlNet ControlNet and spatial constraints, and according to the input positive condition and the encoded latent representation, the texture of the target clothing area is redrawn in the diffusion model to generate a redrawing result I repaint , according to the redrawing result I repaint , select the result with good spatial sense and maintaining the original texture characteristics as the final output, or enter the subsequent optimized redrawing process. This process not only requires precise image processing technology, but also requires an in-depth understanding of user needs and design intentions to ensure that the generated images meet both technical requirements and artistic and aesthetic standards. Through the above steps, the diffusion model is used to redraw the model base map with texture features to generate a clothing model image with new texture details. The image not only retains the structure and shape of the original clothing, but also introduces new details of the target texture pattern, enhancing the realism and visual effect of the image.
[0079] To verify the effectiveness of the method of the present invention, a large number of experimental verifications were carried out in the present invention. The experimental dataset comes from the e-commerce field and covers a variety of professionally photographed high-resolution clothing images. By comparing with existing advanced texture transfer algorithms and virtual fitting algorithms, the method of the present invention shows significant advantages in multiple key indicators.
[0080] Figure 4 shows the application effects of the intelligent redrawing method for clothing texture replacement proposed by the present invention on various fashion items, reflecting the versatility of the framework in dealing with clothing of different styles, textures and complexities, and further highlighting its robustness in diverse real-world scenarios. In addition, the present invention realizes dynamic texture scaling through patch size editing Figure 5 , and this ability is illustrated using a multi-scale checkerboard input. Compared with the source texture, the re-blended output shows precise density preservation and maintains the consistency of texture density. This scale-aware synthesis mechanism ensures geometric fidelity across spatial resolutions.
[0081] Corresponding to the foregoing embodiment of an intelligent redrawing method for clothing texture replacement, the present invention also provides an embodiment of an intelligent redrawing device for clothing texture replacement.
[0082] See Figure 6 , an intelligent redrawing device for clothing texture replacement provided by an embodiment of the present invention includes a memory and one or more processors, and executable code is stored in the memory. When the processor executes the executable code, it is used to implement an intelligent redrawing method for clothing texture replacement in the above embodiment.
[0083] An embodiment of an intelligent redrawing device for clothing texture replacement provided by the present invention can be applied to any device with data processing capabilities, and such a device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a logically defined device, it is formed by the processor of any device with data processing capabilities reading the corresponding computer program instructions in the non-volatile memory into the memory for operation. From a hardware perspective, as Figure 6 shown, it is a hardware structure diagram of any device with data processing capabilities where an intelligent redrawing device for clothing texture replacement provided by the present invention is located. In addition to Figure 6 the processor, memory, network interface, and non-volatile memory shown, generally, according to the actual functions of any device with data processing capabilities where the device in the embodiment is located, other hardware may also be included, which will not be elaborated here.
[0084] The specific implementation processes of the functions and roles of each unit in the above device can be specifically referred to the implementation processes of the corresponding steps in the above method, which will not be elaborated here.
[0085] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiments described above are merely illustrative. 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 can be located in one place, or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present invention. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0086] The embodiment of the present invention also provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it implements an intelligent redrawing method for clothing texture replacement in the above embodiment.
[0087] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the foregoing 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. Further, 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, including a computer program, which when executed by a processor, implements the intelligent redrawing method for clothing texture replacement described above.
[0089] The above embodiments are used to explain the present invention, rather than limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims of the present invention fall within the protection scope of the present invention.
Claims
1. An intelligent redrawing method for clothing texture replacement, characterized in that, The method includes the following steps: Step 1: Obtain the original clothing image and its corresponding texture and structure guidance information; Step 2: Perform image super-resolution processing on the original clothing. Enlarge the original low-resolution image to high-definition resolution through block processing and divide it into multiple overlapping sub-regions, and achieve seamless aggregation of all enhanced sub-regions into the output at the target resolution; Step 3: Perform four-way continuous texture stitching 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 a 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 high-quality images; Step 5: Process through the CLIP integrator to generate descriptive prompts, and use the text-to-image model to perform texture redrawing and output a high-fidelity clothing image.
2. The intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that, Step 1 requires obtaining the original clothing image, replaceable relevant textures, keywords describing the target clothing type, and descriptive words for enhancing the generation effect.
3. An intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that, In step two, 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 the high-definition resolution res through block processing HD ; the image is divided into n×n blocks, and 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-regions , and each sub-region maintains a certain overlap ratio.
4. An intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that, In step two, all enhanced sub-regions are seamlessly aggregated to a unified high-definition output high-definition image I at high-definition resolution res HD The enhanced high-definition image I HD is semantically segmented by the SAM method using item-specific descriptors to obtain a clothing mask M HD and the alpha channel where the non-single-item regions are blurred is combined with the clothing mask to form the clothing mask image I item mask . 5. An intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that, In Step 3, relevant texture diffusion is performed, introducing a four-way continuous texture stitching strategy, and combining edge continuity loss to enhance the seamlessness and naturalness of texture laying; first, refine the four-way continuous texture through partial enhanced redrawing, and then based on the adaptive tiling of the optimized four-way continuous texture, while deploying the constrained partial redrawing technology of SDXL, use an edge-aware operator to make the original texture map perform grid-based segmentation and recombination through a calculation conversion process. For non-uniform input, achieve size normalization through adaptive centroid cropping, and then perform the tiling operation.
6. An intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that, In Step 3, assemble a composite grid from standardized texture units, and then extract squares based on the cropping size and regenerate the transition area at the boundary; to establish the spatial correspondence between the tiled texture and the target item, perform resolution matching, formally expressed as: ; Among them, T processed is the processed texture pattern, indicating adaptive geometric scaling, copying the mesh matrix to generate the synthetic image I merge 's shortest side is proportionally matched to the longest dimension of the high-definition image I HD to ensure that the source texture coverage exceeds the target area; subsequently, the operator extracts a region with a size of high-definition resolution res HD through window sampling with central alignment to achieve dimensional consistency between the texture and the target object input; then, mask-guided alpha-channel synthesis is implemented to obtain the overlapping image I overlay .
7. An intelligent redrawing method for clothing texture replacement according to claim 1, characterized in that, In Step 4, in the generation stage of the diffusion model, first, the Canny edge detection algorithm is used to perform edge detection on the clothing mask image I mask to generate a texture line drawing C real ; depth estimation is performed on the high-definition clothing graphic I HD to generate a depth map D real ; Subsequently, the texture line drawing C real and the depth map D real are input into ControlNet for conditional synthesis.
8. An intelligent redrawing method for clothing texture replacement according to claim 7, characterized in that, In step 4, during the generation phase of the diffusion model, the ControlNet additional network is used to enhance the generation effect of the diffusion model and restore the clothing details; this architecture realizes weight specialization among different ControlNet modules, where the edge processing branch adjusts the edge weight w canny for optimization to maintain the contour, and the depth analysis branch calibrates through the depth weight w depth for three-dimensional consistency; this dual-branch conditional mechanism enables the diffusion model to perform spatially consistent redrawing while maintaining the structural integrity of the original item, and finally achieves high-fidelity redrawing through geometric constraint synthesis.
9. An intelligent redrawing method and device for clothing texture replacement according to claim 8, characterized in that In step five, the SDXL model is used for texture redrawing, and the original texture map is processed by the CLIP integrator to generate a descriptive prompt P prompt , encapsulating texture features; These semantic cues are then combined with the classification keywords K of the target object type item and the enhancement instruction G for optimizing the redrawing intensity boost to generate text conditions for enhancing the redrawing effect through a structured text conditioning pipeline ; SDXL performs local texture synthesis on the clothing mask M of the overlapping image I while preserving non-target areas through latent space regularization: overlay of the clothing mask M item ; ; Among them, represents the central U-Net architecture in Stable Diffusion XL; the model receives the noise latent representation z at time step t t , enhanced by the text conditioning and spatial constraints of ControlNet, and synthesizes to produce the redrawn output I repaint .
10. An intelligent redrawing device for clothing texture replacement, comprising a memory and one or more processors, wherein executable code is stored in the memory, characterized in that, When the processor executes the executable code, it implements an intelligent redrawing method for clothing texture replacement as described in any one of claims 1-9.
Citation Information
Patent Citations
Personalized virtual fitting method based on shape control and texture guidance
CN117670893A
Garment texture migration method based on image
CN117974870A
AI photographing method, device and equipment based on diffusion model
CN118261780A
Method and device for quickly previewing pattern garment
CN118710777A
Garment fabric replacement method and device
CN118941799A