adde88 / Pixelization

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

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.

My email is on my profile.

Train

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 ./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 :stars: If you like this work~ :stars:

License:Other


Languages

Language:Python 100.0%