 In this video, I'll show you how I taught AI to draw any picture, but only using twitch emotes. Twitch emotes are becoming their own language. Kids are using them at school, adults are using them at work, and grandma at the old folks home. What we're trying to do is replace the basic colored pixels in an image with twitch emotes, which is also known as mosaic art. Since doing it by hand is going to be a lot of work, I'm just going to automate everything into a simple bot. To make a bot that replaces pixels with images, we're going to need to do some color math. We're going to have to first split the picture into chunks. We can go with super small chunks, but it's going to be really hard to see the difference. Or we can go with really big chunks, but the actual image will start to be lost and it'll just look like a pixel grid. So for now, let's just go somewhere in the middle. Once we have our chunks, we can analyze them for a color. We just have to average the chunk into a number that we use to reference what it looks like. So we can calculate how much red, green, or blue it has. And then the combination of those colors is what we see. It doesn't matter how many colors are in it, but as long as we color the dominant one, it should look good. Then we just have to repeat the process for every single chunk in the picture. The more chunks, the more detail, but it also will take a lot more time. Now that we have our color labeled chunks, we need to replace them with some art. And this is when it got complicated. There's no real way to mass download twitch emotes. But there are sites that have done the hard and tedious work. So instead of doing it ourselves like they've done, we're just going to steal it from them without them knowing, of course. So I found a bot that can't steal from Twitch directly, but can steal from the sites that have stolen from Twitch. Once it was done, I had downloaded a couple thousand emotes from the top 1% Twitch channels. And then I added some of my favorites. Now we have to analyze those emotes for their color. Some emotes have a lot of detail, but from afar, they're all going to have a dominant color that pops out the most. So we're going to run the whole process back again. The same thing we did to our pixels, we're going to be doing to our Twitch emotes. And now they're all labeled so we can go to the next step, which is swapping them around. But there are different ways of doing this. The first version just uses basic logic. This is what I created. It takes the closest match to the pixel and then it swaps it and that's it. It's really hard to tell what's going on. So I threw in the original picture behind the pixels to see if it would blend in a bit better. But it's still not there. I'm not sure if you can see what's behind the image. So I redid the process with a much higher pixel resolution. And now it's starting to look a little bit better, but it's still not there. I wanted it to blend in more. So I did what all engineers do and copied someone smarter than me. This one uses a much smarter algorithm and lets you control a lot more on how it works. It also blends in the colors a lot better. So here's what my version looks like in high resolution and here's what this one looks like. It's so much cleaner. And from afar, it just looks like block images until you zoom in and see those high quality Twitch emotes. One thing that's cool about this bot is you can even get it to work on video. If you want to see that in the future or even enjoyed this video, do me a favor. Hit the like button and the subscribe button so that I can continue making these videos for your pleasure. See you in the next one.