https://github.com/songquanpeng/font-sr
基于 GAN 的字体图片超分辨. Super resoluation for font images based on GANs.
https://github.com/songquanpeng/font-sr
Last synced: 5 days ago
JSON representation
基于 GAN 的字体图片超分辨. Super resoluation for font images based on GANs.
- Host: GitHub
- URL: https://github.com/songquanpeng/font-sr
- Owner: songquanpeng
- License: other
- Created: 2022-05-06T01:42:01.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-07T13:41:06.000Z (over 3 years ago)
- Last Synced: 2025-10-12T19:03:13.610Z (5 days ago)
- Language: Python
- Homepage:
- Size: 7.99 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 字体超分辨
> 超分辨模糊的字体图片,使其清晰没有锯齿。
![]()
![]()
## 使用步骤
### 准备数据集
1. 准备一些 ttf 字体文件,放到 `archive/ttf_10` 下面。
2. 运行脚本生成数据集:`python generate_dataset.py`### 训练模型
```shell
python train.py --dataroot ./archive/FONT_SR_64to256_ttf_10_test3 \
--name super_font_cyclegan --model cycle_gan
```### 进行推断
```shell
python infer.py --name super_font_cyclegan --model cycle_gan \
--dataroot data_path
```### 后处理
二值化,并转成 RGBA 图片:`python post_process.py`## 其他
代码基于:https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix