This online course provides a theoretical and practical guide to the use of face-swap technology. In the past few months, deep neural networks have been wildly used to digital insert actor Nicolas Cage into several movie scenes. These so-called deepfakes have generated a lot of discussion on the ethics of Machine Learning. This second lesson will focus on the potential applications that face-swap technology can offer, and on how to use it properly.

If you are interested in understanding not only how deekfakes are generated, but also to create your own, this is the tutorial you have been looking for. And if you have been using face-swap technology already, I hope this first post will help you become more aware of why and how this technology should (and shouldn’t) be used.

You can read all the posts in this series here:

Introduction

Those of you who have attended driving school will probably remember that before driving a car, you had to pass an exam. Even before practising on the street, you had to learn what you could and what you could not do. And all these other things that you technically could do, but really shouldn’t. Theory before practice. This is because driving a car comes with both risks and responsibility. Misusing it could cost not just your life, but also the lives of bystanders who have never accepted to take the risk that you did.

This premise might sound superfluous for a tutorial about Machine Learning, but it really isn’t. Every time a new technology appears, we need to question ourselves on the impact it will have on us and on the people around us. We cannot rely on governments and laws for guidance, as they are notoriously ineffective and inefficient at keeping up with the pace of progress. Bitcoins, for instance, have been around for almost ten years, yet we had to wait for its speculative bubble to start collapsing to see any attempt at regulating it. Likewise, there is a lot of concerns about how the technology behind deepfakes could be misused.

While some people would like to see any face-swapping technology banned, that is not going to resolve the issue. A similar argument could be raised for sex education. While some conservative parents are worried it will drive their kids to have sex, the reality is that they are going to do it anyway. The difference is that sex ed programs – when done properly – teach kids how to protect themselves, and how their actions can impact others. It is not by banning any discussion on face-swap that we will stop deepfakes from being used improperly. Now that this knowledge is both available and accessible, our best shot is to educate people so that they can understand the potential of face-swapping, including its consequences on others. This is why the second part of this online course on deep face-swapping will be about Ethics, and not Machine Learning.

Let’s start by approaching the legal aspects of deepfakes. This will give precise boundaries to what we can and what we cannot do with them. Then, we will investigate deeper into how we should not use them, and why.

Legal Aspects

❓ Is face-swapping technology illegal?

copyright infringement if you are using videos made by others. No, face-swapping by itself is not illegal, although you could incur in legal issues forif you are using videos made by others. The use of someone else’s face without their explicit consent directly violates a person’s right of publicity, which covers the use of their image and/or identity. Using this technology to create non-consensual pornographic content is not technically a crime yet, but could fall into the category of revenge porn. However, face-swapping children or underage teens into pornographic scenes is indeed a crime, as even drawings and artistic rendering can be considered child pornography. At the moment this article is written (February 2018) there are no known regulations or legal cases involving face-swapping videos.

❓ Who owns the copyright a face-swap video?

It is hard to answer this question, as it falls into a legal grey area. It is reasonable to believe that face-swapping could be treated like any other video editing process in the context of Copyright law. This means that, provided that you own all copyrights for the original footage, you will also own the copyright for the newly face-swapped video.

❓ Do face-swap videos count as parody?

Most countries allow copyright enforcement to be avoided “for the purposes of caricature, parody or pastiche“. There is no reason to believe this will not be the case for face-swap videos as well. The recent examples where Nicolas Cage was digitally inserted in several movies will likely count as a parody. Keep in mind that, in case of a dispute, each case is ultimately decided by a court. I have created myself a deepfake video in which Meryl Streep’s face has been replaced with Margaret Thatcher.

Ethical Aspects

The following questions will only take into account the ethical aspects of face-swap technology, ignoring possible legal consequences.

❓ Why do I need consent to face-swap someone else?

Every time you commit to something, you accept a certain degree of risk. This is certainly true on the Internet, where everything that is posted could potentially reach millions of people. Publishing a video without someone’s explicit consent can expose them to embarrassment, bullying and online harassment. Even if you do not have malicious intentions, releasing a face-swap video could be very distressing for the person portrayed. There is also another important distinction that has to be made. Permission to create a face-swap video, is not the same as permission to re-distribute it or publish it online. While a friend might accept to be face-swapped for a birthday video, he might be unwilling to share that with the rest of the world. If you are unsure about what constitutes as explicit consent, this video might be a good start.

❓ Can I publish a face-swap video I made?

Given that you have the legal right to do so, there are two questions that you have to ask yourself. The first one is if you have consent from the people who are face-swapped. While you might have had right for the original footage, face-swap technology allows you to realistically place people in contexts and situations they might have originally refused. For instance, you might have copyright over a video you made at your friend wedding. While you might be legally allowed to use that footage however you like, the question here is, once again, about consent. While your friend gave consent for you to record a video at their wedding, it is unlikely they would have asked you to record them while having sex. While this is a rather extreme example, it shows that face-swap allow people to be placed in contexts for which they would have not originally agreed to. The second question you have to ask before posting a face-swap video is if the people involved understand the risk. If not, their consent might be insufficient since they might be unable to take an informed decision.

