Instructions to use SujieHu/TextDART-8B-Qwen3VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SujieHu/TextDART-8B-Qwen3VL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="SujieHu/TextDART-8B-Qwen3VL") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("SujieHu/TextDART-8B-Qwen3VL") model = AutoModelForMultimodalLM.from_pretrained("SujieHu/TextDART-8B-Qwen3VL", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SujieHu/TextDART-8B-Qwen3VL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SujieHu/TextDART-8B-Qwen3VL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SujieHu/TextDART-8B-Qwen3VL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/SujieHu/TextDART-8B-Qwen3VL
- SGLang
How to use SujieHu/TextDART-8B-Qwen3VL with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SujieHu/TextDART-8B-Qwen3VL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SujieHu/TextDART-8B-Qwen3VL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SujieHu/TextDART-8B-Qwen3VL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SujieHu/TextDART-8B-Qwen3VL", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use SujieHu/TextDART-8B-Qwen3VL with Docker Model Runner:
docker model run hf.co/SujieHu/TextDART-8B-Qwen3VL
TextDART-8B-Qwen3VL
TextDART is a defect-aware region-targeted reward model for visual text generation. It localizes every visible text region in an image, transcribes the rendered content, and explicitly marks malformed glyphs instead of silently correcting them from context.
Model details
- Backbone model: Qwen/Qwen3-VL-8B-Instruct
- Paper: Blame Errant Words, Not the Canvas: Defect-Aware Spatial Credit Assignment for Visual Text Generation
- Repository: WeChatCV/TextDART-SCANNER
- License: Apache 2.0
TextDART returns one quadrilateral and transcription for each visible text region:
{
"regions": [
{
"quad": [x1, y1, x2, y2, x3, y3, x4, y4],
"recognized_text": "recognized text"
}
]
}
Coordinates are normalized to a 0–1000 grid. The model uses the following structural
anomaly markers:
<#>: one malformed and unreadable Chinese character or English letter<###>: one malformed and unreadable English word<#####>: an entirely unreadable block of secondary or fine-print text
Usage
The official repository contains the exact system prompt, an OpenAI-compatible vLLM deployment script, response parsing, and visualization:
git clone https://github.com/WeChatCV/TextDART-SCANNER.git
cd TextDART-SCANNER/TextDART/train
conda create -n TextDART python=3.11 -y
conda activate TextDART
bash install_all.sh
# Each listed GPU hosts one full model replica.
bash deploy_server.sh SujieHu/TextDART-8B-Qwen3VL 1925 0
In another shell:
conda activate TextDART
cd TextDART-SCANNER/TextDART/train
python infer_demo.py --server-url http://127.0.0.1:1925
The demo processes the included example images and writes parsed JSON plus annotated images. See the TextDART deployment guide for custom images, server options, and training instructions. See the main repository for using TextDART as the reward model in SCANNER.
Intended use
TextDART is intended for:
- detecting and transcribing text regions in generated images
- identifying distortion, missing or extra strokes, blur, and other malformed glyphs
- providing region-level reward signals for reinforcement learning of visual text generation models
- evaluating semantic correctness and glyph fidelity in visual text generation.
Citation
If you find this model useful, please cite:
@article{hu2026textdartscanner,
title={Blame Errant Words, Not the Canvas: Defect-Aware Spatial Credit Assignment for Visual Text Generation},
author={Hu, Sujie and Zhang, Huaisong and Yang, Pujing and Wang, Qian and Li, Xiaomin and Leng, Xinhang and Li, Chen and Lyu, Jing and Li, Xiu and Pan, Ling},
journal={arXiv preprint arXiv:2610.20794},
year={2026}
}
- Downloads last month
- -
Model tree for SujieHu/TextDART-8B-Qwen3VL
Base model
Qwen/Qwen3-VL-8B-Instruct