Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
97 lines (90 loc) · 3.3 KB
/
Copy pathCargo.toml
File metadata and controls
97 lines (90 loc) · 3.3 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[workspace]
members = [".", "oar-ocr-derive", "oar-ocr-core", "oar-ocr-vl", "oar-ocr-bench", "oar-ocr-cli"]
resolver = "2"
[workspace.package]
version = "0.11.0"
edition = "2024"
rust-version = "1.95"
license = "Apache-2.0"
authors = ["Wang Xin <xinwang614@gmail.com>"]
repository = "https://github.com/greatv/oar-ocr"
[workspace.dependencies]
oar-ocr-core = { version = "0.11.0", path = "oar-ocr-core", default-features = false }
oar-ocr-derive = { version = "0.11.0", path = "oar-ocr-derive", default-features = false }
# Shared third-party dependencies (kept in sync via workspace inheritance).
clap = { version = "4.5.42", features = ["derive"] }
hayro = "0.9"
ort = { version = "=2.0.0-rc.15", default-features = false, features = ["std"] }
image = "0.25.10"
imageproc = "0.27.0"
rayon = "1.8"
regex = "1.11.1"
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
tempfile = "3.19"
tokenizers = { version = "0.23", default-features = false, features = ["progressbar", "onig"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
[package]
name = "oar-ocr"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
description = "An Optical Character Recognition (OCR) and Document Layout Analysis library written in Rust."
readme = "README.md"
keywords = [
"ocr",
"onnx",
"computer-vision",
"text-recognition",
"machine-learning",
]
categories = ["computer-vision", "science"]
[features]
default = ["download-binaries", "simd"]
# SIMD-accelerate hot CPU pre/post-processing kernels (see oar-ocr-core).
simd = ["oar-ocr-core/simd"]
# ONNX Runtime execution provider features
cuda = ["oar-ocr-core/cuda"]
tensorrt = ["oar-ocr-core/tensorrt"]
directml = ["oar-ocr-core/directml"]
coreml = ["oar-ocr-core/coreml"]
webgpu = ["oar-ocr-core/webgpu"]
openvino = ["oar-ocr-core/openvino"]
# Auto-download ONNX Runtime binaries during build (enabled by default).
# Set ORT_LIB_LOCATION to use a custom installation (skips download).
# Use --no-default-features for offline/enterprise environments.
download-binaries = ["oar-ocr-core/download-binaries"]
# Auto-download OCR model files at runtime from ModelScope into `$OAR_HOME`
# (default `~/.oar`). When enabled, builder methods that take a model path
# accept either a filesystem path or a bare registered file name.
auto-download = ["oar-ocr-core/auto-download"]
[dependencies]
image.workspace = true
imageproc.workspace = true
nalgebra = "0.35"
oar-ocr-core.workspace = true
oar-ocr-derive.workspace = true
# Indra OCR feeds integer and boolean tensors directly; same pin as oar-ocr-core.
ort.workspace = true
rayon.workspace = true
regex.workspace = true
serde.workspace = true
serde_json.workspace = true
tracing.workspace = true
# Indra OCR: Hangul jamo composition, right-to-left lines, and its n-gram
# language models (.npz archives).
unicode-bidi = "0.3.18"
unicode-normalization = "0.1.25"
unicode-properties = { version = "0.1.4", default-features = false, features = ["general-category"] }
zip = { version = "9.5", default-features = false, features = ["deflate-flate2"] }
[dev-dependencies]
ab_glyph = "0.2"
clap.workspace = true
fontdb = "0.24"
hayro.workspace = true
tempfile.workspace = true
tracing-subscriber.workspace = true