pyiqa.data.dataset_api

Module Contents

pyiqa.data.dataset_api.dataset_download_name[source]
pyiqa.data.dataset_api.extract_archive(archive_path: str, extract_path: str | None = None) bool[source]

Extract .zip, .tar, or .tgz files with a progress bar.

Parameters:
  • archive_path (str) – Path to the archive file

  • extract_path (str, optional) – Extraction destination. Defaults to current directory.

Returns:

True if extraction successful, False otherwise

Return type:

bool

pyiqa.data.dataset_api.load_dataset(name: str, data_root: str = './datasets', force_download: bool = False, dataset_opts: Dict[str, Any] | None = None, **kwargs: Any) Any[source]

Load a dataset from specified location, downloading if necessary.

Parameters:
  • name (str) – Name of the dataset to load

  • data_root (str) – Root directory for dataset storage

  • force_download (bool) – Whether to force download even if files exist

  • dataset_opts (Optional[Dict[str, Any]]) – Additional dataset options

  • **kwargs (Any) – Additional arguments passed to dataset configuration

Returns:

Dataset object

Return type:

Any