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.
59 lines
1.8 KiB
Rust
59 lines
1.8 KiB
Rust
//! M1 (docs/dev/faces.md §12) — will tract load these graphs at all?
|
|
//!
|
|
//! The one measurement everything else in the face subsystem is conditional
|
|
//! on. `det_500m.onnx` has a dynamic H/W input, which is exactly what tract
|
|
//! failed on for YOLO26n-seg, so a plain "no" here is the expected outcome and
|
|
//! the interesting part is the error it gives.
|
|
//!
|
|
//! cargo run -p dr-face --features inference --example probe -- MODEL...
|
|
|
|
fn main() {
|
|
env_logger::init();
|
|
|
|
let paths: Vec<String> = std::env::args().skip(1).collect();
|
|
if paths.is_empty() {
|
|
eprintln!("usage: probe MODEL.onnx [MODEL.onnx ...]");
|
|
std::process::exit(2);
|
|
}
|
|
|
|
let mut failures = 0;
|
|
for path in &paths {
|
|
println!("\n=== {path} ===");
|
|
let bytes = match std::fs::read(path) {
|
|
Ok(b) => b,
|
|
Err(e) => {
|
|
println!(" UNREADABLE: {e}");
|
|
failures += 1;
|
|
continue;
|
|
}
|
|
};
|
|
println!(" {} bytes", bytes.len());
|
|
|
|
dr_face::install_backend_for_probe();
|
|
|
|
let session =
|
|
ort::session::Session::builder().and_then(|mut b| b.commit_from_memory(&bytes));
|
|
|
|
match session {
|
|
Err(e) => {
|
|
println!(" LOAD FAILED: {e}");
|
|
failures += 1;
|
|
}
|
|
Ok(s) => {
|
|
println!(" LOADED");
|
|
for i in s.inputs() {
|
|
println!(" in {:<24} {:?}", i.name(), i.dtype().tensor_shape());
|
|
}
|
|
for o in s.outputs() {
|
|
println!(" out {:<24} {:?}", o.name(), o.dtype().tensor_shape());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
println!("\n{} of {} failed", failures, paths.len());
|
|
if failures > 0 {
|
|
std::process::exit(1);
|
|
}
|
|
}
|