Contextual preservation based spatial normalization pose guided person image generation method

By employing a multi-scale attention fusion alignment network, flow field estimation, and texture local association transformation network, combined with a context-preserving spatial normalization module, the problem of texture detail loss during pose transformation is solved, generating realistic target character images.

CN117789300BActive Publication Date: 2026-11-27DALIAN NATIONALITIES UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311824730.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2026-11-27
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

Existing pose-guided methods for generating human images struggle to preserve the texture details of the source image while changing poses, and the generated results are not realistic enough, especially when faced with complex spatial deformations, they are prone to artifacts.

Method used

By employing a multi-scale attention fusion alignment network, a flow field estimation network, and a texture local association transformation network, combined with a context-preserving spatial normalization module, realistic target human images are generated through pose keypoint detection, flow field calculation, and texture feature distortion.

Benefits of technology

The process effectively preserves the texture details of the source image during pose transformation, resulting in more realistic and consistent generated images, thus improving generation efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117789300B_ABST
    Figure CN117789300B_ABST
Patent Text Reader

Abstract

The present application provides a kind of space normalization pose guide figure image generation method based on context reservation, given a figure image and target pose, generate the figure image under target pose, while keeping the texture information of generated image maximum degree with given image consistent.This method includes 2 stages: in the first stage, using multi-scale attention fusion alignment network generates the rough figure image under target pose, while preserving the color and edge information of source image;In the second stage, use texture local correlation conversion network to distort source image features, gradually transfer the texture features of source image to target pose, realize the texture refinement of rough figure image.The second stage uses the context reservation space normalization method, respectively with source image texture features and target domain features after distortion Feature is mapped into the same hidden space, the texture features of source image are explicitly distributed to target pose, while realizing the spatial alignment of texture and pose.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image generation technology, specifically a method for generating pose-guided human images based on spatial normalization with context preservation. Background Technology

[0002] Pose-guided person image generation aims to transform a person in a source image from one pose into a target image in a given pose while preserving the appearance and texture. It is a challenging problem in computer vision and computer graphics, with great potential applications in image editing, video generation, virtual try-on, and data augmentation for pedestrian re-identification.

[0003] In recent years, GANs have been used to achieve pose-guided human image generation. Most existing methods directly model the global geometric transformation between the source and target images based on CNNs. CNNs possess translation invariance, meaning that if the input content is spatially offset, the output will be offset in the same way, making it difficult to model complex transformations. To address this, attention modules are used to capture the correlation between poses to generate human images. However, this method lacks modeling of the correlation between appearances, causing the model to fail to transfer some important details from the source image to the generated image. Therefore, optical flow-based methods estimate the offsets of 2D keypoints on the source and target images to warp the features of the source image and render them onto the target pose, generating more realistic human images. However, this method produces noticeable artifacts when faced with large spatial deformations. In addition, some methods first predict a human anatomy map under the target pose in the first stage, and then use the target anatomy map to generate the human image in the second stage. The results show that while these methods can generate relatively good target images, the detail information is still not realistic enough. Summary of the Invention

[0004] To overcome the shortcomings of existing technologies, this invention provides a spatially normalized pose-guided character image generation method based on context preservation. This method can fully preserve the texture details of the source image while realizing the transformation of the character image from one pose to another, thereby improving the training efficiency of the model while ensuring the generation of realistic character images.

[0005] The technical solution adopted by this invention to solve its technical problem is: a method for generating human images based on context-preserving spatial normalized pose guidance, comprising the following steps:

[0006] S1: Select a portrait image as the source image;

[0007] S2: Select the target image, and perform pose key point detection on the source image and the target image respectively to obtain the corresponding source pose heatmap and target pose heatmap;

[0008] S3: Input the source image, source pose heatmap and target pose heatmap into the multi-scale attention fusion alignment network to generate a rough image of the person in the target pose;

[0009] S4: Input the source image, source attitude heatmap, and target attitude heatmap into the flow field estimation network to obtain the coordinate offset between the source image and the target image and the occlusion mask. The coordinate offset is represented by the flow field.

[0010] S5: Input the source image, source pose heatmap, rough human image, target pose heatmap, flow field and occlusion mask into the texture local association transformation network, and obtain the distortion features of the source image through the texture local association transformation module;

[0011] S6: Input the source image, target image, target pose heatmap, and distortion features obtained in S5 into the context-preserving spatial normalization module, and finally generate the final target person image through the decoder.

