以條件式生成對抗網路為基礎的深度學習模型,是主流的影像生成演算法之一,該演算法以條件輸入作為模型生成影像的依據與約束。以人臉影像生成為例,該模型通常以人臉輪廓影像作為條件輸入,生成與輪廓影像相符的人臉影像,Pix2PixHD與Sketch2Face兩個生成模型皆是以條件式生成對抗網路為基礎進行改良,而以條件式生成對抗網路為基礎開發的影像生成模型都有著共同的問題,以上兩個模型也不例外:若條件輸入與預訓練模型的訓練資料構成不夠相近,模型便無法輸出令人滿意的結果。本研究針對以上問題,提出以自編碼器對訓練資料作資料降維與特徵提取,並以K-近鄰演算法結合基於內容的影像檢索作為解方,改善條件式生成對抗網路對大多數人使用上不友善的問題,並加入權重的設計,提供繪畫技巧了得的使用者能如意的控制影像生成結果。
A prevalent approach for image generation involves deep learning models based on conditional generative adversarial networks (cGANs). These models utilize conditional inputs to generate images, with examples including facial sketches serving as constraints for generating corresponding facial images. Notable examples such as Pix2PixHD and Sketch2Face have advanced this technique. However, common issues persist in such models, including the dependence on sufficiently similar conditional inputs to the training data for satisfactory results. To address this challenge, we propose employing autoencoders for data dimensionality reduction and feature extraction from the training data, thereby enhancing model performance. Additionally, we integrate the K-nearest neighbor algorithm with content-based image retrieval to alleviate user-unfriendly issues associated with cGANs, making the process more accessible for users. Moreover, we introduce a customizable weight mechanism, enabling users with proficient drawing skills to exert greater control over the image generation results to suit their preferences.