mukosame / anime2sketch Goto Github PK
View Code? Open in Web Editor NEWA sketch extractor for anime/illustration.
License: MIT License
A sketch extractor for anime/illustration.
License: MIT License
When I run test.py, I get a ValueError: Unknown resampling filter (InterpolationMode.BICUBIC) error in data.py.
To avoid errors
data.py line 96 image_pil = image_pil.resize (output_resize, bic) is
image_pil = image_pil.resize (output_resize, Image.BICUBIC) or
Shouldn't image_pil = image_pil.resize (output_resize, 3)?
This way the error no longer occurs.
Place it in folder where test.py is and run bat file (a2sgui.bat)
a2sgui.zip
could be useful to have a dockerfile that contains all the programs needed to run it. We could just mount a volume for the input/output.
Right now, this model has issues in dark / low contrast regions #21. I've made a version of the model which significantly reduces the artifacts of this model without degrading performance on existing images.
Below are a couple of examples model outputs
Of course, the model outputs aren't perfect... but if the author of the repository or anyone is interested. Would be glad to write a PR or share methods, weights and code.
I'm using Windows 10 and python 3.9
PS C:\Users\Tamal\Desktop\Anime2Sketch> python3 test.py --dataroot image --load_size 512 --output_dir results
Traceback (most recent call last):
File "C:\Users\Tamal\Desktop\Anime2Sketch\test.py", line 46, in
save_image(aus_img, aus_path, aus_resize)
File "C:\Users\Tamal\Desktop\Anime2Sketch\data.py", line 96, in save_image
image_pil = image_pil.resize(output_resize, bic)
File "C:\Users\Tamal\AppData\Local\Programs\Python\Python39\lib\site-packages\PIL\Image.py", line 1957, in resize
raise ValueError(
ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). Use Image.NEAREST (0), Image.LANCZOS (1), Image.BILINEAR (2), Image.BICUBIC (3), Image.BOX (4) or Image.HAMMING (5)
PS C:\Users\Tamal\Desktop\Anime2Sketch>
ValueError: Unknown resampling filter (InterpolationMode.BICUBIC). Use Image.Resampling.NEAREST (0), Image.Resampling.LANCZOS (1), Image.Resampling.BILINEAR (2), Image.Resampling.BICUBIC (3), Image.Resampling.BOX (4) or Image.Resampling.HAMMING (5)
Can you provide the test code?
Hi, thanks to great works.
tho found this project has been stalled for a year
can it do line extraction but with colored lines (mark) , train model on multi-colour lines pairs ?
In fact, in animation production, called 色トレス, need work that tracing the scanned paper drawing into digital
the tracing easy to coloring (compare to illustration making), tracing following coloring reference to standardize lines colour, like solid line, shadow, highlight mark
Hi, I would like to convert normal face images to sketch. Would a model trained on ffhq dataset perform well with normal images? Have you tried something like this before?
请问一下作者大大,在使用AODA训练Anime2Sketch时是否有使用GC,是将类别数设置为了0还是1呢。
how can launch web interface?
Hi, thanks for your sharing , I want to train my own dataset using this network
I see in readme for training in AODA, but AODA repo also has nothing about how to train 。。。
大佬,请问一下权重文件在哪获取呀
I am getting the following error while trying the test code.
UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
warnings.warn(
heres what works for me and converts all files from in folder to out folder with 2048 tex quality :
@echo off
for %%F in (in*.*) do test.py --dataroot in --load_size 2048 --output_dir out/
raise ValueError("Expected more than 1 spatial element when training, got input size {}".format(size))
ValueError: Expected more than 1 spatial element when training, got input size torch.Size([1, 512, 1, 1])
analytics-python 1.4.0
backoff 1.10.0
bcrypt 3.2.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.8
click 8.0.3
colorama 0.4.4
cryptography 36.0.0
cycler 0.11.0
ffmpy 0.3.0
Flask 2.0.2
Flask-CacheBuster 1.0.0
Flask-Cors 3.0.10
Flask-Login 0.5.0
fonttools 4.28.2
gradio 2.4.6
idna 3.3
itsdangerous 2.0.1
Jinja2 3.0.3
kiwisolver 1.3.2
markdown2 2.4.1
MarkupSafe 2.0.1
matplotlib 3.5.0
monotonic 1.6
numpy 1.21.4
packaging 21.3
pandas 1.3.4
paramiko 2.8.1
pep517 0.12.0
Pillow 8.4.0
pip 21.3.1
pycparser 2.21
pycryptodome 3.11.0
pydub 0.25.1
PyNaCl 1.4.0
pyparsing 3.0.6
python-dateutil 2.8.2
pytz 2021.3
requests 2.26.0
setuptools 41.2.0
setuptools-scm 6.3.2
six 1.16.0
tomli 1.2.2
torch 1.10.0
torchtext 0.11.0
torchvision 0.11.1
tqdm 4.62.3
typing_extensions 4.0.0
urllib3 1.26.7
Werkzeug 2.0.2
你好,可以使用这个模型用来训练普通图片到草图吗?我使用AODA进行了一些尝试,但是效果并不理想,我猜可能是我哪里做错了。
这是我的训练参数,希望能得到你的帮助,谢谢!
python train.py --dataroot ./dataset/sketch/ --name scribble_aoda --model aoda_gan --gan_mode vanilla --no_dropout --n_classes 9 --direction BtoA --save_epoch_freq 1 --load_size 260 --continue_train --gpu_ids 0
Hello, I love your research and output is so great
I'm just wondering how mach size of dataset are used for pretrained model of this Anime2sketch, through the original code
https://github.com/Mukosame/AODA
waiting for reply
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.