Anime2Sketch
1.0.0
Anime2sketch:插圖,動漫藝術,漫畫的素描提取器
Xiaoyu Xiang


存儲庫包含測試代碼和動漫2sketch的預算權重。
Anime2sketch是一種素描提取器,可在插圖,動漫藝術和漫畫中效果很好。它是基於“對抗性開放域的適應素描至光學合成”的紙張的應用程序。
安裝所需的軟件包: pip install -r requirements.txt
請從GoogleDrive下載權重,然後將其放入權重/文件夾中。
我們還有一個無偽影的模型版本,可與深色 /低對比度圖像一起使用。您可以從GoogleDrive下載權重,然後將其放入權重/文件夾中。
python3 test.py --dataroot /your_input/dir --load_size 512 --output_dir /your_output/dir以上命令包括三個參數:
512x512 。運行我們的示例:
python3 test.py --dataroot test_samples/madoka.jpg --load_size 512 --output_dir results/如果要在Docker上運行,則可以通過自定義輸入/輸出圖像目錄來輕鬆地進行操作。
構建Docker圖像
make docker-build設置輸入/輸出目錄
您可以通過makefile自定義輸入/輸出圖像的安裝量。請設置目標目錄。
docker run -it --rm --gpus all -v `pwd`:/workspace -v {your_input_dir}:/input -v {your_output_dir}:/output anime2sketch
例子:
docker run -it --rm --gpus all -v `pwd`:/workspace -v `pwd`/test_samples:/input -v `pwd`/output:/output anime2sketch
跑步
make docker-run如果您只想運行CPU ,則需要修復兩件事(刪除GPU選項)。
CMD [ "python", "test.py", "--dataroot", "/input", "--load_size", "512", "--output_dir", "/output" ]docker run -it --rm -v `pwd`:/workspace -v `pwd`/images/input:/input -v `pwd`/images/output:/output anime2sketch該項目是AODA的子分支。請檢查一下培訓說明。
我們的模型在插圖藝術上效果很好: 
將手工繪畫的照片轉到清潔線路:
簡化徒手草圖:
還有更多動漫結果: 

Xiaoyu Xiang。
您也可以將問題作為存儲庫中的問題。我很高興回答他們!
該項目根據麻省理工學院許可發布。
@misc { Anime2Sketch ,
author = { Xiaoyu Xiang, Ding Liu, Xiao Yang, Yiheng Zhu, Xiaohui Shen } ,
title = { Anime2Sketch: A Sketch Extractor for Anime Arts with Deep Networks } ,
year = { 2021 } ,
publisher = { GitHub } ,
journal = { GitHub repository } ,
howpublished = { url{https://github.com/Mukosame/Anime2Sketch} }
}
@inproceedings { xiang2022adversarial ,
title = { Adversarial Open Domain Adaptation for Sketch-to-Photo Synthesis } ,
author = { Xiang, Xiaoyu and Liu, Ding and Yang, Xiao and Zhu, Yiheng and Shen, Xiaohui and Allebach, Jan P } ,
booktitle = { Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision } ,
year = { 2022 }
}