IP Library Granted Patent US 12,620,141
Granted Patent B2
US 12,620,141 · App. 18/128,081 · Granted May 5, 2026

Image style conversion method and apparatus, electronic device, and storage medium

Inventors: Yun Cao (Shenzhen, CN); Xinyi Zhang (Shenzhen, CN); Junwei Zhu (Shenzhen, CN); Ying Tai (Shenzhen, CN); Mu Zhang (Shenzhen, CN); Chengjie Wang (Shenzhen, CN); Feiyue Huang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06T11/00G06T5/50G06T2207/20081G06T2207/20221G06T2207/30201
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,620,141
App. No.
18/128,081
Filed
Mar 29, 2023
Granted
May 5, 2026
Kind
B2
Examiner
YANG, YI
Art Unit
2616
USPC
345/629
Abstract

Embodiments of this application disclose an image style conversion method performed by an electronic device. The method includes: performing quality enhancement on a first target style image to obtain a second target style image; performing feature extraction on the second target style image to obtain a target style feature; performing migration training on a preset target style conversion model by using a full style conversion model and the target style feature to obtain a target style conversion model; inputting a full style feature, the target style feature, and a to-be-converted image into the target style conversion model, and performing style conversion on the to-be-converted image using the target style conversion model to obtain a target image conforming to a target style.

Claims (73)

1 . An image style conversion method, performed by an electronic device, the method comprising:

performing quality enhancement on a first target style image to obtain a second target style image;

performing feature extraction on the second target style image to obtain a target style feature;

performing transfer training on a preset target style conversion model by using a full style conversion model, the first target style image and the target style feature to obtain a target style conversion model, wherein a model architecture of the full style conversion model is the same as a model architecture of the preset target style conversion model;

encoding a to-be-converted image by using the target style conversion model to obtain an intermediate style feature of the to-be-converted image, further including:

extracting feature information from the to-be-converted image;

performing distribution mapping on the feature information to obtain a distribution feature of the feature information; and

generating the intermediate style feature according to the distribution feature;

converting the intermediate style feature by using the target image style feature to obtain a converted style feature; and

decoding the converted style feature by using the target style conversion model to obtain the target image.

2 . The method according to claim 1 , wherein the converting the intermediate style feature by using the target image style feature to obtain a converted style feature comprises:

performing feature fusion on a full style feature and the target style feature to obtain a fused image style feature; and

converting the intermediate style feature by using the fused image style feature to obtain the converted style feature.

3 . The method according to claim 2 , wherein the full style feature comprises a plurality of basic style features, and the performing feature fusion on the full style feature and the target style feature to obtain a fused image style feature comprises:

performing statistical processing on each basic style feature to obtain a statistical image style feature; and

fusing the statistical image style feature and the target style feature to obtain the fused image style feature.

4 . The method according to claim 1 , wherein the method further comprises:

adjusting the target style conversion model based on the full style conversion model to obtain an adjusted target style conversion model.

5 . The method according to claim 1 , wherein the performing transfer training on a preset target style conversion model by using a full style conversion model and the target style feature to obtain a target style conversion model comprises:

initializing the preset target style conversion model by using the full style conversion model to obtain an initialized target style conversion model; and

training the initialized target style conversion model by using the target style feature to obtain the target style conversion model.

6 . The method according to claim 5 , wherein the training the initialized target style conversion model by using the target style feature to obtain the target style conversion model comprises:

obtaining a training image;

performing style conversion on the training image by using the target style feature and the initialized target style conversion model to obtain a style-converted image;

calculating loss information between the style-converted image and a preset target style image corresponding to the training image; and

adjusting the initialized target style conversion model according to the loss information to obtain the target style conversion model.

7 . An electronic device, comprising a memory and a processor, the memory storing a plurality of instructions that, when executed by the processor, cause the electronic device to perform an image style conversion method including:

performing quality enhancement on a first target style image to obtain a second target style image;

performing feature extraction on the second target style image to obtain a target style feature;

performing transfer training on a preset target style conversion model by using a full style conversion model, the first target style image and the target style feature to obtain a target style conversion model, wherein a model architecture of the full style conversion model is the same as a model architecture of the preset target style conversion model;

encoding a to-be-converted image by using the target style conversion model to obtain an intermediate style feature of the to-be-converted image, further including:

extracting feature information from the to-be-converted image;

performing distribution mapping on the feature information to obtain a distribution feature of the feature information; and

generating the intermediate style feature according to the distribution feature;

converting the intermediate style feature by using the target image style feature to obtain a converted style feature; and

decoding the converted style feature by using the target style conversion model to obtain the target image.

8 . The electronic device according to claim 7 , wherein the converting the intermediate style feature by using the target image style feature to obtain a converted style feature comprises:

performing feature fusion on a full style feature and the target style feature to obtain a fused image style feature; and

converting the intermediate style feature by using the fused image style feature to obtain the converted style feature.

9 . The electronic device according to claim 8 , wherein the full style feature comprises a plurality of basic style features, and the performing feature fusion on the full style feature and the target style feature to obtain a fused image style feature comprises:

