# Metallurgical Alchemy: Synthesizing Steel Microstructure Images Using DCGANs
## 3 Results
This indicates that the discriminator found it easier to identify images generated from z2 as synthetic compared to those from z1. The persistent challenge for the generator in producing indistinguishable images from the discriminator's perspective is highlighted here as well. Figure 8a compares a real image with images generated from Experiment 1, Figure 8b, and Experiment 2, Figure 8c. While the probability metrics indicated learning in both experiments, the visual comparison reveals that the quality of the generated images varies and may require more epochs for significant improvement. An additional experiment was conducted to generate images with the microconstituent martensite, originally produced in quenched samples together with the Widmanstatten structure. Figure 9 shows the evolution of the loss during training for both the generator and discriminator networks, with the original data and the smoothed data. The final smoothed loss values were 2.3790 for the generator and 0.8581 for the discriminator. These results suggest a balanced adversarial game, as the trends in the losses of the generator and discriminator were close to each other, indicating that both networks were improving concurrently and maintaining stable training dynamics. Figure 10 displays the smoothed probability metrics D(G(z1)) and D(G(z2)), which followed a similar trend to previous experiments, with final values of 0.1694 and 0.1030, respectively. Figure 11 presents a comparison between real and synthetic images. Despite the reduction in epochs, the generated images still demonstrated a high level of detail. While some blurry areas are present, the lamellar regions of pearlite and clear areas of ferrite are distinguishable, showing an acceptable level of detail for consideration as a microstructure resulting from the quenching process of low-carbon steel. Figure 5: Probability metrics for Experiment 1:D(G(z1)) and D(G(z2)). Figure 6: Loss during training for pearlite and ferrite image generation over 300 epochs with 16 filters and mini-batch size of 8. (**a**) Original; (**b**) Smoothed. Figure 7: Probability metrics D(G(z1)) and D(G(z2)) for Experiment 2. Figure 8: Comparison of real and generated images of C45E steel from Experiments 1 and 2. (**a**) Real image and (**b,c**) synthetic images of Experiments 1 and 2, respectively. Figure 9: Training progress of generator and discriminator losses for Experiment 3. (**a**) Original; (**b**) Smoothed. To contrast the previous results, other commonly used metrics in image generation were employed. The metrics used for evaluation were calculated using a script that measures inception score, Frechet inception distance (FID), and kernel inception distance (KID). The script utilizes a pre-trained Inception v3 model to extract features from real and generated images, then computes these metrics to assess the quality and diversity of the generated images. The results of these metrics are shown in Table 5 and are analyzed in detail in the Discussion section. Additional images are provided in the Appendix A to enhance the understanding and perception of the results. Figures 11-13 show the synthetic images produced in Experiments 1, 2, and 3, respectively, involving annealed steel in the  
images. Initially, we started with 128 filters and 300 epochs, but this configuration resulted in out-of-memory errors. We observed that decreasing the batch size significantly improved the results. Furthermore, increasing the number of epochs up to the memory limit also enhanced image quality. Higher batch sizes, starting from sixteen, deteriorated the quality of the generated images, whereas a batch size of eight significantly enhanced image quality, leading us to conclude that lower batch sizes improve the results. Testing with eight filters showed a decline in performance compared to using sixteen filters. We also found that increasing the number of filters can improve the results, but there is a limitation due to the memory capacity of the device.