In this setup, as shown in
Figure 3, we optimize the generator module itself to synthesize images that produce visual illusions. This generator is a DCGAN trained in two different datasets, the Airfield category of the Places 2 dataset (Experiment 2.a) and DTD dataset (Experiment 2.b) (see
Table 1 for their details). In Experiment 2.b, the generative network is composed of two fully connected layers followed by two convolutional layers. The fully connected layers have 2048 and 256 × 8 × 8 hidden nodes respectively. Both convolutional layers use 5 × 5 filter size with 128 and 1 channels, respectively. Before each convolutional layer the input is 2 × 2 upscaled. ReLu activation functions are used after each layer but the output one in which a sigmoid activation function is applied. The discriminator network is composed of three convolutional layers and two fully connected layers. The first convolutional layer uses 5 × 5 filter size and the other two use 3 × 3 filter size with 128, 256, and 512 channels, respectively. The two fully connected layers have 1,024 and 1 hidden nodes. After every layer the activation function is a Leaky ReLu (
\(\alpha = 0.2\)) except for the output layer that uses a sigmoid function. A max pooling operation is applied after each convolutional layer. This DCGAN from Experiment 2.b was modified to perform experiments in higher resolutions in Experiment 2.a (128 × 128). The generative CNN now has additional convolutional layers (with same dimensions as before) and
\(2\times 2\) upscaling layers while a convolution and max-pooling layers are added to the discriminative CNN. For the vision module in Experiment 2.a we use the deep denoising CNN proposed by
Zhang et al. (2017) for brightness and color illusions while in Experiment 2b we use RestoreNet, a shallow image restoration CNN used in (
Gomez-Villa et al., 2020), that were shown to accurate reproduce human response in several brightness illusions. We optimize the whole framework using an ADAM optimizer on the DCGAN loss modified to include the output from the chosen meter function. In the case of grayscale illusions the meter function used is the one defined in
Equation (1), while for color illusions we choose between
Equations (2),
(4), or
(5) depending on the color in which we want to perceive the differences (respectively Equation red, blue, and yellow).