Anyone can make deepfakes now!
❤️ Become The AI Epiphany Patreon ❤️ ► https://www.patreon.com/theaiepiphany
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Deepfakes. The scary player in the game. 🤖
Fake news are about to become an even bigger problem.

So...what to do in a world where a video is not proof anymore? 

As with many things, the way to alleviate this is through education i.e. raising the general awareness that they exist (as well as developing deepfake detector neural nets).

You'll learn about:
✔️ Deepfakes
✔️ Ethics behind technology
✔️How to create SIMPLE video and audio deepfakes

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Deefakes for video:
✅ https://github.com/AliaksandrSiarohin/first-order-model
✅ https://colab.research.google.com/github/AliaksandrSiarohin/first-order-model/blob/master/demo.ipynb
✅ https://github.com/gordicaleksa/first-order-model
✅ https://drive.google.com/drive/folders/1kZ1gCnpfU0BnpdU47pLM_TQ6RypDDqgw

💻 command line ►
python --config config/vox-256.yaml --driving_video mydata/driver_videos/04.mp4 --source_image mydata/target_imgs/khal.jpg --checkpoint checkpoints/vox-cpk.pth.tar --relative --adapt_scale

Deepfakes for audio:
✅ https://github.com/CorentinJ/Real-Time-Voice-Cloning
✅ https://github.com/gordicaleksa/Real-Time-Voice-Cloning
✅ https://drive.google.com/file/d/1n1sPXvT34yXFLT47QZA6FIRGrwMeSsZc/view
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

⌚️ Timetable:
00:00 - Intro
01:15 - Ethics and fake news consideration
03:18 - First Order Motion Model For Image Animation (setup & play)
05:28 - Real-Time Voice Cloning (setup & play)

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
💰 BECOME A PATREON OF THE AI EPIPHANY ❤️

If these videos, GitHub projects, and blogs help you,
consider helping me out by supporting me on Patreon!

The AI Epiphany ► https://www.patreon.com/theaiepiphany
One-time donations: https://www.paypal.com/paypalme/theaiepiphany

Much love! ❤️

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

💡 The AI Epiphany is a channel dedicated to simplifying the field of AI using creative visualizations and in general, a stronger focus on geometrical and visual intuition,
rather than the algebraic and numerical "intuition". 

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 
👋 CONNECT WITH ME ON SOCIAL 
LinkedIn ► https://www.linkedin.com/in/aleksagordic/ 
Twitter ► https://twitter.com/gordic_aleksa 

Instagram ► https://www.instagram.com/aiepiphany/ 
Facebook ► https://www.facebook.com/aiepiphany/ 

👨‍👩‍👧‍👦 JOIN OUR DISCORD COMMUNITY:
Discord ► https://discord.gg/peBrCpheKE

📢 SUBSCRIBE TO MY MONTHLY AI NEWSLETTER:
Substack ► https://aiepiphany.substack.com/

💻 FOLLOW ME ON GITHUB FOR COOL PROJECTS: 
GitHub ► https://github.com/gordicaleksa 

📚 FOLLOW ME ON MEDIUM:
Medium ► https://gordicaleksa.medium.com/ 
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

