Everyframe · TypeScript SDK reference
ai: analysis ops
Sort-changing ML analysis (detect: Video to Detection, transcribe: Audio to Transcript) and typed post-processing on analysis streams (track, zone, diarize).
@jtdigital/renderbox-sdk on npm →aggregateTracks
DetectionStream.aggregateTracks(opts?: AggregateTracksOpts): DetectionStreamAggregate per-track attribute predictions across frames
| Param | Type | Description |
|---|---|---|
| attribute | string | Attribute to aggregate across each track. |
| method | 'majority_vote' | 'weighted_avg' | 'last_n' | Aggregation strategy applied per track. |
| window | number | Number of trailing frames considered.
Range: greater than 0
|
classifyAudioEvent
AudioStream.classifyAudioEvent(opts?: ClassifyAudioEventOpts): AudioEventStreamClassify audio events (gunshot, siren, animal call, etc.)
| Param | Type | Description |
|---|---|---|
| model | string | Audio event classification model id. |
| threshold | number | Minimum event confidence.
Range: [0, 1]
|
| window_seconds | number | Analysis window length in seconds.
Range: greater than 0
|
| hop_seconds | number | Stride between analysis windows in seconds.
Range: greater than 0
|
classifyScene
VideoStream.classifyScene(opts?: ClassifySceneOpts): SceneStreamClassify scene content
| Param | Type | Description |
|---|---|---|
| model | string | Scene classification model id. |
| threshold | number | Minimum class confidence.
Range: [0, 1]
|
| top_k | number | Number of top classes to report per frame.
Range: greater than 0
|
| batchSize | number | Frames per inference batch. |
computeAngles
PoseStream.computeAngles(opts?: ComputeAnglesOpts): PoseStreamCompute joint angles between keypoint triplets
| Param | Type | Description |
|---|---|---|
| angles | string |
count
DetectionStream.count(opts?: CountOpts): DetectionStreamCount detected objects per frame
| Param | Type | Description |
|---|---|---|
| aggregate | 'sum' | 'avg' | 'max' | 'min' | How per-frame counts are reduced over time. |
detect
VideoStream.detect(opts: DetectOpts): DetectionStreamDetect objects in video
| Param | Type | Description |
|---|---|---|
| model required | string | Detection model id (e.g. 'retinaface_mv2' for faces, permissively licensed). See `renderbox models list`. |
| threshold | number | Minimum confidence for a detection to be kept.
Range: [0, 1]
|
| classes | string | Comma-separated class names the model should report. |
| filter_classes | string | Comma-separated class names to drop from the output. |
| inputSize | string | Model input resolution override, e.g. '640x640'. |
| stride | number | Run inference every N frames; detections are interpolated between. |
| batchSize | number | Frames per inference batch. |
diarize
TranscriptStream.diarize(opts?: DiarizeOpts): TranscriptStreamSpeaker diarization on transcript
| Param | Type | Description |
|---|---|---|
| max_speakers | number | Upper bound on distinct speakers.
Range: greater than 0
|
| min_duration | number | Minimum segment length in seconds.
Range: at least 0
|
estimateDensity
VideoStream.estimateDensity(opts?: EstimateDensityOpts): DensityStreamEstimate crowd density
| Param | Type | Description |
|---|---|---|
| model | string | Crowd-density model id. |
estimateDepth
VideoStream.estimateDepth(opts?: EstimateDepthOpts): DepthStreamEstimate depth map
| Param | Type | Description |
|---|---|---|
| model | string | Monocular depth model id. |
estimatePose
VideoStream.estimatePose(opts?: EstimatePoseOpts): PoseStreamEstimate human poses
| Param | Type | Description |
|---|---|---|
| model | string | Pose estimation model id. |
| threshold | number | Minimum keypoint confidence.
Range: [0, 1]
|
| max_persons | number | Cap on the number of tracked persons per frame.
Range: greater than 0
|
filterAudioEvents
AudioEventStream.filterAudioEvents(opts?: FilterAudioEventsOpts): AudioEventStreamFilter audio events by class or confidence
| Param | Type | Description |
|---|---|---|
| include | string | |
| exclude | string | |
| min_confidence | number |
Range: [0, 1]
|
| min_duration | number |
Range: at least 0
|
filterDetections
DetectionStream.filterDetections(opts?: FilterDetectionsOpts): DetectionStreamFilter detections by class, attribute, or track_id (assigned by track())
| Param | Type | Description |
|---|---|---|
| include | string | Comma-separated class names to keep. |
| exclude | string | Comma-separated class names to drop. |
| min_confidence | number | Drop detections below this confidence.
Range: [0, 1]
|
| min_area | number | Drop detections smaller than this fraction of the frame.
Range: [0, 1]
|
| min_track_frames | number | Drop tracks shorter than this many frames.
Range: at least 0
|
| attribute | string | Keep only detections carrying this attribute. |
| attribute_value | string | Required value for `attribute`. |
| attribute_absent | string | Keep only detections missing this attribute. |
| track_id | number | Keep only this track id.
Range: at least 0
|
| exclude_track_id | number | Drop this track id.
Range: at least 0
|
filterPoses
PoseStream.filterPoses(opts?: FilterPosesOpts): PoseStreamFilter poses by score
| Param | Type | Description |
|---|---|---|
| min_score | number |
Range: [0, 1]
|
| max_persons | number |
Range: greater than 0
|
filterScenes
SceneStream.filterScenes(opts?: FilterScenesOpts): SceneStreamFilter scenes by confidence
| Param | Type | Description |
|---|---|---|
| min_confidence | number |
Range: [0, 1]
|
filterSegmentation
SegmentationStream.filterSegmentation(opts?: FilterSegmentationOpts): SegmentationStreamFilter segmentation masks
| Param | Type | Description |
|---|---|---|
| classes | string | |
| min_area | number |
Range: at least 0
|
filterText
TextStream.filterText(opts?: FilterTextOpts): TextStreamFilter text regions by confidence or pattern
| Param | Type | Description |
|---|---|---|
| min_confidence | number |
Range: [0, 1]
|
| pattern | string |
insertChapters
SceneStream.insertChapters(opts?: InsertChaptersOpts): SceneStreamInsert chapter markers from scene boundaries
| Param | Type | Description |
|---|---|---|
| min_duration | number |
Range: at least 0
|
| format | string |
recognizeText
VideoStream.recognizeText(opts?: RecognizeTextOpts): TextStreamOCR text recognition
| Param | Type | Description |
|---|---|---|
| model | string | OCR model id. |
| threshold | number | Minimum text-region confidence.
Range: [0, 1]
|
segment
VideoStream.segment(opts?: SegmentOpts): SegmentationStreamSegment image regions
| Param | Type | Description |
|---|---|---|
| model | string | Segmentation model id. |
| threshold | number | Minimum mask confidence.
Range: [0, 1]
|
| pointsPerSide | number | Grid density for automatic mask generation (SAM-style models). |
track
DetectionStream.track(opts: TrackOpts): DetectionStreamTrack detected objects across frames
| Param | Type | Description |
|---|---|---|
| algorithm required | 'bytetrack' | 'sort' | 'deepsort' | Multi-object tracking algorithm to assign stable track ids. |
| persistFrames | number |
Range: [0, 30]
|
transcribe
AudioStream.transcribe(opts?: TranscribeOpts): TranscriptStreamTranscribe audio to text
| Param | Type | Description |
|---|---|---|
| model | string | Speech-to-text model id. |
| language | string | ISO language hint (e.g. 'en', 'sl'); auto-detected when omitted. |
zone
DetectionStream.zone(opts?: ZoneOpts): DetectionStreamFilter detections by spatial zone (ROI geofencing)
| Param | Type | Description |
|---|---|---|
| polygon | string | Zone polygon as 'x1,y1 x2,y2 …' in normalized coordinates. |
| anchor | 'centroid' | 'bottom_center' | 'bbox' | Which point of the bounding box must fall inside the zone. |
| invert | boolean | Keep detections outside the zone instead. |
| attribute | string | Attribute name stamped onto matching detections. |