ONNX Model Zoo

metythorn/ViTOCR-base

By metythorn · ↓ 4 · ♥ 0 · Updated 2026-02-15

What's in this repo

This page lists the files in metythorn/ViTOCR-base, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 5 files, including 1 .md, 1 .json, 1 .onnx, 1 .py
  • Last updated 2026-02-15

ONNX files

File Size Download
model.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

ViTOCR

This repository contains a pure Transformer-based checkpoint for Khmer OCR. Images are patch-embedded and encoded by a Transformer encoder, then decoded autoregressively.

Installation

pip install onnxruntime pillow torch torchvision numpy

Get the inference script

Download from this model repo:

curl -L -o onnx_inference.py https://huggingface.co/metythorn/ViTOCR-base/resolve/main/onnx_inference.py

Or copy onnx_inference.py from the repository files into your project directory.

Usage

from onnx_inference import ONNXPredictor

predictor = ONNXPredictor(
    model_path="model.onnx",
    config_path="config.json",
    providers=["CPUExecutionProvider"],  # or include CUDAExecutionProvider if available
)
result = predictor.predict("sample_image.png")
print("Predicted text:", result)

Model info

onnx ocr transformer vision image-to-text km license:apache-2.0 region:us
↓ 4 ♥ 0

Created: 2026-02-15

Updated: 2026-02-15

View on Hugging Face

Files (5)

.gitattributes
README.md
config.json
model.onnx ONNX
onnx_inference.py

Related models