gestalt
17 years ago
2 weeks ago
52
https://sortitoutsi.net/uploads/mirrored_images/wtxubAs4d402o1bCp3ZqjhCc3jxCa1Y9iClP3wmm.jpg
https://sortitoutsi.net/uploads/mirrored_images/ZY89cUuqgo5fXJqfrb0XAxw6utVFcM1Dw3dmZ2Yk.jpg
This is a sample of newly generated faces from a machine learning algorithm.



FM NEWGAN FACES V1
  • What is this?
  • What are the limitations?
  • Why is SI not using this?
  • Can I download it?
What is This?

I trained a GAN (pretrained StyleGan2), which is a specific type of neural networks, to generate novel faces with a subset of the sortitoutsi-mega-cutout facepack. The goal of a GAN is to generate indistinguishable images compared to the input images. Therefore, it is an ideal approach to generate fotorealistic faces for newgen player inside Football Manager. More info on what a GAN is and what the application are [1].

What Are The Limitations?

First of all, we can not control the properties of a generated image, so we can not say "generate a face with blonde hair and brown eyes and give it a medium teint". This is huge in the context of Football Manager, because we need to generate a face that suits a specific newgen (e.g. african). Although there is hope, because current research tries to solve this problem and morph a image into a similar image that fulfills our desired properties [2]. Additionally, sometimes you will get garbage samples that look like an accident from Frankensteins lab. From my 2000 generated samples I had about 114 bad ones (5.7%). The hardware specification to run the training process are very high. I ran this on a Google Colab instance, this is googles cloud computing platform for AI research and makes use of high-end GPU units. Nvidia used for their pretrained network several high-end GPUs in parallel. One can not replicate this on hardware that the average user has at home. Further, even nvidia trained their networks for several days (afaik 16).

Why is SI not using this?

Beside, some of the limitations mentioned above, SI what need to sort some legal questions. First Nvidia released the StyleGan2 under a specific license that forbids usage in a commercial context. Therfore, they could train their network with a non-commercial dataset for ~200k faces. SI would need to clarify the usage of the GAN technology with Nvidia and have a dataset, which they are allowed to use. Since, Football Manager comes with some faces they might already have a dataset, but it needs to be big enough in size and have some diversity. For example you can not generate east asian faces when your set consists of caucasian faces. But the GAN doesn't care if a face is from Messi or some 4th division player, so this might be the angle.
As I mentioned above, computation is also an issue, I would suggest to figure out an agreement with nvidia to use their technology in exchange for some marketing exposure. I mean they released the noise cancellation for free, so to see some of their research applied in a market might have some considerable value for them. Maybe they could even help out with some of the limitations I mentioned.
Further, the images would ne to be generated in the cloud, it is impossible to even just generate one picture on a user spec computer. The amount of VRAM those networks need is insane and mostly above 10GB.

Can I download it?

Yes, here is a zip file with 1886 images. Technically I can generate millions of them but as mentioned above, about 5% are bad.

FAQ

placeholder


Cheers
fayon
16 years ago
4 months ago
127
Wonderful! I always thougth why SI doesn't do this instead of the awful regen faces.\

Cheers!!
bennytee
18 years ago
5 days ago
161
Premium
This is amazing, just gave all my youth intake a face, amazing for my youth focussed save, can't believe these aren't real people, extraordinary .
Can't thank you enough, they look great. My only gripe is that they do need cleaning up a bit if they're used on dark skin as they have white ghosting around them but its not a deal-breaker and can be done one by one as I use them.
Is there any chance you could do older ones for staff?
Thanks again
gestalt
17 years ago
2 weeks ago
52
This is amazing, just gave all my youth intake a face, amazing for my youth only save, can't believe these aren't real people, extraordinary .
Can't thank you enough, they look great. My only gripe is that they do need cleaning up a bit if they're used on a dark skin as they have white ghosting around them but its not a deal breaker and can be done one by one as I use them.
Is there any chance you could do older ones for staff?
Thanks again


Im working on that white ghosting stuff, but it seems like there always will be some roughness to it. A staff pack will be possible, but at first I will try to sort some other issues out.
ygeshev
9 years ago
5 months ago
12
Thanks for great work. How to put the faces into the game?
bennytee
18 years ago
5 days ago
161
Premium
Thanks for great work. How to put the faces into the game?


