Pyllusion is a Python Toolbox that utilizes a parametric framework to generate visual illusions.

The parametric approach implemented in this software proposes to describe illusions using a set of parameters, such as for instance the difference in the target features, and the strength of the contextual information in biasing the perception of the illusion (i.e., illusion strength). These two parameters can be modulated independently in Pyllusion to investigate the precision and threshold at which certain populations become susceptible to the illusion. The aim of Pyllusion is to foster reproducible science, allowing neuroscientists to easily report, generate and manipulate similar stimuli regardless of the display format and software. There is comprehensive documentation regarding the functionalities of Pyllusion and code examples of how illusions can be generated in the form of images and psychopy stimuli.


Pyllusion was presented at the 43rd European Conference on Visual Perception (ECVP), held from 22 to 27 August 2021. A video walkthrough of the poster is available via this Youtube link.


Makowski, D., Lau, Z. J., Pham, T., Boyce, P., S H Chen, A. (in preparation). Pyllusion: A Parametric Framework to Generate Visual Illusions using Python.