[0012] The multi-scale attention fusion alignment network aligns the source and target images when generating a rough portrait image, helping to reduce deformation and distortion caused by pose changes and improve the quality of the generated result. Through a texture local association transformation network, this method captures the distortion features of the source image, helping to preserve the texture details of the source image when generating the target portrait image, making the generated result more realistic and detailed. The context-preserving spatial normalization module maintains the consistency of contextual information when generating the final target portrait image, contributing to the overall consistency and realism of the generated result.

[0013] Furthermore, step S2 uses the OpenPose pose estimation algorithm to obtain a pose heatmap of the person's image. The pose heatmap includes 18 key points: left eye, right eye, left ear, right ear, nose, neck, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, and right ankle. Each key point is represented by one channel, for a total of 18 channels.

[0014] Using 18 key points to represent the person's posture information, covering the person's full-body posture information, the generated person image can accurately reflect the person's overall posture, enhancing the realism of the generated result.

[0015] Furthermore, step S3 includes:

[0016] S31: Input the source image, source pose heatmap and target pose heatmap into the encoder of the multi-scale attention fusion alignment network. The encoder includes 1 residual block and 3 downsampling blocks to obtain a feature map with 256 channels and a size of 32×32.

[0017] S32: Input the downsampled features and the decoder upsampled features of the same scale into the attention fusion module, and calculate the fused feature a by pixel-level summation;

[0018] S33: Local features of fused feature a are extracted using a local attention branch, which consists of two pointwise convolutional layers and one batch normalization layer;

[0019] S34: Extract global features of fused feature a using a global attention branch, which includes one global average pooling layer, two pointwise convolutional layers and one batch normalization layer;

[0020] S35: The local features of fused feature a in S33 and the global features of fused feature a in S34 are calculated by pixel-level summation to obtain fused feature b, and the attention fusion weight coefficients are obtained by using the Sigmoid activation function;

[0021] S36: Use the attention fusion weight coefficients obtained in S35 to further fuse the upsampled features and downsampled features in S32 to obtain attention fusion features;

[0022] S37: Repeat steps S32-S36 before the second and third layers of the multi-scale attention fusion alignment network to gradually obtain fusion features of sizes 64×64 and 128×128. Finally, a rough portrait image is generated through the decoder output layer.

[0023] In step S32, the attention fusion module fuses downsampled features and upsampled features from the decoder at the same scale, which better focuses on the correspondence between the source image and the target pose heatmap, improving the accuracy and consistency of the generated results. In steps S33 and S34, local and global attention branches are used to extract local and global features of the fused features, respectively, which can simultaneously focus on the local details and global contextual information of the fused features, thereby improving the subtlety and realism of the generated results. The attention fusion weight coefficients obtained through the Sigmoid activation function can further fuse the upsampled and downsampled features, dynamically adjusting the fusion weights according to the importance and correspondence of different features, improving the consistency and naturalness of the generated results.

[0024] Furthermore, step S4 includes:

[0025] S41: Input the source image, source attitude heatmap, and target attitude heatmap into the flow field estimation network to extract 256-channel features of size 8×8;

[0026] S42: The features extracted in S41 are upsampled through the decoder residual block. The decoder residual block consists of a 3×3 transposed convolutional layer, an instance normalization layer, and an activation layer.

[0027] S43: The flow field is calculated using a convolutional layer with 2 output channels, which represents the coordinate offset from the source to the target; at the same time, an occlusion mask is obtained using a convolution with 1 output channel, which indicates whether the target's location information is visible in the source image.

[0028] S44: Repeat step S43 after the second and third layers of the decoder to gradually obtain flow field and occlusion masks with sizes of 32×32 and 64×64.

[0029] The feature extraction, upsampling, flow field calculation, and occlusion mask calculation operations in step S4 can provide richer feature representations, accurate position alignment, and occlusion processing, providing a better foundation for the subsequent image generation process, thereby generating more refined, accurate, and realistic detailed images of people.

[0030] Furthermore, step S5 includes:

[0031] S51: The source image and source pose heatmap are concatenated along the channel dimension to form the source domain, and the rough human image and target pose heatmap obtained in S37 are concatenated along the channel dimension to form the target domain. Features of the source domain, target domain and source image are extracted respectively.

[0032] S52: Input the source domain features, target domain features and source image features into the texture local association transformation network, extract local feature blocks using the flow field, and calculate the local attention coefficients of the source domain features and target domain features;

[0033] S53: Use local attention coefficients to sample the source image features at the corresponding locations to obtain distortion features.

[0034] The texture information in the source image is distorted and deformed to better adapt to the target pose and posture, providing more realistic details and textures for subsequent image generation.

[0035] Furthermore, step S6 includes:

