Request access to this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
Access is granted manually for research and educational purposes. By requesting access you agree not to use this model to bypass access controls of any live system and not to redistribute it.
Log in or Sign Up to review the conditions and access this model content.
captcha2-resolver (ONNX)
A PP-OCRv5 mobile text recognizer (SVTR-LCNet backbone + CTC head) fine-tuned on ~900 labeled 6-symbol text captchas, exported to ONNX. ~7.6 MB, CPU-only inference, no Paddle at runtime.
Results (frozen validation split, n=100)
| metric | value |
|---|---|
| sequence accuracy (all 6 symbols right) | 98.0% |
| character accuracy | 99.7% |
| CPU latency (Apple Silicon, batch 1, ONNX Runtime) | 5.3 ms |
The remaining errors are bโ6 confusions.
Usage
# pip install "captcha2-resolver @ git+https://github.com/vinc3r3/captcha2-resolver" huggingface_hub
from captcha2_resolver import CaptchaSolver
solve = CaptchaSolver.from_hub("kozhikov/captcha2-resolver-onnx")
text, confidence = solve("captcha.jpg")
Raw ONNX: input x float32 [N, 3, 48, Wโค320], BGR, aspect-preserving resize to height 48,
scaled to [-1, 1], right zero-padded. Output: softmax [N, T, 1 + len(dict)]; greedy CTC with
class 0 = blank, class i = line iโ1 of dict.txt.
Training
Fine-tuned from the official PP-OCRv5 mobile rec weights. The pretrained CTC/NRTR head rows for the captcha's symbols were kept, not re-initialized: this alone gives 8% accuracy before training. 100 epochs, batch 64, OneCycle (max_lr 7e-4), RecAug, 48ร320 input, one T4 GPU. Full recipe and experiments: GitHub repository vinc3r3/captcha2-resolver.
Limitations & intended use
Trained for one captcha style; it will not generalize to other captchas. Research and education only. Do not use it to circumvent access controls.