说明文档
Type-R 官方仓库
本仓库包含 Type-R 项目中使用的模型权重和数据资源。该数据集旨在支持 Type-R 系统中使用的文本到图像生成、OCR、文本擦除、编辑和评估流程。
📘 目录结构
⚠️ 仓库中的代码设计为直接使用此结构运行。
<pre>
resources/ ├── weight/ │ ├── ocr/ # OCR相关模型权重 │ │ ├── solo.pth # ⚠️需手动下载 │ │ ├── masktextspotterv3.pth # ⚠️需手动下载 │ │ ├── modelscope │ │ ├── craft │ │ ├── clova │ │ └── hisam_weight │ ├── text_eraser/ # 文本擦除模型权重 │ │ ├── big-lama.pt │ │ └── garnet.pth │ ├── text_editor/ # 文本编辑模型权重 │ │ ├── anytext.ckpt │ │ └── udifftext │ └── t2i/ # 文本到图像模型权重 │ ├── (权重将缓存到这里) │ ~ ├── data/ │ ├── marioevalbench/ # Mario-Eval 基准数据集 | │ └── hfds │ ├── arial_unicode_ms.ttf # ⚠️需手动下载 │ └── LiberationSans-Regular.ttf └── prompt └── example.txt
</pre>
📘 ⚠️需手动下载的数据⚠️
resources/weight/ocr/solo.pthresources/weight/ocr/masktextspotterv3.pth- 请从官方 MaskTextSpotterV3 实现下载此权重。[链接]
resources/data/arial_unicode_ms.ttf- 由于 Arial 字体无法重新分发,请通过您的操作系统或其他合法途径获取。作为替代,您可以使用开源字体如 Liberation Sans(resources/data/LiberationSans-Regular.ttf)。但请注意,我们观察到在最佳配置下使用 AnyText 配合 Liberation Sans 时,Mario-Eval 基准上的 OCR 准确率会下降 1-2 个百分点。
📘 数据集详情
-
weight/- 此目录包含 Type-R 流程中各模块使用的预训练权重
- ocr/:用于 OCR 检测/识别的模型。
- text_eraser/:用于移除文本的修复或擦除模块。
- text_editor/:用于将文本渲染到图像中的模型。
- t2i/:大型文本到图像模型。
- 如果 T2I 模型需要认证,请确保在执行流程之前登录 Hugging Face(例如使用 huggingface-cli login)。
-
data/marioevalbench/- 包含用于评估 Type-R 的提示词和参考图像的数据集
- hfds/:包含 Mario-Eval 基准的提示词、增强提示词和图像
📘 许可证
权重
- DeepSolo:
resources/weight/ocr/solo.pth— 许可协议为 Adelaidet - MaskTextSpotterV3:
resources/weight/ocr/masktextspotterv3.pth— 许可协议为 Creative commons - Paddle:
resources/weight/ocr/modelscope— 许可协议为 Apache 2.0 - CRAFT:
resources/weight/ocr/craft— 许可协议为 MIT License - Clova Recognition:
resources/weight/ocr/clova— 许可协议为 Apache 2.0 - Hi-SAM:
resources/weight/ocr/hisam_weight— 许可协议为 Apache 2.0 - Lama:
resources/weight/text_eraser/big-lama.pt— 许可协议为 Apache 2.0 - Garnet:
resources/weight/text_eraser/garnet.pth— 许可协议为 Apache 2.0 - AnyText:
resources/weight/text_editor/anytext.ckpt— 许可协议为 Apache 2.0 - UDiffText:
resources/weight/text_editor/udifftext— 许可协议为 MIT License
数据
- Mario-Eval Benchmark:
resources/data/marioevalbench— 许可协议为 MIT License - Arial 字体:
resources/data/arial_unicode_ms.ttf— 许可协议为 License Microsoft fonts - Liberation Sans:
resources/data/LiberationSans-Regular.ttf— 许可协议为 OFL 1.1
cyberagent/type-r
作者 cyberagent
创建时间: 2025-04-23 05:40:51+00:00
更新时间: 2025-05-20 03:48:45+00:00
在 Hugging Face 上查看