Skip to main content

Crate adk_vision

Crate adk_vision 

Source
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

FeatureContents
(always)media, geometry, manifests, the traits, VisionRuntime, the egress gate, the deterministic Editor, watch conditions (WatchEvaluator), calibration and measurement (Calibration), the verifier loop (VerifierLoop)
fetchModelFetcher: Hugging Face downloads by revision, SHA-256 checked before load, HF_HUB_OFFLINE honoured
conformanceconformance: the suite every backend runs, and its test macros
evaleval: any runtime task as an adk-eval agent, in process or behind cargo adk eval --agent-cmd
guardrailImagePrivacyGuardrail on model calls, tool results and user input, and PersonalTextRedactor (OCR words matched by adk-guardrail’s PII patterns)
onnxonnx: RF-DETR, EfficientSAM, SAM 2.1 and SigLIP 2 on ONNX Runtime, the runtime downloaded at build time
onnx-dynamicThe same backends against an onnxruntime library loaded from ORT_DYLIB_PATH
onnx-coreml, onnx-cudaThe CoreML and CUDA execution providers for the onnx backends
sam3-localSAM 3 on ONNX Runtime from weights you supply under Meta’s SAM License, after you accept it
cloudLlmDescriber 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
nimNVIDIA NIM: vision-language models over the OpenAI-compatible client, and NimDocumentReader for NVIDIA’s OCR, page, table and chart endpoints, remote (implies cloud)
samThe Meta sam-3.1 client: SamSegmenter, its stream parser and mask placement; SamVideoTracker, masks with stable object identifiers over a clip
sam-codecLicensedMaskDecoder: 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)
ocrPpOcrReader: PP-OCRv6 text lines and words through oar-ocr on ONNX Runtime
ocr-vlPaddleOcrVlReader: PaddleOCR-VL-1.6 with PP-DocLayoutV3 through oar-ocr-vl on Candle
ocr-vl-metalocr-vl on Apple GPUs
mistralrsmistralrs: 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-cudamistralrs on Apple GPUs or CUDA
streamstream: 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-cameraThe frame sources: RtspSource, FileSource (and H.264/H.265 through a user-installed ffmpeg), ScreenSource, BrowserSource, SurfaceCameraSource
deviceDeviceSource: a camera on this machine through a user-installed ffmpeg (AVFoundation, v4l2, DirectShow), and DeviceSource::list (implies ffmpeg)
computer-useGroundedTarget::target_evidence as adk-computer-use TargetEvidence; with screen, stream::RuntimeObserver and stream::screen_source, any ComputerUseRuntime as a screen frame source
stream-fixturesstream::fixtures: the generated conveyor clip and an in-process RTSP test server
trackByteTracker: ByteTrack through trackforge, anonymous tracks with stable identifiers across frames
gemini-videoGeminiVideoAnalyzer: Gemini native video, through the File API above 20 MB, at an explicit frame rate and media resolution (implies cloud)
memorymemory: 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
analystanalyst: 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)
teamteam: 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 any adk-rag VectorStore, found again by text or by an example image, captioned in adk-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), features onnx and onnx-dynamic.
sam
The Meta sam-3.1 client (spec 3.7 §7.7), feature sam.
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 refusing want_regions with Unsupported. Arguments as detector_conformance_tests!.
detector_conformance_tests
Generates the conformance cases for a Detector.
document_reader_conformance_tests
Generates the conformance cases for a DocumentReader. Arguments as detector_conformance_tests!.
editor_conformance_tests
Generates the conformance cases for an Editor, with a case for provenance. Arguments as detector_conformance_tests!.
embedder_conformance_tests
Generates the conformance cases for an Embedder, with a case for the space’s dimensions. Arguments as detector_conformance_tests!.
segmenter_conformance_tests
Generates the conformance cases for a Segmenter. Arguments as detector_conformance_tests!.
tracker_conformance_tests
Generates the conformance cases for a Tracker. make is 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§

