pyavs.load_scenes¶
- pyavs.load_scenes(scene_ids: str | List[int] = 'all', data_path: str | None = None, download: bool = True) Dict[int, str][source]¶
Load scene image paths, fetching from COCO on demand if not shipped locally.
- Parameters:
scene_ids (str or list of int, optional) – Scene IDs to load. If ‘all’, loads every AVS scene: from the shipped
stimuli/images/directory if present, else — ifdownload— by fetching all 4,080 from COCO (slow; a one-time cost, since each fetch is cached). (default: ‘all’)data_path (str, optional) – Path to the
avs-publicroot. If None, uses configured data pathdownload (bool, optional) – Fetch images missing locally from COCO’s own hosting and cache them under the layout’s
derivatives_root(default: True). If False, only already-shipped/cached images are returned.
- Returns:
Dictionary mapping COCO image IDs to image file paths.
- Return type:
Notes
The release does not ship per-image scene JPEGs (COCO/Flickr photos carry no redistribution license). Images are reconstructed on first use from
coco_urlinstimuli/avs_scenes_all_licenses.parquetand the same center-crop + resize used to build the original{coco_id:012d}_MEG_size.jpgstimuli, then cached locally so repeat calls skip the network.