#deepfakes #deeplearning #computervision
 Oh, it's live. Let's start with Mr. Hinton. Hey, Jeffy Hinton here. I just wanted to point out that this YouTube channel, The Epiphany, is truly awesome and hand it over to Jan here. Thank you, Jeff. Yeah, I agree I got this Turing Award thingy, but I think this guy deserves it more than I do. Let's see what Joshua has to say. Howdy ho. Yeah, artificial intelligence is getting increasingly important. Boy, you're doing God's work. Step aside, Clamps. This thing is going to be huge. Let's make Serbia great again. Well done, kid. Keep doing this thing, even though I don't understand it. What's your problem, Donald? You're acting like such a snob. Do you know that? Boy, spread the knowledge. Education is really important and crucial. We'll need this against the Russians. My God, I'm just kidding, Vladimir. You know a joke, right? The fuck was that, dude? Kind of cringy, nonetheless. Hope you liked it. Before I show you how to make stuff that we saw just seconds ago, I want you to have a couple of things in mind because this video is primarily educational. One really important thing I want to make sure you understand is that this tech was not developed to create deepfakes. The thing you saw with Trump and Obama, the deepfake voice, that technology is something called multi-speaker text-to-speech. And its use case is, for example, accessibility applications. Imagine somebody who lost their voice, but they either have an old recording of themselves and can thus reconstruct their voice, or they can pick a new one that they like. And on the other hand, the technology that I use to animate Mona Lisa and others is called image animation, and it will help, for example, artists create better animated movies that you and I like to watch, as well as other cool and empowering applications. There's one thing I want you to come up with from this video. That deepfakes are only one, although socially highly desirable application of this technology, and that the tech itself was not created with this in mind. Same thing as with nuclear energy and everything else. You can either use it for good purposes or you can use it for bad purposes. Second, this is dead simple to create, and really basic deepfake technology can be much better. Deepfake videos I showed you use only a single target image, and they animated using the video that you need to create in order to control the target image. You can imagine that it can be improved by using multiple target images, or even better, a target video of the person you want to animate or in this use case, deepfake. Same improvements can be made for audio deepfakes. Third thing, fake news is a really big problem nowadays, and you need to be extra cautious of the information you're ingesting, even videos, as we saw, right? You'll need critical thinking in this brand new world to discern true from false more than ever. Things I'll show you can create truly convincing deepfakes. For that, you'd need some kind of neural voice puppetry. And as such, I feel okay showing you this. Let's start. Okay, so we'll be using this code, first order motion model for image animation. Go ahead and explore the read me a little bit. And I encourage you to go and play with the demo Jupyter notebook. You can find here I'll put the link in the description. And it just works out of the box. I had problems with the original environment file. So I went ahead and forked the code, reverse engineered environment file from Google Colab. And I've added additional wrapper code that you'll find useful. First step, go ahead and clone the code. And you'll end up with this code here. And just go ahead, we'll need to download pre trained model into checkpoints folder here. So go ahead and open this link and just download this box CPK PTH tar file into checkpoints. Okay, once that's done, you can optionally go ahead and download some target images from this link. But you don't have to because I already checked in some dummy data. So this is totally optional. So I assume you have mini conda already installed, just navigate to the top most directory here and do conda and create press enter and that will create the environment, the Python environment. Once that's done, go ahead and activate the environment. So activate the fix and visa name. And you're in and we're pretty much done. Just go ahead and run this command Python demo, not Jupyter demo pi and run it. I'll put the link in the description for the for this code line. Keep in mind that this can take some time depending on the hardware configuration you have. Finally, we get the results. So this is how it looks like a result team before and I've used Trump's video for as a driver video and I've used the cultural goes image as the target image. That's it for deep fix for videos. Make sure to check out this script master combiner, which will help you automate this procedure of animating videos. And I'll also write a follow up medium blog that will explain you how to use your own data. So stay tuned. Next up deep fix for audio. We're going to play with this awesome code called real time voice cloning. It's just an implementation of this paper here. And it's really awesome because you need only five seconds of target audio and you can reconstruct the voice. I went ahead and forked the repo as I had to just update the environment file and add some small code changes inside. So go ahead and just clone the repo. You'll end up with something like this. Similar to before, just navigate to the top most directory here and do a conda and create and that will create a fresh conda environment. There's one more thing we need to do and that's go ahead and download this zip file here and place the content inside of the corresponding directories here encoder, synthesizer and vocoder. Once that's done, you'll have pre trained models inside of each of these. So see it models pre trained PT. Finally, go ahead and activate the environment here. So activate DF voice and and run Python demo toolbox. You'll end up with this screen and it may take some time to load it the first time. Go ahead and click browse. So I went ahead and checked in a snippet of voice from Barack Obama. So go ahead and just load that one here, Obama and open. So you'll end up with some mal spectrogram, some embeddings and you map projections, whatnot. You don't need to worry about those to only use this tool. Now finally, go ahead and write down some text in this text box. Click synthesize and vocode and we'll finally get the result. Hi, plebs. I'm Barack Obama and I used to be the president of the United States of America. And the sound clip will be automatically saved in the file system here. My speech data outputs. You can also of course use other sound clips aside from Barack Obama, of course. Hope you liked it. Share and subscribe, but only if you like the content until next time.