One by one, using the unique ID's of each newgen, bit of a pain but worth it

Like this

In Football Manager, go to settings > preferences > interface and select the field that says "Show sceen IDs in the Title Bar to assist skinning"

Exit back to the player you want to replace the image of and take note of the ID number.

Find the image you want to use and replace the name of the image with the ID

then use this program to create the config file
ygeshev
9 years ago
5 months ago
12
Mustang13297
9 years ago
3 days ago
22,894
@HRiddick Maybe something for your Cut-Out Regen pack?
HRiddick
15 years ago
6 hours ago
34,939
@HRiddick Maybe something for your Cut-Out Regen pack?

We're already chatting, hopefully something will be in the works between the two projects fairly soon
Mustang13297
9 years ago
3 days ago
22,894
We're already chatting, hopefully something will be in the works between the two projects fairly soon


That's great to hear! Looking forward to it
Ms Football Manager
4 years ago
4 weeks ago
2
Premium
I have to say that I have been looking for regen faces for ages and these are by far, without a doubt the very best there is. I STILL cannot believe they are computer generated (except for the odd one). Truly, truly amazing work.

Thank you. You have made my game complete.
laurentius
16 years ago
1 hour ago
18
Anyone know of a tool to remove the white halo from multiple images easily? 1800 images one-by-one is too much of a chore...
Btw, generated.photos gives very realistic AI-created images too, and you can remove the background already at the website.
bennytee
18 years ago
5 days ago
161
Premium
I've gotten used to the issue of the white halo effect as it helps me identify that a player is a regen
jozza800
17 years ago
7 months ago
3
One by one, using the unique ID's of each newgen, bit of a pain but worth it

Like this

In Football Manager, go to settings > preferences > interface and select the field that says "Show sceen IDs in the Title Bar to assist skinning"

Exit back to the player you want to replace the image of and take note of the ID number.

Find the image you want to use and replace the name of the image with the ID

then use this program to create the config file


If you set the squad view to show only player names and the player id you can export/print to file the lists of players and they're ids. Easier than copying the ids from the player name top bar.
GfxJG
12 years ago
1 week ago
105
Premium
Excuse my French, but... Holy fuck, this is amazing. Currently using a 3D-face newgen pack, which works incredibly, but this is next-level. You mention that you could theoretically generate millions of them, but about 5% are bad. If you're willing, I'd gladly help you sort through the generated images, identify the bad ones, if it means a larger selection of faces. Obviously not millions, but from my experience, ~15.000 is where you reach a point that duplicates are so rare, you don't really notice them when you see them. Even half that would be great. Hit me up if it's something you'd be interested in, but naturally it's fair if it's too time-intensive, I don't know how long these take to generate :-)
Gordonzolar
12 years ago
1 year ago
1
These are amazing! We need more of these. Since there is no way to link these faces to skin colour of regens (as of now) anyway, you could just randomly assign those to newgen IDs like its done in the Zealand Regen Pack. These are much better faces than in that pack.
Bob de Bobber
9 years ago
6 days ago
65
Premium
First off, this is great! I've been using real faces to replace regens for 4 years now, and I was starting to struggle to find good faces for some ethnicities, that I hadn't used yet. So a theoretically endless supply of faces is perfect!

I also might have a solution for the first problem (being able to generate a specific hair color or ethnicity). Now I don't really know how the whole StyleGAN thing works (I looked at it briefly in the past, but I found it a bit to complicated), but could you in theory just use a bunch of images of for only example blond white guys to ensure you generate a blond white guy?
If that does work and you've not done it because it's too much work to sort through face packs and select all the blond guys, then maybe a facepack like this would help? It was made back when you just replaced regen hairstyles with faces so it's fully sorted by ethnicity, hair colour and hair length.

Again, no idea if that's an option and maybe you already thought of it yourself and it's too much work with the training of StyleGAN for a bunch of different smaller image sets or something else, but it might be useful.

