animeGAN
anime face images and meta data
生成對抗網絡的簡單pytorch實現,重點是動漫面部圖。
這些圖像是由在100個時代訓練的143,000個動漫角色面孔訓練的DCGAN模型。

操縱潛在代碼,可以使從第一行中的圖像過渡到最後一行。

這些圖像不是乾淨的,可以觀察到一些異常值,從而降低了生成的圖像的質量。

要運行實驗,
$ python main.py --dataRoot path_to_dataset/ DCGAN預驗證的模型也在此存儲庫中,在Jupyter Notebook中播放。
使用Crawler Tool Gallery-DL從Danbooru.donmai.us收集126個標籤的動漫型圖像。然後通過動漫探測器python-Animeface處理圖像。最終的數據集包含約143,000個動漫面孔。請注意,某些標籤在裁剪後可能不再有意義,即“統一”標籤下的裁剪面部圖像可能不包含均勻套件的可見部分。
如何從頭開始構建數據集?
前提:畫廊-DL,Python-Animeface
下載動漫風格的圖像
# download 1000 images under the tag "misaka_mikoto"
gallery-dl --images 1000 " https://danbooru.donmai.us/posts?tags=misaka_mikoto "
# in a multi-processing manner
cat tags.txt |
xargs -n 1 -P 12 -I ' tag '
bash -c ' gallery-dl --images 1000 "https://danbooru.donmai.us/posts?tags=$tag" '從下載的圖像中提取面孔
import animeface
from PIL import Image
im = Image . open ( 'images/anime_image_misaka_mikoto.png' )
faces = animeface . detect ( im )
x , y , w , h = faces [ 0 ]. face . pos
im = im . crop (( x , y , x + w , y + h ))
im . show () # display我已經清潔了原始數據集,該數據集的新版本具有115085的圖像,其中有126個標籤。您可以從:
請使用非商業用途。
我沒有仔細驗證它們,如果您正在尋找一些一般的gan技巧,請參閱 @soumith的ganhacks
@Jayleicn