Skip to main content

outis_core/
lib.rs

1//! Captcha Engine - RTEN-based captcha recognition
2//!
3//! A standalone library for breaking text-based captchas using a pre-trained RTEN model (optimized ONNX).
4//!
5//! # Features
6//!
7//! - `download` (default): Enables async model download from `HuggingFace`
8//! - `embed-model`: Embeds the model in the binary (~19MB larger, no network required)
9//!
10//! # Example
11//!
12//! ```ignore
13//! use outis_core::CaptchaModel;
14//!
15//! // With embed-model feature:
16//! let mut model = CaptchaModel::load_embedded()?;
17//!
18//! // Or load from file:
19//! let mut model = CaptchaModel::load("path/to/outis-model.rten")?;
20//!
21//! let image = image::open("captcha.png")?;
22//! let text = model.predict(&image)?;
23//! println!("Captcha text: {}", text);
24//! ```
25
26mod error;
27pub mod image_ops;
28pub mod model;
29pub mod tokenizer;
30
31pub use error::{Error, Result};
32pub use model::CaptchaModel;
33pub use tokenizer::Tokenizer;
34
35#[cfg(feature = "download")]
36pub use model::ensure_model_downloaded;