gestalt
17 years ago
2 weeks ago
52
Excuse my French, but... Holy fuck, this is amazing. Currently using a 3D-face newgen pack, which works incredibly, but this is next-level. You mention that you could theoretically generate millions of them, but about 5% are bad. If you're willing, I'd gladly help you sort through the generated images, identify the bad ones, if it means a larger selection of faces. Obviously not millions, but from my experience, ~15.000 is where you reach a point that duplicates are so rare, you don't really notice them when you see them. Even half that would be great. Hit me up if it's something you'd be interested in, but naturally it's fair if it's too time-intensive, I don't know how long these take to generate :-)

Training takes the most time. Generating is moderate. The goal is to release a megapack in the end, so it could potentially be used for automatic regen replacement. Right now I am working with HRiddick to improve the cleaning of generated images.

These are amazing! We need more of these. Since there is no way to link these faces to skin colour of regens (as of now) anyway, you could just randomly assign those to newgen IDs like its done in the Zealand Regen Pack. These are much better faces than in that pack.

Yes of course you could use it in that way, but at first we focus on better image quality. As said above. Automatic regen replacement is the end goal. And the ethnicity option really just works if the guys who work on the live editors would help us out here. I looked into it, but this is not really my area of informatics im into. Unfortunately none of them have answered our messages, so i dont have much hope unfortunately.

First off, this is great! I've been using real faces to replace regens for 4 years now, and I was starting to struggle to find good faces for some ethnicities, that I hadn't used yet. So a theoretically endless supply of faces is perfect!

I also might have a solution for the first problem (being able to generate a specific hair color or ethnicity). Now I don't really know how the whole StyleGAN thing works (I looked at it briefly in the past, but I found it a bit to complicated), but could you in theory just use a bunch of images of for only example blond white guys to ensure you generate a blond white guy?
If that does work and you've not done it because it's too much work to sort through face packs and select all the blond guys, then maybe a facepack like this would help? It was made back when you just replaced regen hairstyles with faces so it's fully sorted by ethnicity, hair colour and hair length.

Again, no idea if that's an option and maybe you already thought of it yourself and it's too much work with the training of StyleGAN for a bunch of different smaller image sets or something else, but it might be useful.

Could be done, but training the StyleGAN2 from a pretrained network takes at least 8hrs. I think we can achieve great diversity with a well designed training set. I am already using stratified sampling, so i try to balance the different ethnicities out. The odd one might just not make it, because GANs sometimes don't reproduce super small minorities. E.g lets say there is a player with blue hair and just one in FM, im pretty confident the GAN would not produce any player with blue hair. Its just an outlier.

A future version will have the generated images pre-sorted by ethnicities. This will not be 100% accurate, especially for ethnicities that look very similar (e.g African and Carribean, or East Asian and South East Asian). But it should be good enough to aid you.

P.S: If we finish improving the image quality, there will be a staff pack as well.
laurentius
16 years ago
1 hour ago
18
I managed to remove the white halos by batch processing a simple script in Paintshop Pro utilizing the feathering tool. Combining this with ethnically specific automatic assignment and now every regen in my save has a proper face. =) Took some years to achieve but finally I have a game that SI should have made to begin with...
gestalt
17 years ago
2 weeks ago
52
I managed to remove the white halos by batch processing a simple script in Paintshop Pro utilizing the feathering tool. Combining this with ethnically specific automatic assignment and now every regen in my save has a proper face. =) Took some years to achieve but finally I have a game that SI should have made to begin with...


How did you do it? How accurate are your results?
laurentius
16 years ago
1 hour ago
18
How did you do it? How accurate are your results?


There is a Python script to do it but as far as I know it is only available as part of paid-for content. Works really well though, almost no hiccups at all. Only thing I've noticed is that English players with obviously Asian names get assigned Northern European faces. I can PM you later if you're interested in more details...
gestalt
17 years ago
2 weeks ago
52
There is a Python script to do it but as far as I know it is only available as part of paid-for content. Works really well though, almost no hiccups at all. Only thing I've noticed is that English players with obviously Asian names get assigned Northern European faces. I can PM you later if you're interested in more details...


definetly interested.
FuryG
14 years ago
1 year ago
210
Hi! I think this is brilliant!