[0036] S61: Input the distortion features and source image features into the first residual structure of the context-preserving spatial normalization module to adjust the spatial distribution of texture features in the generated image and obtain normalized feature a; this operation can spatially adjust and normalize the texture features, making the generated image smoother and more natural, and avoiding discontinuities and inconsistencies in texture features.

[0037] S62: Input the distortion features and target domain features into the second residual structure, and align the generated image with the target pose in space to obtain normalized feature 2; this operation can align the generated image with the target pose, making the generated image more in line with the requirements of the target pose, and improving the accuracy and realism of the generated image.

[0038] S63: Use fusion parameters to fuse the two normalized features obtained in S61 and S62 to obtain the final normalized fused features; this operation can reasonably fuse the source image features and target domain features, and make comprehensive use of the information of both, so that the generated image has more texture features of the source image and accuracy of target pose.

[0039] S64: Repeat operations S52, S53, S61, S62, and S63 before the first and second layers of the decoder, and finally generate the final image of the person through the decoder output layer.

[0040] Furthermore, the context-preserving spatial normalization described in step S6 is mainly divided into two stages: In the first stage, two types of parameters are generated: four semantic modulation parameters are extracted from the source image features and target domain features using a 3×3 convolutional layer, and two context modulation parameters are extracted from the distortion features. These six parameters are then used for the first modulation to generate fused modulation parameters. In the second stage, the fused modulation parameters are used to perform normalized modulation calculations on the distortion features to obtain the normalized fused features.

[0041] The two stages of spatial normalization in step S6, which preserve the context, enhance the network model's ability to perceive different features through operations such as parameter extraction, first modulation, and normalization modulation. This enables feature fusion and adjustment, making the generated image more comprehensive, accurate, and natural, and helps improve the quality and realism of the generated image.

[0042] The beneficial effects of this invention include: (1) A multi-scale attention fusion alignment network is proposed to generate a coarse target image. The attention mechanism is used to fuse global and local features, making the network more concerned with the global and local contextual information of the features, reducing the information loss of the generated coarse image, and providing more guidance for the second-stage refinement process. (2) A texture local association transformation network based on global flow is proposed. The association between textures is added on the basis of calculating the correlation between poses, and the source image features are sampled using this correlation to obtain the distortion features of the local position, which is beneficial to the preservation of texture details. (3) A spatial normalization module for context preservation is proposed to explicitly distribute the texture features of the source image onto the target pose, and at the same time realize the spatial alignment of texture and pose features. Attached Figure Description

[0043] Figure 1 : Flowchart of the method of the present invention;

[0044] Figure 2 : The overall network model structure diagram of this invention;

[0045] Figure 3 : A diagram illustrating the spatial normalization calculation process with context preservation in this invention. Detailed Implementation

[0046] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0048] This invention proposes a context-preserving spatial normalization-based pose-guided person image generation method. Given a person image and a target pose, it generates a person image in the target pose while maintaining the texture information of the generated image as consistent as possible with the given image. The method comprises two stages: In the first stage, a multi-scale attention fusion alignment network is used to generate a coarse person image in the target pose, preserving the color and edge information of the source image; in the second stage, a texture local association transformation network is used to distort the features of the source image, gradually transferring the texture features of the source image to the target pose, thus refining the texture of the coarse person image. To enable the generated person image to capture more detailed information, this method uses a context-preserving spatial normalization method in the second stage, mapping the distorted features to the latent space along with the texture features of the source image and the target domain features, respectively, explicitly distributing the texture features of the source image onto the target pose, and simultaneously achieving spatial alignment between texture and pose.

[0049] Example 1

[0050] A context-preserving spatially normalized pose-guided human image generation method includes the following steps:

[0051] S1: Select a portrait image as the source image.

[0052] S2: Select the target image and perform pose keypoint detection on both the source and target images to obtain the corresponding pose heatmaps. The OpenPose pose estimation algorithm is used to obtain the pose heatmap of the person image. This heatmap includes 18 keypoints: left eye, right eye, left ear, right ear, nose, neck, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, and right ankle. Each keypoint is represented by one channel, for a total of 18 channels.

[0053] S3: Input source image, source pose heatmap and target pose heatmap, and generate a rough human image under the target pose through a multi-scale attention fusion alignment network.

[0054] S31: Input the source image, source pose heatmap and target pose heatmap into the encoder of the multi-scale attention fusion alignment network. The encoder includes 1 residual block and 3 downsampling blocks to obtain a feature map with 256 channels and a size of 32×32.