ArtifactLocator
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; x1 and y1 exclusive.
BackendDescriptor
What a backend is, where it runs, the frame it answers in, what it costs and what it takes.
BackendId
A backend’s stable identifier, such as rf-detr-m or sam-3.1.
Block
A block of a document page with its region, text, words and, for tables, cells.
ByteTrackConfig
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.
ByteTracker
ByteTrack (Zhang et al., 2022) through trackforge 0.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 for max_missed frames 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.
CallOptions
Per-call options.
CallRecord
One backend call, for the vision.call audit record: backend, locality, image digests, units, cost, region count and duration.
ClipReleaseRequest
One request to release a clip to a remote backend.
DataClass
The kind of data an image is, which egress rules are written per: document_crop, photo, screen.
DecodeLimits
Caps checked before an image is decoded.
DecodedImage
Decoded RGBA8 pixels, row-major, EXIF orientation already applied.
DescribeRequest
What to ask a describer.
DescribeSpec
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.
DeterministicEditor
Crops, resizes, redacts, blurs, pixelates and annotates on the image crate, in process. Refuses generative edits.
Digest
A SHA-256 digest in the form sha256:<64 lowercase hex digits>.
DocumentPage
One page read: blocks with regions, the reading order, and optionally Markdown.
Edited
An edited image, stored with Provenance::Derived.
EgressConfig
The [egress] table: the default action, the redaction classes every release passes through, and the rules per host or provider and data class.
EgressEvidence
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.
EgressGate
The only code that releases an image to a remote backend.
EgressPreview
The minimised, redacted image the gate would release, before the rule decides.
EgressReceipt
What left the machine: written before the request is sent (V-I3).
EgressRefusal
Why an image was not released.
EgressRuleConfig
One [[egress.rule]]: the action for a host or a provider and, optionally, some data classes.
EmbeddingSpace
The space an embedder’s vectors live in. An index belongs to one space.
EscalatedFrom
The primary backend’s answer an escalation replaced.
Escalation
Where a route escalates, on which triggers, and how much margin a crop keeps.
ExpectedChange
What an action should change: regions that appear, regions that disappear; everything else stays.
FaceRedactor
Covers faces: each face a face Detector finds, widened by FACE_MARGIN, and — with a person fallback — the whole box of each person it finds no face for (spec 3.7 Q3).
FetchConfig
Where and how the fetcher reads and downloads.
FiducialSpec
The physical size of a calibration fiducial: a printed square or rectangle.
FileAcceptanceStore
Acceptances in a JSON file, by default .adk/vision/licences.json in the project.
Frame
One frame of a stream. Pixels stay in memory unless the frame becomes evidence.
FrameMeta
A stream frame’s identity and timing, without its pixels.
FrameRef
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.
FrameSourceId
The identifier of a frame source: a camera, a file, a screen or a browser.
GateOutcome
What gating one content changed.
GreedyIouTracker
Associates each detection with the live track of the same label it overlaps most, at min_iou or better, highest score first; unmatched detections start new tracks, and a track unseen for more than max_missed frames ends. Identifiers are anonymous counters that restart on reset.
ImagePrivacyGuardrail
Runs the egress gate on every image the framework sends to a remote model.
ImageRef
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.
ImageRegion
A region a describer found, with the index of the request image it belongs to.
InMemoryAcceptanceStore
Acceptances in memory.
InMemoryEgressRecorder
An EgressRecorder that keeps entries in memory, for tests and for proving that a run sent nothing off the machine.
InputLimits
The largest image a backend takes.
InputSpec
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.
LetterboxGeometry
The resize and padding that put a sent image into a model input.
LicenceAcceptance
A person’s recorded acceptance of a use-restricted model’s licence.
LicenceGate
Decides whether a model may be fetched or loaded under its licence.
LicenceInfo
A model’s licence.
LicencePolicy
The non-commercial and copyleft models a user’s configuration allows, by id.
ManifestSet
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: counts alternates runs of unset and set pixels, starting with unset, scanning each column top to bottom, columns left to right. The runs always sum to width × height.
Measurement
A region measured in the calibrated plane.
MediaScope
The app, user and session an image is stored under.
MediaStore
Images kept as versioned artifacts, named by digest.
ModelFetcher
Fetches a model’s files by revision and verifies them.
ModelFile
One file of a model, pinned by SHA-256 and size.
ModelManifest
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.
NimCvConfig
Where NVIDIA’s CV endpoints are and how the client calls them.
NimDocumentReader
A DocumentReader over 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.
PaddleOcrVlReader
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.
PersonRedactor
Redacts faces as the whole box of every detected person.
PersonalTextRedactor
Finds personal text: words an on-device DocumentReader reads that adk_guardrail::PiiRedactor’s patterns match, and the values of labelled fields.
Point2
A point in pixels.
Polygon
A closed polygon, vertices in order.
PpOcrReader
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.
ReadOptions
Options for reading a document page.
RedactionClass
A class of content the gate redacts before release: faces, personal_text, schema_personal_fields, or marked for regions the caller names.
Region
Something found in one image, always in that image’s pixels.
RegionDiff
What changed between two observations.
RegionExpectation
A region the action expects to appear or disappear: a label, and optionally where.
RegionNormalizer
Turns a backend’s answers into regions of the source image.
RegionOrigin
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.
RegionSet
The wire form of an image’s regions: the image’s digest and dimensions, and its regions.
ReleaseRequest
One request to release an image to a remote backend.
ReleasedClip
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 EgressGate constructs one:
ReleasedImage
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.
ScreenSpace
Logical screen points for actuation, from source pixels of a screenshot.
SentImage
The image an on-device backend sees: pixels, the source image’s digest, and the transform chain from the source to these pixels.
SourceImage
A source image on the device: its pixels and the digest of the bytes they came from.
StagedEgress
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.
TableCell
A table cell.
TokenEstimate
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).
TrackedObservation
One frame’s tracked regions, as the stream pipeline hands them to a WatchEvaluator.
TransformChain
The transforms from a source image of source_width × source_height to the image a backend saw, in order.
VerificationHold
A verification that failed twice, for a person.
VerificationReport
The outcome of one check.
VerifiedFile
One model file whose size and SHA-256 matched its manifest when it was checked.
VerifiedModel
A model whose every file matched its manifest, under a licence the gate allowed.
VerifierLoop
Observe, act, re-observe, check; re-ground once; then hold (spec 3.7 §7.14).
VideoAnalysis
What a video analysis found.
VideoEvent
A time range a video analysis names: an event an Ask found, or a chunk a Caption described.
VideoFrame
The regions found on one frame of a video, each with the track it belongs to.
VideoInput
What a video backend is handed: sampled frames, a clip, or both, as the backend may see them — SentImages and a SentClip on the device, ReleasedImages and a ReleasedClip off it. Only the runtime constructs one.
VideoPlan
What a video call will send, known before anything is prepared or released: for a backend’s frame count and cost estimate.
VideoRef
A video kept as an artifact.
VideoUsage
What one analysis used: frames, tokens and cost, so each path reports its own (S13).
VisionConfig
The contents of .adk/vision.toml.
VisionCx
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.
VisionOutput
A runtime result and the backend calls that produced it.
VisionRuntime
Routes vision calls to backends, prepares and releases their images, meters them, maps their answers to source pixels and escalates.
VisionRuntimeBuilder
Builds a VisionRuntime.
VisionTool
One vision tool; VisionToolset::tools makes them.
VisionToolset
The governed vision tools over a VisionRuntime.
VisionToolsetBuilder
Builds a VisionToolset.
WatchCondition
What a stream watches for, evaluated on the device so the kernel sees only the events that pass (spec 3.7 §7.10).
WatchEvaluator
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.
WatchEvent
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 WatchCondition is limited to: a polygon in source pixels and the point of each region that must lie inside it.

