Hacking Together 'Identities' with ArcFace
In the last log, I decided to use the SFHQ (Synthetic Faces High Quality) dataset to avoid ethics board approvals. The problem? I have a giant folder of one-off fake faces. I need identities—users with multiple photos—so I can tell my unlearning algorithm to “Forget User 42”.
So, I hacked together a pipeline to force identities onto random data.
I started by running all 30,000 images through MTCNN to align and crop the faces into standardized 128x128 bounding boxes. Then, I passed them through ArcFace to extract a 512-dimensional embedding for each face.
ArcFace is specifically designed for facial recognition; it maps visual facial features into a latent space where structurally similar faces cluster together. Relying on this property, I ran a massive MiniBatchKMeans clustering algorithm to partition the embeddings into 200 distinct clusters.
Boom. Instant pseudo-identities.
When you look at a 3x3 grid of a cluster, it feels magical. They look like photos of the same synthetic person taken under different conditions. It felt elegant and technically sound. Little did I know, this architecture was a ticking time bomb that would come back to haunt me months later.
But for now, we have our dataset! Next stop: building the base ResNet and testing naive erasers.