diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2835e94 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__ +venv +env + +output/*.jpg \ No newline at end of file diff --git a/README.md b/README.md index a8b2983..01df5a2 100644 --- a/README.md +++ b/README.md @@ -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 @@ -127,34 +181,7 @@ The paper "***ArtCoder: An End-to-end Method for Generating Scanning-robust Styl
-## 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. diff --git a/output/default.txt b/output/default.txt new file mode 100644 index 0000000..9ea0e49 --- /dev/null +++ b/output/default.txt @@ -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 \ No newline at end of file diff --git a/output/default_epoch_0.jpeg b/output/default_epoch_0.jpeg new file mode 100644 index 0000000..3794d74 Binary files /dev/null and b/output/default_epoch_0.jpeg differ diff --git a/output/default_epoch_200.jpeg b/output/default_epoch_200.jpeg new file mode 100644 index 0000000..b77b77e Binary files /dev/null and b/output/default_epoch_200.jpeg differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0ba28a2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +matplotlib==3.7.1 +pandas==2.0.1 +