# Metallurgical Alchemy: Synthesizing Steel Microstructure Images Using DCGANs
## 3 Results  
In this section, the outcomes from our experiments with the GAN architecture are detailed, and the best results achieved with the computational capabilities of the equipment are presented. The graphs of the generator and discriminator loss during training are included, and their significance is interpreted. Both the original training values and the smoothed values using the Savitzky-Golay filter [37] are represented for greater clarity. Additionally, the smoothed probability graphs D(G(z1)) and D(G(z2)) are included. Here, z1 refers to the latent vectors used to generate synthetic images, and z2 refers to the same latent vectors used for subsequent evaluations. D(G(z1)) is the discriminator's probability that the images generated from z1 are real, evaluated before the generator is updated, while (G(z2)) is the probability that the images generated from z2 are real, evaluated after the generator update. These graphs provide qualitative insights into the discriminator's ability to distinguish real images from generated ones throughout the training process. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Experiment** & **Material** & **Epochs** & **Learning Rate** & **Filters** & **Batch Size** \\ \hline
1 & Annealed steel & 350 & 0.0002 & 16 & 4 \\
2 & Annealed steel & 300 & 0.0002 & 16 & 8 \\
3 & Quenched steel & 300 & 0.0002 & 16 & 8 \\ \hline \end{tabular}
\end{table} 
Table 4: Details of the experiments with relevant results. Common hyperparameters: Image Size = 512, Channels = 3, Latent Vector Size = 100, \(\beta\)1 = 0.5, \(\beta\)2 = 0.999, Filter Size = 4, Scale Parameter = 0.2, GPU = 1, Data Loader Workers = 2. Following this, the impact of various hyperparameters on the quality of the generated images is discussed, with more detailed information provided in the Discussion section. The generated images are shown compared with the real images to illustrate the effectiveness of the training process. In our first experiment with annealed steel images, the GAN was trained for 350 epochs using a filter size of 16 and a batch size of 4. The training progress of the generator and discriminator losses are shown in Figure 4. Figure 4a presents the original data, while Figure 4b shows the smoothed data using the Savitzky-Golay filter. The final smoothed loss values were 2.3425 for the generator and 0.7181 for the discriminator. These results indicate that while the generator's loss was consistently higher than the discriminator's loss throughout the training process, both networks were actively learning. In Figure 5, the probability metrics D(G(z1)) and D(G(z2)) are depicted. D(G(z1)) is shown in red, while D(G(z2)) is shown in blue. Throughout the data log, D(G(z1)) remained consistently higher than D(G(z2)), with final values of 0.1323 and 0.0863, respectively. This suggests that the discriminator found it easier to identify images generated from z2 as synthetic compared to those from z1. Figure 4: Generator and discriminator loss during training for pearlite and ferrite image generation over 350 epochs with 16 filters and a batch size of 4. (**a**) Original; (**b**) Smoothed. In the second experiment, the GAN was trained with annealed steel images for 300 epochs, using a filter size of 16 and a batch size of 8. The training progress is shown in Figure 6. Figure 6a presents the original training data, while Figure 6b shows the smoothed data. The final smoothed loss values were 2.3041 for the generator and 0.7123 for the discriminator. Similar to Experiment 1, the generator's loss remained higher than the discriminator's loss throughout the training process, indicating active learning in both networks. However, a different batch size of 8 was used in this experiment, compared to 4 in Experiment 1. Figure 7 displays the probability metrics D(G(z1)) and D(G(z2)). In this plot, D(G(z1)) is represented in red and D(G(z2)) in blue. As in Experiment 1, D(G(z1)) was consistently higher than D(G(z2)), with final values of 0.1223 and 0.0863, respectively.