pub struct OcrOptions {
pub return_word_box: bool,
pub lang: Option<String>,
pub use_doc_orientation: bool,
pub use_doc_unwarping: bool,
pub use_seal: bool,
pub use_formula: bool,
pub use_chart: bool,
}Expand description
Opzioni di runtime per la pipeline OCR.
§Mappa degli stage opzionali PP-OCRv6 / PP-StructureV3
| Flag | Stato | Modello / API | Default |
|---|---|---|---|
return_word_box | ✅ | CTC timestep tracking (in-process) | false |
lang | ✅ (routing) | PP-OCRv6 CH+Latin unico | None |
use_doc_orientation | ✅ | DocOrientationClassifier (0/90/180/270°) | true |
use_doc_unwarping | ❌ reserved | TextImageUnwarping (UVDoc) | false |
use_seal | ❌ reserved | SealTextDet + SealTextRec | false |
use_formula | ❌ reserved | PP-FormulaNet-plus-L (LaTeX) | false |
use_chart | ❌ n/a | ChartRecognition (non disponibile come ONNX) | false |
§Moduli standalone
Layout e cell-detection si invocano separatamente:
- Layout:
LayoutAnalyzer+detect_with_layout - Tipo tabella:
TableTypeClassifierstandalone - Struttura tabella:
TableStructureRecognizerstandalone
I flag ❌ reserved / ❌ n/a sono sempre ignorati: il campo
esiste per stabilire l’API surface senza breaking changes.
Fields§
§return_word_box: boolPopola TextBlock.words con bbox per-parola via CTC timestep
tracking. Default false (costo negligibile ma disabilitato per
back-compat con callers che non usano i word bbox).
Limitazione: le linee verticali (crop_h ≥ crop_w × 3/2)
restituiscono words = []; il line-level box_points è sempre
valido.
lang: Option<String>ISO 639-1 ("it", "en", "fr", "de", "es", "pt") o
codice 3-lettere. Oggi ignorato: PP-OCRv6 CH+Latin unico copre
tutte le 6 lingue EU. Riservato per routing a modelli per-lingua
futuri (Tesseract / fine-tuned rec).
use_doc_orientation: boolCorregge automaticamente la rotazione della pagina (0°/90°/180°/270°)
prima dell’OCR. Richiede che il classificatore sia caricato via
OcrLite::set_doc_orientation_model; senza modello il flag è ignorato
silenziosamente. Default true.
use_doc_unwarping: bool⚠ riservato. Correzione prospettica pre-det via UVDoc.
Modello disponibile (PpStructureModel::DocUnwarp) ma non integrato
nella pipeline detect.
use_seal: bool⚠ riservato. Riconoscimento timbri circolari (PII nei rogiti notarili). Modello non ancora scaricato/integrato.
use_formula: bool⚠ riservato. Riconoscimento formule LaTeX via PP-FormulaNet-plus-L.
Modello disponibile (PpStructureModel::FormulaRec) ma non integrato;
irrilevante per PII su documenti legali/medici.
use_chart: bool⚠ n/a. ChartRecognition non è disponibile come ONNX su HuggingFace.
Vedi tools/convert/ per convertire il modello Paddle.
Trait Implementations§
Source§impl Clone for OcrOptions
impl Clone for OcrOptions
Source§fn clone(&self) -> OcrOptions
fn clone(&self) -> OcrOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OcrOptions
impl Debug for OcrOptions
Auto Trait Implementations§
impl Freeze for OcrOptions
impl RefUnwindSafe for OcrOptions
impl Send for OcrOptions
impl Sync for OcrOptions
impl Unpin for OcrOptions
impl UnsafeUnpin for OcrOptions
impl UnwindSafe for OcrOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.