Official implementation of unPIC from How to Spin an Object: First, Get the Shape Right, a CVPRW 2026 paper (link). This repository contains the code to run our hierarchical diffusion model for generating 3D views from a single 2D input.
Follow these steps to set up the project locally.
- Python 3.8 or later
- An NVIDIA GPU with CUDA support (RTX A4000 or above) is recommended for performance.
-
Initialize Git LFS and clone the repository:
git lfs install git clone https://github.com/google-deepmind/unpic.git cd unpic -
Create and activate a virtual environment (Recommended):
python3 -m venv unpic_env source unpic_env/bin/activate -
Install dependencies: The required Python packages are listed in
pyproject.toml. Install them using pip:pip install .
You can run inference on a single image using the run_unpic.py script. The script
requires a path to an input image, the pre-trained model variables, and an
output directory.
Example Command:
python run_unpic.py \
--input_image_path /path/to/your/image.png \
--checkpoint_dir checkpoint/ \
--output_dir /path/to/save/outputs/ \
--config config.py@InProceedings{Kabra_2026_CVPR,
author = {Kabra, Rishabh and A Hudson, Drew and van Steenkiste, Sjoerd and Carreira, Joao and Mitra, Niloy J},
title = {How to Spin an Object: First, Get the Shape Right},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2026},
pages = {4708-4718}
}
