*4.2. Preprocessing*

Before implementing the 3D-IWGAN, we need to prepare the image data to be fixed with the requirement of GAN input. The first step of preprocessing is binary image conversion. In this step, the raw CT images of the microstructure are converted into binary images with the dimension of 1130 × 1130 pixels. This binary conversion is based on Otsu's thresholding method.

In the second step, the image is cropped into a square with the dimension of 800 × 800 pixels, which is the maximum square size inside the circle of the converted binary image. The squared image is then resized into a smaller size of 300 × 300 pixels to fit the system requirement. This is the third step, known as image downsizing. The illustration of binary conversion, image cropping, and downsizing is shown in Figure 4.

**Figure 4.** Binary conversion and image cropping. Input data are converted to binary versions, then converted and resized to fit the requirement of system.

The fourth step of preprocessing consists of volumetric image construction. In this step, a 3D microstructure image is created by stacking the binary images. The stack consists of 800 images of the permeable pavement microstructure and the size of each image is 800 × 800 pixels. The volumetric image of this generated microstructure is shown in Figure 5.

**Figure 5.** Volumetric image of permeable pavement sample. This consists of 800 images each of 800 × 800 pixel size.

Image resampling is the fifth step of preprocessing. Since we only have one training image per sample for the generator network, we need to create appropriate images for the training process by extracting sub-volumes from the voxelized binary images. For this experiment, we made approximately 24,389 images of 20<sup>2</sup> voxels from a single sample image of 300<sup>3</sup> voxels, illustrated in Figure 6. These generated images were used as the training images in the generator network.

**Figure 6.** Volumetric image resampling. Overall, 24,389 images of 20<sup>2</sup> voxels are taken from a single 300<sup>3</sup> voxel image.

### *4.3. 3D Model Generation*

In this subsection, we shall present details of the 3D model generation including the 3D-IWGAN process and enhanced gradient penalty.