Enums§

AxisOrder
The order of axes in a provider’s raw coordinates.
BlockKind
The kind of a document block.
CalibrationSource
Where a Calibration’s scale came from.
CoordFrame
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.
DetectQuery
What to detect.
EditOp
One edit, with coordinates in source pixels.
EgressAction
What happens to an image bound for a destination, always after redaction.
EgressApproval
How an ask egress rule is satisfied for a call a vision tool makes.
EgressDecision
How a release was decided.
EgressRecord
One entry in the egress record: vision.egress.released or vision.egress.refused.
EscalationReason
Why a region or value came from an escalation backend.
FramePixels
A frame’s pixels: ephemeral by default, stored only as evidence.
ImageTokens
How a provider counts an image’s input tokens.
Letterbox
How a backend fits the sent image into its fixed-size model input.
LicenceClass
How freely a model’s weights may be used.
Locality
Where a backend’s computation happens, which decides whether an image leaves the machine.
LoopOutcome
How a verified action ended.
MaskDecoderChoice
Which decoder a SamSegmenter uses for sam-3.1 masks.
MeasuredGeometry
What a region’s mask, polygon or box was measured as.
MediaResolution
The resolution Gemini tokenises images and video frames at: generationConfig.mediaResolution.
Metric
The distance an embedding space is searched by.
ModelSource
Where a model’s files come from.
NimOcrModel
The OCR model a NimDocumentReader reads text with.
Overlay
Something drawn over an image.
Oversize
What a backend does with an image larger than its limits.
PpOcrV6Size
A PP-OCRv6 model size.
PriceRef
How a priced backend is billed.
Provenance
How an image came to be.
RuleTarget
What an [[egress.rule]] matches: a host, or every host of one provider.
RuntimeSpec
The runtime that executes a model.
SegmentPrompt
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.
VideoRequest
What to do with a video.
VideoSource
What a video call analyses: a clip, for a backend that reads video itself, or frames a frame source already sampled.
VisionError
What went wrong in a vision operation.
VisionTask
What a model or backend does.
VisionToolKind
Which vision tool a VisionTool is.
VlDevice
Where Candle runs the models.
WatchEventKind
What happened to a track under a condition.
ZoneAnchor
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_device loads: 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_detr and FaceRedactor::on_device load: 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 FaceRedactor adds 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_video call 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_fields takes 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-codec records 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_ref of the vision egress policy in audit records.
VISION_TOOL_NAMES
The names of every vision tool: the image tools in the order VisionToolKind::ALL lists them, then vision_watch (feature stream, 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§

AcceptanceStore
Where licence acceptances are kept.
Describer
Describes images in text, structured values and regions.
Detector
Finds objects as boxes (and masks, for segmenting detectors).
DocumentReader
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.
EgressRecorder
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 RedactionClass in an image, on the device.
Segmenter
Segments objects into masks or polygons.
Tracker
Associates detections across frames. Pure CPU, no model.
VerifiedAction
An action, or a claim, the loop verifies.
VideoAnalyzer
Tracks, captions or answers questions over a video, at an explicit sampling rate and resolution.
VisionInput
The two kinds of image a backend can be handed: SentImage for on-device backends and ReleasedImage for remote ones. Sealed: no other type implements it.
WatchSink
Takes the events a WatchEvaluator passes, such as the kernel’s VisionWakeSource (adk-kernel, feature vision), which turns each into a wake.

Functions§

answer_artifact_name
The artifact name of the record for call call_id of run invocation_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 op to pixels, whose transform chain from the source is chain. 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 their uri.
check_change
Checks expected against what changed from before to after.
diff_regions
Pairs regions of the same label across two observations by overlap.
watch_registered_draft
The vision.watch.registered audit record of condition registered on source.

Type Aliases§

Result
Result with VisionError.