facesjs icon indicating copy to clipboard operation
facesjs copied to clipboard

[FEAT] Generate face based off of a PNG of a real-life person

Open a4v2d4 opened this issue 11 months ago • 7 comments

This would essentially be like Vectorizer.ai, but the SVG would follow your current style. So you could easily create face svg's of actual prof athletes without infringing on whatever licenses or whatever are stopping common folk like us from using.

I was thinking of using some modern AI image analysis stuff (even if simply asking chatgpt for feature values manually) to analyze player headshot pngs/jpegs and output values for all face 'types' values... Then that could be used with CLI to generate actual SVG's with facejs styling?

If anyone can think of a better way, let me know!! I might just take a stab at something like this myself.

a4v2d4 avatar Feb 08 '25 09:02 a4v2d4

So you could easily create face svg's of actual prof athletes without infringing on whatever licenses or whatever are stopping common folk like us from using.

I'm not sure if that is legally true, even if you own the rights to the original image.

I was thinking of using some modern AI image analysis stuff (even if simply asking chatgpt for feature values manually) to analyze player headshot pngs/jpegs and output values for all face 'types' values... Then that could be used with CLI to generate actual SVG's with facejs styling?

It's an interesting idea. Would be really cool if you could get it to work. People would have fun putting themselves in it.

I'm not sure how easy it will be to do. Can an LLM do it out of the box, maybe with a little instruction? Maybe? How good can they do it? I don't know? Would be cool to see what you come up with!

dumbmatter avatar Feb 09 '25 01:02 dumbmatter

I'm not sure if that is legally true, even if you own the rights to the original image.

Could you explain/expand please? Even if I own the rights to the image? If I drew a picture of my favorite player by hand, what do you think the legal restrictions would be for how I use it?

a4v2d4 avatar Feb 09 '25 02:02 a4v2d4

Publicity rights - can't necessarily use pictures of real people (even a cartoon you made) for all purposes. Depends on the details though.

dumbmatter avatar Feb 09 '25 03:02 dumbmatter

Fudge, I'm dumb. Forgot what NIL stood for 😂

a4v2d4 avatar Feb 09 '25 03:02 a4v2d4

@dumbmatter is there an easy place that lists all the different valid values for each feature type?

Like, I see the feature types defined here: https://github.com/zengm-games/facesjs/blob/master/src/types.ts.

And I can figure out the valid numeric ranges for scalar values from the random generations here: https://github.com/zengm-games/facesjs/blob/master/src/generate.ts.

But idk where, without clicking through web ui, i can find all the values for the different ID types (e.g. hat2 or jersey1)? Am I missing something?

a4v2d4 avatar Feb 09 '25 08:02 a4v2d4

You can find each of the individual SVGs in the /svg folder under their component subfolders

And then the best consolidated list is probably here - https://github.com/zengm-games/facesjs/blob/master/tools/lib/genders.js

tomkennedy22 avatar Feb 09 '25 13:02 tomkennedy22

@tomkennedy22 Thank you!

a4v2d4 avatar Feb 09 '25 23:02 a4v2d4