performing statistical processing on each basic style feature to obtain a statistical image style feature; and

fusing the statistical image style feature and the target style feature to obtain the fused image style feature.

10 . The electronic device according to claim 7 , wherein the method further comprises:

adjusting the target style conversion model based on the full style conversion model to obtain an adjusted target style conversion model.

11 . The electronic device according to claim 7 , wherein the performing transfer training on a preset target style conversion model by using a full style conversion model and the target style feature to obtain a target style conversion model comprises:

initializing the preset target style conversion model by using the full style conversion model to obtain an initialized target style conversion model; and

training the initialized target style conversion model by using the target style feature to obtain the target style conversion model.

12 . The electronic device according to claim 11 , wherein the training the initialized target style conversion model by using the target style feature to obtain the target style conversion model comprises:

obtaining a training image;

performing style conversion on the training image by using the target style feature and the initialized target style conversion model to obtain a style-converted image;

calculating loss information between the style-converted image and a preset target style image corresponding to the training image; and

adjusting the initialized target style conversion model according to the loss information to obtain the target style conversion model.

13 . A non-transitory computer-readable storage medium, storing a plurality of instructions that, when executed by a processor of an electronic device, cause the electronic device to perform an image style conversion method including:

performing quality enhancement on a first target style image to obtain a second target style image;

performing feature extraction on the second target style image to obtain a target style feature;

performing transfer training on a preset target style conversion model by using a full style conversion model, the first target style image and the target style feature to obtain a target style conversion model, wherein a model architecture of the full style conversion model is the same as a model architecture of the preset target style conversion model;

encoding a to-be-converted image by using the target style conversion model to obtain an intermediate style feature of the to-be-converted image, further including:

extracting feature information from the to-be-converted image;

performing distribution mapping on the feature information to obtain a distribution feature of the feature information; and

generating the intermediate style feature according to the distribution feature;

converting the intermediate style feature by using the target image style feature to obtain a converted style feature; and

decoding the converted style feature by using the target style conversion model to obtain the target image.

14 . The non-transitory computer-readable storage medium according to claim 13 , wherein the converting the intermediate style feature by using the target image style feature to obtain a converted style feature comprises:

performing feature fusion on a full style feature and the target style feature to obtain a fused image style feature; and

converting the intermediate style feature by using the fused image style feature to obtain the converted style feature.

15 . The non-transitory computer-readable storage medium according to claim 14 , wherein the full style feature comprises a plurality of basic style features, and the performing feature fusion on the full style feature and the target style feature to obtain a fused image style feature comprises:

performing statistical processing on each basic style feature to obtain a statistical image style feature; and

fusing the statistical image style feature and the target style feature to obtain the fused image style feature.

16 . The non-transitory computer-readable storage medium according to claim 13 , wherein the method further comprises:

adjusting the target style conversion model based on the full style conversion model to obtain an adjusted target style conversion model.

17 . The non-transitory computer-readable storage medium according to claim 13 , wherein the performing transfer training on a preset target style conversion model by using a full style conversion model and the target style feature to obtain a target style conversion model comprises:

initializing the preset target style conversion model by using the full style conversion model to obtain an initialized target style conversion model; and

training the initialized target style conversion model by using the target style feature to obtain the target style conversion model.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 10, 2023
From: CAO, YUN; ZHANG, XINYI; ZHU, JUNWEI; TAI, YING; ZHANG, MU; WANG, CHENGJIE; HUANG, FEIYUE
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 063279/0330 →
Priority Claims (1)
CN 202110839235.X · Jul 23, 2021 · national
Continuity (2)
Continuation PCTCN2022099989 · Jun 21, 2022
Related Publication 20230245351A1 · Aug 3, 2023
References Cited (16)
US 10713754B1 · Wang · 2020 [cited by examiner]
US 10762398B2 · Sjölund · 2020 [cited by examiner]
US 11276207B2 · Li · 2022 [cited by examiner]
US 11526712B2 · Chen · 2022 [cited by examiner]
US 20190188882A1 · Son · 2019 [cited by examiner]
US 20190228264A1 · Huang · 2019 [cited by examiner]
US 20210142064A1 · Shimizu · 2021 [cited by examiner]
US 20210166028A1 · Ramenahalli Govindaraju · 2021 [cited by examiner]
CN 108846793A · 2018 [cited by applicant]
CN 111223039A · 2020 [cited by applicant]
CN 112232425A · 2021 [cited by applicant]
CN 113012073A · 2021 [cited by applicant]
CN 113822794A · 2021 [cited by applicant]
Tencent Technology, WO, PCT/CN2022/099989, Sep. 6, 2022, 5 pgs. [cited by applicant]
Tencent Technology, IPRP, PCT/CN2022/099989, Jan. 18, 2024, 6 pgs. [cited by applicant]
Tencent Technology, ISR, PCT/CN2022/099989, Sep. 6, 2022, 2 pgs. [cited by applicant]