Skip to main content

Crate warden_vision

Crate warden_vision 

Source
Expand description

warden-vision: reusable computer vision building blocks for detection, tracking, and annotation, mirroring the API shape of Roboflow’s Python supervision library.

§Modules

(Items behind a non-default feature are written above as plain code text rather than intra-doc links, since those links only resolve when this crate’s docs are built with that feature enabled. The published docs build with annotate-image and datasets — see [package.metadata.docs.rs] in Cargo.toml — but not annotate-opencv, since docs.rs has no system OpenCV install; read video’s module docs directly in src/video/mod.rs instead.)

§Scope

This crate targets the core, dependency-light building blocks of Roboflow’s supervision: detection/keypoint/classification data structures, geometry, tracking, annotation, evaluation metrics, dataset I/O, image utilities, and OpenCV-backed video I/O. Remaining known gaps: RichLabelAnnotator has no annotate-opencv implementation (OpenCV has no built-in TTF rendering without FreeType); a dedicated OrientedBoxAnnotator doesn’t exist since annotators::PolygonAnnotator already draws an arbitrary 4-point rotated box stored in core::Detection::mask; and detector-output parsing covers Ultralytics YOLO and DETR-family transformers models (the two most common) rather than every framework supervision has an adapter for.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

annotators
Backend-agnostic annotation: drawing detections and zone counters onto an image or video frame.
core
Core data structures: detections and the value types built on top of them.
dataset
Dataset loaders and exporters: three object-detection annotation formats (coco, yolo, pascal_voc) built around the shared DetectionDataset shape, plus a folder-per-class classification layout (classification) built around ClassificationDataset.
error
Shared error type for warden-vision.
geometry
Spatial primitives and zones: points, counting lines, and polygonal regions of interest.
metrics
Evaluation metrics for comparing predicted crate::core::Detections against ground-truth annotations: Precision, Recall, F1Score, ConfusionMatrix, MeanAveragePrecision, and MeanAverageRecall.
tracker
Multi-object tracking: Kalman motion prediction and IoU-based association.
utils
Small standalone utilities that don’t belong to any single pipeline stage: FPSMonitor for throughput reporting, and (under the annotate-image feature) pure-Rust image helpers.