CartoonGAN github

Deecamp夏令营需要用到CartoonGAN,所以对于CartoonGAN进行代码以及文章分析。

首先分析了preTrain的VGG19如下

input VGG19 提取feature

input generator VGG199提取feature 使两者相似来提取结构信息。

如果在实现时效果不明显或者出现模型崩塌,加大pre_train的epoch,这样可以使得后面训练更容易,当然加大pre_train的epoch 之后 后面训练的epoch就可能出现

对于github上面2个cartoonGAN进行复现,发现问题。

https://github.com/taki0112/CartoonGAN-Tensorflow

问题1 图片文件夹错误 trainA 真实世界,trainB卡通世界

问题2 进行迭代后效果不明显

解决方案:分析有可能是pretrain不够 增加pretrain次数然后进行train

 

https://github.com/SystemErrorWang/CartoonGAN

问题1 未对如何运行进行详细描述

问题2 未对test进行描述

解决方案 查看代码,在oldcode文件目录下创建

celeba
cartoon 

分别存放卡通图像以及真实的名人图像

 

CartonnGAN 理解

cartonnGAN的贡献:

1.generate high-quality stylized cartoons 提出的GAN模型能生成高质量的图像

2.We propose two simple yet effective loss functions in GAN-based architecture. In the generative network, to cope
with substantial style variation between photos and cartoons, we introduce a semantic loss defined as an ℓ1 sparse
regularization in the high-level feature maps of the VGG network [30]. In the discriminator network, we propose an edge-promoting adversarial loss for preserving clear edges 提出两种有效的loss函数,一个loss 是VGGloss对于图像的conv4_4的更高级的特征进行pretrain与discriminator提出一种边缘损失有益于保留清晰的边界。

3.We further introduce an initialization phase to improve the convergence of the network to the target manifold.
Our method is much more efficient to train than existing methods. 如图是经过pretrain后的图像。

 

Loss函数

loss分为两部分组成,第一部分对内容进行流行转换,第二部分保留卡通的内容。

第一部分

其中 S(c)为卡通 S(e) 为模糊边界卡通 ,p为图像。

第二部分

内容损失,保留卡通的内容。

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值