Skip to content

Evaluation Tools for [NeurIPS 2024] RectifID: Personalizing Rectified Flow with Anchored Classifier Guidance

Notifications You must be signed in to change notification settings

JeffreyYzh/Personalization_Evaluation_Tools

Repository files navigation

Evaluation Tools for Personalized Image Generation

This is the evaluation toolkit for NeurIPS 2024 paper RectifID: Personalizing Rectified Flow with Anchored Classifier Guidance.

Set up

Our code mainly bases on CelebBasis. We use their environment to initialize.

conda env create -f environment.yaml
conda activate sd
pip install insightface
pip install onnx2torch

Download Model

As we use PIPNet to extract face landmarks (weights) for face region detection and computes cosine similarities using ArcFace (weights). Please download their weights to the /weights directory.

Download Source Image

We evaluate on the first 200 images in the CelebA-HQ dataset with 20 text prompts including 15 realistic prompts and 5 stylistic prompts. Refer to /src directory and unzip the image under the directory.

Quick Use

  1. Generate Images using 200 images and 20 text prompts. Label each image as {IMAGE_ID}_{PROMPT_ID}.jpg and put them all in /Your/Path/To/OUTPUT
  2. Run the following code to generate evaluation results
python eval_imgs.py --src_root src --save_dir result.csv --eval_folder ouput --model_dir weights

About

Evaluation Tools for [NeurIPS 2024] RectifID: Personalizing Rectified Flow with Anchored Classifier Guidance

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages