Yijunmaverick/CartoonGAN-Test-Pytorch-Torch
Yijunmaverick/CartoonGAN-Test-Pytorch-Torch has 689 GitHub stars and 201 forks. GitHot measured 0 stars in 24 hours and -1 in 7 days. Last checked 2026-11-25 14:46 UTC. Last push 2024-08-10.
計測したスター増加
- 24時間
- 0
- 7日間
- -1
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
概要
CartoonGAN [Chen et al., CVPR18] の PyTorch および Torch のテストコード
機械学習README.md
オリジナルCartoonGAN-Test-Pytorch-Torch
Pytorch and Torch testing code of CartoonGAN [Chen et al., CVPR18]. With the released pretrained models by the authors, I made these simple scripts for a quick test.
Getting started
- Linux
- NVIDIA GPU
- Pytorch 0.3
- Torch
git clone https://github.com/Yijunmaverick/CartoonGAN-Test-Pytorch-Torch
cd CartoonGAN-Test-Pytorch-Torch
Pytorch
The original pretrained models are Torch nngraph models, which cannot be loaded in Pytorch through load_lua. So I manually copy the weights (bias) layer by layer and convert them to .pth models.
- Download the converted models:
sh pretrained_model/download_pth.sh
- For testing:
python test.py --input_dir YourImgDir --style Hosoda --gpu 0
Torch
Working with the original models in Torch is also fine. I just convert the weights (bias) in their models from CudaTensor to FloatTensor so that cudnn is not required for loading models.
- Download the converted models:
sh pretrained_model/download_t7.sh
- For testing:
th test.lua -input_dir YourImgDir -style Hosoda -gpu 0
Examples (Left: input, Right: output)
Note
- The training code should be similar to the popular GAN-based image-translation frameworks and thus is not included here.
Acknowledgement
Many thanks to the authors for this cool work.
Part of the codes are borrowed from DCGAN, TextureNet, AdaIN and CycleGAN.
関連プロジェクトを探す
読み込み中…