Skip to content

kktsubota/manga-character-screentone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manga Character Screentone Synthesis

Official PyTorch implementation of "Synthesis of Screentone Patterns of Manga Characters" presented in IEEE ISM 2019. I only provide a demo script now.

Environment

Python 3.9 is recommended in 2023/07/30.

pip install -r requirements.txt -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html

Usage

Dataset Preparation

  1. Crop manga character images along with the bounding boxes of "body" annotation in Manga109.

  2. Extract line drawings from manga character images using theano implementation. You can also use official PyTorch implementation. (I used the theano implementation for our experiments in our paper. I checked that the PyTorch implementation also works well.)

Inference

Line drawings to manga images

# download a pre-trained model
wget https://github.com/kktsubota/manga-character-screentone/releases/download/pre/model.pth

# apply a screentone generator
python apply_gen.py <path to a line-drawing image> --model_path model.pth

# render a manga image from the generated label
python render.py <path to a line-drawing image> label.png

Manga images to screentone labels

# download a pre-trained model
wget https://github.com/kktsubota/manga-character-screentone/releases/download/pre/unet.pth

# apply a screentone classifier
python classify_tone.py <path to a manga image> --model_path unet.pth

# render a manga image from the extracted label
python render.py <path to a corresponding line-drawing image> label-c.png

Contact

Please contact me via e-mail if you have any troubles when running this code. My e-mail address is shown in our paper.

Links

Acknowledgements

About

Official PyTorch implementation of "Synthesis of Screentone Patterns of Manga Characters"

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages