What is Nostr?
james / James Lewis
npub1nf9…xa3x
2024-07-08 00:26:38
in reply to nevent1q…7c4w

james on Nostr: I don't think we need a 256-bit face generator. Too many variables with too much ...

I don't think we need a 256-bit face generator. Too many variables with too much resolution may make false-positive matches. Three faces that add up to greater than 128-bits should be sufficient.

Generating an image could be done by creating a standard svg with all individual elements as `<symbol>` elements and using color assignments from a palette. Each avatar could be created by selecting the `<symbol>`s by bitwise operation on the seed/key/hash. For the bit breakdown, here's what I've thought of:

Sex (1)
Face shape (3) and color (3)
Eye shape (2) and color (3)
Hair shape (4) and color (3 or 2x3 for base/highlight)
Accessory type (3) and colors (2x3) // Like a hat, scarf, etc.
Shirt shape (3, vee/collar/sleeve) and colors (2x3)
Facial hair or earrings (depends on sex bit?) shape (3) and color (3) // Some more thinking needed to balance counts, etc.
Background pattern (3) and colors (2x3)

This adds up to 55 bits. I'm sure we could squeeze out some more bits by adding another bit of option here or there, probably in color. Probably able to get to 64-bit per face.

Limiting the colors and shapes will result in more discrete images, and spotting a match should prove easier. Too many possible colors will result in some colors looking too similar, like "is this chartreuse or lime?" It also allows for more art in the creation of the faces, IMHO.
Author Public Key
npub1nf9vm6uhs4j7yaysmjn9eqlf7et5t6hvrkdqgpd995vcc9yfjyas0pxa3x