|
il y a 1 mois | |
---|---|---|
network | il y a 7 ans | |
pretrained_model | il y a 7 ans | |
src | il y a 7 ans | |
test_img | il y a 7 ans | |
test_output | il y a 6 ans | |
.gitignore | il y a 7 ans | |
LICENSE | il y a 4 ans | |
README.md | il y a 6 ans | |
python算法时长计算研究生版.py | il y a 2 mois | |
test.lua | il y a 7 ans | |
test.py | il y a 6 ans | |
train_corrector.py | il y a 1 mois | |
参考.py | il y a 1 mois | |
模型调用.py | il y a 1 mois | |
焦炭计算公式.py | il y a 1 mois | |
煤矿途径地点初始温度代码接收java数据算法.py | il y a 2 mois | |
解冻库python代码接收java算法数据.py | il y a 2 mois |
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.
Torch
git clone https://github.com/Yijunmaverick/CartoonGAN-Test-Pytorch-Torch
cd CartoonGAN-Test-Pytorch-Torch
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
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
Many thanks to the authors for this cool work.
Part of the codes are borrowed from DCGAN, TextureNet, AdaIN and CycleGAN.