3DIAS_Pytorch
This repository contains the official code to reproduce the results from the paper:
3DIAS: 3D Shape Reconstruction with Implicit Algebraic Surfaces (ICCV 2021)
[project page] [arXiv]
Installation
Clone this repository into any place you want.
git clone https://github.com/myavartanoo/3DIAS_PyTorch.git
cd 3DIAS_Pytorch
Dependencies
- Python 3.8.5
- PyTorch 1.7.1
- numpy
- Pillow
- open3d
- PyMCubes (or build this repo)
Install dependencies in a conda environment.
conda create -n 3dias python=3.8
conda activate 3dias
pip install -r requirements.txt
Pretrained model
Download config.json
and checkpoint-epoch#.pth
from below links and save in weigths
folder. Note that we get Multi-class
weight by training with all-classes and Single-class
weight by training with each class
Multi-class
Single-class
To download all the single-class weigths, run
sh download_weights.sh
Or you can get the weights one-by-one.
airplane / bench / cabinet / car / chair / display / lamp / speaker / rifle / sofa / table / phone / vessel
Quickstart (Demo)
You can now test our demo code on the provided input images in the input
folder. (Or you can use other images in shapeNet.) To this end, simply run,
CUDA_VISIBLE_DEVICES=0 python demo.py --inputimg "./input/
.png" --config "./weights/config.json" --resume "./weights/checkpoint-epoch890.pth"
The result meshes are saved in output
folder. (We've created a few example meshes)
- total.ply is a whole mesh
- parts_.ply are meshes for parts To see the mesh, you can use meshlab
If you want to visualize meshes with open3d, run with --visualize
option as below.
CUDA_VISIBLE_DEVICES=0 python demo.py --inputimg "./input/
.png" --config "./weights/config.json" --resume "./weights/checkpoint-epoch890.pth" --visualize
The preprocessed dataset, training, testing code will be distributed soon.
Citation
If you find our code or paper useful, please consider citing
@inproceedings{3DIAS,
title = {3DIAS: 3D Shape Reconstruction with Implicit Algebraic Surfaces},
author = {Mohsen Yavartanoo, JaeYoung Chung, Reyhaneh Neshatavar, Kyoung Mu Lee},
booktitle = {Proceedings IEEE Conf. on International Conference on Computer Vision (ICCV)},
year = {2021}
}