A Sketching Image Generation Algorithm Based on Attention Mechanism
Jianguo Shi, Chao Kong · 2024
In order to solve the problems of detail loss and image blurring in the process of generating sketch images from original images, a sketch image generation algorithm with residual block attention mechanism was proposed. By introducing residual blocks of attention mechanism, the generator and perceptron of the network model assign different weights to different parts of the input facial image during the training process, thereby improving the quality of the generated facial sketch image. At the same time, in response to the difficulty of training generative adversarial networks on small-scale datasets such as APDrawing, facial sketch images were horizontally flipped at a ratio of 6:1, and the dataset was enhanced by randomly adjusting brightness. Compared with CycleGAN, the facial sketch images generated by this generation algorithm model have clearer contours, more complete details, and more natural and realistic expressions. The FSIM index is used to compare the performance of different algorithms, which verified the stability and effectiveness of the proposed algorithm in facial sketch generation tasks.