The power of masking images
When you take a photograph, you are capturing everything that the camera sees. However, the chances are that you’re not equally interested in every part of the image. If you’re on vacation, you might take a selfie of yourself in front of a waterfall, and while you value yourself and the waterfall, you care less about the cars or other people in the image. While you can’t remove the cars without adding something into the gaps for your vacation photos, sometimes, you’re only interested in the main subject and might want to cut it from the rest of the image.
With deepfakes, we can use a mask to help us remove the face from the image so that we replace only the face and leave the rest of the image alone. In other AI tasks, you might have similar needs but different objects that you want to cut out:
Figure 8.3 – An example of the mask used in the deepfake process
Next, let’s look at other...