SceneSemanticsTool interface

Zero-shot scene classification tool configuration (CLIP). Each label is embedded through the CLIP text encoder at instance creation (wrapped in "a photo of {label}"); every sampled frame is classified against the set by cosine similarity.

Signature:

export interface SceneSemanticsTool

Properties

Property Type Description

aggregation?

AggregationStrategy

(Optional)

bucketSecs?

number

(Optional)

gate?

Gate

(Optional) Only run this tool while the gate holds (see Gate).

id?

string

(Optional) Instance id (G3): names this instance so gates can reference it and the same tool may appear more than once. Default: the tool name. Must be unique across localAnalysis.

inferEveryMs?

number

(Optional) Minimum media-time between inferences in ms (framerate-invariant). Default 1000. Explicit 0 = every frame.

labels

string[]

The label set, e.g. ["a football pitch", "a tv studio", "an advert"]

model?

"clip-vit-b32"

(Optional) Today’s model, named for forward compatibility.

sampleN?

number

(Optional)

tool

"scene_semantics"

windowSecs

number