科研速览 · Science Skim继续刷下去 · Keep skimming →
◆ Behavior research methods2026-08-10

GridSamp: An open-source Python toolbox for grid sampling.

Maarten Leemans, Christophe Bossens, Johan Wagemans

原始摘要(英文原文)· Original abstract
Grid sampling is widely used in vision science and computer vision to study relations between local image regions and global image structure. Regions are sampled from an image by overlaying a grid with predefined rows and columns onto an image and treating the content of a cell as an image region. By manipulating the grid properties, researchers can systematically control sampling properties such as density and the spatial arrangement of local samples. Despite its frequent use, however, grid sampling is typically implemented using ad hoc, study-specific code, limiting reproducibility, comparability across studies, and accessibility for new users. To address this gap, we introduce GridSamp, an open-source Python toolbox that standardizes and streamlines the grid sampling workflow into an intuitive and flexible workflow. GridSamp supports multiple grid types with user-defined parameters and starting positions, allows manipulation of the appearance and arrangement of sampled regions (e.g., region shape, size, swapping, and shuffling), and enables extraction of image regions either with or without surrounding context, as regions of interest or as reassembled mosaic images. We demonstrate the utility of GridSamp by reproducing stimuli used in previous experimental studies, illustrating how the toolbox facilitates transparent and reproducible stimulus generation. The source code and interactive Jupyter Notebook tutorials are freely available on GitHub, and GridSamp can be downloaded as a module from the Python Package Index.
读原文 · Read the paper ↗

AI 追问PRO

登录后使用 AI 追问

讨论区

登录后参与讨论

相关论文 · Related

GridSamp: An open-source Python toolbox for grid sampling. — 科研速览 Science Skim