Status: Needs Review
This page has not been reviewed for accuracy and completeness. Content may be outdated or contain errors.
Output Nodes¶
Output nodes persist detections, tracks, features, and rendered video artifacts.
Tracking And Detection Writers¶
CocoTrackMaskWriter
¶
CocoTrackMaskWriter(
output_json_path,
default_category_name="object",
write_empty_frames=True,
atomic_write=True,
flush_interval=0,
**kwargs,
)
Bases: _BaseCocoTrackWriter
Write mask tracking outputs into video_coco JSON.
Source code in cuvis_ai/node/json_file.py
forward
¶
forward(
frame_id,
mask,
object_ids,
detection_scores,
category_ids=None,
category_semantics=None,
context=None,
**_,
)
Store one frame of tracked masks and metadata for later JSON export.
Source code in cuvis_ai/node/json_file.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
CocoTrackBBoxWriter
¶
CocoTrackBBoxWriter(
output_json_path,
category_id_to_name=None,
write_empty_frames=True,
atomic_write=True,
flush_interval=0,
**kwargs,
)
Bases: _BaseCocoTrackWriter
Write tracked bbox outputs into COCO tracking JSON.
Source code in cuvis_ai/node/json_file.py
forward
¶
Store one frame of tracked bounding boxes for later export.
Source code in cuvis_ai/node/json_file.py
DetectionCocoJsonNode
¶
DetectionCocoJsonNode(
output_json_path,
category_id_to_name=None,
write_empty_frames=True,
atomic_write=True,
flush_interval=0,
**kwargs,
)
Bases: _BaseJsonWriterNode
Write frame-wise detections into COCO detection JSON.
Source code in cuvis_ai/node/json_file.py
forward
¶
Store one frame of detections for COCO JSON serialization.
Source code in cuvis_ai/node/json_file.py
NumPy Feature Writers¶
numpy_writer
¶
Per-frame numpy feature writer node.
NumpyFeatureWriterNode
¶
Bases: Node
Save per-frame feature tensors to .npy files.
Writes one .npy file per frame, named
{prefix}_{frame_id:06d}.npy. Useful for offline analysis,
clustering, or evaluation of ReID embeddings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_dir
|
str
|
Directory to write |
required |
prefix
|
str
|
Filename prefix (default |
'features'
|
Source code in cuvis_ai/node/numpy_writer.py
forward
¶
Write features to a .npy file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
features
|
Tensor
|
|
required |
frame_id
|
Tensor
|
|
required |
Returns:
| Type | Description |
|---|---|
dict
|
Empty dict (sink node). |
Source code in cuvis_ai/node/numpy_writer.py
Video Outputs¶
video
¶
Video utilities: frame iteration, datasets, Lightning DataModule, and export nodes.
ToVideoNode
¶
ToVideoNode(
output_video_path,
frame_rate=10.0,
frame_rotation=None,
codec="mp4v",
overlay_title=None,
**kwargs,
)
Bases: Node
Write incoming RGB frames directly to a video file.
This node opens a single OpenCV VideoWriter and appends frames on each
forward call. It is intended for streaming pipelines where frames arrive
incrementally.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_video_path
|
str
|
Output path for the generated video file (for example |
required |
frame_rate
|
float
|
Video frame rate in frames per second. Must be positive. Default is |
10.0
|
frame_rotation
|
int | None
|
Optional frame rotation in degrees. Supported values are |
None
|
codec
|
str
|
FourCC codec string (length 4). Default is |
'mp4v'
|
overlay_title
|
str | None
|
Optional static title rendered at the top center with its own slim
darkened background block. Default is |
None
|
Source code in cuvis_ai/node/video.py
forward
¶
Append incoming RGB frames to the configured video file.
Source code in cuvis_ai/node/video.py
VideoFrameNode
¶
Bases: Node
Passthrough source node that receives RGB frames from the batch.
forward
¶
Pass through RGB frames and optional frame IDs from the batch.