zea.data.convert.utils¶
Functions
|
Load a .avi file and return a numpy array of frames. |
|
Checks if data folder exist in src. |
- zea.data.convert.utils.load_avi(file_path, mode='L')[source]¶
Load a .avi file and return a numpy array of frames.
- Parameters:
filename (str) – The path to the video file.
mode (str, optional) – Color mode: “L” (grayscale) or “RGB”. Defaults to “L”.
- Returns:
Array of frames (num_frames, H, W) or (num_frames, H, W, C)
- Return type:
numpy.ndarray
- zea.data.convert.utils.unzip(src, dataset)[source]¶
Checks if data folder exist in src. Otherwise, unzip dataset.zip in src.
- Parameters:
src (str | Path) – The source directory containing the zip file or unzipped folder.
dataset (str) – The name of the dataset to unzip. Options are “picmus”, “camus”, “echonet”, “echonetlvh”.
- Returns:
The path to the unzipped dataset directory.
- Return type:
Path