A clothing extraction method based on visual features
Patent Information
- Application Number
- CN202611341957.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-10-16
AI Technical Summary
[0007]与此同时,仅依靠最终生成图像与真实标准图像之间的像素级重建误差或对抗损失,难以直接且充分地约束衣着前景区域的轮廓边界精度、遮挡区域的内容一致性以及坐标映射场的局部拓扑合理性
[0021]In summary, this method first normalizes the person image into a network input tensor and obtains spatial visual features and a global visual token. Then, it predicts the initial visibility field and initial clothing occupancy field in the person's observation coordinate domain, and predicts the coordinate offset field pointing to the person's observation coordinate domain on a standard clothing coordinate grid. A standard coordinate correspondence field is constructed from the preset standard coordinate grid and the coordinate offset field. The person image, initial visibility field, and initial clothing occupancy field are then resampled differentiably to the standard clothing coordinate domain. Subsequently, the standard domain visibility evidence field is used to select observation evidence and occlusion completion results, and the standard domain clothing occupancy field is used to limit the foreground, forming a standard clothing condition tensor. The condition tensor and coordinate information are encoded into a spatial clothing token, injected into the global visual token through a zero-initialized confidence-gated residual structure, and then the image generation network is controlled to output a standardized clothing image. This invention functionally decouples clothing spatial attribution, observation evidence credibility, and spatial correspondence, and can be used to improve clothing contour reconstruction, credible evidence preservation, and invisible area completion under pose deformation and occlusion conditions.
Smart Images