[{"start": 0.0, "end": 12.8, "text": " Oh, it's live. Let's start with Mr. Hinton."}, {"start": 12.8, "end": 22.0, "text": " Hey, Jeffy Hinton here. I just wanted to point out that this YouTube channel, The Epiphany,"}, {"start": 22.0, "end": 25.28, "text": " is truly awesome and hand it over to Jan here."}, {"start": 25.28, "end": 32.56, "text": " Thank you, Jeff. Yeah, I agree I got this Turing Award thingy, but I think this guy deserves it"}, {"start": 32.56, "end": 36.160000000000004, "text": " more than I do. Let's see what Joshua has to say."}, {"start": 37.2, "end": 44.88, "text": " Howdy ho. Yeah, artificial intelligence is getting increasingly important. Boy,"}, {"start": 44.88, "end": 50.8, "text": " you're doing God's work. Step aside, Clamps. This thing is going to be huge. Let's make"}, {"start": 50.8, "end": 56.0, "text": " Serbia great again. Well done, kid. Keep doing this thing, even though I don't understand it."}, {"start": 56.0, "end": 60.4, "text": " What's your problem, Donald? You're acting like such a snob. Do you know that? Boy,"}, {"start": 60.4, "end": 64.64, "text": " spread the knowledge. Education is really important and crucial. We'll need this against the Russians."}, {"start": 66.47999999999999, "end": 69.44, "text": " My God, I'm just kidding, Vladimir. You know a joke, right?"}, {"start": 73.92, "end": 75.28, "text": " The fuck was that, dude?"}, {"start": 75.28, "end": 83.28, "text": " Kind of cringy, nonetheless. Hope you liked it. Before I show you how to make stuff that we saw"}, {"start": 83.28, "end": 88.24000000000001, "text": " just seconds ago, I want you to have a couple of things in mind because this video is primarily"}, {"start": 88.24000000000001, "end": 94.0, "text": " educational. One really important thing I want to make sure you understand is that this tech"}, {"start": 94.0, "end": 98.24000000000001, "text": " was not developed to create deepfakes. The thing you saw with Trump and Obama,"}, {"start": 98.8, "end": 103.76, "text": " the deepfake voice, that technology is something called multi-speaker text-to-speech."}, {"start": 103.76, "end": 108.4, "text": " And its use case is, for example, accessibility applications. Imagine somebody who lost their"}, {"start": 108.4, "end": 113.2, "text": " voice, but they either have an old recording of themselves and can thus reconstruct their voice,"}, {"start": 113.2, "end": 118.0, "text": " or they can pick a new one that they like. And on the other hand, the technology that I use to"}, {"start": 118.0, "end": 123.44, "text": " animate Mona Lisa and others is called image animation, and it will help, for example, artists"}, {"start": 123.44, "end": 129.6, "text": " create better animated movies that you and I like to watch, as well as other cool and empowering"}, {"start": 129.6, "end": 134.64, "text": " applications. There's one thing I want you to come up with from this video. That deepfakes are only"}, {"start": 134.64, "end": 140.48, "text": " one, although socially highly desirable application of this technology, and that the tech itself was"}, {"start": 140.48, "end": 145.04, "text": " not created with this in mind. Same thing as with nuclear energy and everything else. You can either"}, {"start": 145.04, "end": 150.24, "text": " use it for good purposes or you can use it for bad purposes. Second, this is dead simple to create,"}, {"start": 150.24, "end": 155.2, "text": " and really basic deepfake technology can be much better. Deepfake videos I showed you use only a"}, {"start": 155.2, "end": 160.56, "text": " single target image, and they animated using the video that you need to create in order to control"}, {"start": 160.56, "end": 166.23999999999998, "text": " the target image. You can imagine that it can be improved by using multiple target images, or even"}, {"start": 166.23999999999998, "end": 172.0, "text": " better, a target video of the person you want to animate or in this use case, deepfake. Same"}, {"start": 172.0, "end": 176.64, "text": " improvements can be made for audio deepfakes. Third thing, fake news is a really big problem"}, {"start": 176.64, "end": 181.35999999999999, "text": " nowadays, and you need to be extra cautious of the information you're ingesting, even videos,"}, {"start": 181.36, "end": 186.32000000000002, "text": " as we saw, right? You'll need critical thinking in this brand new world to discern true from false"}, {"start": 186.32000000000002, "end": 191.44000000000003, "text": " more than ever. Things I'll show you can create truly convincing deepfakes. For that, you'd need"}, {"start": 191.44000000000003, "end": 197.84, "text": " some kind of neural voice puppetry. And as such, I feel okay showing you this. Let's start. Okay,"}, {"start": 197.84, "end": 204.16000000000003, "text": " so we'll be using this code, first order motion model for image animation. Go ahead and explore"}, {"start": 204.16000000000003, "end": 209.84, "text": " the read me a little bit. And I encourage you to go and play with the demo Jupyter notebook. You"}, {"start": 209.84, "end": 215.76, "text": " can find here I'll put the link in the description. And it just works out of the box. I had problems"}, {"start": 215.76, "end": 221.12, "text": " with the original environment file. So I went ahead and forked the code, reverse engineered"}, {"start": 221.12, "end": 226.64000000000001, "text": " environment file from Google Colab. And I've added additional wrapper code that you'll find useful."}, {"start": 226.64000000000001, "end": 231.92000000000002, "text": " First step, go ahead and clone the code. And you'll end up with this code here. And just go ahead,"}, {"start": 231.92000000000002, "end": 238.0, "text": " we'll need to download pre trained model into checkpoints folder here. So go ahead and open"}, {"start": 238.0, "end": 246.32, "text": " this link and just download this box CPK PTH tar file into checkpoints. Okay, once that's done,"}, {"start": 246.32, "end": 252.32, "text": " you can optionally go ahead and download some target images from this link. But you don't have"}, {"start": 252.32, "end": 257.28, "text": " to because I already checked in some dummy data. So this is totally optional. So I assume you have"}, {"start": 257.28, "end": 265.68, "text": " mini conda already installed, just navigate to the top most directory here and do conda and create"}, {"start": 265.68, "end": 272.48, "text": " press enter and that will create the environment, the Python environment. Once that's done, go ahead"}, {"start": 272.48, "end": 279.52, "text": " and activate the environment. So activate the fix and visa name. And you're in and we're pretty"}, {"start": 279.52, "end": 289.2, "text": " much done. Just go ahead and run this command Python demo, not Jupyter demo pi and run it."}, {"start": 289.76, "end": 294.56, "text": " I'll put the link in the description for the for this code line. Keep in mind that this can"}, {"start": 294.56, "end": 298.88, "text": " take some time depending on the hardware configuration you have. Finally, we get the"}, {"start": 298.88, "end": 306.48, "text": " results. So this is how it looks like a result team before and I've used Trump's video for as"}, {"start": 306.48, "end": 310.72, "text": " a driver video and I've used the cultural goes image as the target image. That's it for deep"}, {"start": 310.72, "end": 316.64, "text": " fix for videos. Make sure to check out this script master combiner, which will help you automate this"}, {"start": 316.64, "end": 321.6, "text": " procedure of animating videos. And I'll also write a follow up medium blog that will explain"}, {"start": 321.6, "end": 328.16, "text": " you how to use your own data. So stay tuned. Next up deep fix for audio. We're going to play with"}, {"start": 328.16, "end": 334.40000000000003, "text": " this awesome code called real time voice cloning. It's just an implementation of this paper here."}, {"start": 334.96000000000004, "end": 339.52000000000004, "text": " And it's really awesome because you need only five seconds of target audio and you can reconstruct"}, {"start": 339.52000000000004, "end": 346.48, "text": " the voice. I went ahead and forked the repo as I had to just update the environment file and add"}, {"start": 346.48, "end": 351.68, "text": " some small code changes inside. So go ahead and just clone the repo. You'll end up with something"}, {"start": 351.68, "end": 358.48, "text": " like this. Similar to before, just navigate to the top most directory here and do a conda and"}, {"start": 359.12, "end": 363.6, "text": " create and that will create a fresh conda environment. There's one more thing we need"}, {"start": 363.6, "end": 369.76, "text": " to do and that's go ahead and download this zip file here and place the content inside of"}, {"start": 369.76, "end": 374.0, "text": " the corresponding directories here encoder, synthesizer and vocoder. Once that's done,"}, {"start": 374.0, "end": 380.16, "text": " you'll have pre trained models inside of each of these. So see it models pre trained PT. Finally,"}, {"start": 380.16, "end": 392.0, "text": " go ahead and activate the environment here. So activate DF voice and and run Python demo toolbox."}, {"start": 392.64, "end": 396.56, "text": " You'll end up with this screen and it may take some time to load it the first time."}, {"start": 396.56, "end": 403.2, "text": " Go ahead and click browse. So I went ahead and checked in a snippet of voice from Barack Obama."}, {"start": 403.2, "end": 408.64, "text": " So go ahead and just load that one here, Obama and open. So you'll end up with some"}, {"start": 408.64, "end": 413.68, "text": " mal spectrogram, some embeddings and you map projections, whatnot. You don't need to worry"}, {"start": 413.68, "end": 418.08, "text": " about those to only use this tool. Now finally, go ahead and write down some text in this text box."}, {"start": 418.08, "end": 423.76, "text": " Click synthesize and vocode and we'll finally get the result. Hi, plebs. I'm Barack Obama and I used"}, {"start": 423.76, "end": 427.68, "text": " to be the president of the United States of America. And the sound clip will be automatically"}, {"start": 427.68, "end": 434.96, "text": " saved in the file system here. My speech data outputs. You can also of course use other sound"}, {"start": 434.96, "end": 442.16, "text": " clips aside from Barack Obama, of course. Hope you liked it. Share and subscribe,"}, {"start": 442.16, "end": 458.0, "text": " but only if you like the content until next time."}]