Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__pycache__
venv
env

output/*.jpg
81 changes: 54 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,60 @@ The paper "***ArtCoder: An End-to-end Method for Generating Scanning-robust Styl
}
```

## Prerequisites

* Linux or Windows
* CPU or NVIDIA GPU + [CUDA CuDNN ](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local)
* Python 3.8

## Getting Started

### Installation

* Clone this repo:
```
> git clone https://github.com/SwordHolderSH/ArtCoder
> cd ArtCoder
```
### Create virtual env and install packages
```

> python -m venv venv

or

> python -m pip install virtualenv
> python -m virtualenv venv

Windows :
> venv\Scripts\activate

Linux :
> venv/bin/activate

CUDA :
> pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

> pip install -r requirements.txt
```

### Quick Start :

* Default Run
```
python manin.py
```

* Get detailed information about all parameters using
```
python main.py -h
```

* Generate your customized Stylized QR codes:
```
python main.py -style_img_path ./xxxx/xxx.jpg --content_img_path ./xxxx/xxx.jpg --code_img_path ./xxxx/xxx.jpg --output_dir ./xxxx/
```

## Demos

<table>
Expand Down Expand Up @@ -127,34 +181,7 @@ The paper "***ArtCoder: An End-to-end Method for Generating Scanning-robust Styl

</table>

## Prerequisites

* Linux or Windows
* CPU or NVIDIA GPU + CUDA CuDNN
* Python 3
* Pytorch 1.7.0

## Getting Started

### Installation

* Clone this repo:
```
git clone https://github.com/SwordHolderSH/ArtCoder
cd ArtCoder
```
* Install PyTorch and other dependencies.

### Quick Start
* Get detailed information about all parameters using
```
python main.py -h
```

* Generate your customized Stylized QR codes:
```
python main.py -style_img_path ./xxxx/xxx.jpg --content_img_path ./xxxx/xxx.jpg --code_img_path ./xxxx/xxx.jpg --output_dir ./xxxx/
```
### Notices
* The input code images are generated by the algorithm on the website https://meiyaoma.com/ . Of course, it is OK to use traditional QR codes (square modules appear as random distribution) as the input code images, and it just compromises some visual quality.
<table>
Expand Down
4 changes: 4 additions & 0 deletions output/default.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This folder will have output from default resolution

e.g file names
> epoch_epoch=0__Wstyle=1.0e+15__Wcode=1.0e+12__Wcontent1.0e+08.jpg
Binary file added output/default_epoch_0.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added output/default_epoch_200.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matplotlib==3.7.1
pandas==2.0.1