Have you seen the new Regen Replacement Tool? Using this together with GAN faces would be amazing I believe! --> https://sortitoutsi.net/downloads/view/55026/samaroys-newgen-replacement-tool

There might still be a "manual" component if I understand correctly - sorting the generated faces into certain ethnicities (the regen replacement tool has distinct source folders named by ethnicity from which the pictures are pulled and mapped to relevant IDs). I believe this could be very well handled, especially if we combine efforts of a couple of interested helpers (would offer myself of course).

What do you think?

KnockItWide86
9 years ago
4 years ago
1
Is this another one of these packs whrere you put player ID's to indiviual faces?
Samuel Roy
8 years ago
2 weeks ago
139
Premium
Hi! I think this is brilliant!

Have you seen the new Regen Replacement Tool? Using this together with GAN faces would be amazing I believe! --> https://sortitoutsi.net/downloads/view/55026/samaroys-newgen-replacement-tool

There might still be a "manual" component if I understand correctly - sorting the generated faces into certain ethnicities (the regen replacement tool has distinct source folders named by ethnicity from which the pictures are pulled and mapped to relevant IDs). I believe this could be very well handled, especially if we combine efforts of a couple of interested helpers (would offer myself of course).

What do you think?


We have definitely been in contact around this and will be working together on something for sure!
Mortiis
12 years ago
2 days ago
81
wow...if u guys can work this out together it would be perfect!!!!
JimmysTheBestCop
4 years ago
1 week ago
42
Premium
If you wanted something quick and dirty as a stop gap, until more advanced methods are able to be produced, there was a script from Willylim in FM18 that used exactly 14,256 picture files to automatically assign all generated characters a face. You just rename the files 1 to 14,256 and drop them and the xml file into a folder and you're off totheraces.

I tested it with your 1886 picture files I just had to replicate it to 14,256 and randomly generate there file names 1 to 14,256. I'm sure I will notice duplicate pictures since the pool was only 1886 pics replicated. But if you had 14,256 unique picture files I'm sure it would drop the chances of ever seeing duplicate pics for gens to really low.

Great stop gap until you can figure out the ethnicity/nationality/skin color thing. And it doesn't require the end user to do anything. They would just drop the folder with the 14,256 and the xml file into their graphics folder.
Mortiis
12 years ago
2 days ago
81
@JimmysTheBestCop

but how u get all those regens id's
and how u fast rename all those pictures to their regen id's???
JimmysTheBestCop
4 years ago
1 week ago
42
Premium
@JimmysTheBestCop

but how u get all those regens id's
and how u fast rename all those pictures to their regen id's???


A free program like "bulk rename utility" to rename all the files. So I copy/paste the original 1800+ images to 14,256. Used the program to then randomize the order of the renaming and just start from 1 to n+1. Click go, basically. Takes all of 5 seconds for the program to run.

Now the 1st question I have absolutely no idea. I am assuming its part of the xml script from Willylim that he made for FM18. The xml file has over 1 million lines!!!!!!! I'm assuming each of the gen ids are those 1 million lines. Looks like it goes from 1915388583 to 1916413232

There is also another script out there that takes care of the ethnicity part. I know it was mentioned somewhere, maybe a podcast or article, but it has to do with "Chilled Moose". Her custom regen faces. I think one of her discord users created a script to map her face gen packs by nationality or ethnicity. Besides a couple of steps its basically suppose to be automatic as well. Chilled Moose stuff is paid content as she has a Patreon which among other things gives access to the scripts and discord. But as far as I heard the script wasn't created by her and so is free to be modified if one can find the script.

I came across the Willylim script because someone applied it to a free "self isolation" 50 pack that Chilled Moose gave out when Covid isolation struck. Limited effectiveness since you are replicating 50 to 14256. Many many many duplicates. But with the 1800+ its pretty dang on great. If there was a full 14256 unique pics even better. Someone posted a link to the script, somewhere on social media most likely a twitter post
https://www.mediafire.com/file/cegb7rptrh44jmh/config.xml/file


Mortiis
12 years ago
2 days ago
81
thx...i think i have an idea how i can do it quickly
i will try it on the weekend and i will let you know if it worked

You'll need to Login to comment