Skip to content

jwliao1209/ArtCoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArtCoder

This repository implements a PyTorch-based refactor of "ArtCoder: An End-to-end Method for Generating Scanning-robust Stylized QR Codes". The code has been restructured to enhance readability, scalability, and computational efficiency by leveraging PyTorch's built-in functions for tensor operations.

Setup

To set up the environment:

  1. Create a virtual environment:
virtualenv --python=python3.10 artcoder
  1. Activate the environment:
source artcoder/bin/activate
  1. Install the dependencies:
pip install -r requirements.txt

Generation

To generate the aesthetic qrcode, run the following:

python generate_aesthetic_qrcode.py \
    --qrcode_image_path <path_to_qrcode_image> \
    --content_image_path <path_to_content_image> \
    --style_image_path <path_to_style_image> \
    --output_path <path_to_output_image>

Result

Below is an example of generating an aesthetic qrcode from an inputs:

Original Image Aesthetic QR Code

Environment

We implemented the code on an environment running Ubuntu 22.04.1, utilizing a 12th Generation Intel(R) Core(TM) i7-12700 CPU, along with a single NVIDIA GeForce RTX 4090 GPU equipped with 24 GB of dedicated memory.

Citation

If you use this code, please cite the following repository:

@misc{liao2024artcoder,
    title  = {A PyTorch implementation of ArtCoder},
    author = {Jia-Wei Liao},
    url    = {https://github.com/jwliao1209/ArtCoder},
    year   = {2024}
}

Additionally, please reference the original paper:

@inproceedings{su2021artcoder,
  title     = {Artcoder: an end-to-end method for generating scanning-robust stylized qr codes},
  author    = {Hao Su, Jianwei Niu, Xuefeng Liu, Qingfeng Li, Ji Wan, Mingliang Xu, Tao Ren},
  booktitle = {CVPR},
  year      = {2021}
}

About

✏️ [CVPR'21] Unofficial implementation of "ArtCoder: An End-to-end Method for Generating Scanning-robust Stylized QR Codes".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages