|
před 3 týdny | |
---|---|---|
network | před 7 roky | |
pretrained_model | před 7 roky | |
src | před 7 roky | |
test_img | před 7 roky | |
test_output | před 6 roky | |
.gitignore | před 7 roky | |
LICENSE | před 4 roky | |
README.md | před 6 roky | |
python算法时长计算研究生版.py | před 2 měsíci | |
run_all.py | před 3 týdny | |
test.lua | před 7 roky | |
test.py | před 6 roky | |
train_corrector.py | před 1 měsícem | |
反推含水量.py | před 1 měsícem | |
模型调用.py | před 1 měsícem | |
焦炭计算公式.py | před 1 měsícem | |
煤矿途径地点初始温度代码接收java数据算法.py | před 2 měsíci | |
解冻库python代码接收java算法数据.py | před 2 měsíci |
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.