# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91.0"
name = "od_opencv"
version = "0.6.0"
authors = ["Dimitrii Lopanov <sexykdi@gmail.com>"]
build = false
exclude = [
    "/.github",
    "/ci",
    "/tools",
    "/scripts",
    "release.toml",
    "rustfmt.toml",
    "/images",
    "/pretrained",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Object detection utilities in Rust programming language for YOLO-based neural networks in OpenCV ecosystem"
homepage = "https://github.com/LdDl/object-detection-opencv-rust"
documentation = "https://docs.rs/od_opencv"
readme = "README.md"
keywords = [
    "computer-vision",
    "object-detection",
    "yolo",
    "opencv",
    "onnx",
]
categories = [
    "algorithms",
    "multimedia",
    "computer-vision",
    "mathematics",
    "science",
]
license = "MIT"
repository = "https://github.com/LdDl/object-detection-opencv-rust"

[features]
default = ["ort-backend"]
letterbox = []
opencv-backend = [
    "dep:opencv",
    "opencv/dnn",
]
ort-backend = [
    "dep:ort",
    "dep:image",
]
ort-cuda-backend = [
    "ort-backend",
    "ort/cuda",
]
ort-opencv-compat = [
    "ort-backend",
    "dep:opencv",
]
ort-tensorrt-backend = [
    "ort-backend",
    "ort/tensorrt",
]
rknn-backend = [
    "dep:rknn-runtime",
    "dep:image",
]

[lib]
name = "od_opencv"
path = "src/lib.rs"
doctest = false

[[example]]
name = "yolo_v11_l"
path = "examples/yolo_v11_l.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v11_l_ort"
path = "examples/yolo_v11_l_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v11_l_ort_cuda"
path = "examples/yolo_v11_l_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v11_m"
path = "examples/yolo_v11_m.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v11_m_ort"
path = "examples/yolo_v11_m_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v11_m_ort_cuda"
path = "examples/yolo_v11_m_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v11_n"
path = "examples/yolo_v11_n.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v11_n_ort"
path = "examples/yolo_v11_n_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v11_n_ort_cuda"
path = "examples/yolo_v11_n_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v11_s"
path = "examples/yolo_v11_s.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v11_s_ort"
path = "examples/yolo_v11_s_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v11_s_ort_cuda"
path = "examples/yolo_v11_s_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v11_x"
path = "examples/yolo_v11_x.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v11_x_ort"
path = "examples/yolo_v11_x_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v11_x_ort_cuda"
path = "examples/yolo_v11_x_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v3"
path = "examples/yolo_v3.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v3_tiny"
path = "examples/yolo_v3_tiny.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v4"
path = "examples/yolo_v4.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v4_tiny"
path = "examples/yolo_v4_tiny.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v4_tiny_onnx"
path = "examples/yolo_v4_tiny_onnx.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v5_n"
path = "examples/yolo_v5_n.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v5_n_ort"
path = "examples/yolo_v5_n_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v5u_n"
path = "examples/yolo_v5u_n.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v5u_n_ort"
path = "examples/yolo_v5u_n_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v7"
path = "examples/yolo_v7.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v7_tiny"
path = "examples/yolo_v7_tiny.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v8_l"
path = "examples/yolo_v8_l.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v8_l_ort"
path = "examples/yolo_v8_l_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v8_l_ort_cuda"
path = "examples/yolo_v8_l_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v8_m"
path = "examples/yolo_v8_m.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v8_m_ort"
path = "examples/yolo_v8_m_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v8_m_ort_cuda"
path = "examples/yolo_v8_m_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v8_n"
path = "examples/yolo_v8_n.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v8_n_ort"
path = "examples/yolo_v8_n_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v8_n_ort_cuda"
path = "examples/yolo_v8_n_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v8_n_rknn"
path = "examples/yolo_v8_n_rknn.rs"
required-features = ["rknn-backend"]

[[example]]
name = "yolo_v8_s"
path = "examples/yolo_v8_s.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v8_s_ort"
path = "examples/yolo_v8_s_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v8_s_ort_cuda"
path = "examples/yolo_v8_s_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v8_s_ort_opencv"
path = "examples/yolo_v8_s_ort_opencv.rs"
required-features = ["ort-opencv-compat"]

[[example]]
name = "yolo_v8_x"
path = "examples/yolo_v8_x.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v8_x_ort"
path = "examples/yolo_v8_x_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v8_x_ort_cuda"
path = "examples/yolo_v8_x_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v9_c"
path = "examples/yolo_v9_c.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v9_c_ort"
path = "examples/yolo_v9_c_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v9_c_ort_cuda"
path = "examples/yolo_v9_c_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v9_e"
path = "examples/yolo_v9_e.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v9_e_ort"
path = "examples/yolo_v9_e_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v9_e_ort_cuda"
path = "examples/yolo_v9_e_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v9_m"
path = "examples/yolo_v9_m.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v9_m_ort"
path = "examples/yolo_v9_m_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v9_m_ort_cuda"
path = "examples/yolo_v9_m_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v9_s"
path = "examples/yolo_v9_s.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v9_s_ort"
path = "examples/yolo_v9_s_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v9_s_ort_cuda"
path = "examples/yolo_v9_s_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[[example]]
name = "yolo_v9_t"
path = "examples/yolo_v9_t.rs"
required-features = ["opencv-backend"]

[[example]]
name = "yolo_v9_t_ort"
path = "examples/yolo_v9_t_ort.rs"
required-features = ["ort-backend"]

[[example]]
name = "yolo_v9_t_ort_cuda"
path = "examples/yolo_v9_t_ort_cuda.rs"
required-features = ["ort-cuda-backend"]

[dependencies.image]
version = "0.25"
optional = true

[dependencies.lazy_static]
version = "1.5.0"

[dependencies.ndarray]
version = "0.16"

[dependencies.opencv]
version = "0.96.0"
features = [
    "imgcodecs",
    "imgproc",
]
optional = true
default-features = false

[dependencies.ort]
version = "2.0.0-rc.10"
optional = true

[dependencies.rknn-runtime]
version = "0.1.1"
optional = true
