src.dataset.ucy_dataset module#

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

Bases: BaseDataset

UCY (University of Cyprus) pedestrian dataset loader.

Covers scenes such as Zara01, Zara02, and University Students. The raw data is typically stored in .vsp format or in a text format with spline control points.

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

Load a single UCY scene.

Parse the dataset-specific text format, including the pedestrian count and spline control points, then apply the required coordinate offsets such as x += 360 and y += 288, followed by the homography transform.

Parameters:
  • args (Namespace) – Global arguments.

  • data_path (str) – Path to the .vsp or data file.

Returns:

Initialized dataset instance.

Return type:

UCYDataset

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

Batch-load UCY datasets.

static get_homography_mat(mat_name)[source]#

Get the predefined homography matrix for the specified scene.

The UCY dataset typically requires a scene-specific H matrix to transform pixel coordinates into world coordinates.

Parameters:

mat_name (str) – Scene name, e.g. ‘students003’ or ‘crowds_zara01’.

Returns:

3x3 homography matrix.

Return type:

np.ndarray