Changes

Jump to: navigation, search
Training configuration and hyperparameters setup
==Training configuration and hyperparameters setup==
A total of 6 proGAN models were built and trained, each . Each one was built with the required number of ''straight-through'' and ''fade-in'' model stages, to generate several typologies of synthesized images at the desired target resolution, belonging . These images belong either to ''missing'' and or ''tombstoning'' classes, more specifically and are either ''full'' images (512 × 512 resolution)and or ''upper'' ''/ lower'' soldering region images (256 × 256 resolution). The training was executed mainly on cloud, initially with the free services provided by [https://colab.research.google.com/ Google Colab] and finally with [https://aws.amazon.com/it/sagemaker/ AWS SageMaker].
Discriminators and generators were trained both with a learn rate of 5 × 10<sup>-4</sup> for all fade-in stages and with a smaller learn rate of 1 × 10<sup>-4</sup> for all ''straight-through'' stages in order to guarantee a smooth and slow enough fine-tuning for all layers. Each stage of each created model was trained for 100 epochs, with the sole exception of the last stage for the 512×512 full images, which needed 50 more epochs to generate satisfying results. The batch size is progressively reduced as the resolution increases, starting from a batch of 64 images for the first three resolutions (4 × 4, 8 × 8 and 16 × 16 resolutions), decreasing to 32 (32 × 32, and 64 × 64 resolutions) and 16 (128 × 128 and 256 × 256 resolutions). In the last stage for full typology (512 × 512), batch size is further reduced to 8 images for each train step.
|}
The synthesized images can be effectively used to train a SMC defects classification model for a future ML-based PCB-AVI application, only if they have a similar probability distribution function with respect to the original ones. In particular, it is interesting to verify if there is a clear separation in the data. To this end, it is possible to employ the t-distributed stochastic neighbor embedding (t-SNE), which is a ML algorithm for visualization, based on Stochastic Neighbor Embedding (SNE) algorithm. Since the way this algorithm operates is computationally expensive, it is highly recommended to use another dimensionality reduction technique before applying t-SNE algorithm, in order to reduce the number of dimensions to a reasonable amount. For this purpose, it is possible to employ an autoencoder (AE).
{| style="background:transparent; color:black" border="0" align="center" cellpadding="10px" cellspacing="0px" height="550" valign="bottom"
|}
The two soldering regions are the most important parts concerning the generated images and, by using the methodology proposed in the previous section, they can be easily extracted and evaluated too as well with the t-SNE algorithm. Since the two of them are also correlated for the same image, clearly strongly correlated for ''tombstoning'' class samples, they must be concurrently compressed by the AE. Therefore, a dual-stream autoencoder, with two input/output layers, is required.
{| style="background:transparent; color:black" border="0" align="center" cellpadding="10px" cellspacing="0px" height="550" valign="bottom"
|}
The values obtained by applying the t-SNE algorithm on the compressed data are displayed into in several 3D-plots reported below respectively for ''missing'' and ''tombstoning'' synthesized images. Interestingly, the 4 plots related to full typology do not show a separation in the data between ''fakes'' (red dots) and ''reals'' (blue dots), sign that the generated images do not differ too much from the original ones, which were used to train the proGANs.
The two figures to the utmost right report the plots showing the results of t-SNE on the compressed data, obtained from the dual stream encoder for ''missing'' and ''tombstoning'' synthesized images. In the first case, for ''missing'' class, there is actually no separation between fakes and real of ''upper'' and ''lower'' region sides, a good sign that the generated images are no very different from the original ones. This is quite understandable since the two regions look alike. The situation is visibly different in the plot for the ''tombstoning class'', where two distinct clouds of dots can be seen, confirming a well defined separation between the data related to the ''upper'' and ''lower'' typologies. It is also possible to see that fakes and reals dots, belonging to the same soldering region, are very close to each other, while dots belonging to a different soldering region are distant in the plot, confirming once again that the image generation with the proGAN was successful.
4,650
edits

Navigation menu