[0055] S32: Input the downsampled features and the decoder upsampled features of the same scale into the attention fusion module, and calculate the fused feature a by pixel-level summation;

[0056] S33: Local features of fused feature a are extracted using a local attention branch, which consists of two pointwise convolutional layers and one batch normalization layer;

[0057] S34: Extract global features of fused feature a using a global attention branch, which includes one global average pooling layer, two pointwise convolutional layers and one batch normalization layer;

[0058] S35: The local features in S33 and the global features in S34 are summed at the pixel level to obtain the fused feature b, and the attention fusion weight coefficients are obtained by using the Sigmoid activation function;

[0059] S36: Use the attention fusion weight coefficients obtained in S35 to further fuse the upsampled features and downsampled features in S32 to obtain attention fusion features;

[0060] S37: Repeat steps S32, S33, S34, S35, and S36 before the second and third layers of the multi-scale attention fusion alignment network to gradually obtain fusion features of sizes 64×64 and 128×128. Finally, a rough portrait image is generated through the decoder output layer.

[0061] S4: Input the source image, source attitude heatmap, and target attitude heatmap into the flow field estimation network to obtain the coordinate offset between the source and the target (hereinafter referred to as the flow field) and the occlusion mask.

[0062] S41: Input the source image, source attitude heatmap, and target attitude heatmap into the flow field estimation network to extract 256-channel features of size 8×8;

[0063] S42: The features extracted in S41 are upsampled through the decoder residual block. The decoder residual block consists of a 3×3 transposed convolutional layer, an instance normalization layer, and an activation layer.

[0064] S43: The flow field is calculated using a convolutional layer with 2 output channels, which represents the coordinate offset from the source to the target; at the same time, an occlusion mask is obtained using a convolution with 1 output channel, which indicates whether the target's location information is visible in the source image.

[0065] S44: Repeat step S43 after the second and third layers of the decoder to gradually obtain flow field and occlusion masks with sizes of 32×32 and 64×64.

[0066] S5: Input the source image, source pose heatmap, rough human image, target pose heatmap, flow field and occlusion mask into the texture local correlation transformation network, and obtain the distortion features of the source image through the texture local correlation transformation module.

[0067] S51: The source image and source pose heatmap are concatenated along the channel dimension to form the source domain, and the rough target image and target pose heatmap obtained in S37 are concatenated along the channel dimension to form the target domain. Features of the source domain, target domain and source image are extracted respectively.

[0068] S52: Input the source domain features, target domain features and source image features into the texture local association transformation module, extract local feature blocks using the flow field, and calculate the local attention coefficients of the source domain features and target domain features;

[0069] S53: Use local attention coefficients to sample the source image features at the corresponding locations to obtain distortion features.

[0070] S6: Input the distortion features, source image, target image and target pose heatmap obtained in S5 into the context-preserving spatial normalization module, and finally generate the final target person image through the decoder.

[0071] S61: Input the distortion features and source image features into the first residual structure of the context-preserving spatial normalization module to adjust the spatial distribution of texture features in the generated image and obtain normalized feature a;

[0072] S62: Input the distortion features and target domain features into the second residual structure, align the generated image with the target pose in space, and obtain the normalized feature b;

[0073] S63: Use fusion parameters to fuse the two normalized features obtained from S61 and S62 to obtain the final normalized fused features;

[0074] S64: Repeat operations S52, S53, S61, S62, and S63 before the first and second layers of the decoder, and finally generate the final target image through the decoder output layer.

[0075] Example 2

[0076] This embodiment provides a specific implementation scheme for the context-preserving space normalization in steps S61 and S62 of Embodiment 1:

[0077] Context-preserving spatial normalization involves a two-stage computation process;

[0078] (1) In the first stage, two types of parameters are generated: 1) four semantic modulation parameters are extracted from the source image features and the target domain features; 2) two context modulation parameters are extracted from the distorted fused features. These six parameters are then subjected to the first modulation calculation to obtain the fused modulation parameters.

[0079] (2) In the second stage, the distortion features are normalized and modulated using the above-mentioned fusion modulation parameters to obtain the normalized fusion features.

