All Projects → xiumingzhang → Genre Shapehd

xiumingzhang / Genre Shapehd

Code and Data Release for GenRe (NeurIPS 2018) and ShapeHD (ECCV 2018)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Genre Shapehd

Tsdf Fusion
Fuse multiple depth frames into a TSDF voxel volume.
Stars: ✭ 426 (+76.76%)
Mutual labels:  3d, 3d-reconstruction
3d Machine Learning
A resource repository for 3D machine learning
Stars: ✭ 7,405 (+2972.61%)
Mutual labels:  3d, 3d-reconstruction
Curated List Of Awesome 3d Morphable Model Software And Data
The idea of this list is to collect shared data and algorithms around 3D Morphable Models. You are invited to contribute to this list by adding a pull request. The original list arised from the Dagstuhl seminar on 3D Morphable Models https://www.dagstuhl.de/19102 in March 2019.
Stars: ✭ 375 (+55.6%)
Mutual labels:  3d, 3d-reconstruction
Intrinsic3d
Intrinsic3D - High-Quality 3D Reconstruction by Joint Appearance and Geometry Optimization with Spatially-Varying Lighting (ICCV 2017)
Stars: ✭ 297 (+23.24%)
Mutual labels:  3d, 3d-reconstruction
Flame pytorch
This is a implementation of the 3D FLAME model in PyTorch
Stars: ✭ 153 (-36.51%)
Mutual labels:  3d, 3d-reconstruction
Pymeshfix
Python Wrapper for MeshFix: easily repair holes in PyVista surface meshes
Stars: ✭ 75 (-68.88%)
Mutual labels:  3d, 3d-reconstruction
Tsdf Fusion Python
Python code to fuse multiple RGB-D images into a TSDF voxel volume.
Stars: ✭ 464 (+92.53%)
Mutual labels:  3d, 3d-reconstruction
Pixel2meshplusplus
Pixel2Mesh++: Multi-View 3D Mesh Generation via Deformation. In ICCV2019.
Stars: ✭ 188 (-21.99%)
Mutual labels:  3d, 3d-reconstruction
Synthesize3dviadepthorsil
[CVPR 2017] Generation and reconstruction of 3D shapes via modeling multi-view depth maps or silhouettes
Stars: ✭ 141 (-41.49%)
Mutual labels:  3d, 3d-reconstruction
Objectron
Objectron is a dataset of short, object-centric video clips. In addition, the videos also contain AR session metadata including camera poses, sparse point-clouds and planes. In each video, the camera moves around and above the object and captures it from different views. Each object is annotated with a 3D bounding box. The 3D bounding box describes the object’s position, orientation, and dimensions. The dataset contains about 15K annotated video clips and 4M annotated images in the following categories: bikes, books, bottles, cameras, cereal boxes, chairs, cups, laptops, and shoes
Stars: ✭ 1,352 (+461%)
Mutual labels:  3d, 3d-reconstruction
Meshlab
The open source mesh processing system
Stars: ✭ 2,619 (+986.72%)
Mutual labels:  3d, 3d-reconstruction
Tf flame
Tensorflow framework for the FLAME 3D head model. The code demonstrates how to sample 3D heads from the model, fit the model to 2D or 3D keypoints, and how to generate textured head meshes from Images.
Stars: ✭ 193 (-19.92%)
Mutual labels:  3d, 3d-reconstruction
Pix2vox
Implementation of "Pix2Vox: Context-aware 3D Reconstruction from Single and Multi-view Images" (Xie et al., ICCV 2019)
Stars: ✭ 216 (-10.37%)
Mutual labels:  3d-reconstruction
Pulse
A pendant to warn you when you touch your face
Stars: ✭ 229 (-4.98%)
Mutual labels:  3d
Keras Srgan
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network implemented in Keras
Stars: ✭ 213 (-11.62%)
Mutual labels:  generative-adversarial-networks
Ifc.js
Ifc viewer for client applications.
Stars: ✭ 211 (-12.45%)
Mutual labels:  3d
Huejumper2k
2 Kilobyte 3D racing game in JavaScript
Stars: ✭ 236 (-2.07%)
Mutual labels:  3d
Wonder.js
🚀Functional, High performance 3D Webgl Engine
Stars: ✭ 225 (-6.64%)
Mutual labels:  3d
Scancomplete
[CVPR'18] ScanComplete: Large-Scale Scene Completion and Semantic Segmentation for 3D Scans
Stars: ✭ 213 (-11.62%)
Mutual labels:  3d-reconstruction
Arsenal
Blender game engine written in Rust.
Stars: ✭ 214 (-11.2%)
Mutual labels:  3d

Generalizable Reconstruction (GenRe) and ShapeHD

Papers

This is a repo covering the following three papers. If you find the code useful, please cite the paper(s).

  1. Generalizable Reconstruction (GenRe)
    Learning to Reconstruct Shapes from Unseen Classes
    Xiuming Zhang*, Zhoutong Zhang*, Chengkai Zhang, Joshua B. Tenenbaum, William T. Freeman, and Jiajun Wu
    NeurIPS 2018 (Oral)
    Paper   |   BibTeX   |   Project

    * indicates equal contribution.

  2. ShapeHD
    Learning Shape Priors for Single-View 3D Completion and Reconstruction
    Jiajun Wu*, Chengkai Zhang*, Xiuming Zhang, Zhoutong Zhang, William T. Freeman, and Joshua B. Tenenbaum
    ECCV 2018
    Paper   |   BibTeX   |   Project

  3. MarrNet
    MarrNet: 3D Shape Reconstruction via 2.5D Sketches
    Jiajun Wu*, Yifan Wang*, Tianfan Xue, Xingyuan Sun, William T. Freeman, and Joshua B. Tenenbaum
    NeurIPS 2017
    Paper   |   BibTeX   |   Project

Environment Setup

All code was built and tested on Ubuntu 16.04.5 LTS with Python 3.6, PyTorch 0.4.1, and CUDA 9.0. Versions for other packages can be found in environment.yml.

  1. Clone this repo with

    # cd to the directory you want to work in
    git clone https://github.com/xiumingzhang/GenRe-ShapeHD.git
    cd GenRe-ShapeHD
    

    The code below assumes you are at the repo root.

  2. Create a conda environment named shaperecon with necessary dependencies specified in environment.yml. In order to make sure trimesh is installed correctly, please run install_trimesh.sh after setting up the conda environment.

    conda env create -f environment.yml
    ./install_trimesh.sh
    

    The TensorFlow dependency in environment.yml is for using TensorBoard only. Remove it if you do not want to monitor your training with TensorBoard.

  3. The instructions below assume you have activated this environment and built the cuda extension with

    source activate shaperecon
    ./build_toolbox.sh
    

Note that due to the deprecation of cffi from pytorch 1.0 and on, this only works for pytorch 0.4.1.

Downloading Our Trained Models and Training Data

Models

To download our trained GenRe and ShapeHD models (1 GB in total), run

wget http://genre.csail.mit.edu/downloads/genre_shapehd_models.tar -P downloads/models/
tar -xvf downloads/models/genre_shapehd_models.tar -C downloads/models/
  • GenRe: depth_pred_with_inpaint.pt and full_model.pt
  • ShapeHD: marrnet1_with_minmax.pt and shapehd.pt

Data

This repo comes with a few Pix3D images and ShapeNet renderings, located in downloads/data/test, for testing purposes.

For training, we make available our RGB and 2.5D sketch renderings, paired with their corresponding 3D shapes, for ShapeNet cars, chairs, and airplanes, with each object captured in 20 random views. Note that this .tar is 143 GB.

wget http://genre.csail.mit.edu/downloads/shapenet_cars_chairs_planes_20views.tar -P downloads/data/
mkdir downloads/data/shapenet/
tar -xvf downloads/data/shapenet_cars_chairs_planes_20views.tar -C downloads/data/shapenet/

New (Oct. 20, 2019)

For training, in addition to the renderings already included in the initial release, we now also release the Mitsuba scene .xml files used to produce these renderings. This download link is a .zip (394 MB) consisting of the three training classes: cars, chairs, and airplanes. Among other scene parameters, camera poses can now be retrieved from these .xml files, which we hope would be useful for tasks like camera/object pose estimation.

For testing, we release the data of the unseen categories shown in Table 1 of the paper. This download link is a .tar (44 GB) consisting of, for each of the unseen classes, the 500 random shapes we used for testing GenRe. Right now, nine classes are included, as we are tracking down the 10th.

Testing with Our Models

We provide .sh wrappers to perform testing for GenRe, ShapeHD, and MarrNet (without the reprojection consistency part).

GenRe

See scripts/test_genre.sh.

We updated our entire pipeline to support fully differentiable end-to-end finetuning. In our NeurIPS submission, the projection from depth images to spherical maps was not implemented in a differentiable way. As a result of both the pipeline and PyTorch version upgrades, the model performace is slightly different from what was reported in the original paper.

Below we tabulate the original vs. updated Chamfer distances (CD) across different Pix3D classes. The "Original" row is from Table 2 of the paper.

Chair Bed Bookcase Desk Sofa Table Wardrobe
Updated .094 .117 .104 .110 .086 .114 .106
Original .093 .113 .101 .109 .083 .116 .109

ShapeHD

See scripts/test_shapehd.sh.

After ECCV, we upgraded our entire pipeline and re-trained ShapeHD with this new pipeline. The models released here are newly trained, producing quantative results slightly better than what was reported in the ECCV paper. If you use the Pix3D repo to evaluate the model released here, you will get an average CD of 0.122 for the 1,552 untruncated, unoccluded chair images (whose inplane rotation < 5°). The average CD on Pix3D chairs reported in the paper was 0.123.

MarrNet w/o Reprojection Consistency

See scripts/test_marrnet.sh.

The architectures in this implementation of MarrNet are different from those presented in the original NeurIPS 2017 paper. For instance, the reprojection consistency is not implemented here. MarrNet-1 that predicts 2.5D sketches from RGB inputs is now a U-ResNet, different from its original architecture. That said, the idea remains the same: predicting 2.5D sketches as an intermediate step to the final 3D voxel predictions.

If you want to test with the original MarrNet, see the MarrNet repo for the pretrained models.

Training Your Own Models

This repo allows you to train your own models from scratch, possibly with data different from our training data provided above. You can monitor your training with TensorBoard. For that, make sure to include --tensorboard while running train.py, and then run

python -m tensorboard.main --logdir="$logdir"/tensorboard

to visualize your losses.

GenRe

Follow these steps to train the GenRe model.

  1. Train the depth estimator with scripts/train_marrnet1.sh
  2. Train the spherical inpainting network with scripts/train_inpaint.sh
  3. Train the full model with scripts/train_full_genre.sh

ShapeHD

Follow these steps to train the ShapeHD model.

  1. Train the 2.5D sketch estimator with scripts/train_marrnet1.sh
  2. Train the 2.5D-to-3D network with scripts/train_marrnet2.sh
  3. Train a 3D-GAN with scripts/train_wgangp.sh
  4. Finetune the 2.5D-to-3D network with perceptual losses provided by the discriminator of the 3D-GAN, using scripts/finetune_shapehd.sh

MarrNet w/o Reprojection Consistency

Follow these steps to train the MarrNet model, excluding the reprojection consistency.

  1. Train the 2.5D sketch estimator with scripts/train_marrnet1.sh
  2. Train the 2.5D-to-3D network with scripts/train_marrnet2.sh
  3. Finetune the 2.5D-to-3D network with scripts/finetune_marrnet.sh

Questions

Please open an issue if you encounter any problem. You will likely get a quicker response than via email.

Changelog

  • Dec. 28, 2018: Initial release
  • Oct. 20, 2019: Added testing data of the unseen categories, and all .xml scene files used to render training data
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].