IP Library Granted Patent US 12,315,113
Granted Patent B2
US 12,315,113 · App. 17/395,861 · Granted May 27, 2025

Image processing method and apparatus, and storage medium

Inventors: Gao Wu (Shenzhen, CN); Bingkeng Peng (Shenzhen, CN); Nianhua Xie (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06T5/50G06F18/21G06N3/08G06T11/00G06V10/454G06V10/82G06V20/41G06V20/46G06V20/49G06V30/19173G06V30/274
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,315,113
App. No.
17/395,861
Granted
May 27, 2025
Kind
B2
Abstract

Embodiments of the present disclosure disclose an image processing method and apparatus. The method may include obtaining a harmonized image. The harmonized image may be harmonized with a promotional content image. The method may further include performing context feature extraction on the harmonized image to obtain context feature information of the harmonized image and extracting multi-level semantic information of an object in the harmonized image based on the context feature information. The method may further include performing image reconstruction based on the context feature information and the multi-level semantic information to obtain a reconstructed image. This solution can improve an image harmonization effect.

Claims (83)

1. An image processing method, comprising:

obtaining a harmonized image, the harmonized image being harmonized with a promotional content image;

performing context feature extraction on the harmonized image using a plurality of convolutional layers in a first convolutional neural network, to obtain multi-layer context features of the harmonized image, the multi-layer context features comprise an output-layer context feature and a middle-layer context feature;

performing multi-level semantic extraction on the output-layer context feature to obtain an intermediate multi-level semantic information of an object in the harmonized image;

harmonizing the intermediate multi-level semantic information with a middle-layer context feature at a same level in a manner of feature value summation, to obtain the multi-level semantic information of the object in the harmonized image; and

performing image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain a reconstructed image.

2. The image processing method of claim 1 , wherein the performing the multi-level semantic extraction on the output-layer context feature comprises:

determining the output-layer context feature as a current extraction feature;

performing semantic extraction on the current extraction feature, to obtain target-level semantic information of the object in the harmonized image;

harmonizing the target-level semantic information with a middle-layer context feature at a same level, to obtain a target-level harmonized feature of the object in the harmonized image;

updating a current input feature to the target-level harmonized feature; and

in response to a semantic extraction termination condition being met, outputting the multi-level semantic information of the object in the harmonized image.

3. The image processing method of claim 2 , wherein the performing the multi-level semantic extraction on the output-layer context feature comprises:

in response to the semantic extraction termination condition being not met, reperforming the semantic extraction on the current extraction feature.

4. The image processing method of claim 2 , wherein the multi-layer context features comprise the output-layer context feature; and

the performing the image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain the reconstructed image comprises:

performing multi-level feature restoration on the output-layer context feature to obtain a restored feature; and

harmonizing the restored feature and semantic information at a same level, to obtain the reconstructed image.

5. The image processing method of claim 4 , wherein the multi-layer context features comprise the output-layer context feature and intermediate context features with a plurality of levels, and the performing the image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain the reconstructed image comprises:

determining the output-layer context feature as a current restoration feature;

performing feature restoration on the current restoration feature, to obtain a restored feature;

harmonizing the restored feature and semantic information at a same level, to obtain a harmonized feature;

updating the current restoration feature to the harmonized feature; and

in response to a reconstruction termination condition being met, outputting the current restoration feature to obtain the reconstructed image.

6. The image processing method of claim 5 , wherein the performing the image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain the reconstructed image comprises:

in response to a reconstruction termination condition being not met, reperforming the feature restoration on the current restoration feature.

7. The image processing method of claim 4 , wherein the performing the image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain the reconstructed image comprises:

inputting the output-layer context feature into a second convolutional neural network, the second convolutional neural network comprising a plurality of convolutional layers;

performing feature restoration on a feature outputted by a previous convolutional layer using a convolutional layer in the second convolutional neural network, to obtain a restored feature;

harmonizing the restored feature with semantic information at a same level, and

inputting the harmonized feature into a next convolutional layer to obtain the reconstructed image.

8. The image processing method of claim 1 , wherein the first convolutional neural network comprises an encoding module and a decoding module, the encoding module comprising a plurality of encoding convolutional layers, and the decoding module comprising a plurality of decoding convolutional layers in skip connections with the plurality of encoding convolutional layers respectively;

the performing the context feature extraction on the harmonized image using the plurality of convolutional layers in the first convolutional neural network comprises:

performing the context feature extraction on the harmonized image using the plurality of encoding convolutional layers in the encoding module; and

the extracting the multi-level semantic information of the object in the harmonized image based on the multi-layer context features of the harmonized image comprises:

for each of the plurality of decoding convolutional layers, performing semantic extraction on a feature outputted by a previous convolutional layer using the decoding convolutional layer; and

harmonizing an extracted semantic feature and a middle-layer context feature at a same level, the middle-layer context feature at the same level being a middle-layer context feature outputted by an encoding convolutional layer in a skip connection with the decoding convolutional layer.

9. The image processing method of claim 1 , wherein the obtaining a harmonized image comprises:

splitting a video to obtain at least one video frame;

determining a target video frame in the at least one video frame;

harmonizing the promotional content image to a harmonized region of the target video frame, to obtain a harmonized video frame; and

using the harmonized video frame as the harmonized image.

10. The image processing method of claim 1 , further comprising:

determining a harmonized region in the reconstructed image; and

replacing an image of the harmonized region in the reconstructed image with the promotional content image.

11. An image processing apparatus, comprising:

a memory operable to store computer-readable instructions; and

a processor operable to read the computer-readable instructions, the processor when executing the computer-readable instructions is configured to:

obtain a harmonized image, the harmonized image being harmonized with a promotional content image;

perform context feature extraction on the harmonized image using a plurality of convolutional layers in a first convolutional neural network, to obtain multi-layer context features of the harmonized image, the multi-layer context features comprise an output-layer context feature and a middle-layer context feature;

perform multi-level semantic extraction on the output-layer context feature to obtain an intermediate multi-level semantic information of an object in the harmonized image;

harmonize the intermediate multi-level semantic information with a middle-layer context feature at a same level in a manner of feature value summation, to obtain the multi-level semantic information of the object in the harmonized image;

perform image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain a reconstructed image.

12. The image processing apparatus of claim 11 , wherein the processor is configured to:

perform the context feature extraction on the harmonized image using a plurality of convolutional layers in a first convolutional neural network, to obtain multi-layer context features of the harmonized image;

extract the multi-level semantic information of the object in the harmonized image based on the multi-layer context features of the harmonized image; and

perform the image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain the reconstructed image.

13. The image processing apparatus of claim 12 , wherein the multi-layer context features comprise an output-layer context feature and a middle-layer context feature, and the processor is configured to:

perform multi-level semantic extraction on the output-layer context feature to obtain an intermediate multi-level semantic information; and

harmonize the intermediate multi-level semantic information with a middle-layer context feature at a same level, to obtain the multi-level semantic information of the object in the harmonized image.

14. The image processing apparatus of claim 13 , wherein the processor is configured to:

determine the output-layer context feature as a current extraction feature;

perform semantic extraction on the current extraction feature, to obtain target-level semantic information of the object in the harmonized image;

harmonize the target-level semantic information with a middle-layer context feature at a same level, to obtain a target-level harmonized feature of the object in the harmonized image;

update a current input feature to the target-level harmonized feature; and

in response to a semantic extraction termination condition being met, output the multi-level semantic information of the object in the harmonized image.

15. The image processing apparatus of claim 14 , wherein the processor is configured to:

in response to the semantic extraction termination condition being not met, reperform the semantic extraction on the current extraction feature.

16. The image processing apparatus of claim 14 , wherein the multi-layer context features comprise the output-layer context feature, and the processor is configured to:

perform multi-level feature restoration on the output-layer context feature to obtain a restored feature; and

harmonize the restored feature and semantic information at a same level, to obtain the reconstructed image.

17. The image processing apparatus of claim 16 , wherein the multi-layer context features comprise the output-layer context feature and intermediate context features with a plurality of layers, and the processor is configured to:

determine the output-layer context feature as a current restoration feature;

perform feature restoration on the current restoration feature, to obtain a restored feature;

harmonize the restored feature and semantic information at a same level, to obtain a harmonized feature;

update the current restoration feature to the harmonized feature; and

in response to a reconstruction termination condition being met, output the current restoration feature to obtain the reconstructed image.

18. A non-transitory computer-readable storage medium, having processor executable instructions stored thereon for causing a processor to:

obtain a harmonized image, the harmonized image being harmonized with a promotional content image;

perform context feature extraction on the harmonized image using a plurality of convolutional layers in a first convolutional neural network, to obtain multi-layer context features of the harmonized image, the multi-layer context features comprise an output-layer context feature and a middle-layer context feature;

perform multi-level semantic extraction on the output-layer context feature to obtain an intermediate multi-level semantic information of an object in the harmonized image;

harmonize the intermediate multi-level semantic information with a middle-layer context feature at a same level in a manner of feature value summation, to obtain the multi-level semantic information of the object in the harmonized image; and

perform image reconstruction based on the multi-layer context features and the multi-level semantic information, to obtain a reconstructed image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 13, 2023
From: WU, GAO; PENG, BINGKENG; XIE, NIANHUA
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 064246/0069 →
Priority Claims (1)
CN 201910429716.6 · May 22, 2019 · national
Continuity (2)
Continuation PCTCN2020090055 · May 13, 2020
Related Publication 20210383176A1 · Dec 9, 2021
References Cited (17)
US 20040215965A1 · Tokuda · 2004 [cited by examiner]
US 20100092085A1 · Marchesotti · 2010 [cited by examiner]
US 20200364515A1 · Heide · 2020 [cited by examiner]
US 20210342976A1 · Navarrete Michelini · 2021 [cited by examiner]
CN 104967885 · 2015 [cited by applicant]
CN 106991641 · 2017 [cited by applicant]
CN 107169135 · 2017 [cited by applicant]
CN 108573527 · 2018 [cited by applicant]
CN 108830322A · 2018 [cited by applicant]
CN 109685072 · 2019 [cited by applicant]
Zeng, Yanhong et al., “Learning Pyramid-Context Encoder Network for High-Quality Image Inpainting”, Microsoft Research, Beijing, P.R. China. [cited by applicant]
European Office Action and Search Report issued on application EP20810620.3 on Jul. 5, 2022, 12 pages. [cited by applicant]
Chang, Chia-Hu et al., “Virtual spotlighted advertising for tennis videos”, J. Vis. Commun. Image R. 21 (2010) 595-612. [cited by applicant]
Tsai, Yi-Hsuan et al., “Deep Image Harmonization”, 2017 IEEE Conference on Computer Vision and Pattern Recognition, 9 pages. [cited by applicant]
English translation of International Search Report issued Aug. 12, 2020 in International Application No. PCT/CN2020/090055. [cited by applicant]
Fei et al. “A Convolutional Encoder-Decoder Network with Skip Connections for Saliency Prediction,” IEEE Access, May 2019 7:60428-60438. [cited by applicant]
Office action issued in European application No. 20810620.3, dated Nov. 26, 2024, 9 pages. [cited by applicant]