CPC G06T 5/50 (2013.01) [G06T 7/97 (2017.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01)] | 18 Claims |
1. An image processing method comprising:
obtaining a sample image and a generative adversarial network (GAN), the GAN comprising a generation network and an adversarial network;
performing style conversion on the sample image by using the generation network, to obtain a reference image;
performing global style recognition on the reference image by using the adversarial network, to determine a global style loss between the reference image and the sample image;
performing image content recognition on the reference image and the sample image by using a content monitoring network of a siamese network (SN), to determine a content loss between the reference image and the sample image;
performing local style recognition on the reference image and the sample image by using a style monitoring network of the SN, to determine a local style loss of the reference image and a local style loss of the sample image;
training the generation network based on the global style loss, the content loss, the local style loss of the reference image, and the local style loss of the sample image, to obtain a trained generation network; and
performing, by a server, style conversion on a to-be-processed image by using the trained generation network, to obtain a style converted image.
|