Skip to content

Latest commit

聽

History

History
74 lines (58 loc) 路 2.8 KB

File metadata and controls

74 lines (58 loc) 路 2.8 KB

DiffQRCoder: Diffusion-based Aesthetic QR Code Generation with Scanning Robustness Guided Iterative Refinement

Python MIT license arXiv

Author: Jia-Wei Liao, Winston Wang, Tzu-Sian Wang, Li-Xuan Peng, Ju-Hsian Weng, Cheng-Fu Chou, Jun-Cheng Chen

IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) 2025

This repository implements a two-stage iterative refinement pipeline that leverages a pretrained ControlNet to generate aesthetic QR codes. Check out the project page here.

srpg

馃敡 Setup

To set up the virtual environment and install the required packages, use the following commands:

virtualenv --python=python3.10 diffqrcoder
source diffqrcoder/bin/activate
pip install -r requirements.txt

馃殌 Generating Aesthetic QR Code

To generate the aesthetic qrcode, run the following:

python run.py \
    --controlnet_ckpt <checkpoint of controlnet> \
    --pipe_ckpt <checkpoint of pipeline> \
    --qrcode_path <path of qrcode image> \
    --qrcode_module_size <qrcode module size> \
    --qrcode_padding <qrcode padding> \
    --neg_prompt <negative prompt> \
    --num_inference_steps <number of inference step> \
    --controlnet_conditioning_scale <controlnet conditioning scale> \
    -srg <scanning robust guidance scale> \
    -pg <perceptual guidance scale> \
    --srmpgd_num_iteration <number of srmpgd iterations> \
    --srmpgd_lr <srmpgd learning rate> \
    --device <device of running the code> \
    --output_folder <folder of generated image>

馃敡 Unit Test

To execute the unit test, run the following:

bash scripts/run_test.sh

馃幆 Citation

If you use this code, please cite the following:

@inproceedings{liao2024diffqrcoder,
  title     = {DiffQRCoder: Diffusion-based Aesthetic QR Code Generation with Scanning Robustness Guided Iterative Refinement},
  author    = {Jia-Wei Liao, Winston Wang, Tzu-Sian Wang, Li-Xuan Peng, Ju-Hsian Weng, Cheng-Fu Chou, Jun-Cheng Chen},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  year      = {2025},
}

Star History

Star History Chart