Method and device for data processing
AssigneeBeijing Zitiao Network Technology Co., Ltd.
InventorsJie Wu, Yuxi Ren, Xuefeng Xiao
Life of this patent
Estimating the term…
Abstract
A method and a device for data processing. The method is adapted to a generative adversarial network obtained by model distillation, and the generative adversarial network includes a first generator, a second generator and a discriminator. The model distillation is a process of alternately training the first generator and the second generator. A model scale of the first generator is smaller than a model scale of the second generator. The method includes: obtaining an image to be processed; and processing the image with a first generator to obtain a processed image.
Claims18
A method for data processing adapted to a generative adversarial network obtained by model distillation, wherein the method for data processing comprises:
- obtaining an image to be processed;
- and
- processing the image with a first generator to obtain a processed image;
- wherein the generative adversarial network comprises the first generator, a second generator and a discriminator, the model distillation is a process of alternately training the first generator and the second generator comprising:
- determining a loss value of the second generator based on sample data and the discriminator, the sample data comprising a sample image and a reference image corresponding to the sample image;
- adjusting the second generator based on the loss value of the second generator;
- determining a distillation loss between the adjusted second generator and the first generator based on the sample image, the adjusted second generator and the first generator;
- and
- adjusting the first generator based on the distillation loss, and
- a model scale of the first generator is smaller than a model scale of the second generator.
An electronic device comprising at least one processor and a memory;
- the memory stores computer-executable instructions;
- the computer-executable instructions stored in the memory which, when executed by the at least one processor, cause the at least one processor to carry out a method for data processing adapted to a generative adversarial network obtained by model distillation, wherein the method comprises:
- obtaining an image to be processed;
- and
- processing the image with a first generator to obtain a processed image;
- wherein the generative adversarial network comprises the first generator, a second generator and a discriminator, the model distillation is a process of alternately training the first generator and the second generator comprising:
- determining a loss value of the second generator based on sample data and the discriminator, the sample data comprising a sample image and a reference image corresponding to the sample image;
- adjusting the second generator based on the loss value of the second generator;
- determining a distillation loss between the adjusted second generator and the first generator based on the sample image, the adjusted second generator and the first generator;
- and
- adjusting the first generator based on the distillation loss, and
- a model scale of the first generator is smaller than a model scale of the second generator.
A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions which, when executed by a processor, carry out a method for data processing adapted to a generative adversarial network obtained by model distillation, wherein the method comprises:
- obtaining an image to be processed;
- and
- processing the image with a first generator to obtain a processed image;
- wherein the generative adversarial network comprises the first generator, a second generator and a discriminator, the model distillation is a process of alternately training the first generator and the second generator comprising:
- determining a loss value of the second generator based on sample data and the discriminator, the sample data comprising a sample image and a reference image corresponding to the sample image;
- adjusting the second generator based on the loss value of the second generator;
- determining a distillation loss between the adjusted second generator and the first generator based on the sample image, the adjusted second generator and the first generator;
- and
- adjusting the first generator based on the distillation loss, and
- a model scale of the first generator is smaller than a model scale of the second generator.
Dependencies are inferred from the claim text.