IP Library › Granted Patent US 12,456,241
Granted Patent B2
US 12,456,241 · App. 17/984,110 · Granted Oct 28, 2025

Image processing method and apparatus, computer device, computer-readable storage medium, and computer program product

Inventors: Keke He (Shenzhen, CN); Junwei Zhu (Shenzhen, CN); Xinyi Zhang (Shenzhen, CN); Ying Tai (Shenzhen, CN); Chengjie Wang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06T11/60G06V40/161G06V40/168
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,456,241
App. No.
17/984,110
Granted
Oct 28, 2025
Kind
B2
Abstract

This application provides an image processing method performed by a computer device. The image processing method includes: receiving a face swapping request; acquiring an attribute parameter of the image, an attribute parameter of the target face, and a face feature of the target face, the attribute parameter of the image indicating a three-dimensional attribute of the face in the image; determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face; determining a target comprehensive feature based on the target attribute parameter and the face feature of the target face; encoding the image to obtain an image encoding feature of the image; migrating the target comprehensive feature to the image encoding feature of the image by normalization to obtain a fusion encoding feature; and decoding the fusion encoding feature to obtain a target face-swapped image including a fusion face.

Claims (49)

1. An image processing method performed by a computer device, the method comprising:

receiving a face swapping request, the face swapping request being used for requesting replacement of a face in an image with a target face;

acquiring an attribute parameter of the image, an attribute parameter of the target face, and a face feature of the target face, the attribute parameter of the image indicating a three-dimensional attribute of the face in the image and the face feature of the target face indicating a feature of the face in the image in a two-dimensional plane;

determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face;

determining a target comprehensive feature based on the target attribute parameter and the face feature of the target face;

encoding the image to obtain an image encoding feature vector of the image;

migrating the target comprehensive feature to the image encoding feature vector of the image by (i) normalization of the target comprehensive feature and the image encoding feature vector of the image, respectively, and (ii) alignment of the normalized target comprehensive feature and the normalized image encoding feature vector of the image, to obtain a fusion encoding feature vector; and

decoding the fusion encoding feature vector to obtain the fusion face.

2. The image processing method according to claim 1 ,

wherein the normalization of the target comprehensive feature and the image encoding feature vector of the image comprises:

acquiring a first mean and a first standard deviation of the image encoding feature in at least one feature channel to take normal distribution conforming to the first mean and the first standard deviation as first feature distribution, and acquiring a second mean and a second standard deviation of the target comprehensive feature in the at least one feature channel to take normal distribution conforming to the second mean and the second standard deviation as second feature distribution; and

the alignment of the normalized target comprehensive feature and the normalized image encoding feature vector of the image comprises:

aligning the image encoding feature from the first feature distribution to the second feature distribution to obtain the fusion encoding feature.

3. The image processing method according to claim 1 , wherein the attribute parameter of the target face is a shape coefficient, and the attribute parameter of the image is a pre-configuration parameter; and

the determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face comprises:

determining the shape coefficient of the target face and the pre-configuration parameter of the image to be the target attribute parameter, the pre-configuration parameter comprising at least one of an expression coefficient, an angle coefficient, a texture coefficient, and an illumination coefficient.

4. The image processing method according to claim 1 , wherein the target face-swapped image is obtained by invoking a face swapping model; the face swapping model being configured to swap the target face to a face image based on the attribute parameter and the face feature of the target face.

5. A computer device, comprising a memory, a processor, and a computer program stored on the memory, the computer program, when executed by the processor, causing the computer device to implement an image processing method including:

receiving a face swapping request, the face swapping request being used for requesting replacement of a face in an image with a target face;

acquiring an attribute parameter of the image, an attribute parameter of the target face, and a face feature of the target face, the attribute parameter of the image indicating a three-dimensional attribute of the face in the image and the face feature of the target face indicating a feature of the face in the image in a two-dimensional plane;

determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face;

determining a target comprehensive feature based on the target attribute parameter and the face feature of the target face;

encoding the image to obtain an image encoding feature vector of the image;

migrating the target comprehensive feature to the image encoding feature vector of the image by (i) normalization of the target comprehensive feature and the image encoding feature vector of the image, respectively, and (ii) alignment of the normalized target comprehensive feature and the normalized image encoding feature vector of the image, to obtain a fusion encoding feature vector; and

