Skip to main content

DetectionModel

A loaded object-detection model.

labels (property)​

open_vocabulary (property)​

video (property)​

detect​

detect(self, image: 'clika_runtime.Tensor', *, confidence: 'float' = 0.5, max_detections: 'int' = 100, prompt: 'str | Any | None' = None, text_threshold: 'float | None' = None) -> 'Any'

The boxes in an [H, W, 3] image above confidence. An open-vocabulary model takes prompt (a text, or a prompt encoded once with encode_prompt).

detect_window​

detect_window(self, frames: 'clika_runtime.Tensor', *, confidence: 'float' = 0.5, max_detections: 'int' = 100) -> 'list[Any]'

Detect over a window of frames ([F, H, W, 3]).

encode_prompt​

encode_prompt(self, prompt: 'str') -> 'Any'

Encode a text prompt once, for reuse across images.