Skip to content
Shape-LabPublic

About

[WACV 2027] AdaPhase: Navigating the Trajectory with Adaptive Frequency Modulation for Content-preserving Stylization

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

[WACV 2027] AdaPhase: Navigating the Trajectory with Adaptive Frequency Modulation for Content-preserving Stylization

AdaPhase Overview

Setup

Prerequisites

AdaPhase has been tested with the following environment:

  • Python 3.10
  • PyTorch 2.5.1
  • CUDA 12.1

An NVIDIA GPU with CUDA support is recommended for inference.

Create and activate the Conda environment:

conda env create -f environment.yml
conda activate adaphase

Download SDXL Pretrained Model Weights

AdaPhase uses the pretrained Stable Diffusion XL (SDXL) Base and Refiner models provided by Stability AI:

The required model weights are automatically downloaded from Hugging Face during the first inference run and cached in the directory specified by --model-cache-dir (default: ./model_cache)

Alternatively, the models can be downloaded in advance using:

hf download stabilityai/stable-diffusion-xl-base-1.0 \
    --cache-dir ./model_cache

hf download stabilityai/stable-diffusion-xl-refiner-1.0 \
    --cache-dir ./model_cache

Run AdaPhase

To perform style transfer with AdaPhase, run:

python adaphase_sdxl.py \
    --content-image "./images/content_images/qual4.png" \
    --prompt "cubism" \
    --output-dir "./images/stylized_images" \
    --model-cache-dir "./model_cache" \
    --init-gaussian-lambda 0.3

Replace --content-image with the path to your input image and --prompt with your desired style description.

you can adjust --init-gaussian-lambda to control the balance between stylization and content preservation.

Example Style Prompts

  • Traditional Arts: "oil painting", "watercolor", "impressionism", "ink wash painting", "impasto painting", "sketching", "pointillism", "ukiyo-e"
  • Fregmented Arts: "pixel art", "mosaic art", "cubism", "stained glass art"
  • 3D & Spatial Forms: "voxel art", "claymation", "low poly", "origami"
  • Urban & Digital Arts: "cartoon", "cyberpunk", "glitch art", "graffiti painting"

Citation

If you find our work useful, please consider citing our paper. We also appreciate a star on this repository!

@inproceedings{lee2027adaphase,
    author    = {Sekwang Lee and Ilwoo Lyu},
    title     = {AdaPhase: Navigating the Trajectory with Adaptive Frequency Modulation for Content-preserving Stylization},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
    year      = {2027}
}

About

[WACV 2027] AdaPhase: Navigating the Trajectory with Adaptive Frequency Modulation for Content-preserving Stylization

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages