CPC G06T 3/04 (2024.01) [G06F 18/214 (2023.01); G06N 3/045 (2023.01); G06N 3/088 (2013.01); G06T 9/00 (2013.01); G06V 10/95 (2022.01); G06V 40/168 (2022.01); G06V 40/174 (2022.01)] | 17 Claims |
1. An image processing method, applied to a computer device, the method comprising:
encoding an input image based on an attention mechanism to obtain an encoding tensor set and an attention map set of the input image, the encoding tensor set including n encoding tensors, the attention map set including n attention maps, and n being an integer greater than 1, comprising:
determining, for each group of a corresponding encoding tensor and a corresponding attention map in the encoding tensor set and the attention map set, a processed encoding tensor based on the encoding tensor and the attention map, to obtain n processed encoding tensors;
obtaining an encoding result of the input image according to the encoding tensor set and the attention map set, the encoding result of the input image recording an identity feature of a human face in the input image;
encoding an expression image to obtain an encoding result of the expression image, the encoding result of the expression image recording an expression feature of a human face in the expression image; and
generating an output image according to the encoding result of the input image and the encoding result of the expression image, the output image having the identity feature of the input image and the expression feature of the expression image, the encoding result of the expression image including n displacement maps, comprising:
performing spatial transformation processing, for each group of a corresponding processed encoding tensor and a corresponding displacement map, on the processed encoding tensor to obtain n transformed encoding tensors; and
decoding the n transformed encoding tensors to generate the output image.
|