Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleID : A Perception-Aware Dataset and Metric for Stylization-Agnostic Facial Identity Recognition

SIGGRAPH 2026 / ACM TOG Journal Track

arXiv Project Page HuggingFace

StyleID is a CLIP-based image encoder designed to produce identity embeddings that remain robust under stylization.
It can be used for identity similarity measurement, retrieval, evaluation, and identity-aware conditioning in generative pipelines.

Quick Start

pip install torch transformers==4.52.0 pillow
import torch
from transformers import CLIPModel, CLIPProcessor
from PIL import Image

device = "cuda" if torch.cuda.is_available() else "cpu"

model = CLIPModel.from_pretrained("kwanY/styleid").to(device)
processor = CLIPProcessor.from_pretrained("kwanY/styleid")

img_path = "data/ex.png"
img = Image.open(img_path).convert("RGB")

inputs = processor(images=img, return_tensors="pt").to(device)

with torch.no_grad():
    emb = model.get_image_features(**inputs)
    emb = emb / emb.norm(dim=-1, keepdim=True)

Notes

  • Not suitable for images with multiple faces
  • Rough center crop near the face is recommended for better performance

Training

Install the additional dependencies:

pip install wandb tqdm

Prepare StyleID-S with the following structure:

styleid-s/
├── p3/
│   └── {identity}.png
└── {method}/
    └── {style}/
        └── {identity}_{index}.png

Then create the checkpoint directory and run the training script. The dataset path and training hyperparameters can be changed in the final line of the script.

mkdir -p ckpt
python full_train_clip-checkpoint.py

Intended Uses

StyleID embeddings can be used for:

  • Identity similarity comparison
  • Image retrieval
  • Stylized identity evaluation
  • Identity-aware conditioning for generative models
  • Research on face recognition under domain shift and stylization

License and Usage Notice

  • StyleID is released for non-commercial research use.
  • Do not use FFHQ-derived data for biometric human recognition

Citation

If you find this work useful, please cite the paper:

@article{yun2026styleid,
  title={StyleID: A Perception-Aware Dataset and Metric for Stylization-Agnostic Facial Identity Recognition},
  author={Yun, Kwan and Lee, Changmin and Jeong, Ayeong and Kim, Youngseo and Lee, Seungmi and Noh, Junyong},
  journal={arXiv preprint arXiv:2604.21689},
  year={2026}
}

Releases

Packages

Contributors

Languages