❓ Most Deep Fakes are unrealistic, so nobody will believe them anyway.

Deepfakes videos can still be a major source of distress, even when they are poorly rendered. Even just making crude drawings of someone can be framed in a context of bullying and harassment. Bullying doesn’t have to be photorealistic, to be effective. Just the fact that you have used a specific person as the subject of a deepfake video can be enough to promote a situation of abuse. Also, never overestimate people’s ability to distinguish between real and fake news. Most people are still unaware deepfakes exist.

❓ Face-swaps are a more advanced way of doing fan-art!

They could be. But the Internet is full of unflattering drawing and photomontages of celebrities. Keep in mind that not all forms of fan-art are empowering or appreciated. When you create something, ask yourself what are you trying to achieve. Are you paying homage to a celebrity, or trying to bring a fantasy to life?

❓ What if I do a face-swap for private use only?

It is often believed that what you do behind closed doors should not be subjected to regulation. While this could be a valid opinion for someone, very often face-swap involves other people. If the material you create is for personal and private use only, it can be argued that nobody is hurt. However, there is always a chance for homemade face-swap videos to accidentally leak.

Face-Swap and Pornography

It would be unfair not to mention that in the past few months, several actresses (such as Daisy Ridley, Gal Gadot and Emma Watson) appeared in several deepfakes created from porn movies. Entire subreddits (such as the now defuncts /r/DeepFakes) existed with the sole purpose of sharing pornographic videos and pictures generated with face-swap technology. Most internationals newspapers covered this trend (Motherboard: AI-Assisted Fake Porn Is Here and We’re All Fucked), generating even more hype.

Due to this, most people who have heard of deepfakes now associate them with non-consensual pornography, which is ultimately the reason why websites like Twitter, Reddit and even Pornbub banned them from their platforms.

“Nonconsensual content directly violates our TOS and consists of content such as revenge porn, deepfakes or anything published without a person’s consent or permission.” Pornhub on Deepfakes, via Mashable

It is important to state that while this might sound like an innocent prank, it is far from being a victimless crime. Using the image of someone without their direct consent might have serious repercussions on their personal and professional life.

❓ What's wrong with pornography anyway?

The first point that needs to be raised is that there is nothing inherently wrong with consensual pornography by itself. That being said, anything related to sex is still considered a taboo in Western culture. Being in a porn movie could, by itself, be enough to disqualify people from certain jobs or positions, regardless of their professional experience and qualifications. The ability to create photorealistic porn movies with the face of virtually anyone is troublesome, as this could have direct repercussions on the victim’s personal and professional lives.

❓ Can I use face-swap technology to create pornographic material?

The answer is, surprisingly, yes. Like any other video editing technique, face-swap can be used to enhance alter or even create pornographic content. However, there is a distinction that has to be made. Deepfakes are being unanimously banned not because they are pornographic, but because they are non-consensual. If all parts involved in a face-swap video are fully consensual, and you own the rights of all clips involved, then there is no issue.

❓ I can face-swap porn actors, since they are doing porn already.

Their consent was for the specific scene they shot, not for others. There is a common misconception that is ok to objectify and sexualise porn actors and sex workers. That is not the case. If you are a taxi driver, it does not mean that are available to drive everyone every time they ask. The assumption is that since porn actors have already agreed to appear on porn, their image can be used indiscriminately. This is often rooted in the idea that porn is degrading, and Keep in mind that the same argument about consent still holds. One actor might not want to appear in the context they have been digitally inserted. Or they might, but only under compensations. Porn can be a hobby, but for many is a proper career.

Conclusion

If used correctly, Deep Fakes can reach an unprecedented level of photorealism. Distinguishing a real video from a synthetic one will become virtually impossible in the near future. Consequently, the ability to trace and verify the origin of content is a major challenge that the Internet will have to face very soon. We live in the post-truth era, where fake news is designed and created as a tool to gain political power. The fact that most Deep Fake videos are obviously fake does not make them less dangerous.

While all of the above holds true, it is very crucial to state that the technique behind Deep Fake is, per se, neutral. Like a knife, Machine Learning is a tool can be used for good or evil.

Gaurav Oberoi has written a very interesting article, called Exploring DeepFakes, which discusses the possible application of face-swap and style transfer technologies (below, image from the CycleGAN paper).

You can read all the posts in this series here:

A special thanks goes to Christos Sfetsios and David King, who gave me access to the machine I have used to create the deepfakes used in this tutorial.