# Configuration for the Gradio User Study App # --- File and Folder Names --- DATA_FOLDER = "data" # Main folder containing domain subfolders BACKGROUND_IMAGE_NAME = "input_bg_bb.png" # Standard name for background input FOREGROUND_IMAGE_NAME = "input_fg.jpg" # Standard name for foreground input PROMPT_FILE_NAME = "prompt.txt" # Standard name for the prompt file # Names for the output images from different models. # These should be actual filenames present in each sample's folder. MODEL_OUTPUT_IMAGE_NAMES = { "baseline": "cp_bg_fg.jpg", "kv-edit": "kvedit.jpg", "tf-icon": "tf-icon.png", "dit-editor": "alphanoise0.05_timesteps50_QTrue_KTrue_VFalse_taua0.4_taub0.8_guidance3.0_all-layers.png", } # Names to display for each model in the UI (can be different from filenames) MODEL_DISPLAY_NAMES = { "baseline": "Model A", "kv-edit": "Model B", "tf-icon": "Model C", "dit-editor": "Model D", } # --- Data Collection --- RESULTS_CSV_FILE = "user_preferences.csv" CSV_HEADERS = [ "session_id", "timestamp", "domain", "sample_id", "prompt", "input_background", "input_foreground", "displayed_order_model_1", # To store which model was shown in 1st position "displayed_order_model_2", # To store which model was shown in 2nd position "displayed_order_model_3", # To store which model was shown in 3rd position "displayed_order_model_4", # To store which model was shown in 4th position "preferred_model_key", # The key of the preferred model (e.g., "model_a") "preferred_model_filename" # The filename of the preferred image ] SAMPLES_PER_DOMAIN = 3 # Number of samples to show from each domain per user session # --- Hugging Face Hub --- HF_DATASET_REPO_ID = "matsant01/dit-editor-collected-preferences" # Replace with your actual repo ID HF_TOKEN = None # Set this if your dataset is private, or use HF_HUB_TOKEN env var PUSH_INTERVAL_HOURS = 0.25 # Interval in hours to push results to the Hub # --- UI Configuration --- IMAGE_DISPLAY_SIZE = (300, 300) # (width, height) for displaying images APP_TITLE = "Image Composition User Study" APP_DESCRIPTION = """ Please look at the input foreground and background images, and the text prompt used for generation, then choose the composed image that you prefer the most. You consider: * 📸 **subject consistency**: does the subject resemble the one in the foreground image? Or is it just a similar object/animal? * 🖼️ **background preservation**: is the background image correctly preserved? * 🎨 **style blending**: is the subject style correctly adapted to the one of the background? """ FOOTER_MESSAGE = "Thank you for participating!" # --- Other --- SESSION_ID_LENGTH = 16 # Length of the randomly generated session ID # --- Paths --- BACKUP_FOLDER = "backup"