Skip to content

AIGC, Pixelization, Pixel Art, SIGGRAPH ASIA 🌠 If you like this work~ 🌠

License

Notifications You must be signed in to change notification settings

WuZongWei6/Pixelization

Repository files navigation

Make Your Own Sprites: Aliasing-Aware and Cell-Controllable Pixelization (SIGGRAPH Asia 2022)

Description

This is the official implementation of the SIGGRAPH Asia 2022 paper "Make Your Own Sprites: Aliasing-Aware and Cell-Controllable Pixelization". Paper can be found here or downloaded from here.

⭐⭐⭐Newest Update⭐⭐⭐

Test Pro: We launch a new pixelization method based on original repository, which can produce pixelization result from 2× to N× (N could be any integer number). Please refer to the Test Pro section below.👾👾

Some Results

©Tencent, ©Extend Interactive Co., Ltd, © Pablo Hernández and © Bee Square.

Video Demo

Please see our video demo on YouTube.

User Feedback

See user testing feedback at https://twitter.com/santarh/status/1601251477355663361

Prerequisites

  • Linux
  • Python 3
  • NVIDIA GPU + CUDA CuDNN
  • pytorch >= 1.7.1 and torchvision >= 0.8.2

Dataset

The dataset is available at https://drive.google.com/file/d/1YAjcz6lScm-Gd2C5gj3iwZOhG5092fRo/view?usp=sharing.

Pretrained Models

Path Description
Structure Extractor A VGG-19 model pretrained on Multi-cell dataset.
AliasNet An encoder-decoder network pretrained on Aliasing dataset.
I2PNet I2PNet.
P2INet P2INet.

Please read the License before use. Unauthorized commercial use is prohibited.

My email is in my profile.

使用前请阅读License,禁止未经授权的商业使用

Test Pro

Create empty directory ./checkpoints/YOUR_MODEL_NAME

Put alias_net.pth and pixelart_vgg19.pth in ./

Put 160_net_G_A.pth and 160_net_G_B.pth in ./checkpoints/YOUR_MODEL_NAME

Create empty directory ./dataset/TEST_DATA/Input

Put test images in ./dataset/TEST_DATA/Input

Run the following command to test:

python test_pro.py --input ./datasets/TEST_DATA/Input --cell_size 4 --model_name YOUR_MODEL_NAME

--input could be a file or directory.

--cell_size could be any integer number.

Train

Create empty directory ./checkpoints/YOUR_MODEL_NAME

Put alias_net.pth and pixelart_vgg19.pth in ./

Put 160_net_G_A.pth and 160_net_G_B.pth in ./checkpoints/YOUR_MODEL_NAME

Download the dataset. Create two empty directories ./datasets/TRAIN_DATA/trainA and ./datasets/TRAIN_DATA/trainB.

Put non-pixel art images in ./datasets/TRAIN_DATA/trainA and put multi-cell pixel arts in ./datasets/TRAIN_DATA/trainB.

Run the following command to train:

python train.py --gpu_ids 0 --batch_size 2 --preprocess none --dataroot ./datasets/TRAIN_DATA/ --name YOUR_MODEL_NAME

The checkpoints and logs will be saved in ./checkpoints/YOUR_MODEL_NAME.

Test

Create empty directory ./checkpoints/YOUR_MODEL_NAME

Put alias_net.pth and pixelart_vgg19.pth in ./

Put 160_net_G_A.pth and 160_net_G_B.pth in ./checkpoints/YOUR_MODEL_NAME

Create empty directory ./dataset/TEST_DATA/Input.

Put test images in ./dataset/TEST_DATA/Input, and run python prepare_data.py to prepare data.

Run the following command to test:

python test.py --gpu_ids 0 --batch_size 1 --preprocess none --num_test 4 --epoch WHICH_EPOCH --dataroot ./datasets/TEST_DATA/ --name YOUR_MODEL_NAME

The result will be saved in ./result/YOUR_MODEL_NAME.

License

Software Copyright License for non-commercial scientific research purposes. Please read carefully the terms and conditions in the LICENSE file and any accompanying documentation before you download and/or use the Pixel Art and/or Non-pixel art dataset, model and software, (the "Data & Software"), including code, images, videos, textures, software, scripts, and animations. By downloading and/or using the Data & Software (including downloading, cloning, installing, and any other use of the corresponding github repository), you acknowledge that you have read these terms and conditions, understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not download and/or use the Data & Software. Any infringement of the terms of this agreement will automatically terminate your rights under this License.

Acknowledgements

About

AIGC, Pixelization, Pixel Art, SIGGRAPH ASIA 🌠 If you like this work~ 🌠

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages