docs/ had 26 developer documents flat beside the manual, and the two audiences are very differently sized: most readers want the manual and the gesture reference, a few want the register, the designs and the measurements. The manual and gestures.md stay at the top; everything for someone changing the code moves to docs/dev/, and the two documents that name their own successors — the v0.1 milestone and the UI-refinement plan — go to docs/dev/archive/ rather than being deleted, since both are still cited. docs/README.md is the index, users first. Every reference follows: code comments, Cargo manifests, the workflows, the pre-commit hook, the bench and traceability tools (which locate the repo root by docs/dev/requirements.md now), packaging, the Docker READMEs, CLAUDE.md, CONTRIBUTING.md and the README. The matrix links one level deeper and is regenerated. Links out of the moved documents into the tree gain a level; a link checker over every Markdown file finds none broken.
61 lines
2.5 KiB
TOML
61 lines
2.5 KiB
TOML
[package]
|
|
name = "dr-segment"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
# Guards against a Git LFS pointer being embedded in place of the weights.
|
|
build = "build.rs"
|
|
|
|
[dependencies]
|
|
thiserror.workspace = true
|
|
log.workspace = true
|
|
|
|
# Inference. `ort` is the API; **what runs it is `dr-inference-engine`'s
|
|
# business** — tract, or an ONNX Runtime the app found on disk, on whichever
|
|
# provider the device has (docs/dev/inference.md). This crate never names either.
|
|
ort = { workspace = true, optional = true }
|
|
dr-inference-engine = { workspace = true, optional = true }
|
|
ndarray = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
# The example reads an ordinary JPEG, because the thing worth looking at is
|
|
# whether detections land on a real photograph. Pure Rust, and already in the
|
|
# tree for embedded previews.
|
|
zune-jpeg.workspace = true
|
|
env_logger.workspace = true
|
|
# The probe example drives `ort` directly to print the raw load error, and
|
|
# asks the engine for a runtime by name rather than naming one itself.
|
|
dr-inference-engine.workspace = true
|
|
|
|
[features]
|
|
# On by default: a local adjustment that cannot select a subject is half the
|
|
# feature, and the whole point of the tract backend is that enabling this costs
|
|
# no C dependency on any platform.
|
|
default = ["semantic", "embedded-model"]
|
|
|
|
# Arm B — the ONNX runtime and the instance decoder.
|
|
#
|
|
# Separable because the watershed half is genuinely independent of it: with
|
|
# this off, `dr-segment` is a pure-CPU graph algorithm crate with no model to
|
|
# carry, which is what the headless hierarchy tests want.
|
|
semantic = ["dep:ort", "dep:dr-inference-engine", "dep:ndarray"]
|
|
|
|
# Compile the weights into the binary.
|
|
#
|
|
# Separate from `semantic` because the two answer different questions. Android
|
|
# hands the app no filesystem path to read a model from (ARCH §6.9), so there
|
|
# it must be embedded; a desktop packager pointing at a system model directory,
|
|
# or a test that only needs the decoder, wants the runtime without the 11 MB.
|
|
embedded-model = ["semantic"]
|
|
|
|
# Compile the *scene* model in too, and off by default where `embedded-model`
|
|
# is on.
|
|
#
|
|
# The asymmetry is its size. At 24 MB it is more than twice the instance model,
|
|
# and Android reaches it the way it reaches the face weights — unpacked from
|
|
# APK assets at first launch — rather than by carrying it in the binary. This
|
|
# feature is for a desktop build with nowhere else to read it from, and for
|
|
# tests that want the real graph.
|
|
embedded-scene-model = ["semantic"]
|