Downloads · 30 days
36
20% of all-time downloads
arkhabbazan/ocr-captcha-router
ocr-captcha-router is a image-to-text model from arkhabbazan. Use it when you need a caption or text from an image. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
36
20% of all-time downloads
All-time downloads
181
Public
Parameters
2.3M
2.7 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors9.1 MB · 99%
From the Hugging Face model README

Source code, install instructions, and full documentation: github.com/khabbazan/ocr-captcha-router
A lightweight shared-style captcha router that downloads the selected TrOCR expert on first use. Hugging Face caches downloaded experts locally, and the resolver uses a confidence and grammar-based dual-model fallback for uncertain routes.
arkhabbazan/ocr-captcha-routerarkhabbazan/ocr-math-captchaanuashok/ocr-captcha-v3from resolver import CaptchaResolver
resolver = CaptchaResolver.from_pretrained(
"arkhabbazan/ocr-captcha-router",
token=True,
math_confidence_threshold=0.85,
)
print(resolver.predict("captcha.jpeg"))
Keep the captcha at its original aspect ratio. The resolver pads only the
router input and leaves OCR preprocessing to each TrOCR processor. The first
request for each route downloads that expert; later requests reuse the in-memory
model and Hugging Face cache. math_confidence_threshold accepts a value
from 0.0 to 1.0; it is the minimum router probability required to choose
the math result when both expert outputs match their valid formats.