PixelTransformer
Code release for the ICML 2021 paper "PixelTransformer: Sample Conditioned Signal Generation".
Installation
Please install pytorch and pytorch3d before the following steps.
pip install hydra-core --upgrade
pip install pytorch-lightning
pip install imageio scikit-image
mkdir external; cd external;
git clone [email protected]:kuangliu/pytorch-cifar.git
# if interested in evaluating CIFAR classification accuracy, please train a Resnet-18 model from this repo
Please modify the paths in the config files.
Training
See the sample commands in experiments/s2s.py
Evaluating
See the sample commands in benchmark/
Preprocessing Data
Most of the image datasets used correspond to standard torchvision datasets. The cat dataset used is from Wu. etal's CVPR 2020 work, and can be downloaded using their provided script.
To extract SDF values for the ShapeNet experiments, we followed the preprocessing steps from DISN although with some modifications to the extraction file. Please use our modified preprocessing file instead for reproducibility.