Skip to content
Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images. In ECCV2018.
Branch: master
Clone or download
Latest commit 34fa436 Jan 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
data_generation Add files via upload Nov 22, 2018
pictures Initial commit Nov 13, 2018
pixel2mesh Initial commit Nov 13, 2018 Update Nov 13, 2018


This repository contains the TensorFlow implementation for the following paper

Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images (ECCV2018)

Nanyang Wang*, Yinda Zhang*, Zhuwen Li*, Yanwei Fu, Wei Liu, Yu-Gang Jiang.

The code is based on the gcn framework.


If you use this code for your research, please consider citing:

  title={Pixel2Mesh: Generating 3D Mesh Models from Single RGB Images},
  author={Nanyang Wang and Yinda Zhang and Zhuwen Li and Yanwei Fu and Wei Liu and Yu-Gang Jiang},

Project Page

The project page is available at



Our code has been tested with Python 2.7, TensorFlow 1.3.0, TFLearn 0.3.2, CUDA 8.0 on Ubuntu 14.04.


git clone
cd Pixel2Mesh
python install    

For CD and EMD, we have included the cuda implementations of Fan et. al. in external/

cd pixel2mesh/external/

Modify the first 3 lines of the makefile to point to your nvcc, cudalib and tensorflow library.


Running the demo

First, you need download pre-trained models.

cd pixel2mesh/utils

Reconstructing shapes

python --image utils/examples/plane.png

Run the demo code and the output mesh file is saved in utils/examples/plane.obj

Input image, output mesh


We used the ShapeNet dataset for 3D models, and rendered views from 3D-R2N2:
When using the provided data make sure to respect the shapenet license.

Below is the complete set of training data. Download it into the utils/ folder.

cd pixel2mesh/utils
tar -xzf ShapeNetTrain.tar

The training/testing split can be found in utils/train_list.txt and utils/test_list.txt

The file is named in syntheticID_modelID_renderID.dat format.

Each .dat file in the provided data contain:

  • The rendered image from 3D-R2N2. We resized it to 224x224 and made the background white.
  • The sampled point cloud (with vertex normal) from ShapeNet. We transformed it to corresponding coordinates in camera coordinate based on camera parameters from the Rendering Dataset.

Input image, ground truth point cloud.



You can change the training data, learning rate and other parameters by editing


The evaluation code was released, please refer to for more details.

Notice that the 3D shape are downscaled by a factor of 0.57 to generate rendering. As result, all the numbers shown in experiments used 0.57xRaw Shape for evaluation. This scale may be related to the render proccess, we used the rendering data from 3DR2N2 paper, and this scale was there since then for reason that we don't know.


This software is for research purpose only.
Please contact us for the licence of commercial purposes. All rights are preserved.


Nanyang Wang (nywang16 AT

Yinda Zhang (yindaz AT

Zhuwen Li (lzhuwen AT

Yanwei Fu (yanweifu AT

Yu-Gang Jiang (ygj AT

You can’t perform that action at this time.