Shortcuts

mmcv.video.sparse_flow_from_bytes

mmcv.video.sparse_flow_from_bytes(content: bytes)Tuple[numpy.ndarray, numpy.ndarray][source]

Read the optical flow in KITTI datasets from bytes.

This function is modified from RAFT load the KITTI datasets.

Parameters

content (bytes) – Optical flow bytes got from files or other streams.

Returns

Loaded optical flow with the shape (H, W, 2) and flow valid mask with the shape (H, W).

Return type

Tuple(ndarray, ndarray)