This is the evaluation toolkit for NeurIPS 2024 paper RectifID: Personalizing Rectified Flow with Anchored Classifier Guidance.
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
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.
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.
- 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
- 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