decoding the fusion encoding feature vector to obtain the fusion face.

6. The computer device according to claim 5 , wherein the normalization of the target comprehensive feature and the image encoding feature vector of the image comprises:

acquiring a first mean and a first standard deviation of the image encoding feature in at least one feature channel to take normal distribution conforming to the first mean and the first standard deviation as first feature distribution, and acquiring a second mean and a second standard deviation of the target comprehensive feature in the at least one feature channel to take normal distribution conforming to the second mean and the second standard deviation as second feature distribution; and

the alignment of the normalized target comprehensive feature and the normalized image encoding feature vector of the image comprises:

aligning the image encoding feature from the first feature distribution to the second feature distribution to obtain the fusion encoding feature.

7. The computer device according to claim 5 , wherein the attribute parameter of the target face is a shape coefficient, and the attribute parameter of the image is a pre-configuration parameter; and

the determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face comprises:

determining the shape coefficient of the target face and the pre-configuration parameter of the image to be the target attribute parameter, the pre-configuration parameter comprising at least one of an expression coefficient, an angle coefficient, a texture coefficient, and an illumination coefficient.

8. The computer device according to claim 6 , wherein the target face-swapped image is obtained by invoking a trained face swapping model; the face swapping model being configured to swap the target face to a face image based on the attribute parameter and the face feature of the target face.

9. A non-transitory computer-readable storage medium, storing a computer program, the computer program, when executed by a processor of a computer device, causing the computer device to implement an image processing method including:

receiving a face swapping request, the face swapping request being used for requesting replacement of a face in an image with a target face;

acquiring an attribute parameter of the image, an attribute parameter of the target face, and a face feature of the target face, the attribute parameter of the image indicating a three-dimensional attribute of the face in the image and the face feature of the target face indicating a feature of the face in the image in a two-dimensional plane;

determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face;

determining a target comprehensive feature based on the target attribute parameter and the face feature of the target face;

encoding the image to obtain an image encoding feature vector of the image;

migrating the target comprehensive feature to the image encoding feature vector of the image by (i) normalization of the target comprehensive feature and the image encoding feature vector of the image, respectively, and (ii) alignment of the normalized target comprehensive feature and the normalized image encoding feature vector of the image, to obtain a fusion encoding feature vector; and

decoding the fusion encoding feature vector to obtain the fusion face.

10. The non-transitory computer-readable storage medium according to claim 9 , wherein the normalization of the target comprehensive feature and the image encoding feature vector of the image comprises:

acquiring a first mean and a first standard deviation of the image encoding feature in at least one feature channel to take normal distribution conforming to the first mean and the first standard deviation as first feature distribution, and acquiring a second mean and a second standard deviation of the target comprehensive feature in the at least one feature channel to take normal distribution conforming to the second mean and the second standard deviation as second feature distribution; and

the alignment of the normalized target comprehensive feature and the normalized image encoding feature vector of the image comprises:

aligning the image encoding feature from the first feature distribution to the second feature distribution to obtain the fusion encoding feature.

11. The non-transitory computer-readable storage medium according to claim 9 , wherein the attribute parameter of the target face is a shape coefficient, and the attribute parameter of the image is a pre-configuration parameter; and

the determining a target attribute parameter based on the attribute parameter of the image and the attribute parameter of the target face comprises:

determining the shape coefficient of the target face and the pre-configuration parameter of the image to be the target attribute parameter, the pre-configuration parameter comprising at least one of an expression coefficient, an angle coefficient, a texture coefficient, and an illumination coefficient.

