tysirai/MAERec-B-STR v1

A hosted model for the task str/recognition, published by TysirAI.

import tysirai

model = tysirai.load("hf://tysirai/MAERec-B-STR@v1")
outputs = model(images=images)
outputs["text:labels"]

images is an input of type image.

Interface

Slot Name Type
In images image
Out text:labels Text(B) [text]

Lineage

Licenses

  • Code: MIT
  • Weights: MIT
  • Training data: unknown

Notes

  • Weights converted from the original release (https://github.com/Mountchicken/Union14M/releases/download/Checkpoint/maerec\_b\_union14m.pth) to TysirAI; outputs checked against the original implementation (https://github.com/Mountchicken/Union14M).
  • Not in DTR. The weight map is configs/str/<name>/weight_map.yaml of the TysirAI repository. The fidelity set holds the outputs of the original model (the ViT backbone, MAERecDecoder and AttentionPostprocessor of mmocr-dev-1.x in the repository, with the settings of configs/textrecog/maerec/maerec_b_union14m.py).
  • The images are processed as the MMOCR test pipeline: BGR, resized to 32 x 128 with bilinear interpolation without antialiasing (as OpenCV, computed with torch; at most one grey level from OpenCV), normalized with the ImageNet statistics.
  • Predicts 91 characters (letters in both cases, digits, punctuation and space); the protocol compares words in lower case without punctuation.

Fidelity

Fidelity set: fidelity.

Output atol rtol
text:labels 0 0
Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for tysirai/MAERec-B-STR