How can I access the natural images used in the Brain Observatory?

Each of the experiments contains the images (or info necessary to reconstruct them).

This Jupyter notebook demonstrates how to use the allensdk Python package to get or reconstruct each image:
http://alleninstitute.github.io/AllenSDK/_static/examples/nb/brain_observatory_stimuli.html

Note that these images are warped when displaying them on the monitor so that each image pixel is occupies the same angle of the visual field no matter whether it is in the center of the screen (which is close to the mouse’s eye) or the edge (which is far).

A demonstration of how this warping affects the images can be seen here:
http://alleninstitute.github.io/AllenSDK/_static/examples/nb/brain_observatory_monitor.html

I received a related question to this at Cosyne. Is it possible to download or view the stimuli set without going through an experiment file where that stimulus was used?

Currently stimulus templates are only accessible via NWB files.

For reference, you can access them as follows (example: allensdk 0.16.0, natural_movie_one stimulus template):

from allensdk.core.brain_observatory_cache import BrainObservatoryCache
boc = BrainObservatoryCache(manifest_file='/path/to/manifest.json')
exps = boc.get_ophys_experiments(stimuli=['natural_movie_one'])
ds = boc.get_ophys_experiment_data(exps[0]['id'])
template = ds.get_stimulus_template('natural_movie_one')
1 Like

The stimulus image and movie can be accessed on AWS
https://console.aws.amazon.com/s3/buckets/allen-brain-observatory?region=us-west-2&prefix=visual-coding-neuropixels/ecephys-cache/natural_scene_templates/&showversions=false

You can also preview the natural image tiff on
http://observatory.brain-map.org/visualcoding/stimulus/natural_scenes