Computer Generates Human Faces
HTML-код
- Опубликовано: 1 окт 2017
- 5:51 To skip to the results.
Try It Online: codeparade.net/faces/
Download App (Windows 64-bit): github.com/HackerPoet/FaceEdi...
Source Code: github.com/HackerPoet/FaceEditor
This is another fun project I came up with using the same data set as my other video. This time, I experiment with unsupervised learning to see what the computer can learn about faces, and try to generate some new ones. - Наука
The most important aspect of a face: shirt color.
there is actually some truth to that
I don't feel so bad about being ugly anymore
@XodiakGangrene but where could we get 1700 naked highschoolers...
@@jacobschweiger5897 even if we did, we'd only replace the shirt slider with a collarbone and chest hair / boobage sliders ... of said 1700 highschoolers
ـ Excinerus wtf
is this the yearbook of Chernobyl High?
decoder games fucking keked
there is no school in Chernobyl you dumbface!
really bad meme thatsthejoke.jpg
@@reallybadmeme2838 r/woooosh
Edit: TL;DR I don't woooosh anymore and you are free to laugh at Sir "really bad meme"
From what I can tell, my man "really bad meme" here essentially ruined the joke in a sarcastic tone. It shows that he did get the joke, but chose to say something that someone who didn't get the joke would say. Therefore, it still stands that he ruined the joke. You could say the joke is that he pretended to want to ruin it even though he got it.
If you think he was funny, I get it. Sarcasm can be funny. In my opinion it wasn't used in the *most* comedic way here, but whatever.
I apologise if I have made anybody uncomfortable with my opinion, but please understand that not everybody will agree with you. Which is why you are still free to hate on me now. Peace.
@@Krong did you even look at his profile name? Also, r/ihavereddit
I will have horrible nightmares from this
Yes you will :)
@@gulpgo aBSolutely
Hopefully they've gone by know. If not, my comment will always be here to remind you of what you saw.
@@kennarajora6532 😭
*_Nightmare Generator_*
Freddy Kruger's Personal Smartphone App!
Original
@@junenaya2736 It is original because he put it in b/ BOLD font....
best comment :)
That does actually look creepy
I think it’s interesting that slider 2, male/female, also controls smile/frown so that males frown and females smile.
That indicates that the features are still correlated and not yet completely interpretable .
If there was a slider for frowning or smiling it was left in the middle, so all we can deduce is that males are correlated with frowning.
OR it was actually a frown/smile slider and the gender was just the correlated element.
Probably an artifact from the data set, males tend to adopt a more serious/neutral expression and females smile in pictures
7:33
"Let her head be Large...."
**Eye pops out**
"...or actually just give her a smaller head"
Ha ha ha
that was my reaction too
8:38 - That ended up being super clear!
Ikr
They
Have
No
Eyes
Holy sh*t
Still soulless creatures...
Do AI dreams about creepy humans ?
Ahhhhh
@@FoldUpCobra1017 aAAAaaAaaaaaAAAAaaAaaAaAAaaaaaA
5:54 If you want an average person you get nothing
Tells something about the human nature...
it is just because of the data set , that area is empty in the data set , the machine can guess it , because the closest point in the data set is already far , in other teams , it is either that the high school students are on average far from their average ( not similar , which is true ) , or means that the data set is not big enough , which is also true
@Gromm: its called apache helicopter, you bigot /s
I think it's just because there is no data with a shirt color between white and black. As soon as he defines it with the first slider, you get your average person
@@imaginerus You seem to be the only one in this section who really learnt from the video. ;-)
FIRST!!! It's amazing how each slider is so logical and describable, when you're sliding them around it almost feels like you're customizing your player in The Sims. But it was all chosen by a computer? Whhhhaaaaatttt
8:06
Thanks for bringing me here! This is awesome!
Mind-blowing, thanks for the adress!
Amazing. Unfortunately I can't try this kind of thing myself, German privacy laws would get me rekt.
RE Is echt so :P
fearlessTobi iss doch voll komi das der einfach so Fotos zeigt ne?
5:55
Moral from the video: An *average* person is nobody.
Be someone.
be special.
eat poop.
@@wontcreep you forgot to say the creator of the quote you mentioned:it's Albert Einstein
@@Subakak yes
@@Subakak yes uwu
or... is a monster. And the monster is something!
“Well I’m not sure, I can’t tell what this is doing, but it’s doing something”
Basically every invention/discovery ever
And also a quote from my uncle describing his dog
What da dog doin?
I dunno, _sumthin_
The next step is is get a bunch of people to rate the attractiveness of each face and see how attractiveness correlates to each of those sliders. Maybe we don't realise but a slider that changes very little has a large effect on how we perceive that face!
Yeah that would actually be really interesting
Oskar Krogsgård yeah... If somewhat unethical :p
Haha, if someone can make me a labeled dataset like that, I would try it out ;)
We can set up a website for voting who is more beautiful like the mark zuckerberg did to create a labeled database. All we need is a lot of woman pictures and people to rate. You can achieve the people side if you tell people to vote to a website from your channel.
Ali Devrim OĞUZ I'm pretty sure men can be attractive too haha
6:55 was lateral facial symmetry. As the slider went more to one side that side of the face became larger in features compared to the other side. Maybe a shortened name would be something like 'facial slant' or something like that.
Computer Generates Human Faces... 10 years after car crash
this is actually kind of creepy looking at those faces
Uncanny valley
The Sims: Pripyat edition.
I can see you are more educated than an average memer.
This video gives me a reason to learn more math.
same
Bitcoin made me want to learn more math, and boy oh boy was that a rabbit hole!
@@kebman was it worth the effort?
Mostly linear algebra, if you're still curious. The relevant stuff for PCA has to do with eigenvectors and eigenvalues.
Don't its not worth it
6:10
“Obviously, hair length is highly correlated to gender”
Me, a long haired guy: Damn
Well, it's corraleted to it, it's not a causality and long hair is mostly more associated with the female gender/more girls and women have long hair.
@Nutzpflanze it was a joke chief, I am aware that they are correlated
@@dougthedonkey1805 I know... my comment was also just a joke.
@@nutzpflanze6088 I don't get it.
Same
I didn't understand a single thing, but still watched it till the end.
Try using mugshots instead and you actually could make a police sketching thing. Though I suppose the head position of the suspect wont matter too much
Where the original photos are from wouldn't matter, you still end up with a face that looks right anyway.
Jake Lyon The point of usingmugshots would be to weed out features such as shirt colour, height, and face orientation as they all have a standard arrangement.
but then it would only range from brown to black skin colors...
@@VeryProfessionalGamer lol good one=)))
Not Not
In a way, that would become an issue, but essentially by having less features to analyse it might as well be that the neural network ends up with more finesse.
But it also could start over fitting
Several of you have asked for a way to play with the sliders yourselves.
I'd love to provide that, but its a little tricky. First of all, the data set is not public and there are privacy concerns with releasing it. Second this demo currently has dependencies with python and other ML libraries that require a GPU that take a lot of machine-specific setup, definitely something too difficult for the average person. Another idea is to provide a web interface, but I don't have any experience with designing interactive web GUIs, I'm not much of a web guy.
If someone out there IS a web developer and is willing to remake a GUI and host this on their site, then I could provide the backend and make this accessible to everyone.
Is there a way we could see the code on GitHub tho?
I'm not really sure how to do a web interface for this but I'm sure a day on stack overflow would enlighten me :p
IMO, the cardinal sin of sharing programming projects online is not uploading the code to github.
True. Normally I like to clean my code so others can use it easily (bug-free, documentation, examples, etc.) but that takes a LOT of time. However I could create a 'scratch work' repo on GitHub with 'unpolished' projects like this. It may be difficult to setup and run, but at least someone technical could read through the source if they want to build something similar on their own... Is that something you'd find useful?
It's probably not something i'd work on, i'm time poor and have other projects on the go, but I think it would be better than nothing for anyone who wants to work on it
Also if you mean you have a single repo with multiple projects in it, I would recommend against that, repos are cheap
This would be great for a horror game, good project though.
It's amazing how it's been only 3 years but we've already advanced AI to the point where generated faces are near perfect!
And another three years, AI can generated a next to impossible dectect, Hyper-realistic videos with 80% plus accuracy with faces with environmental factors and expressions with that. (No sound)
In 2027, I bet it does the same as 2024, but better, with sound, 1.5 minutes of video / seconds production, 99.97% accuracy, voice editor, and generates faces of any age that match the voice, sound, brains, and action.
8:55 wtf is that
My nightmares
Dude cmon thats my daughter...
Its ma‘am!
Ur mom
That is your new girlfriend that will lie right next to you when you wake up this night.
Would love to see a higher resolution version of this
There exists one.
Nightmares remastered
I would not.
This face this doesn’t exist .com is here
This is just a video of Oblivion's character editor...
In just a few years we went from this to stable diffusion/dalle 2/midjourney.
7:47 that is so freaking creepy
Yesterday was nostalgic. The future is unprecedented.
The weird moment when you see your own face in the video
Imagine
Is there a way to train a model to score how realistic a face is and use it to tweak the sliders using genetic algorithm?
Yes, that one is called adversarial learning. Basically, you have two competing systems and a set of real photos. System A generates faces from random noise, B is presented with A's output and real photos to be trained to distinguish them. Then A is improved (using B's correct answers as a loss function), then B is improved, etc
No need for GA there too. It can be performed using simple gradient learning, etc
@@evennot you'd have to label the images
To expand in what the first commenter said, model B would be what we call a discriminator because it's trained to discriminate between real and fake images. This is also how deepfake videos are made.
@@eliasniemann7998 No you do not.
You actually do two things: you generate images using NN A from random noise and you feed those images as well as images from the dataset into the NN B. NN B learns to distinguish images from the dataset and images that were generated by NN A. NN A learns to trick NN B into believing images it generates are from the dataset. No labeling involved.
Of course you wouldn't get sliders neatly corresponding to describable features of the dataset, but you can get really realistic images as long as your datasets are big enough. For example thispersondoesnotexist.com/ uses GANs to generate faces.
@@TavartDukod I just typed "face" into Google image search and the 6th result wasn't a real face. So you don't need to label, but you need to manually check the input
I definitely think that you should continue making videos like this one.
Here from carykh! You totally deserve more subs!
Maxwellcrafter fellow cubers
Ha I comes to carykh after I discovered this channel
I absolutely loved this video. Thank you. I only just found your channel today for the first time, I’m now binging all of your videos! Love you dude!
I love that you went into the statistics a bit. Really cool concepts hiding in there.
meanwhile in 2023: you can animate donald trump catching an octopus and innviting his president friends to dinner
This could improve a lot how police sketches are created. Not only that, this provides an interface that could be used with NLP to automatically generate a seed sketch and then refined. Congratulations, really cool.
This video is so cool. The explanation about PCA and what the most important features are using the slides is really educational. Thanks for putting this together.
Just found your channel, and I love the technical videos like this! You have a knack for explaining things in a really intuitive and understandable manner. I've been wanting to get into Machine Learning, and I really appreciate these videos
Thanks man, keep up the good work!
Number 8 is (a)symmetry y. It's easier to recognize if you don't think of these as faces but as images.
I for one definitely enjoy the more technical videos, keep up the good work!
"I'm not sure what the format of this channel will be.": You're doing great. You keep it theoretically sound and practical so we can learn ourselves with your code.
About half a decade later and modern AI has completely trivialized this process
8:22
Zucc shedding his skin
Very intuitive presentation of ideas. The combination of Auto encoder with PCA to make them interpretable was new to me, even though I have read about VAE etc etc. Also your ability to interpret and label the first 8 or 10 features was mind blowing. Nice work!
Incredible how far we’ve come since this
I want an online face generator for the world to use
Go to thispersondoesnotexist . com
There is one. faceresearch.org/demos/average
@@sergeboisse holy shit, thank you. I haven't laughed that much in a while.
@@herbiehusker1889 Are those computer generated? They're so perfect, look like real pictures. Wish there was a similar site but that generated only good looking people.
@@herbiehusker1889 Also, isn't there one where we can adjust the knobs to obtain a custom face?
Great video. I'd love to see more similar technical videos, with unsupervised learning. Seems like supervised learning dominates almost everything, but those things seem quite powerful.
I'd love to see e.g. some variational eutoencoder or similar things.
These all faces are absolutely beautiful! I'm definitely in love with them)) Thanks alot for your great job!
These faces were truly horrific.
Just stumbled upon your channel.
Please dont dissapoint me by becoming inactive but instead you have lots of new amazing content like this one! :)
Imagine being a hypercube with all the generated faces
I miss the times when this was a breakthrough
So well explained! It was amazing to see how the algorithm picked up certain features so well. I would surely play with the code.
This is so amazing. As an artist who loves drawing faces and creating faces, it could be so helpful in character creating.
Can you post the code on git I want to test this on my own dataset. Want to see where I stand in the customization of the sliders lol
ProSurviver admit it, xou just want to feed it pornstars..
@@XxRiseagainstfanxX 🤫🤫
I generate a human face everytime i look in the mirror
You need to continue making videos like this, this is awesome
I know nothing of coding, but found this thoroughly entertaining. You're extremely promising.
cool tech.. but don't get me wrong.. every picture says: PLEASE KILL MEEEEEEE!
This is one of the coolest, most inspiring videos I've seen in a long time. I really like what you do and what your interests are and seriously hope you're putting your skills and talent to good use in a challenging job.
P.S. Where did you learn all this stuff? I learned about PCA just last year and was amazed at what it could do, but I'm referring to the programming skills.
Programming is something I've been doing for so long, I've learned from so many sources. My own tinkering, game making, school, the internet, university, etc. Machine learning stuff was mostly self-taught though.
Well, I hope you enjoy it as much as I like watching the results
7:27 "Lets say we want someone with a dark shirt..." The next slide proceeds to make it a light pink.
Cool video! This stuff is so interesting to me. It’s amazing what can be done with some math and a computer. I took an introductory data science course during my CS degree, but videos like this make me wish I understood all this stuff better.
at 2:49 what do you mean by "instead we just imbed all training samples randomly"? I understand what the latent space is. But if it's only 80 dimensions, how do you get an entire image down to those 80 dimensions without an encoder? Are you feeding a random vector into the latent space and training it to produce a face from just random inputs?
Just realized the source is in the description. apparently keras actually has an "embedding" layer. the description they give of what it does is vague and i still don't get it, but it's a start
Me: *watches technical part*
Brain: "oh, I totally understand this..."
Me: "what did I just watch?"
Brain: "ummmmmmmmmmmm what?"
its simple
he is not doing it the first way but choses to take the easier way
I had absolutely no idea what you were speaking about, but i still found this very interesting lol.
I am studying media technology and this is really a nice way to explain everything.
8:38 OH GOD
OH GOD
hey, that one is pretty
OH GOD
I have absolutely no clue what the hell is going on in this video but I'm hooked anyway
Totally awesome video! Based on your insights, you could preprocess images to make largely redundant some of the biggest PCA components. Eg alighn all faces to the centre of the image, adjust for size differences of the face and maybe rotate faces so to be not tilted. Maybe also add 2 faces to the dataset which you generate yourself by averaging the faces of all girls and all guys. Those are likely to be used as major parts of the PCA axis for gender. Then rerun the training process. With a bit of iterative tweaking like that, my goodness, you really could have an amazing tool for modeling faces with all sorts of real world commercial applications. Well done mate! Brilliant work.
Really looking forward to a future case with this sort of thing (or the similar one by carykh) in higher quality, i.e. with higher quality resulting images. It's already really cool of course, but that would make it even nicer to see.
Somewhere among the 80 parameters there must be the Francis Bacon portrait effect
6:37
Wouldn’t you like to know, weatherboy!
@CodeParade Can you tell me how you made the side-by-side picture output and slider input (For adjusting the principal components) thing ?
The demo is crazy fun to play with....
This is more horrifying than "this person does not exist" so congrats.
I was able to kindda replicate the concept your project. A rather poor man's version of it.
My version is built with Tensorflow and Python, but I have a AMD GPU, so I had to make some sacrifices to be able to have interesting results with my CPU. Ended up scaling things down to 60x60 grayscale image.
I don't know much academic level math, took me a while, but managed to grasp an intuitive understanding of PCA (and most importantly, implement it in python). As in your video, it made everything better.
One thing I added to your concept was a couple randomizer buttons that switch all component values to +/-1 standard deviation, +/-2 standard deviation or +/-3 standard deviation it was really fun to see the generation of faces.
I am afraid that in my search of scaling things down I might have overfitted the NN.
My NN has an input of 3600 grayscale pixels (60x60 image), only one hidden layer of around 1000, and 40 dimensions in latent space.
For training I used just 256 pictures , in batches of 16 pictures.
For each epoch of training, I shuffled the training set, so that no 16 pictures batches the same, so to not have the same batches. I noticed this made a huge impact in quality of face generation.
For optimizer I used a RMSPropOptimizer, learning step of 0.001 ,and for loss calculation, I tryied a few.
I made several runs but all of them ended up simmilar. They didn't reduce loss over time. I also notice that some knob configurations produce really detailed images that I think are the same as one in the dataset.
I am in doubt about it being overfitted, since I ran through the autoencoder images that I didn't use for training, and it did a really good job. Does this discard overfitting?
What would be your choise about the method of loss calculation and choise of optimizer?
I really learned a lot thanks to this video. It pushed me to learn something new.
Wow, that's awesome!
Having only 256 images for training would definitely make me nervous about over-fitting, especially if your loss isn't going down. Did you include horizontal-mirror images? That can double your dataset size if you didn't include them already, I used that trick in this project to double the total. You can also add random translations, rotations and scales of the dataset if you still need more.
I like the Adam optimizer the best, I basically always use it unless its having convergence issues. MSE is fine for loss assuming you have a sigmoid activation as your last layer to clamp pixel brightness to 0-to-1.
Arrived here from your music generation video. Amazing stuff.
Man that was really nice. A very enjoyable way to learn something!
Crazy project man. Would be insane to create an AI trained to make the most human and clearest faces!
Really cool! I guess my main question would be something like: how well can you recognise (parts of?) your high school classmates in the generated faces? Do they look like total strangers to you, or are most of them like "oh, that generated face is mostly just Peter, but with some variations" or maybe "that face is part Peter, part George"? The sliders seem to show a pretty smooth transition between faces, so I assume the former ... but at the same time, it's hard to judge how random they are without having known any of the people in the training set. Once again, really cool video! :)
As far as I can tell they all look 'new'. The school was pretty big though, and this combines all grades, I don't know most of the people either. I didn't show any of the originals since I don't have their permission.
@@CodeParade jesus i've been trying to remember your name for two days. all i want to do is extend the bin data of fourier audio frames to make low sample rate audio high sample rate audio with similar precision to this face app. today people publish papers about this, i don't want perfection, just something to mess around with. that's why i am thinking of you, because you understand art. i can't believe humanity is so selfish there's not even a free web platform offering any kind of "spectral improvisation" but i'd guess a simple GAN would make the 10kHz files at riffusion much more pleasing since it would be so easy to train for. any tips on ML algorithm? (i gotta watch this one again..) i'm gonig to have to make a windows app becaus ei'm sick of humanity, horribly greedy horribles.
All that time in linear algebra and I literally couldn't visualize the shit we did when dicking around with bases or linear independence. It took this video to even get me a foothold two years later.
I want this to improve further. This is dope.
0:14 is that ksi
It would be really nice to see this done with perhaps a much larger data set but maybe with 100 parameters, then hide all but about 20-30 of the less important parameters and have all of the others being randomly shifted constantly to see if it makes any kind of aesthetic. However, it would be amazing if there was some kind of download link to play around with this ourselves. I hope one becomes available sometime!
Yeah I'd love to play around with this
7:33 / 7:34 Honestly, that right there looks really solid in comparison to most of the other faces in the video
Crazy cool stuff. I like your jpg analogy. I think of this sort of like the mp3 encoding that it knows the aural characteristics and compresses based on that advantage.
I feel like the complications were just due to taking a shortcut you assumed would work, but didn't. And I suspect you'd get better results by simplifying your algorithm to actually encode first rather than use two out-of-the-box dimensionality reduction algorithms before finally applying the dimensionality reduction algorithm that this video is actually about.
Those faces are some real nightmare fuel jesus
I love that moat of these are just nightmare fuel
Amazing demonstration. A larger dataset would be very interesting to see.
This is amazing and very creepy!
Is there some way I can play with the sliders?
This is awesome. Best latent ans autoencoder explanation in very few sentencea.
Please do more videos like this!
Wow, in the latent space representation, the activations are correlated. Who knew? Not me. Please keep doing this.
8:55 sleep paralysis demon
I accidentally click the random button then a beautiful girl shows up. I clicked it again
its lost
This was highly enjoyable. Thanks!
Even though I didn't fully understand, this was still really REALLY interesting
these are so spooky