Datasets

The datasets module provides two kinds of helper functions that can be used to load datasets from the bionic vision community:

Note

You will need Pandas (pip install pandas) to load the data. Some datasets also require HDF5 (pip install h5py).

Local data directory

By default, all datasets are downloaded to a directory called ‘pulse2percept_data’ located in the user home directory. This directory is used as a cache so that large datasets don’t have to be downloaded repeatedly.

Alternatively, the directory can be set by a PULSE2PERCEPT_DATA environment variable, or passed directly to the fetcher.

You can retrieve the current data directory as follows:

import pulse2percept as p2p
p2p.datasets.get_data_dir()

You can delete the folder and all its contents as follows:

import pulse2percept as p2p
p2p.datasets.clear_data_dir()

Note

Make sure you have write access to the specified data directory.