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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Constants used throughout the OCR pipeline.
//!
//! This module defines various constants that are used across different
//! components of the OCR pipeline, such as default values for image processing
//! parameters, batch sizes, and tensor size limits.
/// The default maximum width for images.
///
/// This constant defines the maximum width that an image can have
/// when processing in the OCR pipeline.
pub const DEFAULT_MAX_IMG_WIDTH: usize = 3200;
/// The default maximum side limit for images.
///
/// This constant defines the maximum size for any side of an image
/// when processing in the OCR pipeline.
pub const DEFAULT_MAX_SIDE_LIMIT: u32 = 4000;
/// The default limit for the side length of images.
///
/// This constant defines the default size to which image sides
/// are limited during processing in the OCR pipeline.
pub const DEFAULT_LIMIT_SIDE_LEN: u32 = 736;
/// The default threshold for parallel processing.
///
/// This constant defines the minimum number of items that need
/// to be processed before parallel processing is used.
pub const DEFAULT_PARALLEL_THRESHOLD: usize = 4;
/// The default shape for recognition images.
///
/// This constant defines the default shape (channels, height, width)
/// for images used in the recognition phase of the OCR pipeline.
pub const DEFAULT_REC_IMAGE_SHAPE: = ;
/// The default batch size for processing.
///
/// This constant defines the default number of items processed
/// together in a batch in the OCR pipeline.
pub const DEFAULT_BATCH_SIZE: usize = 6;
/// The default value for top-k selection.
///
/// This constant defines the default number of top results
/// to select in classification tasks.
pub const DEFAULT_TOPK: usize = 4;
/// The default input shape for classification.
///
/// This constant defines the default shape (height, width)
/// for images used in classification tasks.
pub const DEFAULT_CLASSIFICATION_INPUT_SHAPE: = ;
/// The maximum allowed tensor size.
///
/// This constant defines the maximum number of elements
/// allowed in a tensor to prevent memory issues.
pub const MAX_TENSOR_SIZE: usize = 100_000_000;