/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
22 окт 2026

TextVerifier-CJK-CLIP

Классификация изображенийИзображение → label3 профессии
0скачиваний за 30 дней4лайкавеса обновлены22 окт 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

TextVerifier проверяет, правильно ли структурно изображён заданный китайский иероглиф, и подходит для контроля текста в сгенерированных изображениях.

TextVerifier — модель ATH-MaaS для проверки структурной правильности китайских иероглифов на изображениях. Она принимает фрагмент изображения с одним символом и целевой символ, после чего оценивает, соответствует ли изображённый глиф заданному. Модель предназначена для контроля качества текста, созданного генераторами изображений и инструментами редактирования, фильтрации результатов, помощи при проверке человеком и получения посимвольного сигнала качества для дообучения.

Архитектура модели — двойной энкодер: визуальный энкодер ViT-L/16 обрабатывает фрагмент глифа, а текстовый DeBERTa-v2 кодирует последовательность описания структуры иероглифа IDS. Оценка основана на расстоянии до ближайшего из обученных визуальных прототипов правильного начертания целевого символа; фиксированный порог преобразует оценку в бинарное решение. Поддерживаются символы из обученного набора, охватывающего распространённые ханские иероглифы в китайском тексте; для символов вне набора оценка не выполняется. Модель нечувствительна к стилю, шрифту, цвету и фону и проверяет именно структурные отклонения.

TextVerifier не распознаёт текст и не определяет целевой символ самостоятельно: целевой символ нужно передать явно. Веса опубликованы под лицензией Apache-2.0; обучающие изображения, сторонние шрифты и исходные данные в репозиторий не входят.

Сценарии применения

  • проверка правильности китайских иероглифов в изображениях, созданных генератором
  • фильтрация изображений с ошибками в начертании китайского текста
  • посимвольная оценка качества для дообучения генератора текста на изображениях
  • помощь человеку при проверке текста на изображениях
  • поиск пропущенных, лишних, слитых или искажённых штрихов в заданном иероглифе

Ограничения

Модель не выполняет OCR и требует целевой символ на входе. Она не оценивает символы за пределами обученного набора и намеренно не считает стилистические различия ошибками.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

TextVerifier

TextVerifier is a target-conditioned verifier for structural Chinese glyph rendering errors. Given a character crop and the character it is supposed to depict, it decides whether the glyph is structurally correct, catching missing, extra, broken, merged, split, distorted, or misplaced strokes and components.

Text-to-image models increasingly produce Chinese text that is perfectly readable yet locally wrong. OCR and general vision-language models are trained to be invariant to exactly those deviations, so they read the intended character and report success. TextVerifier instead conditions on the target character and asks whether the rendering matches it, which makes it usable for quality inspection of generated images and as a per-character reward signal for post-training.

This repository holds the released model weights. Inference and evaluation code live in the GitHub repository below.

Resources

ResourceLocation
Code (inference, evaluation, benchmark converter)github.com/ATH-MaaS/TextVerifier
Model weightsATH-MaaS/TextVerifier-CJK-CLIP (this repository)
Benchmark datasetATH-MaaS/TextRenderBench-ZH
PaperarXiv:2610.19551

How it works

The model is a dual encoder that maps a glyph crop and its target character into a shared embedding space.

  • Image encoder — ViT-L/16 operating on the character crop.
  • Text encoder — DeBERTa-v2 that reads the character's Ideographic Description Sequence (IDS) rather than a single-character token, so the text side carries explicit stroke and component structure.
  • Verification — instead of a single text embedding, each supported character owns a small set of learned visual prototypes for correctly rendered instances. A crop is scored by its cosine distance to the nearest prototype of its target character, and a fixed threshold turns that score into a binary decision.

Comparing against prototypes of normal renderings, rather than against an anomaly model, is what keeps the verifier sensitive to structural deviation while staying insensitive to font, style, color, and background variation.

Files

FileDescription
textverifier_stage3.pthVerifier checkpoint (final training stage).
textverifier_k10_q90.ptPer-character visual prototypes, character-to-index mapping, decision threshold.
prototype_metadata.jsonArchitecture, prototype shape, threshold, and scoring rule.
manifest.sha256SHA-256 checksums for the three files above.

Download all four at the same immutable revision:

huggingface-cli download ATH-MaaS/TextVerifier-CJK-CLIP \
  textverifier_stage3.pth \
  textverifier_k10_q90.pt \
  prototype_metadata.json \
  manifest.sha256 \
  --local-dir assets

Place them in an assets/ directory at the root of the cloned code repository, then verify the checksums and assets with:

python -m textverifier.verify_release --root . --check-checkpoint

Usage

Full installation and evaluation instructions are in the code repository README. The short version:

from textverifier.inference import TextVerifier

verifier = TextVerifier(device="cuda", dtype="bfloat16")
result = verifier.score_image("crop.png", "北")
# {"char": "北", "scored": True, "error_score": ..., "threshold": ..., "pred_render_error": False}

Batch inference and benchmark evaluation are available through python -m textverifier.inference and python -m textverifier.evaluate.

Character coverage

Prototypes exist for the set of characters the model was trained on, which covers the common Han characters used in generated Chinese text. A character outside that set cannot be scored: the verifier reports it as unscored rather than guessing, and treats it as normal by default. Coverage over a given input is reported alongside evaluation results, so unsupported characters are visible rather than silently absorbed.

Intended use

  • Inspecting Chinese text rendered by text-to-image and image-editing models.
  • Character-level filtering of generated images.
  • A per-character reward or preference signal for post-training text rendering.
  • Assisting human review of glyph correctness.

The model judges structural correctness of a glyph against a target character. It is not an OCR system and does not return recognized text; it must be told what the character should be. Stylistic variation such as font choice, calligraphy, color, and background is deliberately not treated as an error.

Training

Training proceeds in three stages: large-scale crop-to-IDS contrastive alignment over real-world Chinese text images, absolute discrimination of correct versus structurally corrupted glyphs built from font rendering and stroke-vector manipulation, and relative quality ordering learned from early-versus-late samples of the same character and position taken from a text-region inpainting model's training trajectory. Training images, third-party fonts, and third-party source data are not part of this release; only code, weights, and the independent TextRenderBench-ZH benchmark are released.

Citation

@article{chen2026textverifier,
  title   = {TextVerifier: Seeing Beyond Recognition to Verify Chinese Text Rendering},
  author  = {Chen, Yiyang and Wang, Guo-Hua and Liu, Yaoli and Chen, Qing-Guo and Xu, Zhao and Luo, Weihua and Ma, Xiujun},
  journal = {arXiv preprint arXiv:2610.19551},
  year    = {2026},
  url     = {https://arxiv.org/abs/2610.19551}
}

License

Apache License 2.0. See LICENSE.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · image-classification

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
adc233a

0 моделей