pulse2percept.stimuli.samples.big_buck_bunny

pulse2percept.stimuli.samples.big_buck_bunny(resize=None, electrodes=None, metadata=None, as_gray=False)[source]

Big Buck Bunny video clip

Load a 115-frame, 24 fps excerpt of Big Buck Bunny (359x640 RGB).

The clip is © 2008 Blender Foundation and licensed CC BY 3.0; attribution is included in metadata. It has no intrinsic field of view.

Note

At full resolution the stimulus contains 689,280 electrodes. Use resize and/or as_gray before passing it to most models.

Added in version 0.11.0.

Parameters:
  • resize ((height, width) or None, optional) – A tuple specifying the desired height and the width of each video frame.

  • electrodes (int, string or list thereof; optional) –

    Optionally, you can provide your own electrode names. If none are given, each pixel is named after its place in the frame: a letter for the row, a number for the column, and a suffix for the color channel (e.g. ‘A1’, ‘C12’, ‘A1_R’).

    Note

    The number of electrode names provided must match the number of pixels in the (resized) frame.

  • metadata (dict, optional) – Additional stimulus metadata can be stored in a dictionary. Keys given here override the attribution defaults above.

  • as_gray (bool, optional) – Flag whether to convert the video to grayscale.

Returns:

stim

Return type:

VideoStimulus

Examples

>>> from pulse2percept.stimuli import samples
>>> video = samples.big_buck_bunny(resize=(60, 80))
>>> video.vid_shape
(60, 80, 3, 115)