Preparing the training images
In this section, we will be collecting, extracting, and curating the images to train our model. Far and away the best sources for collecting face data are video files. Videos are just a series of still images, but as you can obtain 25 still images for every second of video in a standard 25 FPS file, they are a valuable and plentiful resource. Video is also likely to contain a lot more natural and varied poses than photographs, which tend to be posed and contain limited expressions.
Video sources should be of a high quality. The absolute best source of data is HD content encoded at a high bitrate. You should be wary of video content acquired from online streaming platforms, as these tend to be of a low bitrate, even if the resolution is high. For similar reasons, JPEG images can also be problematic. The neural network will learn to recreate what it sees, and this will include learning compression artifacts from low-bitrate/highly compressed sources....