Expand description
§adk-vision
Local-first perception for ADK-Rust agents (spec 3.7).
The crate is contracts first: artifact-backed images (ImageRef); regions that always
know their source image and the transforms between it and the model (Region,
CoordFrame, TransformChain); model manifests that pin every weight file by
revision and SHA-256 and name its licence (ModelManifest); and the perception traits
— Detector, Segmenter, DocumentReader, Embedder, Describer,
Tracker, VideoAnalyzer and Editor — each with a conformance suite.
VisionRuntime routes each call to a backend, local first. An on-device backend is
handed a SentImage; a remote backend only a ReleasedImage, which only the
EgressGate constructs after it has checked the destination, cropped, redacted the
classes the rules list, decided and recorded what leaves. With no rules an image leaves
as it is; ask, deny, redact and on_device each restrict once chosen. Every call is metered against the run’s budget and
spend ledger, local calls at zero cost, and every answer comes back in source pixels.
§Features
| Feature | Contents |
|---|---|
| (always) | media, geometry, manifests, the traits, VisionRuntime, the egress gate, the deterministic Editor, watch conditions (WatchEvaluator), calibration and measurement (Calibration), the verifier loop (VerifierLoop) |
fetch | ModelFetcher: Hugging Face downloads by revision, SHA-256 checked before load, HF_HUB_OFFLINE honoured |
conformance | conformance: the suite every backend runs, and its test macros |
eval | eval: any runtime task as an adk-eval agent, in process or behind cargo adk eval --agent-cmd |
guardrail | ImagePrivacyGuardrail on model calls, tool results and user input, and PersonalTextRedactor (OCR words matched by adk-guardrail’s PII patterns) |
onnx | onnx: RF-DETR, EfficientSAM, SAM 2.1 and SigLIP 2 on ONNX Runtime, the runtime downloaded at build time |
onnx-dynamic | The same backends against an onnxruntime library loaded from ORT_DYLIB_PATH |
onnx-coreml, onnx-cuda | The CoreML and CUDA execution providers for the onnx backends |
sam3-local | SAM 3 on ONNX Runtime from weights you supply under Meta’s SAM License, after you accept it |
cloud | LlmDescriber over any adk_core::Llm that takes images, with the Gemini, Claude and 0–1000 region adapters; FramesAnalyzer, questions over sampled frames on the same models |
nim | NVIDIA NIM: vision-language models over the OpenAI-compatible client, and NimDocumentReader for NVIDIA’s OCR, page, table and chart endpoints, remote (implies cloud) |
sam | The Meta sam-3.1 client: SamSegmenter, its stream parser and mask placement; SamVideoTracker, masks with stable object identifiers over a clip |
sam-codec | LicensedMaskDecoder: sam-3.1 masks decoded in process by adk-vision-sam-codec, the port of Meta’s codec under the SAM License, after a person records acceptance (implies sam) |
ocr | PpOcrReader: PP-OCRv6 text lines and words through oar-ocr on ONNX Runtime |
ocr-vl | PaddleOcrVlReader: PaddleOCR-VL-1.6 with PP-DocLayoutV3 through oar-ocr-vl on Candle |
ocr-vl-metal | ocr-vl on Apple GPUs |
mistralrs | mistralrs: LlmDescriber::mistralrs loads a verified Qwen3-VL (or another mistral.rs vision model) in this process; regions in Qwen3-VL’s own 0–1000 frame (implies cloud, fetch) |
mistralrs-metal, mistralrs-cuda | mistralrs on Apple GPUs or CUDA |
stream | stream: FrameSource, the sampler, the frame governor, frame retention and the stream pipeline; StreamWatch, which keeps each watch event’s frame and wakes a WatchSink; FrameSources, the named sources vision_watch starts and stops watches on |
rtsp, ffmpeg, screen, browser, surface-camera | The frame sources: RtspSource, FileSource (and H.264/H.265 through a user-installed ffmpeg), ScreenSource, BrowserSource, SurfaceCameraSource |
device | DeviceSource: a camera on this machine through a user-installed ffmpeg (AVFoundation, v4l2, DirectShow), and DeviceSource::list (implies ffmpeg) |
computer-use | GroundedTarget::target_evidence as adk-computer-use TargetEvidence; with screen, stream::RuntimeObserver and stream::screen_source, any ComputerUseRuntime as a screen frame source |
stream-fixtures | stream::fixtures: the generated conveyor clip and an in-process RTSP test server |
track | ByteTracker: ByteTrack through trackforge, anonymous tracks with stable identifiers across frames |
gemini-video | GeminiVideoAnalyzer: Gemini native video, through the File API above 20 MB, at an explicit frame rate and media resolution (implies cloud) |
memory | memory: VisualMemory, image embeddings as adk-rag chunks in any vector store with one embedding space per collection, text and example-image queries, SiglipTextEmbedding for adk-rag pipelines, captions with artifact references in adk-memory, erasure by source; the S16 week corpus |
analyst | analyst: VideoAnalyst, the video chunked in fixed windows or at scene cuts, each chunk captioned through the video analyzer, indexed in any vector store with its time range, captions with keyframe and clip references in adk-memory, the clip in graph memory; questions answered citing chunks; cost per hour of video; erasure by clip; the S17 warehouse clip (implies cloud, memory, stream) |
team | team: the perceiver, reasoner and verifier roles and VisionTeam, which escalates a disagreement to a person on one card (implies guardrail) |
VisionToolset — vision_detect, vision_segment, vision_read, vision_describe,
vision_crop, vision_redact, vision_annotate, vision_measure, vision_video, and
with feature stream vision_watch over registered frame sources — is always built: each tool runs on
the governed path, a remote call a rule asks for is held with the exact egress image as
approval evidence, and every call, release and edit writes its vision.* audit record
(audit).
§Example
use std::sync::Arc;
use adk_vision::{
BBox, BackendDescriptor, CoordFrame, DetectQuery, Detector, Locality, RawRegion,
SentImage, SourceImage, DecodedImage, VisionCx, VisionRuntime,
};
/// A detector that finds the whole image, in the pixels it was sent.
struct Whole(BackendDescriptor);
#[async_trait::async_trait]
impl Detector for Whole {
fn descriptor(&self) -> &BackendDescriptor {
&self.0
}
async fn detect(
&self,
_cx: &VisionCx,
image: &SentImage,
_query: &DetectQuery,
) -> adk_vision::Result<Vec<RawRegion>> {
let (w, h) = image.size();
Ok(vec![RawRegion::boxed(BBox::new(0.0, 0.0, w as f32, h as f32), "page", 0.99)])
}
}
// The backend takes at most 500 px on the long edge; the runtime downscales and records it.
let whole = BackendDescriptor::new("whole", Locality::InProcess, CoordFrame::SentPixels)
.with_limits(adk_vision::InputLimits::long_edge(500));
let runtime = VisionRuntime::builder().detector(Arc::new(Whole(whole))).build().unwrap();
let page = SourceImage::from_pixels(DecodedImage::filled(2000, 1000, [255; 4])).unwrap();
let found = runtime
.detect(&VisionCx::new(), &page, &DetectQuery::Classes(vec!["page".into()]))
.await
.unwrap();
// Back in source pixels, with the resize on record.
assert_eq!(found.value[0].shape.bbox(), Some(BBox::new(0.0, 0.0, 2000.0, 1000.0)));
assert!(!found.value[0].origin.chain.is_identity());§Stability
Experimental — new in 3.0.0 (spec 3.7), and its API may change while the spec lands. See STABILITY.md.
Re-exports§
pub use cloud::LlmDescriber;pub use cloud::RegionAdapter;pub use sam::SamConfig;pub use sam::SamSegmenter;pub use sam::SamVideoTracker;pub use video::ClipInfo;pub use video::MAX_CLIP_BYTES;pub use video::SentClip;pub use video::SourceClip;pub use video::VideoCodec;pub use video::DEFAULT_CAPTION_INSTRUCTIONS;pub use video::FramesAnalyzer;pub use video::VisibilityPass;pub use video::GEMINI_INLINE_LIMIT;pub use video::GeminiVideoAnalyzer;
Modules§
- analyst
- The video analyst (spec 3.7 §7.13, §7.15, scenario S17), feature
analyst: a video cut into chunks, each chunk captioned by a vision-language model, the captions indexed, and questions answered from the chunks a retrieval finds, each answer citing the chunks it rests on with their time ranges. It is NVIDIA’s chunk, caption and index pattern from its Video Search and Summarization blueprint, built from workspace parts. - audit
vision.*audit records (spec 3.7 §9.3).- cloud
- Cloud describers (spec 3.7 §7.7), feature
cloud. - conformance
- The conformance suite every vision backend runs (spec 3.7 §7.18), feature
conformance. - eval
- Vision backends as eval agents (spec 3.7 §7.16).
- memory
- Visual memory (spec 3.7 §7.15), feature
memory: images indexed by their embeddings in anyadk-ragVectorStore, found again by text or by an example image, captioned inadk-memory, and erased by source. - mistralrs
- A describer on this machine over mistral.rs (spec 3.7 §7.6), feature
mistralrs. - onnx
- Local backends on ONNX Runtime through
ort(spec 3.7 §7.6), featuresonnxandonnx-dynamic. - sam
- The Meta
sam-3.1client (spec 3.7 §7.7), featuresam. - screen
- The Screen copilot’s grounding (spec 3.7 §7.14): set-of-marks candidates on a screenshot, the target a chosen mark resolves to in logical points, screenshots fitted to a model’s image limits with the scale kept, and previewed plans approved once.
- stream
- Frame ingestion: sources, sampling, the frame governor, retention and the stream pipeline (spec 3.7 §7.9, §7.13).
- video
- Video clips and the video analyzers (spec 3.7 §7.13).
Macros§
- describer_
conformance_ tests - Generates the conformance cases for a
Describer. A describer with no region adapter passes the coordinates case by refusingwant_regionswithUnsupported. Arguments asdetector_conformance_tests!. - detector_
conformance_ tests - Generates the conformance cases for a
Detector. - document_
reader_ conformance_ tests - Generates the conformance cases for a
DocumentReader. Arguments asdetector_conformance_tests!. - editor_
conformance_ tests - Generates the conformance cases for an
Editor, with a case for provenance. Arguments asdetector_conformance_tests!. - embedder_
conformance_ tests - Generates the conformance cases for an
Embedder, with a case for the space’s dimensions. Arguments asdetector_conformance_tests!. - segmenter_
conformance_ tests - Generates the conformance cases for a
Segmenter. Arguments asdetector_conformance_tests!. - tracker_
conformance_ tests - Generates the conformance cases for a
Tracker.makeis an expression that builds a new tracker, evaluated once per tracker a case needs. - video_
analyzer_ conformance_ tests - Generates the conformance cases for a
VideoAnalyzer: usage, egress, normalisation of event times and track regions, chunk captions when the fixture asks for them, and the refusals — an unsupported request, cancellation, the kill switch, a frame cap, and a remote analyzer without an egress gate.
Structs§
- Artifact
Locator - Where an artifact version lives in an
ArtifactService: application, user, session, file name and version. - BBox
- An axis-aligned box: origin top-left, x right, y down;
x1andy1exclusive. - Backend
Descriptor - What a backend is, where it runs, the frame it answers in, what it costs and what it takes.
- Backend
Id - A backend’s stable identifier, such as
rf-detr-morsam-3.1. - Block
- A block of a document page with its region, text, words and, for tables, cells.
- Byte
Track Config - Settings for
ByteTracker: when a detection starts or continues a track, how much it must overlap a track to continue it, and how long a lost track waits to be found again. - Byte
Tracker - ByteTrack (Zhang et al., 2022) through
trackforge0.5 (MIT): a Kalman filter predicts each track’s box, high-scoring detections match tracks first by overlap, low-scoring detections then recover the tracks left over, and a lost track is kept formax_missedframes so an occluded object keeps its identifier when it reappears. - Calibration
- An image’s scale in its measured plane: pixels per millimetre with its uncertainty, for images of one size.
- Call
Options - Per-call options.
- Call
Record - One backend call, for the
vision.callaudit record: backend, locality, image digests, units, cost, region count and duration. - Clip
Release Request - One request to release a clip to a remote backend.
- Data
Class - The kind of data an image is, which egress rules are written per:
document_crop,photo,screen. - Decode
Limits - Caps checked before an image is decoded.
- Decoded
Image - Decoded RGBA8 pixels, row-major, EXIF orientation already applied.
- Describe
Request - What to ask a describer.
- Describe
Spec - What a caller asks the runtime to describe, before images are prepared.
- Description
- A describer’s answer: free text, a value matching the request’s schema, and regions when asked for.
- Deterministic
Editor - Crops, resizes, redacts, blurs, pixelates and annotates on the
imagecrate, in process. Refuses generative edits. - Digest
- A SHA-256 digest in the form
sha256:<64 lowercase hex digits>. - Document
Page - One page read: blocks with regions, the reading order, and optionally Markdown.
- Edited
- An edited image, stored with
Provenance::Derived. - Egress
Config - The
[egress]table: the default action, the redaction classes every release passes through, and the rules per host or provider and data class. - Egress
Evidence - What an approval card shows for a held release: the exact image that would leave, after redaction, with its digest, destination and what was redacted.
- Egress
Gate - The only code that releases an image to a remote backend.
- Egress
Preview - The minimised, redacted image the gate would release, before the rule decides.
- Egress
Receipt - What left the machine: written before the request is sent (V-I3).
- Egress
Refusal - Why an image was not released.
- Egress
Rule Config - One
[[egress.rule]]: the action for a host or a provider and, optionally, some data classes. - Embedding
Space - The space an embedder’s vectors live in. An index belongs to one space.
- Escalated
From - The primary backend’s answer an escalation replaced.
- Escalation
- Where a route escalates, on which triggers, and how much margin a crop keeps.
- Expected
Change - What an action should change: regions that appear, regions that disappear; everything else stays.
- Face
Redactor - Covers faces: each face a face
Detectorfinds, widened byFACE_MARGIN, and — with a person fallback — the whole box of each person it finds no face for (spec 3.7 Q3). - Fetch
Config - Where and how the fetcher reads and downloads.
- Fiducial
Spec - The physical size of a calibration fiducial: a printed square or rectangle.
- File
Acceptance Store - Acceptances in a JSON file, by default
.adk/vision/licences.jsonin the project. - Frame
- One frame of a stream. Pixels stay in memory unless the frame becomes evidence.
- Frame
Meta - A stream frame’s identity and timing, without its pixels.
- Frame
Ref - The frame an observation was made on: its place in the stream, the digest of its encoded bytes, its size, and the artifact it is stored as once it is kept.
- Frame
Source Id - The identifier of a frame source: a camera, a file, a screen or a browser.
- Gate
Outcome - What gating one content changed.
- Greedy
IouTracker - Associates each detection with the live track of the same label it overlaps most, at
min_iouor better, highest score first; unmatched detections start new tracks, and a track unseen for more thanmax_missedframes ends. Identifiers are anonymous counters that restart onreset. - Image
Privacy Guardrail - Runs the egress gate on every image the framework sends to a remote model.
- Image
Ref - An image the framework can reason about. The encoded bytes live in an artifact; this reference is what travels through events, approvals, ledgers and audit records.
- Image
Region - A region a describer found, with the index of the request image it belongs to.
- InMemory
Acceptance Store - Acceptances in memory.
- InMemory
Egress Recorder - An
EgressRecorderthat keeps entries in memory, for tests and for proving that a run sent nothing off the machine. - Input
Limits - The largest image a backend takes.
- Input
Spec - A model’s fixed input size and how an image is fitted into it.
- IoSpec
- A model’s input size, normalisation and labels.
- Keypoint
- One keypoint of a skeleton.
- Keypoints
- Keypoints of a named skeleton, such as
coco-17. - Letterbox
Geometry - The resize and padding that put a sent image into a model input.
- Licence
Acceptance - A person’s recorded acceptance of a use-restricted model’s licence.
- Licence
Gate - Decides whether a model may be fetched or loaded under its licence.
- Licence
Info - A model’s licence.
- Licence
Policy - The non-commercial and copyleft models a user’s configuration allows, by id.
- Manifest
Set - A set of manifests by id: the built-in entries plus the user’s own.
- Mask
- A binary mask, run-length encoded in COCO’s column-major order:
countsalternates runs of unset and set pixels, starting with unset, scanning each column top to bottom, columns left to right. The runs always sum towidth × height. - Measurement
- A region measured in the calibrated plane.
- Media
Scope - The app, user and session an image is stored under.
- Media
Store - Images kept as versioned artifacts, named by digest.
- Model
Fetcher - Fetches a model’s files by revision and verifies them.
- Model
File - One file of a model, pinned by SHA-256 and size.
- Model
Manifest - A model: its task, where its files come from, each file’s SHA-256 and size, its licence, its runtime and its input and output.
- NimCv
Config - Where NVIDIA’s CV endpoints are and how the client calls them.
- NimDocument
Reader - A
DocumentReaderover NVIDIA’s CV endpoints: OCR for text, page elements for blocks, table structure for cells and chart elements for chart labels. - Observation
- One fresh look: the regions found and, when it was stored, the frame they were found in.
- Paddle
OcrVl Reader - PaddleOCR-VL-1.6 as a
DocumentReader: layout blocks in the layout model’s reading order, each with its kind, text, layout confidence, and for tables the rows. - Person
Redactor - Redacts faces as the whole box of every detected person.
- Personal
Text Redactor - Finds personal text: words an on-device
DocumentReaderreads thatadk_guardrail::PiiRedactor’s patterns match, and the values of labelled fields. - Point2
- A point in pixels.
- Polygon
- A closed polygon, vertices in order.
- PpOcr
Reader - PP-OCRv6 as a
DocumentReader: one block per text line, in reading order, with its quad, recognition confidence and words. - RawRegion
- What a backend answers: a shape in its descriptor’s
CoordFrame, with x horizontal and y vertical whatever the provider’s wire order. - Read
Options - Options for reading a document page.
- Redaction
Class - A class of content the gate redacts before release:
faces,personal_text,schema_personal_fields, ormarkedfor regions the caller names. - Region
- Something found in one image, always in that image’s pixels.
- Region
Diff - What changed between two observations.
- Region
Expectation - A region the action expects to appear or disappear: a label, and optionally where.
- Region
Normalizer - Turns a backend’s answers into regions of the source image.
- Region
Origin - Where a region came from: backend, model, the frame it answered in, the transforms between the source image and what the backend saw, and any escalation.
- Region
Set - The wire form of an image’s regions: the image’s digest and dimensions, and its regions.
- Release
Request - One request to release an image to a remote backend.
- Released
Clip - A clip the egress gate released to one backend: the exact bytes sent and the receipt
the gate recorded. The only clip a remote video backend accepts; only
EgressGateconstructs one: - Released
Image - An image the egress gate released to one backend: the minimised, redacted pixels, the exact bytes sent, and the receipt the gate recorded.
- Rgba
- An RGBA colour.
- Route
- A primary backend and an optional escalation.
- SamSettings
- The
[sam]table of.adk/vision.toml. - Sampling
- How a video or stream is sampled, which every provider prices by.
- Screen
Space - Logical screen points for actuation, from source pixels of a screenshot.
- Sent
Image - The image an on-device backend sees: pixels, the source image’s digest, and the transform chain from the source to these pixels.
- Source
Image - A source image on the device: its pixels and the digest of the bytes they came from.
- Staged
Egress - What would leave for one call, staged before anyone decides: the redacted copy, stored as an artifact when the gate has a media store, and the rule that applies to it.
- Table
Cell - A table cell.
- Token
Estimate - A token-billed backend’s preflight: how its images count, its rates, and the output cap assumed when a call sets none.
- Track
- One object across frames. Identifiers are anonymous and reset with the source session.
- TrackId
- An anonymous track identifier; identifiers reset with their source session (V-I8).
- Tracked
Observation - One frame’s tracked regions, as the stream pipeline hands them to a
WatchEvaluator. - Transform
Chain - The transforms from a source image of
source_width×source_heightto the image a backend saw, in order. - Verification
Hold - A verification that failed twice, for a person.
- Verification
Report - The outcome of one check.
- Verified
File - One model file whose size and SHA-256 matched its manifest when it was checked.
- Verified
Model - A model whose every file matched its manifest, under a licence the gate allowed.
- Verifier
Loop - Observe, act, re-observe, check; re-ground once; then hold (spec 3.7 §7.14).
- Video
Analysis - What a video analysis found.
- Video
Event - A time range a video analysis names: an event an
Askfound, or a chunk aCaptiondescribed. - Video
Frame - The regions found on one frame of a video, each with the track it belongs to.
- Video
Input - What a video backend is handed: sampled frames, a clip, or both, as the backend may see
them —
SentImages and aSentClipon the device,ReleasedImages and aReleasedClipoff it. Only the runtime constructs one. - Video
Plan - What a video call will send, known before anything is prepared or released: for a backend’s frame count and cost estimate.
- Video
Ref - A video kept as an artifact.
- Video
Usage - What one analysis used: frames, tokens and cost, so each path reports its own (S13).
- Vision
Config - The contents of
.adk/vision.toml. - Vision
Cx - What every vision call carries: cancellation, the metering scope (budget, spend ledger
and kill switches), the acting agent, the media scope new images are stored under, the
audit trail
vision.*records go to, and the tracing span. - Vision
Output - A runtime result and the backend calls that produced it.
- Vision
Runtime - Routes vision calls to backends, prepares and releases their images, meters them, maps their answers to source pixels and escalates.
- Vision
Runtime Builder - Builds a
VisionRuntime. - Vision
Tool - One vision tool;
VisionToolset::toolsmakes them. - Vision
Toolset - The governed vision tools over a
VisionRuntime. - Vision
Toolset Builder - Builds a
VisionToolset. - Watch
Condition - What a stream watches for, evaluated on the device so the kernel sees only the events that pass (spec 3.7 §7.10).
- Watch
Evaluator - Holds
WatchConditions against each frame’s tracked regions and returns the events that pass (spec 3.7 §7.10). One evaluator serves any number of sources, each with its own state. - Watch
Event - A condition that passed: the track, its label and score, the frame and the regions that met the condition in it.
- Word
- A recognised word.
- Zone
- An area of the frame a
WatchConditionis limited to: a polygon in source pixels and the point of each region that must lie inside it.
Enums§
- Axis
Order - The order of axes in a provider’s raw coordinates.
- Block
Kind - The kind of a document block.
- Calibration
Source - Where a
Calibration’s scale came from. - Coord
Frame - The coordinate frame a backend answers in. It is part of every answer: each backend descriptor names its frame, and the runtime maps from it to source pixels.
- Detect
Query - What to detect.
- EditOp
- One edit, with coordinates in source pixels.
- Egress
Action - What happens to an image bound for a destination, always after redaction.
- Egress
Approval - How an
askegress rule is satisfied for a call a vision tool makes. - Egress
Decision - How a release was decided.
- Egress
Record - One entry in the egress record:
vision.egress.releasedorvision.egress.refused. - Escalation
Reason - Why a region or value came from an escalation backend.
- Frame
Pixels - A frame’s pixels: ephemeral by default, stored only as evidence.
- Image
Tokens - How a provider counts an image’s input tokens.
- Letterbox
- How a backend fits the sent image into its fixed-size model input.
- Licence
Class - How freely a model’s weights may be used.
- Locality
- Where a backend’s computation happens, which decides whether an image leaves the machine.
- Loop
Outcome - How a verified action ended.
- Mask
Decoder Choice - Which decoder a
SamSegmenteruses forsam-3.1masks. - Measured
Geometry - What a region’s mask, polygon or box was measured as.
- Media
Resolution - The resolution Gemini tokenises images and video frames at:
generationConfig.mediaResolution. - Metric
- The distance an embedding space is searched by.
- Model
Source - Where a model’s files come from.
- NimOcr
Model - The OCR model a
NimDocumentReaderreads text with. - Overlay
- Something drawn over an image.
- Oversize
- What a backend does with an image larger than its limits.
- PpOcr
V6Size - A PP-OCRv6 model size.
- Price
Ref - How a priced backend is billed.
- Provenance
- How an image came to be.
- Rule
Target - What an
[[egress.rule]]matches: a host, or every host of one provider. - Runtime
Spec - The runtime that executes a model.
- Segment
Prompt - A segmentation prompt, given to the runtime in source pixels and handed to the backend in its own frame.
- Shape
- The geometry of something found in an image.
- Transform
- One step between the source image and what a backend saw.
- Trigger
- When the runtime escalates from the primary backend.
- Video
Request - What to do with a video.
- Video
Source - What a video call analyses: a clip, for a backend that reads video itself, or frames a frame source already sampled.
- Vision
Error - What went wrong in a vision operation.
- Vision
Task - What a model or backend does.
- Vision
Tool Kind - Which vision tool a
VisionToolis. - VlDevice
- Where Candle runs the models.
- Watch
Event Kind - What happened to a track under a condition.
- Zone
Anchor - Which point of a region must lie in a
Zone.
Constants§
- ANSWER_
ARTIFACT_ PREFIX - The artifact name prefix of an answer record.
- DEFAULT_
FACE_ DETECTOR - The built-in manifest of the face detector
FaceRedactor::on_deviceloads: YuNet 2023mar (MIT, OpenCV Zoo), 232 KB. - DEFAULT_
MASK_ DECODER_ TIMEOUT_ SECS - How long an external decoder may take for one answer’s masks, unless configured.
- DEFAULT_
MAX_ INLINE_ BYTES - The default ceiling for one inline image: the asset upload path is retired, so every image travels as a data URI in the request body.
- DEFAULT_
MIN_ LAYOUT_ CONFIDENCE - The default floor below which a page element is ignored: the page-element model also answers faint boxes (0.18 around a chart’s axis label in the probe) that would split a block.
- DEFAULT_
PERSON_ DETECTOR - The built-in manifest of the person detector
PersonRedactor::rf_detrandFaceRedactor::on_deviceload: RF-DETR Nano, full precision. - DEFAULT_
REQUESTS_ PER_ MINUTE - The default client-side rate: 40 requests per minute, the free-tier figure NVIDIA’s forum users report for the hosted endpoints.
- DEFAULT_
TIMEOUT - The default client timeout. NVIDIA’s gateway gives up after 120 s with a 504, so the client waits longer than that to see the gateway’s answer.
- FACE_
MARGIN - What
FaceRedactoradds on each side of a face box, as a share of the box’s longer side: YuNet boxes a face from brow to chin, and the cover takes in the hair, ears and jaw. - GRAPHIC_
ELEMENTS_ MODEL - The chart-element model, called on each chart’s crop.
- MAX_
VIDEO_ FRAMES - The most frames one
vision_videocall takes. - MEASUREMENT_
VALIDITY - The words every measurement result carries: where it holds.
- MODEL_
CONTEXT_ CLASS - The data class images bound for a remote model’s context are released as.
- NIM_
READER_ ID - The default backend id.
- PADDLEOCR_
VL_ MANIFEST - The built-in manifest id of PaddleOCR-VL-1.6.
- PAGE_
ELEMENTS_ MODEL - The page-element model.
- PERSONAL_
FIELD_ LABELS - The field labels whose values identify a person on identity documents and forms:
PersonalTextRedactor::with_labelled_fieldstakes them as the harness vision pack’s default. - PP_
DOCLAYOUT_ MANIFEST - The built-in manifest id of PP-DocLayoutV3.
- REDACTION_
MARGIN - Pixels added around each box a redactor finds, so anti-aliased edges are covered too.
- SAM_
MASK_ CODEC_ MANIFEST - The built-in manifest entry whose licence, the SAM License, covers the ported codec
(
MaskDecoderChoice::Licensed).adk-rust vision models accept sam-mask-codecrecords a person’s acceptance of it. - TABLE_
STRUCTURE_ MODEL - The table-structure model, called on each table’s crop.
- VERIFICATION_
TOOL - The governed call a failed verification is held as.
- VISION_
EGRESS_ POLICY_ REF policy_refof the vision egress policy in audit records.- VISION_
TOOL_ NAMES - The names of every vision tool: the image tools in the order
VisionToolKind::ALLlists them, thenvision_watch(featurestream, offered when the toolset has frame sources). - VISION_
WATCH_ FIRED - Action of the record a watch event writes.
- VISION_
WATCH_ REGISTERED - Action of the record a watch condition registered on a source writes.
- VISION_
WATCH_ STOPPED - Action of the record a watch condition removed from a source writes.
- VISION_
WATCH_ TOOL - The name of the watch tool.
Traits§
- Acceptance
Store - Where licence acceptances are kept.
- Describer
- Describes images in text, structured values and regions.
- Detector
- Finds objects as boxes (and masks, for segmenting detectors).
- Document
Reader - Reads document pages: layout, text, tables.
- Editor
- Edits an image: crop, redact, annotate, resize, or a generative edit. The runtime stores
the result as a new image with
Provenance::Derived. - Egress
Recorder - Where the gate writes what left the machine and what did not.
- Embedder
- Embeds images and texts into one space.
- Observer
- Takes fresh observations.
- Redactor
- Finds the regions of one
RedactionClassin an image, on the device. - Segmenter
- Segments objects into masks or polygons.
- Tracker
- Associates detections across frames. Pure CPU, no model.
- Verified
Action - An action, or a claim, the loop verifies.
- Video
Analyzer - Tracks, captions or answers questions over a video, at an explicit sampling rate and resolution.
- Vision
Input - The two kinds of image a backend can be handed:
SentImagefor on-device backends andReleasedImagefor remote ones. Sealed: no other type implements it. - Watch
Sink - Takes the events a
WatchEvaluatorpasses, such as the kernel’sVisionWakeSource(adk-kernel, featurevision), which turns each into a wake.
Functions§
- answer_
artifact_ name - The artifact name of the record for call
call_idof runinvocation_id: characters outside[A-Za-z0-9_-]become_, so any ids make one file name. The run is part of the name because a model may reuse a call id in a later turn, and each answer keeps its record. - apply_
edit - Applies
optopixels, whose transform chain from the source ischain. The operation’s coordinates are source pixels. - artifact_
uri - An artifact’s locator as a URI,
artifact://<app>/<user>/<session>/<file>#<version>, the form image parts carry in theiruri. - check_
change - Checks
expectedagainst what changed frombeforetoafter. - diff_
regions - Pairs regions of the same label across two observations by overlap.
- watch_
registered_ draft - The
vision.watch.registeredaudit record ofconditionregistered onsource.
Type Aliases§
- Result
ResultwithVisionError.