Type-R official repository

This repository contains model weights and data resources used in the Type-R project. The dataset is designed to support text-to-image generation, OCR, text erasing, editing, and evaluation pipelines used in the Type-R system.

πŸ“˜ Directory structure

⚠️ The code in the repository is designed to operate directly using this structure.

resources/
β”œβ”€β”€ weight/ 
β”‚     β”œβ”€β”€ ocr/ # OCR-related model weights
β”‚     β”‚    β”œβ”€β”€ solo.pth # ⚠️Required Manual Downloads
β”‚     β”‚    β”œβ”€β”€ masktextspotterv3.pth # ⚠️Required Manual Downloads
β”‚     β”‚    β”œβ”€β”€ modelscope
β”‚     β”‚    β”œβ”€β”€ craft
β”‚     β”‚    β”œβ”€β”€ clova
β”‚     β”‚    └── hisam_weight
β”‚     β”œβ”€β”€ text_eraser/ # Text erasure model weights 
β”‚     β”‚    β”œβ”€β”€ big-lama.pt
β”‚     β”‚    └── garnet.pth
β”‚     β”œβ”€β”€ text_editor/ # Text editing model weights 
β”‚     β”‚    β”œβ”€β”€ anytext.ckpt
β”‚     β”‚    └── udifftext
β”‚     └── t2i/ # Text-to-image model weights 
β”‚          β”œβ”€β”€ (weights will be cached here)
β”‚          ~ 
β”œβ”€β”€ data/ 
β”‚     β”œβ”€β”€ marioevalbench/ # Mario-Eval benchmark dataset 
|     β”‚    └── hfds
β”‚     β”œβ”€β”€ arial_unicode_ms.ttf # ⚠️Required Manual Downloads
β”‚     └── LiberationSans-Regular.ttf 
└── prompt
      └── example.txt

πŸ“˜ ⚠️Manual download required data⚠️

  • resources/weight/ocr/solo.pth
    • Please download this weight from the official Deeosolo implementation.[link]
    • This weight has ViTAEv2-S as its backbone and is trained on Synth150K+Total-Text+MLT17+IC13+IC15+TextOCR.
  • resources/weight/ocr/masktextspotterv3.pth
  • resources/data/arial_unicode_ms.ttf
    • Since the Arial font cannot be redistributed, please obtain it through your operating system or another legal source. As an alternative, you may use an open font such as Liberation Sans (resources/data/LiberationSans-Regular.ttf). However, please note that we have observed a drop of 1–2 points in OCR accuracy on the Mario-Eval benchmark when using AnyText with Liberation Sans under our best configuration.

πŸ“˜ Dataset details

  • weight/

    • This dicrectory contains pretrained weights used for various modules in the Type-R pipeline
    • ocr/: Models for OCR detection/recognition.
    • text_eraser/: Inpainting or erasure modules for removing text.
    • text_editor/: Models for rendering text into images.
    • t2i/: Large text-to-image models.
      • If the T2I model requires authentication, make sure to log in to Hugging Face (e.g., using huggingface-cli login) before executing the pipeline.
  • data/marioevalbench/

    • The dataset containing prompts and reference images for evaluating Type-R
    • hfds/: includes prompts, augmented prompts, and images of the Mario-Eval Benchmark

πŸ“˜ License

Weights

Data

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support