Using the alignment files for each of the learnt faces, the computer then set about the task of trying to train itself. This is achieved by using a machine learning technique known as Generative Adversarial Networks. Essentially where you compete 2 artificial intelligence networks against each other. One AI is responsible for generating a forgery of both faces, and the other AI is trying to detect the forgery. After each iteration, the AI improves and the forgeries are slightly more belivebale. So after hundreds of thousands of iterations the face swaps are more convincing.