MXNet-scala module implementation of cycleGAN.
Based on: https://github.com/junyanz/CycleGAN
So far, I have tried all the tasks and done a lot of experiments,
but just success in two tasks: "apple2orange" and "photo2ukiuoe".
I think I followed the torch implementation completely and couldn't locate the problem :( .
1, compile Mxnet with CUDA, then compile the scala-pkg，doc： https://github.com/dmlc/mxnet/tree/master/scala-package
2, under the Mxnet-Scala/CycleGAN folder
3, copy your compiled mxnet-full_2.11-linux-x86_64-gpu-0.10.0-SNAPSHOT.jar into lib folder;
sbt then compile the project
you can download the datasets with the
datasets/download_dataset.sh. you can refer to https://github.com/junyanz/CycleGAN
for how to use this script.
you can try the pretrained model of "apple2orange" and "photo2ukiuoe" with the
The pretrain model zip file is under
you need to provide the input image file.
If you use the apple2orange model, A means apple, B means orange.
If you use the photo2ukiuoe model which has only one direction, BtoA, B means photo.
# pretrain models are under the $ROOT/datas/pretrain_models directory PREAREIN_G_MODEL=$ROOT/models/pretrain_models/ INPUT_IMAGE= # -1 for cpu GPU=0 # "AtoB" or "BtoA" DIRECTION="BtoA"
Training new models
train_cycle_gan.sh script under
If you keep all the default settings, you just need to provide the domainA images path and domainB images path:
 Zhu, Jun Yan, et al. "Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks." 2017.