Image processing method and apparatus
AssigneeBeijing Zitiao Network Technology Co., Ltd.
InventorKai Chen
Life of this patent
Estimating the term…
Abstract
An image processing method including: obtaining a target feature and a reference feature, the target feature is a feature obtained by performing feature extraction on a target object in a target image, and the reference feature is a feature obtained by performing feature extraction on a reference object in a reference image; obtaining a migration matrix, the migration matrix is used for controlling the reference feature to be fused with the target feature at a designated weight; fusing the target feature and the reference feature according to the migration matrix to obtain a fused feature; and generating a migration result image according to the fused feature and the target image. An image processing apparatus, an electronic device, a storage medium and a program product are also disclosed.
Claims17
An image processing method, comprising:
- obtaining a target feature and a reference feature, wherein the target feature is a feature obtained by performing feature extraction on a target object in a target image, and the reference feature is a feature obtained by performing feature extraction on a reference object in a reference image;
- obtaining a migration matrix, wherein the migration matrix is used for controlling the reference feature to be fused with the target feature at a designated weight;
- fusing the target feature and the reference feature according to the migration matrix to obtain a fused feature;
- and
- generating a migration result image according to the fused feature and the target image,
- wherein the obtaining the migration matrix comprises:
- obtaining a weight parameter, wherein the weight parameter is used for characterizing the designated weight;
- and
- obtaining the migration matrix according to the weight parameter and a pre-trained matrix,
- wherein the pre-trained matrix is a matrix obtained by training a preset matrix based on first sample data, the first sample data comprising:
- a first sample feature, a second sample feature, and a sample fusion feature corresponding to the first sample feature and the second sample feature.
An electronic device, comprising:
- a memory and a processor, wherein the memory is configured to store a computer program, and the processor is configured to, when calling the computer program, cause the electronic device to:
- obtain a target feature and a reference feature, wherein the target feature is a feature obtained by performing feature extraction on a target object in a target image, and the reference feature is a feature obtained by performing feature extraction on a reference object in a reference image;
- obtain a migration matrix, wherein the migration matrix is used for controlling the reference feature to be fused with the target feature at a designated weight;
- fuse the target feature and the reference feature according to the migration matrix to obtain a fused feature;
- and
- generate a migration result image according to the fused feature and the target image,
- wherein the obtaining the migration matrix comprises:
- obtaining a weight parameter, wherein the weight parameter is used for characterizing the designated weight;
- and
- obtaining the migration matrix according to the weight parameter and a pre-trained matrix,
- wherein the pre-trained matrix is a matrix obtained by training a preset matrix based on first sample data, the first sample data comprising:
- a first sample feature, a second sample feature, and a sample fusion feature corresponding to the first sample feature and the second sample feature.
A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a computing device, causes the computing device to:
- obtain a target feature and a reference feature, wherein the target feature is a feature obtained by performing feature extraction on a target object in a target image, and the reference feature is a feature obtained by performing feature extraction on a reference object in a reference image;
- obtain a migration matrix, wherein the migration matrix is used for controlling the reference feature to be fused with the target feature at a designated weight;
- fuse the target feature and the reference feature according to the migration matrix to obtain a fused feature;
- and
- generate a migration result image according to the fused feature and the target image,
- wherein the obtaining the migration matrix comprises:
- obtaining a weight parameter, wherein the weight parameter is used for characterizing the designated weight;
- and
- obtaining the migration matrix according to the weight parameter and a pre-trained matrix,
- wherein the pre-trained matrix is a matrix obtained by training a preset matrix based on first sample data, the first sample data comprising:
- a first sample feature, a second sample feature, and a sample fusion feature corresponding to the first sample feature and the second sample feature.
Dependencies are inferred from the claim text.