Deepfake is a technique from image-to-image translation class of problems, designed to combine and overlay objects in images or videos creating deceptively realistic counterfeits. This paper analyzes and compares four leading methods used for deepfake generation: autoencoders, variational autoencoders, variational autoencoders generative adversarial networks and cycle generative adversarial networks, in problem of face-to-face conversion. Due to the lack of numerical methods for deepfake comparison, all obtained results were assessed in a visual evaluation process. Variational autoencoders technique has proved to be the most efficient one in facial-deepfake generation problem. The worst results were obtained from CycleGAN method, which proved to be unfitted for geometric changes and shape transformations. It was concluded that VAE-GAN technique is the one with the greatest potential, as in case of feature maps with better quality, this approach could provide deceivingly resembling deepfakes.
Contains paper for my master thesis and all necessary files and images.
Contains all scripts necessary for training networks for each method.
Contains all scripts used to process data from data sets.
- extractFrames.py - extracts frames from videos in fixed time interval. Also creates adequate directories.
- splitDatasets - takes two folders with faces and splits them to tests and training directories.
- compressData.py - takes test and training folders and compresses them into npz file for cycleGan training.
- prepareNPZ.py - takes test and training folders and compresses them into npz file for VAE training.
- check_images_sizes.py - checks if all images has the same size.
- rescale_images.py - changes images sizes to fixed size.
- generate_from_models - generates deepfakes form given, pre-trained models for AE, VAE and VAE-GAN methods.
- generate_from_cyclegan - generates deepfakes form given, pre-trained models for CycleGAN method.
Contains pictures used to generate final results for paper.
Contains models of trained networks for AE and VAE methods.