StelleX/thai-trocr-lw
By StelleX · ↓ 6 · ♥ 0 · Updated 2026-02-09
What's in this repo
This page lists the files in StelleX/thai-trocr-lw, including decoder_model_merged_quantized.onnx, encoder_model_merged_quantized.onnx.
- 2 ONNX models (.onnx files)
- 10 files, including 6 .json, 2 .onnx, 1 .md
- Last updated 2026-02-09
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/decoder_model_merged_quantized.onnx | — | Download |
| onnx/encoder_model_merged_quantized.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
language: [th, en] tags: [onnx, quantized, trocr, ocr, transformers.js] library_name: onnxruntime base_model: openthaigpt/thai-trocr pipeline_tag: image-to-text license: apache-2.0
Thai TrOCR - ONNX Quantized (INT8)
Quantized ONNX version of openthaigpt/thai-trocr.
Usage with Transformers.js
import { pipeline } from '@huggingface/transformers';
const ocr = await pipeline('image-to-text', 'StelleX/thai-trocr-onnx-quantized');
const result = await ocr('thai-text.png');
console.log(result[0].generated_text);
Usage with Python
from optimum.onnxruntime import ORTModelForVision2Seq
from transformers import TrOCRProcessor
from PIL import Image
processor = TrOCRProcessor.from_pretrained('StelleX/thai-trocr-onnx-quantized')
model = ORTModelForVision2Seq.from_pretrained('StelleX/thai-trocr-onnx-quantized')
image = Image.open('your_image.png').convert('RGB')
pixel_values = processor(images=image, return_tensors='pt').pixel_values
generated_ids = model.generate(pixel_values)
print(processor.batch_decode(generated_ids, skip_special_tokens=True)[0])
Model info
image-to-text
onnxruntime
onnxruntime
onnx
vision-encoder-decoder
image-text-to-text
quantized
trocr
ocr
transformers.js
image-to-text
th
en
base_model:openthaigpt/thai-trocr
↓ 6
♥ 0
Created: 2026-02-09
Updated: 2026-02-09
View on Hugging FaceFiles (10)
.gitattributes
README.md
config.json
generation_config.json
onnx/encoder_model_merged_quantized.onnx
ONNX
ort_config.json
preprocessor_config.json
tokenizer.json
tokenizer_config.json
Related models
More from StelleX
No other models by this author.