pub use crate::api::{
ClassifierPlan, ClassifierPolicy, CoordinateSpace, DetectionOutcome, DetectionPolicy,
EngineInfo, EnhancementPolicy, FormulaOutcome, FormulaPolicy, ImageInfo, ImageInput, ImageSize,
InputTimings, OcrEngine, OcrOutput, OcrRegion, OcrRequest, OcrTimings, OcrWord, OutputPolicy,
OwnedPixelBuffer, PageRoute, PixelFormat, Polygon, PreprocessPolicy, ProviderInfo,
ProviderPreference as GenericProviderPreference, ProviderResolutionInfo, RecognitionOutcome,
RecognitionPolicy, RectU32, RegionKind, RegionSource, ResolvedProvider, StagePlan, StageReport,
StageReports, StageState, StageTiming, TableCellMatch, TableCellOutcome, TableDegradation,
TableOutcome, TablePolicy, TableStructureConfidence, TableTextPolicy, TextOrder,
TextOrientation, TilePolicy, ValidatedRequest, WordKind, WordOutputMode,
};
pub use crate::config::{
ColorOrder, LangCls, LangDet, LangRec, ModelType, OcrVersion, ProviderPreference, RecImage,
RuntimeConfig,
};
pub use crate::error::{RapidOcrError, Result};
pub use crate::formula::contract::{
FORMULA_INPUT_CHANNELS, FORMULA_INPUT_RANK, FORMULA_INPUT_SPATIAL, FORMULA_OUTPUT_RANK,
FormulaContract, validate_formula_contract,
};
pub use crate::formula::detect::{
DEFAULT_FORMULA_DETECT_CONFIDENCE, DEFAULT_FORMULA_DETECT_IOU,
DEFAULT_FORMULA_DETECT_MAX_DETECTIONS, FORMULA_DETECT_INPUT_SIZE, FormulaBox,
FormulaDetectOptions, FormulaDetector,
};
pub use crate::formula::ftfy::{NOT_APPLICABLE_STEPS, UNIMPLEMENTED_STEPS, fix_text};
pub use crate::formula::model_info::FormulaModelInfo;
pub use crate::formula::output::order_formula_results;
pub use crate::formula::preprocess::{
FORMULA_INPUT_SIZE, FORMULA_MEAN, FORMULA_STD, FormulaPreprocessor, FormulaTensor,
};
pub use crate::formula::recognizer::{
DEFAULT_MAX_FORMULA_BATCH_SIZE, DEFAULT_MAX_FORMULA_SEQUENCE_LENGTH, FORMULA_MODEL_LOOP_BOUND,
FormulaRecognition, FormulaRecognizer,
};
pub use crate::formula::session::FormulaSession;
pub use crate::formula::tokenizer::{FormulaDecode, FormulaTokenizer};
pub use crate::formula::tokenizer_metadata::{
BOS_ID, BOS_TOKEN, EOS_ID, EOS_TOKEN, FormulaTokenizerMetadata, PAD_ID, PAD_TOKEN, UNK_ID,
UNK_TOKEN,
};
pub use crate::input::image_loader::{LoadImage, OcrInput};
pub use crate::model_registry::DefaultModelSelection;
pub use crate::model_set::{
ModelFileSpec, ModelFileState, ModelRole, ModelSet, ModelSetStatus, model_set_status,
model_set_status_probed, validate_model_file_name, validate_model_files,
validate_model_files_probed,
};
pub use crate::model_source::{
MANIFEST_FILE_NAME, ManifestFile, ModelManifest, ModelRequest, ModelSource, ModelSourceKind,
SUPPORTED_MANIFEST_SCHEMA_VERSION,
};
pub use crate::model_verify::{
FileIdentity, PARTIAL_DIGEST_WINDOW_BYTES, PartialDigest, ReverifyCause, VerificationOutcome,
VerificationStats, VerifiedModel, clear_verification_cache, force_verify_file,
sha256_file_cached, verification_stats, verify_file, verify_sha256,
};
pub use crate::model_store::{
ALLOWED_DOWNLOAD_HOSTS, DEFAULT_ALLOWED_HOSTS, DEFAULT_CONNECT_TIMEOUT,
DEFAULT_MAX_DOWNLOAD_BYTES, DEFAULT_MAX_DOWNLOAD_MB, DEFAULT_READ_TIMEOUT, DownloadBudget,
DownloadError, DownloadObserver, DownloadRequest, MAX_REDIRECT_HOPS, NoObserver,
available_disk_bytes, default_model_store_dir, download_model_set, download_model_set_observed,
download_verified, require_model_hash, sha256_file, verify_existing_file,
};
pub use crate::ocr::config::{ModelConfig, RecognizeOptions, RecognizerConfig};
pub use crate::ocr::pipeline::{
config::{EngineConfig, GlobalConfig},
rapid_structure::{PipelineProviderResolutions, RapidOcr, RapidOcrEngine},
};
pub use crate::ocr::rec::recognizer::BatchRecord;
pub use crate::ocr::types::{
AlignStatus, LineResult, RecognizeOutput, WordBox, WordInfo, WordType,
};
pub use crate::output::html::sanitize_table_html;
pub use crate::output::html::{
ReportMode, relative_image_name, render_output_report, render_report,
};
pub use crate::output::json::{OcrJsonItem, OcrTableItem, to_output_items, to_output_json};
pub use crate::output::markdown::to_output_markdown;
pub use crate::output::visualize::draw_output;
pub use crate::runtime::contracts::{ModelIoProbe, TensorSpec};
pub use crate::runtime::memory::{
MemorySample, PEAK_MEMORY_SOURCE, StageMemRecord, peak_memory_failure_reason,
peak_memory_source, peak_working_set_bytes, probe_stage, sample_memory, tl_probe,
tl_probe_begin, tl_probe_end,
};
pub use crate::runtime::ort_runtime::{
LoadedModule, OrtRuntimeFingerprint, PROVIDER_DLL_NAMES, ProviderDll, is_sha256_hex,
ort_runtime_fingerprint,
};
pub use crate::runtime::profile::{RuntimeProfile, ThreadPlan, ThreadSource};
pub use crate::runtime::provider::{
ProviderResolution, ResolvedExecutionProvider, format_provider_preference, ort_runtime_version,
resolve_execution_providers,
};
pub use crate::runtime::session::OrtSession;
pub use crate::runtime::timing::{LedgerConservation, LedgerShares, TimingLedger};
pub use crate::table::cell_content_backfill::{
BackfillOutcome, BackfillSource, CellMatchKind, CellRecognizer, TABLE_MATCH_MIN_IOU,
TextConfidence, TextLine, axis_aligned_bbox, backfill, bbox_to_quad, join_line_texts,
match_cells, match_cells_with_min_iou, match_cells_with_offset, rectangle_distance,
rectangle_iou,
};
pub use crate::table::decode::{
CellSlot, GridCoverage, GridSize, LogicCell, SOS_CLASS_INDEX, StructureNode, StructureResult,
StructureTermination, StructureVocabulary, TableShape, TokenStep, argmax_structure,
decode_logic_points, decode_token_steps, eos_class_index, is_blank_polygon, parse_cell_tag,
polygon_to_bbox, rescale_polygon, rescale_ratios, tokens_to_structure,
};
pub use crate::table::emitter::{
RenderedTable, StructureConfidence, StructureDegradation, TextPolicy, emit_html, emit_markdown,
emit_table_html, structure_degradations,
};
pub use crate::table::ocr_resolution::TableOcrResolution;
pub use crate::table::preprocess::{
TABLE_STRUCTURE_MEAN, TABLE_STRUCTURE_SCALE, TABLE_STRUCTURE_STD, TableCanvas,
resize_dimensions, table_structure_input,
};
pub use crate::table::structure::{
TABLE_STRUCTURE_SIDE_LEN, TableStructureConfig, TableStructureContract,
TableStructureModelInfo, TableStructureSession, validate_table_structure_contract,
};
pub type Quad = [[f32; 2]; 4];