Figure CN122929611A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of conditional image generation technology, and more specifically to a method for clothing extraction based on visual features. Background Technology
[0002] With the rapid development of technologies such as e-commerce, virtual try-on, digital human modeling, and intelligent image editing, accurately extracting and reconstructing the standardized display form of target clothing from a single image of a person containing the wearer has become a highly valuable yet challenging research topic in the field of computer vision. The core of this clothing extraction task lies in inversely mapping a highly non-rigid image of clothing, influenced by human posture and shooting conditions, to a product coordinate space with a standardized geometric layout and orientation, thereby obtaining a standardized clothing image that can be directly used for product display, online retrieval, or virtual styling. However, unlike virtual try-on tasks that transfer standardized product images to a human body in any posture, clothing extraction tasks differ fundamentally in the correspondence between input and output, the target form of geometric transformation, and the evaluation criteria of the final image, presenting unique and complex technical challenges.
[0003] In practical applications, input images of people often contain complex backgrounds, varied human postures, non-rigid wrinkles, local occlusion, and diverse lighting conditions. These factors collectively result in the absence of a single, globally fixed rigid transformation relationship between the human observation image domain and the standard product image domain. Especially for key structural areas of clothing such as collars, shoulder lines, cuffs, and hems, as well as text markings, periodic textures, or specific patterns on the clothing surface, severe compression, distortion, stretching, or even complete obsolescence often occur after being projected from the 3D human body surface onto the 2D image plane and undergoing posture deformation. Therefore, accurately inferring the observation pixel position corresponding to each standard clothing coordinate from a 2D observation image and properly handling the loss of observation information caused by occlusion or deformation are the core issues determining the final quality of clothing extraction.
[0004] To address these challenges, existing technologies have proposed several solutions based on conditional image generation or deep feature encoding. These methods typically utilize convolutional neural networks or visual transformers to encode input images of people, extracting global semantic features or serialized visual tokens. These features are then used as conditional inputs into image generation networks such as generative adversarial networks or diffusion models to drive the network to output standardized clothing images. These solutions can, to some extent, capture the overall color, texture category, and semantic style of clothing, thereby generating visually plausible clothing results. However, existing methods generally lack modeling and constraints on the dense, explicit positional correspondence between the observation space of people and the standard product space. Due to the lack of such spatial correspondence guidance, the generative network often struggles to distinguish which pixels come from reliable observational evidence, which areas belong to the foreground clothing, and which areas should be filled in when learning the mapping relationship. This leads to phenomena such as clothing outline boundary drift, residual human skin or background, incomplete or misaligned texture structure in occluded areas, severely limiting the geometric fidelity and detail reproduction of the generated images.
[0005] Further analysis reveals another key flaw in existing technologies: they often treat "whether a standard clothing coordinate position belongs to the clothing foreground" and "whether credible observational evidence can be obtained from the input image" as the same concept, using a single attention map or probability map to simultaneously represent both properties. However, in real-world scenarios, a standard clothing position may belong to the clothing foreground, but it may be completely occluded or severely deformed in the input image, lacking directly usable observational evidence; conversely, a background region may be misjudged as credible clothing evidence in the feature space due to accidental similarity in color or texture. This semantic coupling and confusion makes existing methods prone to misjudging and deleting clothing foreground regions that should be filled in when encountering occluded areas, or introducing false clothing textures into the background region. Ultimately, this leads to a conflict between the optimization objectives of the two subtasks of foreground segmentation and occlusion completion, making it difficult to simultaneously obtain accurate foreground masks and high-quality completion results.
[0006] Furthermore, when introducing new spatial conditional branches or local attention modules into existing pre-trained image generation networks, current techniques also face challenges related to the stability of conditional injection and training efficiency. Specifically, newly added trainable modules often output randomized feature distributions during the initialization phase. Directly concatenating or simply adding these features with existing global visual conditional features will severely perturb the conditional distributions already learned by the generation network in the early stages of training, leading to drastic fluctuations in generation quality and even making it difficult for the model to converge or causing it to forget existing knowledge. Although some techniques attempt to alleviate this problem by reducing the learning rate or extending the warm-up phase, this does not fundamentally solve the issues of safe fusion and controllable backoff between the newly added spatial conditional branches and the basic visual conditions.
[0007] Meanwhile, relying solely on pixel-level reconstruction errors or adversarial losses between the final generated image and the real standard image is insufficient to directly and adequately constrain the contour boundary accuracy of the clothing foreground region, the content consistency of occluded areas, and the local topological rationality of the coordinate mapping field. For example, for fine contour structures such as the collar and cuffs of clothing, pixel-level losses are often diluted by large background areas, resulting in insufficient boundary supervision signals. Furthermore, the lack of specific topological constraints on coordinate correspondences can lead to local flips or non-physical abrupt changes in the mapping field, disrupting the relative positional relationships of the same clothing structure within the standard coordinate domain. Therefore, the discrepancy between existing training objectives and evaluation metrics is also one of the bottlenecks limiting the further development of clothing extraction technology.
[0008] In view of the above, this application is hereby submitted. Summary of the Invention
[0009] This invention provides a clothing extraction method based on visual features, which can at least partially improve the above-mentioned problems.
[0010] To achieve the above objectives, the present invention adopts the following technical solution:
[0011] A clothing extraction method based on visual features, comprising: Step S1: Obtain the input image of the person, perform normalization processing on the input image of the person to obtain the normalized input image tensor, and perform visual encoding on the normalized input image tensor to obtain spatial visual features; Step S2: The spatial visual features are processed by using mutually distinguishable visibility prediction branches, clothing occupancy prediction branches and coordinate correspondence prediction branches respectively to obtain the initial visibility field, the initial clothing occupancy field and the two-dimensional coordinate offset field, and the standard coordinate correspondence field is constructed according to the preset standard coordinate grid and the two-dimensional coordinate offset field. Step S3: Based on the normalized input human image tensor, initial visibility field, initial clothing occupancy field and spatial visual features, perform differentiable grid resampling and occlusion completion processing respectively to obtain the visible evidence tensor, visibility evidence field, clothing occupancy field and occlusion completion tensor, and construct the standard clothing condition tensor. Step S4: Spatial encoding is performed on the standard clothing condition tensor, visibility evidence field, clothing occupancy field and standard coordinate correspondence field to obtain a spatial clothing token that preserves the standard clothing coordinate position information, and the fusion condition token is calculated based on the confidence statistics. Step S5: Input the fusion condition token into the preset image generation network to obtain a standardized clothing image.
[0012] Preferably, step S1 specifically includes: Obtain the input image of the person, which includes the wearer and the clothing to be extracted. Then, perform size normalization, pixel value scaling, normalization and batch processing on the input image to obtain the normalized input image tensor. Spatial visual encoding and global visual encoding are performed on the normalized input human image tensor to obtain spatial visual features and global visual tokens. The spatial visual features maintain the two-dimensional spatial arrangement of the input human image, while the global visual tokens represent the semantics of color, category, material, and overall style.
[0013] Preferably, step S2 specifically includes: The spatial visual feature F is processed by using mutually distinguishable visibility prediction branches and clothing occupancy prediction branches to obtain the initial visibility field and initial clothing occupancy field defined in the human observation coordinate domain. The spatial visual features are processed using the coordinate correspondence prediction branch to obtain a two-dimensional coordinate offset field defined on the standard clothing coordinate grid and whose value is a two-dimensional offset vector pointing to the human observation coordinate domain. Based on the preset standard coordinate grid and two-dimensional coordinate offset field, calculate the two-dimensional sampling coordinates in the human observation coordinate domain of the normalized input human image tensor for any standard clothing coordinate in the standard clothing coordinate domain. Based on the two-dimensional sampling coordinates corresponding to all standard clothing coordinates, a standard coordinate corresponding field is constructed from the standard clothing coordinates to the person's observation coordinates; The standard coordinate grid is predefined in the standard clothing coordinate domain, and the standard coordinate corresponding field represents the reverse sampling relationship from the standard clothing coordinates to the person's observation coordinates.
[0014] Preferably, step S3 specifically includes: Based on the standard coordinate corresponding field, differentiable grid resampling is performed on the normalized input human image tensor or the clothing features, initial visibility field, and initial clothing occupancy field obtained from the normalized input human image tensor to obtain the visibility evidence tensor, visibility evidence field, and clothing occupancy field defined in the standard clothing coordinate domain. The spatial visual features are processed using the occlusion completion branch to obtain the occlusion completion tensor defined in the standard clothing coordinate domain; Based on the visible evidence tensor, the visibility evidence field, the clothing occupancy field, the occlusion completion tensor, and the background tensor, a standard clothing condition tensor is constructed. The standard clothing condition tensor is composed of the values of the standard clothing condition tensor at all standard clothing coordinates.
[0015] Preferably, step S4 specifically includes: By splicing the standard clothing condition tensor, the visibility evidence field, the clothing occupancy field, and the standard coordinate correspondence field along the channel dimension, a seven-channel spatial condition tensor that simultaneously includes appearance, evidence, outline, and coordinates is obtained. The seven-channel spatial condition tensor is convolutionally encoded, normalized, adaptively pooled, flattened, and linearly projected to form a spatial clothing token that is compatible with the number and dimensions of global visual tokens. Spatial statistics of the visibility evidence field and the clothing occupancy field in the standard coordinate domain are calculated separately and extended to the token dimension to reflect the sufficiency of observational evidence and the proportion of clothing foreground occupancy, thus obtaining confidence statistics. Based on the confidence information and confidence statistics determined by the visibility evidence field and the clothing occupancy field, the spatial clothing token is injected into the global visual token using the zero-initialization confidence gating residual method to obtain the fusion condition token; When the initial value of the trainable residual scale is zero, the fusion conditional token is equal to the global visual token.
[0016] Preferably, step S5 specifically includes: Step S501: Based on the visibility evidence field and the clothing occupancy field, obtain a high-confidence clothing evidence confidence map, and adjust the high-confidence clothing evidence confidence map to the spatial resolution of the latent variable generation to obtain the spatial confidence weight map at time step t; Step S502: Encode the visible evidence tensor into latent evidence variables, and construct time-synchronized latent evidence variables according to the noise level of time step t; Step S503: Obtain the locking weight based on the locking scheduling coefficient and the spatial confidence weight map at time step t; Step S504: Construct time synchronization evidence latent variables based on the noise level at time step t, and write them into the high confidence position of the latent variables generated at time step t according to the locking weight, to obtain the evidence locking latent variables at time step t.
[0017] Step S505: Input the unconditional token, the fusion conditional token, and the evidence-locked latent variable at time step t into the preset image generation network to obtain unconditional noise prediction and conditional noise prediction, wherein the image generation network is an iterative denoising generation network. Step S506: Based on the spatial confidence weight map at time step t, set the spatially relevant conditional guiding scale corresponding to the standard clothing coordinates at time step t; Step S507: Based on the spatially related conditional guided scale corresponding to the standard clothing coordinates at time step t, perform spatial modulation on the difference between the unconditional noise prediction and the conditional noise prediction to obtain the spatially modulated noise prediction at time step t. Then, use the scheduler to process the spatially modulated noise prediction, the evidence-locked latent variables at time step t, and time step t to obtain the latent variables at time step t-1. Step S508: Repeat steps S501 to S507 until the latent variables from t=T to t=1 are calculated, the termination latent variable is obtained, and the termination latent variable is decoded using a latent variable decoder to obtain a standardized clothing image. Here, the termination latent variable is the latent variable at time step t=0, and T is the total number of iterations.
[0018] Preferably, before performing step S1, the following training steps are also included: Use paired training samples to train all of the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch, and zero-initialized confidence gated residual branch. Among them, the paired training sample pairs include at least the training character image, the standard clothing ground truth image corresponding to the training character image, and the target clothing foreground mask obtained from the foreground annotation or segmentation results; Construct a clothing occupancy supervision term based on the difference between the clothing occupancy field and the target clothing foreground mask; After performing the same boundary extraction process on the clothing occupancy field and the target clothing foreground mask respectively, a clothing boundary supervision term is constructed based on the difference between the obtained predicted boundary and the target boundary. A standard clothing coordinate domain reconstruction supervision term is constructed based on the reconstruction difference between the standard clothing condition tensor within the clothing foreground defined by the target clothing foreground mask and the standard clothing ground truth image.
[0019] When the image generation network adopts the iterative denoising generation network, the standard clothing ground truth image is encoded as a clean latent variable, the diffusion time step is randomly selected and noise is sampled, the denoised latent variable is obtained according to the preset noise scheduling, and the diffusion denoising supervision term is constructed based on the difference between the noise and the noise prediction obtained by the conditional denoising network based on the clean latent variable, the diffusion time step and the fusion condition token. Based on at least one of the following: photometric difference, visual feature difference, and occlusion state between the visible evidence tensor and the standard clothing ground truth image at the corresponding standard clothing coordinates, a visibility reliability target for stopping gradients is determined within the region defined by the target clothing foreground mask, and an evidence calibration supervision term is constructed based on the difference between the visibility evidence field and the visibility reliability target. Apply a first simulated occlusion and a second simulated occlusion to the same training image to obtain a first counterfactual observation view and a second counterfactual observation view with the same clothing identity but different areas of missing evidence. Perform steps S1 to S5 on the first counterfactual observation view and the second counterfactual observation view to obtain a first noise prediction result and a second noise prediction result. Within the common credible region or the union of credible regions determined by the two visibility evidence fields, a counterfactual occlusion consistency supervision term is constructed based on the difference between the first noise prediction result and the second noise prediction result.
[0020] Within the clothing foreground region defined by the two clothing occupancy fields, a texture consistency supervision term is constructed based on the two-dimensional spectral phase difference between the first noise prediction result and the second noise prediction result; For the two-dimensional coordinate offset field, coordinate offset constraints are constructed, and for the standard coordinate corresponding field constructed from the preset standard coordinate grid and the two-dimensional coordinate offset field, coordinate topology constraints are constructed. Based on the diffusion denoising supervision term, clothing occupation supervision term, clothing boundary supervision term, standard clothing coordinate domain reconstruction supervision term, evidence calibration supervision term, counterfactual occlusion consistency supervision term, texture consistency supervision term, coordinate offset constraint term, and coordinate topology constraint term, the joint training objective is obtained by weighted summation according to non-negative weights; Backpropagation is performed based on the joint training objective to update the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch, zero-initialized confidence-gated residual branch, and model parameters in the image generation network.
[0021] In summary, this method first normalizes the person image into a network input tensor and obtains spatial visual features and a global visual token. Then, it predicts the initial visibility field and initial clothing occupancy field in the person's observation coordinate domain, and predicts the coordinate offset field pointing to the person's observation coordinate domain on a standard clothing coordinate grid. A standard coordinate correspondence field is constructed from the preset standard coordinate grid and the coordinate offset field. The person image, initial visibility field, and initial clothing occupancy field are then resampled differentiably to the standard clothing coordinate domain. Subsequently, the standard domain visibility evidence field is used to select observation evidence and occlusion completion results, and the standard domain clothing occupancy field is used to limit the foreground, forming a standard clothing condition tensor. The condition tensor and coordinate information are encoded into a spatial clothing token, injected into the global visual token through a zero-initialized confidence-gated residual structure, and then the image generation network is controlled to output a standardized clothing image. This invention functionally decouples clothing spatial attribution, observation evidence credibility, and spatial correspondence, and can be used to improve clothing contour reconstruction, credible evidence preservation, and invisible area completion under pose deformation and occlusion conditions.
[0022] Compared with the prior art, the present invention has at least the following beneficial effects: (1) By explicitly representing the dense back-sampling relationship from the standard commodity coordinates to the observation coordinates of the person through the standard coordinate correspondence field, non-rigid clothing evidence can be reconstructed in a differentiable coordinate domain; (2) By decoupling the visibility evidence field and the clothing occupancy field, the confidence of the observation evidence and the probability of clothing foreground attribution are described respectively, reducing the semantic conflict between occlusion completion and foreground segmentation; (3) By explicitly synthesizing the foreground, the high-confidence observation evidence, the low-confidence region completion result and the background tensor are incorporated into the same differentiable expression, which is used for clothing outline, occlusion region and local texture. (4) By using standard coordinate space tokens to store clothing position, outline, credibility and coordinate correspondence information, the problem of insufficient spatial structure expression when only global visual conditions are used is compensated; (5) By using zero-initialized confidence gated residual structure, the newly added spatial condition branches are strictly or approximately back to the original global visual conditions in the initial state, reducing the unexpected disturbance of random initialization features to the basic generation ability; (6) By using occupation, boundary, reconstruction, evidence calibration, antifactual occlusion and topological joint constraints, the training target can directly correspond to technical failure modes such as outline drift, evidence misuse, texture misalignment and coordinate flipping. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the clothing extraction method based on visual features provided in an embodiment of the present invention.
[0024] Figure 2 This is a flowchart of the clothing extraction method based on visual features provided in this embodiment of the invention.
[0025] Figure 3This is a schematic diagram of decoupling prediction and standard domain reconstruction of the visibility evidence field, clothing occupancy field and standard coordinate corresponding field provided in the embodiments of the present invention.
[0026] Figure 4 This is a diagram of the zero-initialization confidence-gated residual fusion structure provided in an embodiment of the present invention.
[0027] Figure 5 This is a flowchart of the dual-reverse fact occlusion and multi-target joint training provided in the embodiments of the present invention.
[0028] Figure 6 This is a flowchart of the condition generation and optional evidence locking reasoning provided in the embodiments of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0030] refer to Figure 1 , Figure 2 As shown, the first embodiment of the present invention discloses a clothing extraction method based on visual features, which can be executed by a clothing extraction device based on visual features (hereinafter referred to as clothing extraction device), specifically, by one or more processors within the clothing extraction device, to implement the following method: Step S1: Obtain the input image of the person, perform normalization processing on the input image of the person to obtain the normalized input image tensor, and perform visual encoding on the normalized input image tensor to obtain spatial visual features; Specifically, step S1 further includes: acquiring an input person image I containing the wearer and the clothing to be extracted, and performing size normalization, pixel value scaling, normalization, and batch processing on the input person image I to obtain a normalized input person image tensor X. ; Spatial visual encoding and global visual encoding are performed on the normalized input image tensor X to obtain spatial visual features F and global visual token T. g Among them, the spatial visual features F maintain the two-dimensional spatial arrangement of the input person image I and are used to predict local coordinates and probability fields, while the global visual token T... g It represents the semantics of color, category, material, and overall style, and serves as the basic visual condition for conditional image generation networks; its formula is: , , , All are global visual encoders. Let B be the set of real numbers, and B be the batch size. Where is the number of channels, h is the height of the spatial feature map, w is the width of the spatial feature map, N is the number of tokens, d is the feature dimension, H is the height of the normalized input image tensor, and W is the width of the normalized input image tensor. This is the global projection layer.
[0031] In this embodiment, firstly, an input image of a person, including the wearer and the clothing to be extracted, is acquired. This input image I can be captured in real time by image acquisition devices such as smartphones, digital cameras, or webcams, or it can be read from existing digital image files stored locally or in the cloud. The posture of the person in the input image I is not limited and can include various situations such as standing, side profile, walking, or sitting, to adapt to the diverse needs of practical application scenarios. Secondly, the acquired input image is subjected to size normalization and pixel normalization processing to obtain a normalized input image tensor. Size normalization processing adjusts the spatial dimensions of the input image to a preset uniform height and width, which can be set according to the needs of subsequent network processing. Pixel normalization processing scales the pixel values of the original image to the floating-point representation range and performs normalization operations on each color channel, so that the input data has consistent numerical distribution characteristics, which is beneficial to the stable inference of the neural network. When batch processing multiple input images, a batch organization operation is also performed to organize multiple normalized image tensors into a uniform batch processing format to make full use of parallel computing resources.
[0032] Finally, spatial visual encoding and global visual encoding are performed on the normalized input image tensor to obtain spatial visual features and global visual tokens, respectively. Spatial visual encoding is processed through an encoding network containing multiple convolutional or transform structures to obtain spatial visual features that preserve the two-dimensional spatial arrangement of the input image. Each spatial location in this feature corresponds to a local region in the input image; therefore, F retains information such as local texture, edge contours, and pattern details of the clothing, providing precise feature inputs for subsequent spatial coordinate prediction and probability field prediction. Global visual encoding, through global pooling, clustering, or specific encoding processing, yields global visual tokens, which represent the overall color style, category attributes, material texture, and style semantics of the clothing in the input image. Global visual tokens serve as the foundational visual conditions for subsequent image generation networks, providing global style and category guidance for the generation process.
[0033] refer to Figure 3As shown, step S2: The spatial visual features are processed using mutually distinct visibility prediction branches, clothing occupancy prediction branches, and coordinate correspondence prediction branches to obtain an initial visibility field, an initial clothing occupancy field, and a two-dimensional coordinate offset field. Based on the preset standard coordinate grid and the two-dimensional coordinate offset field, a standard coordinate correspondence field is constructed. Among them, the visibility prediction branch, clothing occupancy prediction branch, and coordinate correspondence prediction branch each have trainable parameters that are not completely identical to each other. Specifically, step S2 further includes: processing the spatial visual feature F using mutually distinguishable visibility prediction branches and clothing occupancy prediction branches respectively, to obtain an initial visibility field defined in the person's observation coordinate domain. And the initial clothing occupies the field (The visibility prediction branch and the clothing occupancy prediction branch obtain the initial visibility field and the initial clothing occupancy field respectively through an upsampling operator and an activation function with a value range of 0 to 1), and the formula is: , ,in, For visibility prediction head, Clothing is the top prediction. For upsampling operators, is an activation function with values ranging from 0 to 1; among them, the visibility prediction branch is used to estimate whether clothing evidence in the observation coordinates of a person can be preserved, and the clothing occupancy prediction branch is used to estimate the probability that the corresponding position belongs to the target clothing foreground. The two are trained using different supervision targets. The spatial visual feature F is processed using a coordinate-correspondence prediction branch to obtain a two-dimensional coordinate offset field defined on a standard clothing coordinate grid, with values pointing to the person's observation coordinate domain as a two-dimensional offset vector. , , , For the coordinates corresponding to the prediction head, It is the hyperbolic tangent function. The preset maximum coordinate offset scale; Based on the preset standard coordinate grid C0 and two-dimensional coordinate offset field Calculate the two-dimensional sampling coordinate C(u) of any standard clothing coordinate u in the standard clothing coordinate domain Ωs in the normalized input person image tensor X, corresponding to the person's observation coordinate domain Ωi. , , This indicates a channel arrangement transformation that adjusts the coordinate channels of the two-dimensional coordinate offset field to the arrangement required by the sampling operator (i.e., P only represents tensor dimension rearrangement, without changing the coordinate values). This represents the coordinate offset field after rearrangement. This represents the rearranged coordinate offset field corresponding to the standard clothing coordinate u. This is the standard coordinate grid corresponding to the standard clothing coordinate u. This represents the truncation operator that projects two-dimensional coordinates onto a normalized coordinate interval; Based on the two-dimensional sampling coordinates corresponding to all standard clothing coordinates, a standard coordinate corresponding field C is constructed, pointing from the standard clothing coordinates to the person's observation coordinates; The standard coordinate grid is predefined in the standard clothing coordinate domain, and the standard coordinate corresponding field C represents the reverse sampling relationship from the standard clothing coordinates to the person's observation coordinates.
[0034] In this embodiment, spatial visual features are input into a trainable coordinate correspondence transformation. This transformation can consist of one or more convolutional layers, with its output including a two-channel coordinate projection layer, where the two channels represent the lateral and longitudinal coordinate offset responses, respectively. An upsampling operator adjusts the two-channel response to the spatial resolution of the standard clothing coordinate domain. A hyperbolic tangent function compresses the response to the interval [-1, 1] position by position and coordinate component by component, and then multiplies it by a preset maximum coordinate offset scale to obtain a two-dimensional coordinate offset field. For any standard clothing coordinate, the two components represent the lateral and longitudinal relative sampling displacements of that coordinate in the person's observation coordinate domain, respectively.
[0035] A standard coordinate grid is pre-established in the standard clothing coordinate domain. The standard coordinate grid is a uniformly spaced normalized grid with horizontal and vertical coordinates evenly distributed in the interval [-1, 1]. The two-dimensional coordinate offset field is transformed from a B×2×H×W coordinate channel-first arrangement to a B×H×W×2 coordinate channel-last arrangement using channel arrangement transformation, resulting in a rearranged coordinate offset field. Subsequently, the rearranged coordinate offset field is added position-by-position to the standard coordinate grid, and the resulting two-dimensional coordinates are projected onto [-1, 1]² to obtain the standard coordinate corresponding field. Thus, C(u) represents the two-dimensional sampled coordinates corresponding to the standard clothing coordinate u in the person's observation coordinate domain. This mapping direction allows each standard clothing position to actively query the corresponding observation in the person's image. The coordinate values are projected onto the normalized sampling range. Grid sampling uses bilinear interpolation, bicubic interpolation, or other differentiable kernel interpolation, while preserving the gradient propagation path from reconstruction error to the coordinate prediction head.
[0036] Specifically, the visibility prediction branch transforms spatial visual features through its internal visibility prediction head, restores spatial resolution via an upsampling operator, and then maps using an activation function ranging from 0 to 1 to obtain an initial visibility field defined in the person's observation coordinate domain. This field is used to estimate the credibility of clothing observation evidence at each location. The clothing occupancy prediction branch transforms the same spatial visual features through its internal clothing occupancy prediction head, and obtains an initial clothing occupancy field defined in the person's observation coordinate domain via the same upsampling and activation function mapping. This field is used to estimate the probability that each location belongs to the target clothing foreground. The two branches have slightly different trainable parameters and different supervision targets, achieving semantic decoupling between "observation credibility" and "spatial attribution," enabling clear distinction between occlusion-induced invisibility and background areas.
[0037] The coordinate correspondence prediction branch transforms spatial visual features through its internal coordinate correspondence prediction head. After upsampling, the response is compressed using a hyperbolic tangent function and multiplied by a preset maximum offset scale, resulting in a two-dimensional coordinate offset field defined on a standard clothing coordinate grid. This field represents the sampling displacement from the standard coordinate point to the person's observation coordinate domain. Subsequently, a standard coordinate correspondence field is constructed based on the preset standard coordinate grid and the two-dimensional coordinate offset field. The format of the coordinate offset field is adjusted through channel arrangement transformation, and it is added position-by-position to the preset standard coordinate grid. A truncation operator projects the coordinates into a normalized interval, ultimately establishing a reverse sampling relationship from the standard clothing coordinate domain to the person's observation coordinate domain. This correspondence field enables subsequent operations to retrieve clothing content in a standard pose from the input person image using a reverse lookup method.
[0038] Step S3: Based on the normalized input character image tensor, initial visibility field, initial clothing occupancy field, and spatial visual features, perform differentiable mesh resampling and occlusion completion processing respectively to obtain the visible evidence tensor, visibility evidence field, clothing occupancy field, and occlusion completion tensor, and construct the standard clothing condition tensor (i.e., use the visibility evidence field to control the credibility fusion between the visible evidence tensor and the occlusion completion tensor, and use the clothing occupancy field to control the spatial synthesis between the clothing foreground and background to obtain the standard clothing condition tensor). Specifically, step S3 further includes: based on the standard coordinate corresponding field, performing differentiable grid resampling on the normalized input person image tensor X or the clothing features, initial visibility field, and initial clothing occupancy field obtained from the normalized input person image tensor, respectively, to obtain a visibility evidence tensor defined in the standard clothing coordinate domain. Visible evidence field And clothing takes center stage , For differentiable mesh resampling (i.e., W(A,C) represents differentiable mesh resampling of tensor A according to the field C corresponding to the standard coordinates); The spatial visual features are processed using an occlusion completion branch to obtain an occlusion completion tensor defined in the standard clothing coordinate domain. , , To complete the decoder; that is, when resampling the clothing features obtained from the normalized input person image tensor, the normalized input person image tensor in the above formula is replaced with clothing features; differentiable grid resampling uses at least one of bilinear interpolation, bicubic interpolation, or differentiable kernel interpolation, and retains the gradient propagation path from the reconstruction error in the standard clothing coordinate domain to the prediction branch corresponding to the coordinates; the occlusion completion branch includes at least one upsampling layer, and obtains the occlusion completion tensor based on spatial visual features; Based on the visible evidence tensor E, the visibility evidence field V, the clothing occupancy field O, the occlusion completion tensor R, and the background tensor B bg Construct a standard clothing condition tensor G, which consists of the values G(u) of the standard clothing condition tensor at all standard clothing coordinates u. Its formula is: , Let u be the probability that the standard clothing coordinates belong to the target clothing foreground. For element-wise multiplication, To determine the credibility of clothing observation evidence at the standard clothing coordinate u, Let's determine the value of the occlusion completion tensor at the standard clothing coordinate u. Let the value of the visible evidence tensor be taken at the standard clothing coordinate u. Let u be the value of the background tensor at the standard clothing coordinates.
[0039] In this embodiment, a shared spatial coding backbone is followed by mutually distinct visibility prediction heads and clothing occupancy prediction heads. The two prediction heads first output an initial visibility field and an initial clothing occupancy field in parallel within the person's observation coordinate domain. The initial visibility field answers whether the content of the person's observation location can be retained as clothing evidence, and the initial clothing occupancy field answers whether the person's observation location belongs to the target clothing. The two prediction heads use parameters and supervision targets that are not entirely identical to each other. A reverse differentiable query from the standard clothing coordinates to the person's observation coordinates is performed through the standard coordinate corresponding field, uniformly resampling the normalized input person image tensor, the initial visibility field, and the initial clothing occupancy field to the standard clothing coordinate domain, resulting in the standard domain visibility evidence, the standard domain visibility evidence field, and the standard domain clothing occupancy field, respectively. When an external visible region mask is available, it can be multiplied by the initial evidence reliability before grid sampling; this operation only reduces the evidence reliability of the occluded location and does not change the occupancy semantics of the location belonging to the clothing foreground.
[0040] The completion decoder generates a candidate completion tensor R based on spatial visual features to recover standard clothing content corresponding to human occlusion, wrinkle compression, or low-reliability observations. Within the clothing foreground, V determines the contribution of visible evidence E and occlusion completion R; outside the clothing foreground, O transitions the output to a preset or predicted background B. Based on the standard clothing condition tensor, this expression assigns "evidence selection" and "foreground constraint" to different latent variables. Even if V is low at a certain location, as long as O is high, that location is still completed by R as clothing foreground; only when O is low does the output shift to the background, thus avoiding the erroneous deletion of invisible clothing areas.
[0041] Specifically, differentiable grid resampling is implemented using any one of bilinear interpolation, bicubic interpolation, or differentiable kernel interpolation. For each coordinate position in the standard clothing coordinate domain, the sampling position in the person's observation coordinate domain pointed to by that position in the corresponding field of the standard coordinates is queried. The feature value of that position is calculated using an interpolation algorithm, thereby transforming each input feature from the person's observation coordinate domain to the standard clothing coordinate domain. After this resampling, the normalized input person image tensor or its clothing features yields the visibility evidence tensor, which represents the clothing appearance information extracted from the input person image and aligned in the standard clothing coordinate domain. This tensor is based on objective pixel data from the original photograph. After this resampling, the initial visibility field yields the visibility evidence field, which represents the credibility information of observation evidence at each position in the standard clothing coordinate domain, answering the question of "whether the observation at this position is reliable." After this resampling, the initial clothing occupancy field yields the clothing occupancy field, which represents the probability that each position in the standard clothing coordinate domain belongs to the target clothing foreground, answering the question of "whether this position belongs to clothing." The above resampling process preserves the gradient propagation path from the reconstruction error in the standard clothing coordinate domain to the corresponding prediction branch, so that the prediction of the coordinate offset field can be optimized end-to-end through the supervision signal of the subsequent loss function, thereby gradually learning a more accurate spatial correspondence during the training process.
[0042] Simultaneously, an occlusion completion branch is used to process the spatial visual features, resulting in an occlusion completion tensor defined in the standard clothing coordinate domain. This occlusion completion branch includes at least one upsampling layer to progressively restore the spatial visual features from a lower spatial resolution to the full resolution of the standard clothing coordinate domain. The occlusion completion tensor is used to predict the clothing content that should be presented in areas of the standard clothing coordinate domain where observations are unreliable due to occlusion or pose deformation. Essentially, it is a completion result generated based on prior knowledge for invisible areas.
[0043] Subsequently, a standard clothing condition tensor is constructed based on the visible evidence tensor, the visibility evidence field, the clothing occupancy field, the occlusion completion tensor, and the preset background tensor. Specifically, for each position in the standard clothing coordinate domain, the visible evidence tensor and the occlusion completion tensor are first weighted and fused within the clothing foreground according to the value of the visibility evidence field: when the visibility evidence field value is high, it indicates that the observation evidence at that position is credible, so more of the real pixels sampled from the input person image are retained; when the visibility evidence field value is low, it indicates that there is occlusion or inaccurate deformation alignment at that position, so more of the completion result generated by the occlusion completion branch is used. Then, the above fusion result and the background tensor are spatially synthesized according to the value of the clothing occupancy field: when the clothing occupancy field value is high, it indicates that the position belongs to the target clothing foreground, so the above foreground fusion result is output; when the clothing occupancy field value is low, it indicates that the position belongs to the background region, so the background tensor is output to fill the non-clothing region.
[0044] Through this step, the multi-source information originally scattered in the character observation coordinate domain is aligned to the same standard clothing coordinate domain through unified resampling, achieving precise spatial correspondence. The occlusion completion branch provides reasonable prior predictions for invisible areas. The final constructed standard clothing condition tensor assigns "evidence selection" and "foreground constraint" to two different fields—even if the visibility of a certain position is low (observation is unreliable), as long as the occupancy rate is high (belonging to the clothing foreground), that position is still filled by the completion result as a clothing area, avoiding the erroneous deletion of occluded areas as background; only when the occupancy rate is low does the output turn to the background. This decoupled design effectively solves the problem in traditional methods where occluded areas are easily misjudged as background, causing clothing to appear "broken," ensuring the integrity and continuity of the clothing area, and providing structurally complete and pixel-reliable conditional inputs for the subsequent generative network.
[0045] refer to Figure 4 As shown, step S4: Spatial encoding is performed on the standard clothing condition tensor, visibility evidence field, clothing occupancy field and standard coordinate correspondence field to obtain a spatial clothing token that preserves the standard clothing coordinate position information, and the fusion condition token is calculated based on the confidence statistics. Specifically, step S4 further includes: concatenating the standard clothing condition tensor G, the visibility evidence field V, the clothing occupancy field O, and the standard coordinate correspondence field C along the channel dimension to obtain a seven-channel spatial condition tensor that simultaneously includes appearance, evidence, contour, and coordinates. , For splicing operations, This is a transpose operation; The seven-channel spatial conditional tensor K is convolutionally encoded, normalized, adaptively pooled, flattened, and linearly projected to form a spatial clothing token that matches the number and dimensions of the global visual tokens. , For linear projection layers, For flattening operation, For adaptive pooling, For spatial encoders; Spatial statistics of the visibility evidence field V and the clothing occupancy field O in the standard coordinate domain are calculated separately and extended to the token dimension to reflect the sufficiency of observational evidence and the proportion of clothing in the foreground, thus obtaining confidence statistics. , Let V be the value of the visibility evidence field V at coordinates (i,j). Let O be the value of the clothing occupation field at coordinates (i,j), H be the height of the normalized input character image tensor, and W be the width of the normalized input character image tensor. Based on the confidence information and confidence statistics determined by the visibility evidence field and the clothing occupancy field, the spatial clothing token is injected into the global visual token using a zero-initialization confidence-gated residual method to obtain the fusion condition token. , , This can be used for token-by-token gating, channel-by-channel gating, or element-by-element gating. For trainable residual scaling, For trainable gated mappings; where, when the initial value of the trainable residual scale is zero, the fusion conditional token is equal to the global visual token. Because It is initialized to zero, T f Strictly equal to T g Spatial branches do not alter the underlying visual conditions under random initialization. After training, Together with the gating network, it determines the injection range and location of spatial clothing tokens, forming a verifiable security fallback property.
[0046] In this embodiment, the standard clothing condition tensor, the visibility evidence field, the clothing occupancy field, and the two coordinate channels of the standard coordinate corresponding field are concatenated along the channel dimension to obtain the spatial condition tensor. At least one operation is sequentially performed on the spatial condition tensor: convolutional encoding, normalization, adaptive pooling, flattening, and linear projection to obtain the spatial clothing token. Confidence statistics are obtained based on the spatial statistics of the visibility evidence field and the clothing occupancy field, and the fused condition token is obtained according to the following formula: That is, confidence statistics are calculated based on the visibility evidence field and the clothing occupancy field, and the confidence statistics are extended to a dimension suitable for the token sequence. The global visual token, the spatial clothing token, and the confidence statistics are concatenated along the token feature dimension and input into a trainable gated mapping (MLP), and then gating activation values are obtained through a sigmoid function. In parallel with the calculation of the gating activation values, a zero-initialized trainable residual scale is input into a hyperbolic tangent function to obtain a bounded residual scale. The effective residual gating is obtained by element-wise multiplying the bounded residual scale with the trainable residual scale, and T is controlled by the effective residual gating. s As residual increment injected into T g Obtain the fusion condition token.
[0047] Specifically, the standard clothing condition tensor, the visibility evidence field, the clothing occupancy field, and two coordinate channels of the standard coordinate correspondence field are concatenated along the channel dimension to obtain a spatial condition tensor that simultaneously contains appearance information, evidence credibility information, foreground attribution information, and precise point-by-point coordinate mapping information. The standard clothing condition tensor contributes visual content from three channels, the visibility evidence field and the clothing occupancy field each contribute credibility and attribution probability from one channel, and the horizontal and vertical coordinate channels of the standard coordinate correspondence field contribute position mapping information. After concatenation, a total of seven channels are obtained. This concatenation operation combines four tensors from different sources but with the same spatial resolution in a concatenated manner along the channel dimension, allowing subsequent processing to simultaneously access four types of heterogeneous information—visual content, credibility, foreground attribution, and spatial coordinates—within a unified tensor.
[0048] The concatenated spatial conditional tensor is sequentially subjected to convolutional encoding, normalization, adaptive pooling, flattening, and linear projection to form spatial clothing tokens that match the number and feature dimensions of the global visual tokens. Convolutional encoding uses a spatial encoder with multiple convolutional layers to abstract local features from the spatial conditional tensor, extracting higher-level semantic information such as clothing contours, texture distribution, and coordinate mapping relationships. Adaptive pooling forcibly compresses the spatial resolution of the feature map output by convolutional encoding to a preset fixed size, ensuring that the number of tokens does not change with the input image size and guaranteeing the model's generalization ability to inputs at different resolutions. Flattening flattens the multidimensional features that maintain the spatial grid structure after pooling into a one-dimensional feature sequence. Linear projection maps the flattened features to the exact same feature dimensions as the global visual tokens, enabling the spatial clothing tokens and global visual tokens to interact within the same feature space. Each token position in the spatial clothing token corresponds to a local area in the standard clothing coordinate domain. By incorporating the channel information of the field corresponding to the standard coordinate into the encoding process, each token retains the position information of the standard clothing part it corresponds to, thereby making up for the problem of insufficient spatial structure expression when only global visual tokens are used.
[0049] Spatial statistics for the visibility evidence field and the clothing occupancy field in the standard coordinate domain are calculated separately, i.e., their global averages are calculated to obtain confidence statistics. These confidence statistics reflect the overall sufficiency of observational evidence and the proportion of clothing foreground occupancy in the entire image: the closer the average value of the visibility evidence field is to 1, the more clearly visible most of the clothing area in the input image is, with minimal occlusion; the closer it is to 0, the more extensive the occlusion or the more severe the deformation, requiring incomplete completion. Similarly, the closer the average value of the clothing occupancy field is to 1, the larger the proportion of the target clothing in the image; the closer it is to 0, the smaller the proportion of clothing. These two global statistics are extended to the token dimension, enabling each token position to perceive the overall occlusion level and area proportion, providing global contextual information for subsequent gating fusion.
[0050] Subsequently, based on the confidence information determined by the visibility evidence field and the clothing occupancy field, as well as the aforementioned confidence statistics, the spatial clothing token is injected into the global visual token using a zero-initialized confidence-gated residual method. Specifically, the global visual token, the spatial clothing token, and the expanded confidence statistics are input into a trainable gating mapping network, which outputs a gating activation value. In parallel with the calculation of the gating activation value, a trainable residual scale parameter is set, and its initial value is zero. This parameter is mapped to a bounded residual scale value using a hyperbolic tangent function, and then multiplied element-wise with the gating activation value to obtain the effective residual gating. Since the residual scale parameter is strictly zero during initialization, the effective residual gating is also zero in the initial training phase. At this point, the fusion conditional token is strictly equal to the global visual token, and the newly added spatial conditional branch does not change the original visual conditions at all, thus perfectly protecting the basic capabilities of the pre-trained generative network.
[0051] By effectively controlling spatial clothing tokens as residual increments and injecting them into the global visual token, a fusion conditional token is obtained. This fusion method superimposes spatial location information onto the global semantic token in residual form, preserving the original overall style and category guidance capabilities of the global visual token while introducing the location-aware capability of the spatial clothing token. As training progresses, the residual scale parameter gradually learns appropriate values, and the gating network gradually learns to determine the injection strength and application location of the spatial token based on global confidence statistics and local confidence information. Even during the initial random initialization phase of training, since the residual scale is zero, new branches do not cause any unexpected perturbations to the generated results, significantly ensuring training stability. As training progresses, this gating mechanism can adaptively adjust the injection strength of spatial conditions—when overall occlusion is severe, the gating value tends to decrease, and the model reverts to a generation mode based primarily on global semantics, avoiding reliance on unreliable spatial information; when observations are sufficient, the gating value increases, and spatial structural information is fully injected to ensure accurate alignment of the generated image with the input image in terms of contours and textures. This design combines the advantages of safe backoff and adaptive enhancement.
[0052] refer to Figure 6 As shown, step S5: Input the fusion condition token into the preset image generation network to obtain a standardized clothing image (i.e., a clothing image in the standard product display format).
[0053] Specifically, step S5 further includes: Step S501: Obtain a high-confidence clothing evidence confidence map based on the visibility evidence field V and the clothing occupancy field O. Furthermore, the confidence map Q of the high-confidence clothing evidence is adjusted to the spatial resolution of the latent variables to obtain the spatial confidence weight map at time step t. , For the cropping operation, For space size adjustment operations; Step S502: Encode the visible evidence tensor E into latent variables of evidence. And construct latent variables for time synchronization evidence according to the noise level at time step t. , For cumulative noise dispatch coefficient, This is random sampling noise; Step S503: Based on the locking scheduling coefficient Spatial confidence weights plot at time step t Obtain locked weight ; Step S504: Construct latent variables for time synchronization evidence from the noise levels at time step t. By locked weight Write the latent variables generated at time step t. Highly reliable location, Evidence obtained at time step t is used to lock in latent variables. ;Will Input the denoising network at the current time step to preserve reliable clothing evidence in the input person image in high-confidence regions and continue to perform generative completion in low-confidence regions; Step S505: Combine the unconditional token and the fusion conditional token Evidence-based locking of latent variables at time step t The input is fed into a pre-defined image generation network to obtain unconditional noise predictions. Conditional noise prediction The image generation network is an iterative denoising generation network. Step S506: Based on the spatial confidence weight map at time step t Set spatially relevant conditions to guide the scale at time step t, corresponding to the standard clothing coordinates u. , The guiding scale for observational evidence at time step t corresponds to the region of high-credibility clothing evidence. This is a spatial confidence weight map corresponding to the standard clothing coordinates u at time step t. The completion guidance scale is the region of low-confidence clothing evidence corresponding to time step t; both are preset or change with the denoising time. Step S507: Guide the scale based on the spatially relevant conditions corresponding to the standard clothing coordinates u at time step t. Predicting unconditional noise Conditional noise prediction The difference between the values is used to perform spatial modulation, resulting in a spatial modulation noise prediction at time step t. This approach uses an observational evidence-guided scale for high-confidence clothing evidence areas and a completion-guided scale for low-confidence clothing evidence areas; and employs a scheduler to predict spatial modulation noise. Evidence-based identification of latent variables at time step t Processing at time step t yields the latent variables at time step t-1. , For the unconditional noise prediction corresponding to the standard clothing coordinate u, For conditional noise prediction corresponding to the standard clothing coordinate u, For scheduler; Step S508: Repeat steps S501 to S507 until the latent variables from t=T to t=1 are calculated, and the termination latent variable is obtained. And use the latent variable decoder to terminate the latent variable Decoding is performed to obtain a standardized clothing image Y, where the termination latent variable... Let T be the latent variable at time step t=0, and T be the total number of iterations.
[0054] In this embodiment, the time step t is a discrete iteration number in the preset noise scheduling rather than a physical number of seconds. During inference, the latent variables are updated sequentially according to t=T, T-1, ..., 1, with different time steps corresponding to different noise levels. Specifically, the visible evidence tensor is encoded as evidence latent variables, and noise corresponding to the current noise scheduling is added to the evidence latent variables according to the current denoising time step t to obtain time-synchronized evidence latent variables. Locking weights are obtained based on the locking scheduling coefficient that changes with denoising time and the time step confidence graph, and the time-synchronized evidence latent variables are reinjected into the currently generated latent variables.
[0055] The latent variables generated after the evidence is locked are input into the denoising network at the current denoising time step to preserve clothing evidence obtained from the input person image in high-confidence clothing evidence regions and perform generative completion in low-confidence clothing evidence regions. The goal is to include time-synchronized evidence latent variables that are consistent with the current noise level before they enter the current denoising network. By locked weight Write back to the high-confidence region; if used directly Iterative denoising may rewrite the colors, patterns, or identifiers already obtained from the input image of a person. The current step actually uses... Alternative It serves as a common latent variable input for both conditional and unconditional prediction.
[0056] The generated latent variables are updated based on spatially modulated noise predictions, so that high-confidence clothing evidence regions focus on preserving observed clothing evidence, while low-confidence clothing evidence regions focus on recovering invisible clothing content. This involves generating spatially modulated noise predictions. The purpose is to provide different denoising directions and guidance intensities for different spatial locations at the same denoising time step; the scheduler obtains the latent variables for the next time step and repeats this process. Then, the latent variable decoder outputs... , This refers to the decoder part of a variational autoencoder (VAE).
[0057] Specifically, this image generation network employs an iterative denoising generation network, generating the final standard product display image of clothing by starting with pure noise and progressively denoising it. The entire denoising process begins with a total of T iterations, decreasing sequentially to 1, for a total of T iterations. The specific processing in each iteration is explained in detail below. In each iteration, a high-confidence clothing evidence confidence map is first obtained based on the visibility evidence field and the clothing occupancy field. Specifically, the visibility evidence field and the clothing occupancy field are multiplied element-wise, and then a cropping operation is used to restrict the values to between zero and one, resulting in a high-confidence clothing evidence confidence map. Only positions that simultaneously meet the conditions of "observational confidence" and "belonging to the clothing foreground" will obtain a higher value in this confidence map. Subsequently, the confidence map is adjusted to the exact same spatial resolution as the current latent variable through a spatial size adjustment operation, resulting in a spatial confidence weight map at the current time step. Since the denoising process of the diffusion model is carried out in the latent variable space after compression by the variational autoencoder, its spatial resolution is much smaller than that of the original pixel space. Therefore, this size adjustment operation must be used to align the confidence map with the latent variable spatial resolution so that it can be directly applied to various positions of the latent variable feature map as spatial weights.
[0058] Simultaneously, the visible evidence tensor is encoded into latent evidence variables. This is achieved by mapping the visible evidence tensor in pixel space to the latent variable space using a variational autoencoder, resulting in a clean latent variable representation carrying the clothing texture information of high-confidence regions in the original input image. Then, time-synchronized latent evidence variables are constructed according to the noise level of the current time step: the latent evidence variables are scaled based on the cumulative noise scheduling coefficient corresponding to the current time step, and random sampling noise matching the noise intensity of that time step is superimposed, ensuring that the obtained time-synchronized latent evidence variables are perfectly aligned with the generated latent variables at the current time step in terms of noise statistics. This operation "ages" the reliable texture information from the original input image to the same level of blurriness as the currently generated draft after adding noise, thus preventing out-of-distribution input problems due to differences in sharpness when subsequently written into the generated latent variables.
[0059] Subsequently, the locking weights are obtained based on the preset locking scheduling coefficients that vary with denoising time and the aforementioned spatial confidence weight map. The locking scheduling coefficients are a preset function that varies with the number of iterations, used to control the overall strength of evidence locking at different denoising stages: in the early stages of denoising (when t is large and the image is extremely blurry), the locking strength is weak to avoid locking coarse noise patterns as real textures; in the later stages of denoising (when t is small and the image tends to be clearer), the locking strength reaches its maximum, finely preserving edge and texture details. The spatial confidence weight map provides location-specific spatial differentiation control: high-confidence regions receive higher locking weights, and low-confidence regions receive lower locking weights. The final locking weights are obtained by multiplying the two and cropping, achieving dual differentiation control of "overall variation with the number of iterations and local variation with spatial location."
[0060] The time-synchronization evidence latent variables are written into the high-confidence positions of the generated latent variables at the current time step according to the aforementioned locking weights, resulting in the evidence-locked latent variables at the current time step. Specifically, in the high-confidence clothing evidence region, the current generated latent variables are replaced by the time-synchronization evidence latent variables, thereby forcibly injecting the original image texture information of that region into the generation process, preventing the noise of iterative denoising from gradually "washing away" the trademarks, stripes, or fine patterns on the clothing; in the low-confidence region, the generated latent variables remain unchanged, allowing the denoising network to use its imagination to complete the data. This operation achieves protective locking of observational evidence in the high-confidence region, while not hindering the generative completion in the low-confidence region, so that the final output standardized clothing image can faithfully reproduce the visible clothing details in the input image, and can reasonably complete the occluded or severely deformed areas.
[0061] The unconditional token, the fused conditional token, and the evidence-locked latent variables at the current time step are input into the iterative denoising generation network to obtain unconditional noise predictions and conditional noise predictions, respectively. The unconditional token represents the generation direction without any conditional guidance, while the fused conditional token carries complete conditional information including global semantics and spatial structure. The denoising network predicts the noise contained in the current latent variables under both conditions; the difference between the two reflects the guiding role of conditional information in the generation direction.
[0062] Based on the spatial confidence weight map at the current time step, spatially relevant conditional guidance scales are set for each spatial location at the current time step. Specifically, an observational evidence guidance scale is used in high-confidence clothing evidence regions, making these regions more inclined to follow the direction of conditional noise prediction, thus faithfully preserving reliable textures extracted from the input image; a completion guidance scale is used in low-confidence clothing evidence regions, giving these regions greater generative freedom to leverage their completion capabilities. The interpolation weights between the two guidance scales are determined position-by-position by the spatial confidence weight map, ensuring a smooth spatial transition of the guidance strategy and avoiding unnatural generation caused by hard boundaries.
[0063] Based on the aforementioned spatially correlated conditional guiding scale, spatial modulation is applied to the difference between the unconditional noise prediction and the conditional noise prediction to obtain the spatially modulated noise prediction at the current time step. This modulation focuses on preserving observed clothing evidence in high-confidence regions and on recovering invisible clothing content in low-confidence regions, achieving a differentiated denoising strategy for different spatial locations within the same denoising time step. Subsequently, the scheduler calculates the latent variables for the next time step based on the spatially modulated noise prediction, the generated latent variables after evidence locking, and the current time step, completing the iterative update for this step.
[0064] The above process is repeated, decreasing the total number of iterations T sequentially to 1 until the terminating latent variable is obtained. Finally, the terminating latent variable is decoded using a latent variable decoder, mapping it back from the latent variable space to the pixel space to obtain the final standardized clothing image. This standardized clothing image is a standard product display format and can be used in downstream applications such as e-commerce product display, virtual try-on, or clothing retrieval.
[0065] Through evidence locking and spatial adaptive guidance in the iterative denoising process described above, reliable colors, patterns, and symbols in the input image are preserved in high-confidence clothing evidence regions, avoiding the destruction of key details by iterative noise. In low-confidence regions, the generative model's completion capabilities are fully utilized to reasonably restore occluded or severely deformed content. The spatial confidence weight map, combined with the dynamic adjustment of the locking scheduling coefficient at different iteration steps, realizes a progressive protection strategy of early weak locking and later strong locking, making evidence injection and denoising processes complement each other, ultimately generating a standardized clothing image that combines fidelity and integrity.
[0066] refer to Figure 5 As shown, preferably, in this embodiment, before performing step S1, the following training step is also included: training all of the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch and zero-initialization confidence gated residual branch using paired training samples; The paired training sample pairs include at least a training image of a person and a ground truth image of standard clothing corresponding to the training image of a person. and the target clothing foreground mask obtained from foreground annotation or segmentation results. M is directly used for clothing occupancy supervision and clothing boundary supervision, and is also used as foreground weights for standard clothing coordinate domain reconstruction supervision and visibility reliability targets, thereby supervising O, G, and V respectively; after the model training is completed, no further input is required during the inference phase. Alternatively, M can be used, where only Y represents the model output. Here, the pixel values of M represent the degree to which the coordinates of the standard product belong to the foreground of the target clothing; M can be a binary mask or a soft mask obtained through anti-aliasing or probabilistic segmentation. Furthermore, in the latent variable diffusion implementation during the training phase, the paired ground truth images of the standard clothing are mapped to clean latent variables via a variational autoencoder; t is randomly sampled from a preset set of discrete time steps {1,…,T}, noise is sampled from a standard normal distribution, and a noisy latent variable is constructed based on the cumulative noise scheduling coefficient corresponding to that time step. t represents the noise level and iteration position, not the actual time consumed; the cumulative noise scheduling coefficient varies with t, therefore the noise intensity is different at each time step.
[0067] A clothing occupancy supervision term is constructed based on the difference between the clothing occupancy field O and the target clothing foreground mask M. , , Used for pixel-by-pixel foreground discrimination For binary cross-entropy loss, The weighting coefficients for the binary cross-entropy loss are... Dice difference at the boundary, used for region overlap. It is the numerical stability constant. These are the weighting coefficients of the Dice loss. The summation of the element-wise products of the predicted occupancy probability O and the truth mask M represents an approximation of the "intersection" between the prediction and the truth. The summation of the predicted occupancy probabilities for all locations represents the "area" of the predicted foreground region. The summation of the ground truth masks over all locations represents the "area" of the ground truth foreground region; After performing the same boundary extraction process on both the clothing occupancy field O and the target clothing foreground mask M, a clothing boundary supervision term is constructed based on the difference between the predicted boundary and the target boundary. , This indicates that the same boundary extraction operator is used for O and M. To predict the boundary, For the target boundary; Based on the standard clothing condition tensor within the clothing foreground defined by the target clothing foreground mask M and the standard clothing ground truth image. Reconstruction differences between them, constructing standard clothing coordinate domain reconstruction supervision items , The value of M corresponding to the standard clothing coordinate u. Let u be the standard clothing coordinate, and the corresponding value of G. For the standard clothing coordinate u The value of G is determined by first limiting the standard clothing foreground using M, and then calculating the relationship between G and the foreground. The normalized L1 difference is used to obtain the gradient, which is then used to train the coordinate correspondence, occlusion completion, and conditional tensor construction branches. The foreground normalization mentioned above avoids large areas of background pixels dominating the gradient, so that the optimization signal is concentrated in the target clothing area. Boundary supervision and region supervision constrain the local contour and the overall occupancy, respectively, and the soft occupancy intersection-union ratio during the training process is not used to replace the evaluation of the independent test set.
[0068] When the image generation network uses an iterative denoising generation network, the standard clothing ground truth image is generated. Encode as clean latent variables, randomly select diffusion time steps and sample noise. The latent noise variables are obtained based on the preset noise scheduling, and the noise is then combined with a conditional denoising network. Based on clean latent variables Diffusion time step t and fusion condition token T f (and optional clothing category embedding), the difference between the obtained noise predictions is used to construct a diffusion denoising supervision term. , For mathematical expectation operators, The square of the L2 norm; the image generation network is not limited to the latent variable diffusion network, but can also use the pixel spatial diffusion network, the flow matching network, the autoregressive image generation network or other trainable generative structures that can receive fused visual conditions and output standard clothing images; Based on the visible evidence tensor and the standard clothing truth image Based on at least one of the following factors—luminance difference, visual feature difference, and occlusion state—at the corresponding standard clothing coordinates, determine the visibility reliability target of the stopping gradient within the region defined by the target clothing foreground mask M. And based on the visibility evidence field V and the visibility reliability target The differences between them construct evidence for calibration supervision items , , To stop the gradient operator, Let be an exponential function with base e, and c be the channel index. Scaling factor Let c be the visible evidence tensor. For channel c Specifically, comparing E with M within the clothing foreground defined by M. The local photometric differences are used to obtain the reliability target for stopping the gradient. The smaller the difference, The larger the value, the greater the difference; occlusion, human presence, or coordinate mismatch can all increase the discrepancy. The value decreases accordingly. Then, the Brier form is used to calibrate V; where the evidence calibration supervision term is not used to determine whether a certain position belongs to clothing, but to estimate whether the resampled evidence E can be directly retained. Specifically, V is calibrated to the confidence probability of whether visible evidence E can be directly retained, so that the standard clothing condition tensor G retains E at high confidence positions and is replaced by the occlusion completion tensor R at low confidence positions; the clothing occupancy field O is still used to represent whether the standard clothing coordinates belong to the target clothing foreground. After this training, V controls V⊙E and (1) in the standard clothing condition tensor G. The choice of V)⊙R: High V retains reliable observations, while low V is supplemented by R; O is still only responsible for foreground limitation. This avoids occlusions, human body areas, or misaligned textures being written into G as clothing evidence, which is the direct purpose of constructing the evidence calibration supervision term.
[0069] Applying a first simulated occlusion and a second simulated occlusion to the same training image of a person, we obtain a first counterfactual observation view and a second counterfactual observation view that have the same clothing and identity but different areas of missing evidence. Then, we perform steps S1 to S5 on the first counterfactual observation view and the second counterfactual observation view respectively to obtain the first noise prediction result. Second noise prediction results ; Within the common credible region or the union of credible regions determined by the two visibility evidence fields, a counterfactual occlusion consistency supervision term is constructed based on the difference between the first noise prediction result and the second noise prediction result. In simple terms, two simulated occlusion-preserving masks are sampled for the same training input X, and the regions outside the masks are replaced with fill values or texture f to obtain two counterfactual observation views. A(k) comes from the random occlusion generator during training and is not part of the inference input; the two views have the same clothing and identity but different missing evidence locations, and share the same model parameters; the two noise predictions are calculated separately under the same diffusion time step and the same noise samples. The counterfactual comparison region is constructed from the two visibility evidence fields. :Pick =min[V(1),V(2)] represents the common reliable region, and takes the value of min[V(1),V(2)]. =max[V(1),V(2)] represents the union of believable regions. Counterfactual occlusion consistency supervision term. Only in Compare the results of the two paths internally.
[0070] Within the clothing foreground region defined by the two clothing occupancy fields, a texture consistency supervision term is constructed based on the two-dimensional spectral phase difference between the first noise prediction result and the second noise prediction result. , , For the average value operator, For comparison regions, For phase difference, Let be the phase spectrum of the k-th counterfactual observation view. For argument operator, For two-dimensional Fourier transform, The noise prediction result is obtained by performing a two-dimensional Fourier transform on the two noise predictions or their corresponding clothing reconstruction features, and adjusting the foreground weights from the clothing occupancy field to the same resolution. By limiting the comparison region and then comparing the spectral phase, the spatial arrangement of stripes, text, logos, or repeating textures is constrained; dual occlusion supervision reduces the model's dependence on a single occlusion location; frequency domain phase supervision supplements the problem of insufficient constraints on texture arrangement location by pixel and perceptual loss.
[0071] Construct coordinate offset constraints for the two-dimensional coordinate offset field , For the horizontal spatial gradient operator, For the longitudinal (vertical) spatial gradient operator, The L1 norm is used to suppress non-physical abrupt changes in coordinate offset, based on the spatial gradients of the two-dimensional coordinate offset field in the horizontal and vertical directions. Furthermore, a coordinate topology constraint term is constructed for the standard coordinate correspondence field built from the pre-defined standard coordinate grid and the two-dimensional coordinate offset field. , To correct the linear unit, To preset the positive mapping threshold, For determinant operators, The standard coordinate corresponding field C at position u is the Jacobian matrix, which is obtained based on the difference between the determinant of the local Jacobian matrix of C and the preset positive mapping threshold, and is used to suppress local mapping flipping or direction reversal. Based on the diffusion denoising supervision term, clothing occupation supervision term, clothing boundary supervision term, standard clothing coordinate domain reconstruction supervision term, evidence calibration supervision term, counterfactual occlusion consistency supervision term, texture consistency supervision term, coordinate offset constraint term, and coordinate topology constraint term, the joint training objective is obtained by weighted summation according to non-negative weights; Backpropagation is performed based on the joint training objective to update the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch, zero-initialized confidence-gated residual branch, and model parameters in the image generation network.
[0072] In this embodiment, during the model training phase, paired training samples are input into the model and a complete forward processing procedure is performed to obtain a standardized clothing prediction image Y and the corresponding intermediate prediction tensor. The intermediate prediction tensor includes the clothing occupancy field, the visibility evidence field, the visibility evidence tensor, the standard clothing condition tensor, the two-dimensional coordinate offset field, the standard coordinate correspondence field, and the noise prediction result at the current denoising time step. When constructing two counterfactual observation views, it further includes the first noise prediction result and the second noise prediction result. Based on the diffusion denoising supervision term, clothing occupancy supervision term, clothing boundary supervision term, standard clothing coordinate domain reconstruction supervision term, evidence calibration supervision term, counterfactual occlusion consistency supervision term, texture consistency supervision term, coordinate offset constraint term, and coordinate topology constraint term, a joint training objective is obtained by weighted summation according to non-negative weights. Backpropagation is performed according to the joint training objective to update the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch, zero-initialized confidence-gated residual branch, and model parameters in the image generation network. After training, the model parameters are kept fixed during the model execution phase, and the initial visibility field, initial clothing occupancy field, two-dimensional coordinate offset field, and standard coordinate correspondence field are re-obtained for the current input image of a person.
[0073] All loss weights are non-negative, and the weights participating in joint training are greater than zero; the weights can be determined based on the validation set or a multi-objective optimization strategy. The joint training objective is to update all trainable branches through backpropagation; after training, the model parameters are fixed and not calculated again during inference. M or the aforementioned supervision items. The basic visual encoder, latent variable encoder / decoder, and part of the generated backbone can be frozen, with only the three-field prediction, completion, spatial token encoding, and gated residual branches updated; alternatively, the generated backbone can be jointly fine-tuned after stable initialization is achieved. Specifically, in this embodiment, the batch size is B, and the paired standard clothing ground truth image is denoted as... The target clothing foreground mask is denoted as M; it should be noted that M is composed of... The results are obtained from manual foreground annotation, automatic segmentation, or a combination of both, and are only used during the training phase.
[0074] Specifically, to further illustrate the effectiveness of this method, this embodiment employs a tensor computation framework that supports graphics processor acceleration to implement the three-field prediction, differentiable mesh sampling, standard domain synthesis, spatial token encoding, zero-initialization gating, joint training, condition generation, and evaluation processes. Sixteen automated tests were performed on data loading, tensor size, forward propagation, loss backpropagation, coordinate topology constraints, and gating backoff logic, and all tests passed.
[0075] During the data preparation phase, latent variables were pre-encoded on 1024 training pairs and 100 test pairs. A 1000-step training phase was performed on the 1024 training samples. Comparing the training records from the first 100 steps with the last 100 steps, the total loss decreased by an average of approximately 17.00%, clothing occupancy loss decreased by approximately 14.38%, standard domain reconstruction loss decreased by approximately 18.54%, and completion reconstruction loss decreased by approximately 14.55%. The soft occupancy intersection-union ratio increased from approximately 0.227 to approximately 0.298 during the training process.
[0076] When performing deterministic backoff tests on zero-initialization gating, the maximum absolute difference between the fusion condition token and the input global vision token is 0, and the maximum absolute value of the effective residual gating is 0, verifying that the newly added spatial condition branch does not change the basic vision conditions in the initialization state.
[0077] Under a fixed set of 20 test samples, the same random seed, and the same inference settings, a phased pairwise evaluation was conducted. The improved branch showed an average structural similarity increase of 0.011519 compared to the basic branch, a structural similarity sample win rate of 85%, and an average peak signal-to-noise ratio increase of 0.077627. These results demonstrate that the proposed technical solution is feasible and has a measurable impact on some structural evaluation aspects.
[0078] In summary, the core of this method lies in decoupling the three functions of spatial attribution determination, observational evidence credibility assessment, and spatial coordinate mapping. These functions are independently modeled by the clothing occupancy field, the visibility evidence field, and the standard coordinate correspondence field, respectively. By resampling through differentiable grids, the non-rigid clothing content in the input person image is aligned to the standard clothing coordinate domain. Finally, the conditional image generation network outputs a clothing image in the standard product display format. Specifically, this method first normalizes and visually encodes the input image of a person, extracting spatial visual features that preserve the two-dimensional spatial arrangement and global visual tokens that represent global semantics. Then, it predicts the initial visibility field, the initial clothing occupancy field, and the two-dimensional coordinate offset field through three independent prediction branches. A standard coordinate correspondence field is constructed using a preset standard coordinate grid and the coordinate offset field, establishing a dense backsampling relationship from the standard clothing pose to the input person's pose. Next, the image of the person and the prediction field are uniformly transformed to the standard clothing coordinate domain through differentiable grid resampling. In the standard domain, the visibility evidence field controls the preservation of credible observation evidence and the invocation of occlusion completion results, while the clothing occupancy field controls the spatial synthesis of the clothing foreground and background, obtaining a structurally complete and pixel-credible standard clothing condition tensor. The condition tensor and spatial coordinate information are then encoded into a spatial clothing token, which is injected into the global visual token through a zero-initialized confidence-gated residual structure, realizing the organic integration of spatial structural information and global semantic information. Finally, the image generation network outputs a standardized clothing image. During the training phase, the accuracy and robustness of each prediction branch are ensured through joint optimization of multiple objectives, including clothing occupancy supervision, clothing boundary supervision, standard domain reconstruction supervision, evidence calibration supervision, counterfactual occlusion consistency supervision, texture consistency supervision, coordinate offset constraints, and coordinate topology constraints. During the inference phase, evidence locking and spatial adaptive guidance enhancement mechanisms are used to preserve the real texture of the input image in high-confidence regions and to leverage generative completion capabilities in low-confidence regions.
[0079] This invention employs a functionally decoupled parallel prediction architecture, assigning the determination of "whether the observation is reliable" and "whether the location belongs to clothing" to two independent branches with different parameters and supervision targets. This ensures that even if an observation is unreliable due to occlusion, it will still be preserved and completed as long as it belongs to the clothing foreground, rather than being incorrectly classified as background. This fundamentally improves the problem in traditional methods where occluded areas are easily misjudged, leading to "torn" clothing. By explicitly expressing the dense backsampling relationship from the standard product pose to the input person's pose using a standard coordinate correspondence field, all subsequent operations can be performed in a unified standard clothing coordinate domain. Furthermore, the entire mapping process is fully differentiable, and reconstruction errors in the standard domain can be directly optimized through gradient backpropagation to improve coordinate prediction, thus achieving more accurate spatial correspondence learning. Through an explicit synthesis expression of the standard clothing condition tensor, evidence selection and foreground constraint are assigned to two different variables. This achieves unified processing of reliable observation preservation, unreliable region completion, and background filling within the same expression, ensuring natural continuity between the three boundaries and avoiding visual discontinuities caused by hard switching. By encoding the standard clothing condition tensor and spatial coordinate information into spatial clothing tokens, with each token position corresponding to a local region in the standard clothing coordinate domain, the spatial position, contour direction, and coordinate correspondence of the clothing are preserved. This provides both overall style guidance and spatial structure guidance for the generative network, ensuring that the generated images maintain stylistic consistency while achieving controllable spatial structure. Through a zero-initialized confidence-gated residual structure, the trainable residual scale parameter is set and initialized to zero. This ensures that adding spatial branches in the initial training phase does not alter the original visual conditions, effectively avoiding unintended perturbations to the pre-trained generative network's fundamental capabilities caused by random initialization features, thus guaranteeing training stability. Simultaneously, this gating mechanism can adaptively adjust the injection intensity of spatial conditions based on global confidence statistics, achieving a balance between safe backoff and adaptive enhancement. In the optional inference enhancement scheme, high-confidence clothing evidence is encoded and written into the generated latent variables according to the noise level matching the current time step. The guiding scale is then differentially set based on the spatial confidence weight map in the conditional guidance of the denoising network. This ensures that fine textures such as trademarks, stripes, and patterns in the original input image are not gradually washed away by noise during the iterative denoising process, guaranteeing a faithful restoration of the visible areas in the final output image. Simultaneously, sufficient generation freedom is preserved in invisible areas to achieve reasonable occlusion completion. Furthermore, the joint training objective of this invention encompasses multiple losses, including clothing occupancy supervision, boundary supervision, standard domain reconstruction supervision, evidence calibration supervision, counterfactual occlusion consistency supervision, texture consistency supervision, coordinate offset constraints, and coordinate topology constraints. The synergistic effect of these loss terms enables the training process to directly suppress technical failure modes such as contour drift, evidence misuse, texture misalignment, and coordinate abrupt changes, significantly improving the model's robustness in complex scenes.
[0080] In short, this invention decouples the three functions of spatial attribution, evidence credibility, and coordinate mapping, and combines them with differentiable standard domain resampling, spatial token encoding, zero-initialization gated fusion, and multi-objective joint training to effectively improve the accuracy of clothing contour reconstruction under pose deformation and occlusion conditions, the ability to preserve credible observation evidence, and the completion effect of invisible areas. It can be widely used in e-commerce product display, virtual try-on, fashion image retrieval, and digital human clothing generation.
[0081] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A clothing extraction method based on visual features, characterized in that, include: Step S1: Obtain the input image of the person, perform normalization processing on the input image of the person to obtain the normalized input image tensor, and perform visual encoding on the normalized input image tensor to obtain spatial visual features; Step S2: The spatial visual features are processed by using mutually distinguishable visibility prediction branches, clothing occupancy prediction branches and coordinate correspondence prediction branches respectively to obtain the initial visibility field, the initial clothing occupancy field and the two-dimensional coordinate offset field, and the standard coordinate correspondence field is constructed according to the preset standard coordinate grid and the two-dimensional coordinate offset field. Step S3: Based on the normalized input human image tensor, initial visibility field, initial clothing occupancy field and spatial visual features, perform differentiable grid resampling and occlusion completion processing respectively to obtain the visible evidence tensor, visibility evidence field, clothing occupancy field and occlusion completion tensor, and construct the standard clothing condition tensor. Step S4: Spatial encoding is performed on the standard clothing condition tensor, visibility evidence field, clothing occupancy field and standard coordinate correspondence field to obtain a spatial clothing token that preserves the standard clothing coordinate position information, and the fusion condition token is calculated based on the confidence statistics. Step S5: Input the fusion condition token into the preset image generation network to obtain a standardized clothing image.
2. The clothing extraction method based on visual features according to claim 1, characterized in that, Step S1 is as follows: Obtain the input image of the person, which includes the wearer and the clothing to be extracted. Then, perform size normalization, pixel value scaling, normalization and batch processing on the input image to obtain the normalized input image tensor. Spatial visual encoding and global visual encoding are performed on the normalized input human image tensor to obtain spatial visual features and global visual tokens. The spatial visual features maintain the two-dimensional spatial arrangement of the input human image, while the global visual tokens represent the semantics of color, category, material, and overall style.
3. The clothing extraction method based on visual features according to claim 2, characterized in that, Step S2 is as follows: The spatial visual feature F is processed by using mutually distinguishable visibility prediction branches and clothing occupancy prediction branches to obtain the initial visibility field and initial clothing occupancy field defined in the human observation coordinate domain. The spatial visual features are processed using the coordinate correspondence prediction branch to obtain a two-dimensional coordinate offset field defined on the standard clothing coordinate grid and whose value is a two-dimensional offset vector pointing to the human observation coordinate domain. Based on the preset standard coordinate grid and two-dimensional coordinate offset field, calculate the two-dimensional sampling coordinates in the human observation coordinate domain of the normalized input human image tensor for any standard clothing coordinate in the standard clothing coordinate domain. Based on the two-dimensional sampling coordinates corresponding to all standard clothing coordinates, a standard coordinate corresponding field is constructed from the standard clothing coordinates to the person's observation coordinates; The standard coordinate grid is predefined in the standard clothing coordinate domain, and the standard coordinate corresponding field represents the reverse sampling relationship from the standard clothing coordinates to the person's observation coordinates.
4. The clothing extraction method based on visual features according to claim 3, characterized in that, Step S3 is as follows: Based on the standard coordinate corresponding field, differentiable grid resampling is performed on the normalized input human image tensor or the clothing features, initial visibility field, and initial clothing occupancy field obtained from the normalized input human image tensor to obtain the visibility evidence tensor, visibility evidence field, and clothing occupancy field defined in the standard clothing coordinate domain. The spatial visual features are processed using the occlusion completion branch to obtain the occlusion completion tensor defined in the standard clothing coordinate domain; Based on the visible evidence tensor, the visibility evidence field, the clothing occupancy field, the occlusion completion tensor, and the background tensor, a standard clothing condition tensor is constructed. The standard clothing condition tensor is composed of the values of the standard clothing condition tensor at all standard clothing coordinates.
5. The clothing extraction method based on visual features according to claim 4, characterized in that, Step S4 is as follows: By splicing the standard clothing condition tensor, the visibility evidence field, the clothing occupancy field, and the standard coordinate correspondence field along the channel dimension, a seven-channel spatial condition tensor that simultaneously includes appearance, evidence, outline, and coordinates is obtained. The seven-channel spatial condition tensor is convolutionally encoded, normalized, adaptively pooled, flattened, and linearly projected to form a spatial clothing token that is compatible with the number and dimensions of global visual tokens. Spatial statistics of the visibility evidence field and the clothing occupancy field in the standard coordinate domain are calculated separately and extended to the token dimension to reflect the sufficiency of observational evidence and the proportion of clothing foreground occupancy, thus obtaining confidence statistics. Based on the confidence information and confidence statistics determined by the visibility evidence field and the clothing occupancy field, the spatial clothing token is injected into the global visual token using the zero-initialization confidence gating residual method to obtain the fusion condition token; When the initial value of the trainable residual scale is zero, the fusion conditional token is equal to the global visual token.
6. The clothing extraction method based on visual features according to claim 5, characterized in that, Step S5 is as follows: Step S501: Based on the visibility evidence field and the clothing occupancy field, obtain a high-confidence clothing evidence confidence map, and adjust the high-confidence clothing evidence confidence map to the spatial resolution of the latent variable generation to obtain the spatial confidence weight map at time step t; Step S502: Encode the visible evidence tensor into latent evidence variables, and construct time-synchronized latent evidence variables according to the noise level of time step t; Step S503: Obtain the locking weight based on the locking scheduling coefficient and the spatial confidence weight map at time step t; Step S504: Construct time synchronization evidence latent variables based on the noise level at time step t, and write them into the high confidence position of the latent variables generated at time step t according to the locking weight, to obtain the evidence locking latent variables at time step t.
7. The clothing extraction method based on visual features according to claim 6, characterized in that, Also includes: Step S505: Input the unconditional token, the fusion conditional token, and the evidence-locked latent variable at time step t into the preset image generation network to obtain unconditional noise prediction and conditional noise prediction, wherein the image generation network is an iterative denoising generation network. Step S506: Based on the spatial confidence weight map at time step t, set the spatially relevant conditional guiding scale corresponding to the standard clothing coordinates at time step t; Step S507: Based on the spatially related conditional guided scale corresponding to the standard clothing coordinates at time step t, perform spatial modulation on the difference between the unconditional noise prediction and the conditional noise prediction to obtain the spatially modulated noise prediction at time step t. Then, use the scheduler to process the spatially modulated noise prediction, the evidence-locked latent variables at time step t, and time step t to obtain the latent variables at time step t-1. Step S508: Repeat steps S501 to S507 until the latent variables from t=T to t=1 are calculated, the termination latent variable is obtained, and the termination latent variable is decoded using a latent variable decoder to obtain a standardized clothing image. Here, the termination latent variable is the latent variable at time step t=0, and T is the total number of iterations.
8. The clothing extraction method based on visual features according to claim 1, characterized in that, Before step S1, the following training steps are also included: Use paired training samples to train all of the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch, and zero-initialized confidence gated residual branch. Among them, the paired training sample pairs include at least the training character image, the standard clothing ground truth image corresponding to the training character image, and the target clothing foreground mask obtained from the foreground annotation or segmentation results; Construct a clothing occupancy supervision term based on the difference between the clothing occupancy field and the target clothing foreground mask; After performing the same boundary extraction process on the clothing occupancy field and the target clothing foreground mask respectively, a clothing boundary supervision term is constructed based on the difference between the obtained predicted boundary and the target boundary. A standard clothing coordinate domain reconstruction supervision term is constructed based on the reconstruction difference between the standard clothing condition tensor within the clothing foreground defined by the target clothing foreground mask and the standard clothing ground truth image.
9. The clothing extraction method based on visual features according to claim 8, characterized in that, Also includes: When the image generation network adopts the iterative denoising generation network, the standard clothing ground truth image is encoded as a clean latent variable, the diffusion time step is randomly selected and noise is sampled, the denoised latent variable is obtained according to the preset noise scheduling, and the diffusion denoising supervision term is constructed based on the difference between the noise and the noise prediction obtained by the conditional denoising network based on the clean latent variable, the diffusion time step and the fusion condition token. Based on at least one of the following: photometric difference, visual feature difference, and occlusion state between the visible evidence tensor and the standard clothing ground truth image at the corresponding standard clothing coordinates, a visibility reliability target for stopping gradients is determined within the region defined by the target clothing foreground mask, and an evidence calibration supervision term is constructed based on the difference between the visibility evidence field and the visibility reliability target. Apply a first simulated occlusion and a second simulated occlusion to the same training image to obtain a first counterfactual observation view and a second counterfactual observation view with the same clothing identity but different areas of missing evidence. Perform steps S1 to S5 on the first counterfactual observation view and the second counterfactual observation view to obtain a first noise prediction result and a second noise prediction result. Within the common credible region or the union of credible regions determined by the two visibility evidence fields, a counterfactual occlusion consistency supervision term is constructed based on the difference between the first noise prediction result and the second noise prediction result.
10. The clothing extraction method based on visual features according to claim 9, characterized in that, Also includes: Within the clothing foreground region defined by the two clothing occupancy fields, a texture consistency supervision term is constructed based on the two-dimensional spectral phase difference between the first noise prediction result and the second noise prediction result; For the two-dimensional coordinate offset field, coordinate offset constraints are constructed, and for the standard coordinate corresponding field constructed from the preset standard coordinate grid and the two-dimensional coordinate offset field, coordinate topology constraints are constructed. Based on the diffusion denoising supervision term, clothing occupation supervision term, clothing boundary supervision term, standard clothing coordinate domain reconstruction supervision term, evidence calibration supervision term, counterfactual occlusion consistency supervision term, texture consistency supervision term, coordinate offset constraint term, and coordinate topology constraint term, the joint training objective is obtained by weighted summation according to non-negative weights; Backpropagation is performed based on the joint training objective to update the visibility prediction branch, clothing occupancy prediction branch, coordinate correspondence prediction branch, occlusion completion branch, spatial coding branch, zero-initialized confidence-gated residual branch, and model parameters in the image generation network.