12. The non-transitory computer-readable storage medium according to claim 9 , wherein the target face-swapped image is obtained by invoking a trained face swapping model; the face swapping model being configured to swap the target face to a face image based on the attribute parameter and the face feature of the target face.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 25, 2023
From: HE, KEKE; ZHU, JUNWEI; ZHANG, XINYI; TAI, YING; WANG, CHENGJIE
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 062803/0561 →
Priority Claims (1)
CN 202210334052.7 · Mar 30, 2022 · national
Continuity (2)
Continuation PCTCN2022111774 · Aug 11, 2022
Related Publication 20230316607A1 · Oct 5, 2023
References Cited (38)
US 11276231B2 · Chandran · 2022 [cited by examiner]
US 11581020B1 · Hadap · 2023 [cited by examiner]
US 11657852B1 · Zavesky · 2023 [cited by examiner]
US 11769346B2 · Moustafa · 2023 [cited by examiner]
US 20200151424A1 · Li et al. · 2020 [cited by applicant]
US 20210142440A1 · Ahn · 2021 [cited by examiner]
US 20230021661A1 · Bao · 2023 [cited by examiner]
US 20230027783A1 · Kuta · 2023 [cited by examiner]
US 20230063681A1 · Palacios · 2023 [cited by examiner]
US 20230081982A1 · He · 2023 [cited by examiner]
US 20230100427A1 · He · 2023 [cited by examiner]
US 20230112462A1 · Li · 2023 [cited by examiner]
US 20230162407A1 · Kalarot · 2023 [cited by examiner]
US 20230316587A1 · Ghebremusse · 2023 [cited by examiner]
CN 110264396A · 2019 [cited by applicant]
CN 111080511A · 2020 [cited by applicant]
CN 111508050A · 2020 [cited by applicant]
CN 111783603A · 2020 [cited by applicant]
CN 112581635A · 2021 [cited by applicant]
CN 113240575A · 2021 [cited by applicant]
CN 113642491A · 2021 [cited by applicant]
CN 113762022A · 2021 [cited by applicant]
CN 114140320A · 2022 [cited by applicant]
WO WO2021258920A1 · 2021 [cited by applicant]
Chen et al. “SimSwap: An Efficient Framework for High Fidelity Face Swapping”, arXiv:2106.06340v1 [cs.CV] Jun. 11, 2021 (Year: 2021). [cited by examiner]
Li et al. “FaceShifter: Towards High Fidelity and Occlusion Aware Face Swapping”, arXiv:1912.13457v3 [cs.CV] Sep. 15, 2020 (Year: 2020). [cited by examiner]
Naruniec et al. “High-Resolution Neural Face Swapping for Visual Effects”, Eurographics Symposium on Rendering vol. 39 (2020), No. 4 2020 (Year: 2020). [cited by examiner]
Petrov et al. “DeepFaceLab: Integrated, flexible and extensible face-swapping framework”, arXiv:2005.05535v5 [cs.CV] Jun. 29, 2021 (Year: 2021). [cited by examiner]
Nirkin et al. “On Face Segmentation, Face Swapping, and Face Perception”, arXiv:1704.06729v1 [cs.CV] Apr. 22, 2017 (Year: 2017). [cited by examiner]
Nirkin et al. “FSGAN: Subject Agnostic Face Swapping and Reenactment”, arXiv:1908.05932v1 [cs.CV] Aug. 16, 2019 (Year: 2019). [cited by examiner]
Tencent Technology, ISR, PCT/CN2022/111774, Dec. 12, 2022, 2 pgs. [cited by applicant]
Lingzhi Li et al., “FaceShifter: Towards High Fidelity and Occlusion Aware Face Swapping”, arxiv.org, Sep. 15, 2020, 11 pgs. [cited by applicant]
Tencent Technology, Korean Office Action, KR Patent Application No. 10-2022-7040870, Dec. 18, 2023, 11 pgs. [cited by applicant]
Tencent Technology, Written Opinion, PCT/CN2022/111774, Dec. 22, 2022, 3 pgs. [cited by applicant]
Tarun Yenamandra et al., “i3DMM: Deep Implicit 3D Morphable Model of Human Heads”, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021, 11 pgs. [cited by applicant]
Tencent Technology, Extended European Search Report, EP Patent Application No. 22934637.4, Feb. 13, 2025, 7 pgs. [cited by applicant]
Anni Tang et al., “Dense 3D Coordinate Code Prior Guidance for High-Fidelity Face Swapping and Face Reenactment”, 16th IEEE International Conference on Automatic Face and Gesture Recognition (FG 2021), Dec. 2021, 8 pgs. [cited by applicant]
Jia Li et al., “Faceinpainter: High Fidelity Face Adaptation to Heterogeneous Domains”, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021, 10 pgs. [cited by applicant]