Giter VIP home page Giter VIP logo

w-net-pytorch's Introduction

基于Wnet的字体生成

训练:

python main.py

图例:

python main.py inference

现阶段的训练结果:

原始字体(黑体加粗)protype

目标字体(一个batch里面混合了多种字体)real

生成字体 fake

与原论文的差别

  1. Discriminator中没有使用LayerNorm,而是用了BatchNorm
  2. 没有额外再训练一个VGG分类模型,而是用Discriminator替代

TODO:

  • 推理代码完善
  • 添加更多字体
  • 添加对字体支持汉字的检测功能 / 使用mask屏蔽掉不支持的字符对loss的影响
  • 自定义字符集

待添加的一些tricks:

  • label smoothing
  • 在G的训练和测试阶段都添加dropout
  • 使用LeaklyReLU替代ReLU
  • Generator的最后一层使用Tanh激活
  • 在Discriminator中使用LayerNorm
  • 每个batch中使用同一种字体(据说可以使训练变得更简单)
  • 监控训练中的梯度变化
  • 添加梯度惩罚
  • 历史均值
  • 模型推理代码

w-net-pytorch's People

Contributors

arctanxy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.