src.dataset.eth_dataset module#

class src.dataset.eth_dataset.ETHDataset(*args: Any, **kwargs: Any)[source]#

Bases: BaseDataset

ETH pedestrian dataset loader.

Handles scenes such as BIWI Hotel (ETH) and ETH Univ. The raw data usually comes in obsmat.txt or a similar observation-matrix format.

raw_fps = 25#
classmethod load_data(args: Namespace, data_path: str) ETHDataset[source]#

Load a single ETH scene.

If no cache is available, read the raw txt/csv file, load the map image and homography matrix, then apply coordinate mapping and resampling.

Parameters:
  • args (Namespace) – Global arguments.

  • data_path (str) – Data file path, usually a txt file containing positions.

Returns:

Initialized dataset instance.

Return type:

ETHDataset

classmethod load_data_batch(args: Namespace, data_path: str, show_tqdm=True) List[ETHDataset][source]#

Batch-load all ETH scenes under the given directory.

Parameters:
  • args (Namespace) – Global arguments.

  • data_path (str) – Root directory path or glob pattern.

  • show_tqdm (bool, optional) – Whether to show a progress bar.

Returns:

List of dataset instances.

Return type:

List[ETHDataset]