The possibility and expediency of using variational autoencoders when expanding training datasets of neural networks for cases when the training set consists of several dozen samples is tested. Investigations are carried out on the example of images of «crack»-type defects. Brief information on the theory of variational autoencoders is given. Practical recommendations are given for constructing training sets of variational autoencoders. It is shown that deviation from the suggested recommendations will most likely not allow generating realistic images for the case of a small dataset. For the case of a dataset of eighty images, the distribution of «crack»- type defects in the hidden space after training the variational autoencoder is demonstrated. Examples of images with defects sampled from different parts of the distribution of latent factors are given. For the case of images of cracks, the continuity of the hidden space is demonstrated, when one image is sufficiently smoothly transformed into another on the way through the space of hidden features. A method for obtaining superimposed images based on the use of variational autoencoders is proposed. This method seems to be promising, since it allows automating the process of obtaining superimposed images. Examples of generated cracked superimposed images are shown.