Skip to main content

Crate captcha_engine

Crate captcha_engine 

Source
Expand description

Captcha Engine - ONNX-based captcha recognition

A standalone library for breaking text-based captchas using a pre-trained ONNX model.

§Features

  • download (default): Enables async model download from HuggingFace
  • embed-model: Embeds the model in the binary (~19MB larger, no network required)

§Example

use captcha_engine::CaptchaModel;

// With embed-model feature:
let mut model = CaptchaModel::load_embedded()?;

// Or load from file:
let mut model = CaptchaModel::load("path/to/captcha.onnx")?;

let image = image::open("captcha.png")?;
let text = model.predict(&image)?;
println!("Captcha text: {}", text);

Re-exports§

pub use model::CaptchaModel;
pub use tokenizer::Tokenizer;
pub use model::ensure_model_downloaded;

Modules§

image_ops
Image preprocessing for the captcha model.
model
Model loading and prediction for captcha recognition.
tokenizer
Tokenizer for decoding captcha model output.

Enums§

Error
Errors that can occur during captcha processing.

Type Aliases§

Result
Result type alias for captcha engine operations.