[0080] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for generating character images based on context-preserving spatial normalized pose guidance, characterized in that, Includes the following steps: S1: Select a portrait image as the source image; S2: Select the target image, and perform pose key point detection on the source image and the target image respectively to obtain the corresponding source pose heatmap and target pose heatmap; S3: Input the source image, source pose heatmap and target pose heatmap into the multi-scale attention fusion alignment network to generate a rough image of the person in the target pose; S4: Input the source image, source attitude heatmap, and target attitude heatmap into the flow field estimation network to obtain the coordinate offset between the source image and the target image and the occlusion mask. The coordinate offset is represented by the flow field. S5: Input the source image, source pose heatmap, rough human image, target pose heatmap, flow field and occlusion mask into the texture local association transformation network, and obtain the distortion features of the source image through the texture local association transformation module; S51: The source image and the source pose heatmap are concatenated along the channel dimension to form the source domain, and the rough human image and the target pose heatmap obtained in step S3 are concatenated along the channel dimension to form the target domain. Features of the source domain, the target domain and the source image are extracted respectively. S52: Input the source domain features, target domain features and source image features into the texture local association transformation network, extract local feature blocks using the flow field, and calculate the local attention coefficients of the source domain features and target domain features; S53: Sample the source image features at the corresponding locations using local attention coefficients to obtain distortion features; S6: Input the source image, target image, target pose heatmap and distortion features obtained in S5 into the context-preserving spatial normalization module, and finally generate the final target person image through the decoder; S61: Input the distortion features and source image features into the first residual structure of the context-preserving spatial normalization module to adjust the spatial distribution of texture features in the generated image and obtain normalized feature a; S62: Input the distortion features and target domain features into the second residual structure, align the generated image with the target pose in space, and obtain the normalized feature b; S63: Use the fusion parameters to fuse the normalized features a and b obtained from S61 and S62 to obtain the final normalized fused features; S64: Repeat operations S52, S53, S61, S62, and S63 before the first and second layers of the decoder, and finally generate the final target image through the decoder output layer.

2. The method for generating character images based on context-preserving spatial normalized pose guidance according to claim 1, characterized in that, Step S2 is to obtain the pose heatmap of the image using the OpenPose pose estimation algorithm. The pose heatmap includes 18 key points: left eye, right eye, left ear, right ear, nose, neck, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, and right ankle. Each key point is represented by one channel, for a total of 18 channels.

3. The method for generating character images based on context-preserving spatial normalized pose guidance according to claim 1, characterized in that, Step S3 includes: S31: Input the source image, source pose heatmap and target pose heatmap into the encoder of the multi-scale attention fusion alignment network. The encoder includes 1 residual block and 3 downsampling blocks to obtain a feature map with 256 channels and a size of 32×32. S32: Input the downsampled features and the decoder upsampled features of the same scale into the attention fusion module, and calculate the fused feature a by pixel-level summation; S33: Local features of fused feature a are extracted using a local attention branch, which consists of two pointwise convolutional layers and one batch normalization layer; S34: Extract global features of fused feature a using a global attention branch, which includes one global average pooling layer, two pointwise convolutional layers and one batch normalization layer; S35: The local features of fused feature a in S33 and the global features of fused feature a in S34 are calculated by pixel-level summation to obtain fused feature b, and the attention fusion weight coefficients are obtained by using the Sigmoid activation function; S36: Use the attention fusion weight coefficients obtained in S35 to further fuse the upsampled features and downsampled features in S32 to obtain attention fusion features; S37: Repeat steps S32-S36 before the second and third layers of the multi-scale attention fusion alignment network to gradually obtain fusion features of sizes 64×64 and 128×128. Finally, generate a rough portrait image through the decoder output layer.

4. The method for generating character images based on context-preserving spatial normalized pose guidance according to claim 1, characterized in that, Step S4 includes: S41: Input the source image, source attitude heatmap, and target attitude heatmap into the flow field estimation network to extract 256-channel features of size 8×8; S42: The features extracted in S41 are upsampled through the decoder residual block. The decoder residual block consists of a 3×3 transposed convolutional layer, an instance normalization layer, and an activation layer. S43: The flow field is calculated using a convolutional layer with 2 output channels. The flow field represents the coordinate offset between the source image and the target image. At the same time, an occlusion mask is obtained using a convolutional layer with 1 output channel, which indicates whether the target position information is visible in the source image. S44: Repeat step S43 after the second and third layers of the decoder to gradually obtain flow field and occlusion masks with sizes of 32×32 and 64×64.

5. The method for generating character images based on context-preserving spatial normalized pose guidance according to claim 1, characterized in that, The context-preserving spatial normalization is divided into two stages: In the first stage, two types of parameters are generated: four semantic modulation parameters are extracted from the source image features and target domain features using a 3×3 convolutional layer, and two context modulation parameters are extracted from the distortion features. The above six parameters are used for the first modulation to generate the fusion modulation parameters. In the second stage, the fusion modulation parameters are used to perform normalization modulation calculation on the distortion features to obtain the normalized fusion features.