1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Dynamic batching for OCR pipeline components.
//!
//! This module provides functionality for dynamically batching images based on
//! shape compatibility and performance requirements.
//! It supports both same-image batching (multiple images) and cross-image
//! batching (text regions from multiple images).
//!
//! # Features
//!
//! - **Shape Compatibility**: Group images by exact dimensions, aspect ratio, or custom strategies
//! - **Flexible Batching**: Support for detection and recognition batching
//! - **Speed Metrics**: Track batching time and throughput
//! - **Cross-Image Batching**: Batch text regions from multiple images together
//!
//! # Example
//!
//! ```rust,no_run
//! use oar_ocr_core::core::{DynamicBatchConfig, DefaultDynamicBatcher, DynamicBatcher};
//! use image::RgbImage;
//!
//! # fn main() -> Result<(), oar_ocr_core::core::OCRError> {
//! let config = DynamicBatchConfig::default();
//! let batcher = DefaultDynamicBatcher::new();
//! let images = vec![(0, RgbImage::new(100, 100)), (1, RgbImage::new(100, 100))];
//!
//! let batches = batcher.group_images_by_compatibility(images, &config)?;
//! # let _ = batches;
//! # Ok(())
//! # }
//! ```
// Re-export public types
pub use ;
pub use ;
pub use ;