A compact CRNN + CTC model that reads 8–10 character reCAPTCHA-v1-style captchas. Trained from scratch on 16,000 real captcha images, no synthetic pretraining.

Results

evaluation exact match CER
1,600 held-out real captchas, greedy 98.56% 0.20%
same set, CTC beam search (width 10) 98.56% 0.19%

Usage

The easiest way is to clone the code repository, which downloads these weights automatically:

git clone https://github.com/swargaraj/recaptcha-v1-crnn
cd recaptcha-v1-crnn
pip install -r requirements.txt
python inference.py --input examples/

To download the weights directly:

pip install huggingface_hub
hf download swargaraj/recaptcha-v1-crnn best.pt --local-dir weights

The checkpoint stores the model configuration, so it can be reconstructed with the architecture from the code repository. Key settings:

  • VGG-style CNN β†’ 2-layer BiLSTM (256) β†’ linear β†’ CTC loss
  • 64Γ—256 grayscale input, 64 time steps
  • 27 output classes: a–z plus the CTC blank
  • runs on CPU, CUDA or Apple MPS

Input format

The model expects the captcha as an image (PNG, JPEG, etc.):

  • 200Γ—70 RGB, coloured text on a white background, like the training data
  • converted to grayscale using the minimum RGB channel, resized to 64Γ—256 with the aspect ratio preserved, and padded with white
  • output alphabet: a–z (26 letters + the CTC blank)

Other image sizes are resized automatically, but accuracy is best on captchas from the same source/style as the training set.

Training data

16,000 unique real reCAPTCHA-v1-style captchas (200Γ—70 RGB, 8–10 lowercase letters). The model was trained from scratch on real captchas only; no synthetic images or synthetic pretraining were used.

Dataset: swargaraj/recaptcha-v1-captchas.

Limitations

  • Best on captchas from the same generator/style as the training data. A different font, distortion, colour scheme or length will reduce accuracy.
  • Lowercase a–z only β€” no digits, uppercase or punctuation.
  • Errors are usually a single substituted or dropped character (e.g. i/l, a/e/o, m/n).

Responsible use

This model is released for research and educational use. reCAPTCHA is a Google service, and automated solving may violate a site's terms of service or local law. You are responsible for how you use it. Before redistributing the weights, check the terms under which the training images were collected.

License

MIT, see LICENSE.

Downloads last month
33
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support