Dataset over a directory tree of the form root_dir/<class_name>/<clip_name>/<sequentially-named-frame-image>, decoding each clip's frames (via ImageDecoder) into one (T, C, H, W) Tensor per sample.
More...
#include <video_frame_directory_dataset.hpp>
Dataset over a directory tree of the form root_dir/<class_name>/<clip_name>/<sequentially-named-frame-image>, decoding each clip's frames (via ImageDecoder) into one (T, C, H, W) Tensor per sample.
- Note
- Reduced-scope stub (campaign_exai_dl_library_data_pipeline, Phase 5, Decision Point 3, operator-directed): no real video container/codec decode – frames must already be extracted into per-clip directories. Real container/codec decode (FFmpeg or otherwise) is a named, tracked follow-up, not implemented here.
◆ VideoFrameDirectoryDataset()
| pulsatrix::VideoFrameDirectoryDataset::VideoFrameDirectoryDataset |
( |
const std::string & |
root_dir, |
|
|
DeviceBackend * |
backend |
|
) |
| |
- Parameters
-
| root_dir | Directory containing one subdirectory per class, each containing one subdirectory per clip, each containing that clip's frame image files. |
| backend | Backend to allocate decoded frame Tensors through. Not owned. |
- Exceptions
-
| std::runtime_error | if root_dir doesn't exist/isn't a directory, contains no class subdirectories, or any clip directory contains no frame files. |
◆ classes()
| const std::vector< std::string > & pulsatrix::VideoFrameDirectoryDataset::classes |
( |
| ) |
const |
|
inline |
Sorted class names; classes()[i] is the human-readable name for label i.
◆ get()
| Sample pulsatrix::VideoFrameDirectoryDataset::get |
( |
int64_t |
index | ) |
const |
|
overridevirtual |
- Exceptions
-
| std::out_of_range | if index is out of bounds. |
- Returns
- {frames (T,C,H,W), label (1,) float, the class's sorted-order index}.
Implements pulsatrix::Dataset.
◆ size()
| int64_t pulsatrix::VideoFrameDirectoryDataset::size |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following file: