Views
No views yet

<char>{characters}</char><bbox>{x1}, {y1}, {x2}, {y2}</bbox>, where the coordinates correspond to the top-left (x1, y1) and bottom-right (x2, y2) corners of the character's bounding box.
| Model Name | Base Models (Vision / Language) | HF Link |
|---|---|---|
| VARCO-VISION-2.0-14B | siglip2-so400m-patch16-384 / Qwen3-14B | link |
| VARCO-VISION-2.0-1.7B | siglip2-so400m-patch16-384 / Qwen3-1.7B | link |
| VARCO-VISION-2.0-1.7B-OCR | siglip2-so400m-patch16-384 / Qwen3-1.7B | link |
| GME-VARCO-VISION-Embedding | Qwen2-VL-7B-Instruct | link |
| Benchmark | CLOVA OCR | PaddleOCR | EasyOCR | VARCO-VISION-2.0-1.7B-OCR |
|---|---|---|---|---|
| CORD | 93.9 | 91.4 | 77.8 | 95.6 |
| ICDAR2013 | 94.4 | 92.0 | 85.0 | 95.5 |
| ICDAR2015 | 84.1 | 73.7 | 57.9 | 75.4 |
transformers version 4.53.1 or higher.
Additionally, for best results, we recommend upscaling input images to a minimum resolution of 2,304 on the longer side if they are smaller.1import torch
2from PIL import Image
3from transformers import AutoProcessor, LlavaOnevisionForConditionalGeneration
4
5model_name = "NCSOFT/VARCO-VISION-2.0-1.7B-OCR"
6model = LlavaOnevisionForConditionalGeneration.from_pretrained(
7 model_name,
8 torch_dtype=torch.float16,
9 attn_implementation="sdpa",
10 device_map="auto",
11)
12processor = AutoProcessor.from_pretrained(model_name)
13
14image = Image.open("file:///path/to/image.jpg")
15
16# Image upscaling for OCR performance boost
17w, h = image.size
18target_size = 2304
19if max(w, h) < target_size:
20 scaling_factor = target_size / max(w, h)
21 new_w = int(w * scaling_factor)
22 new_h = int(h * scaling_factor)
23 image = image.resize((new_w, new_h))
24
25conversation = [
26 {
27 "role": "user",
28 "content": [
29 {"type": "image", "image": image},
30 {"type": "text", "text": "<ocr>"},
31 ],
32 },
33]
34
35inputs = processor.apply_chat_template(
36 conversation,
37 add_generation_prompt=True,
38 tokenize=True,
39 return_dict=True,
40 return_tensors="pt"
41).to(model.device, torch.float16)
42
43generate_ids = model.generate(**inputs, max_new_tokens=1024)
44generate_ids_trimmed = [
45 out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generate_ids)
46]
47output = processor.decode(generate_ids_trimmed[0], skip_special_tokens=False)
48print(output)