Skip to content
Convolutional Neural Network for 3D meshes in PyTorch
Branch: master
Clone or download
Latest commit c30859a May 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
data all files May 7, 2019
docs all files May 7, 2019
models all files May 7, 2019
options all files May 7, 2019
scripts all files May 7, 2019
util all files May 7, 2019
.gitignore first commit May 7, 2019
LICENSE Create LICENSE May 11, 2019 Update May 7, 2019
environment.yml all files May 7, 2019 all files May 7, 2019 all files May 7, 2019

MeshCNN in PyTorch

SIGGRAPH 2019 [Paper] [Project Page]

MeshCNN is a general-purpose deep neural network for 3D triangular meshes, which can be used for tasks such as 3D shape classification or segmentation. This framework includes convolution, pooling and unpooling layers which are applied directly on the mesh edges.

The code was written by Rana Hanocka and Amir Hertz with support from Noa Fish.

Getting Started


  • Clone this repo:
git clone
cd MeshCNN
  • Install dependencies: PyTorch version 1.0 (also works with 0.4+). Optional : tensorboardX for training plots.
    • Via new conda environment conda env create -f environment.yml (creates an environment called meshcnn)

3D Shape Classification on SHREC

Download the dataset

bash ./scripts/shrec/

Run training (if using conda env first activate env e.g. source activate meshcnn)

bash ./scripts/shrec/

To view the training loss plots, in another terminal run tensorboard --logdir runs and click http://localhost:6006.

Run test and export the intermediate pooled meshes:

bash ./scripts/shrec/

Visualize the network-learned edge collapses:

bash ./scripts/shrec/

An example of collapses for a mesh:

Note, you can also get pre-trained weights using bash ./scripts/shrec/

In order to use the pre-trained weights, run which will compute and save the mean / standard deviation of the training data.

3D Shape Segmentation on Humans

The same as above, to download the dataset / run train / get pretrained / run test / view

bash ./scripts/human_seg/
bash ./scripts/human_seg/
bash ./scripts/human_seg/
bash ./scripts/human_seg/
bash ./scripts/human_seg/

Some segmentation result examples:

Additional Datasets

The same scripts also exist for COSEG segmentation in scripts/coseg_seg and cubes classification in scripts/cubes.


If you find this code useful, please consider citing our paper

  title={MeshCNN: A Network with an Edge},
  author={Hanocka, Rana and Hertz, Amir and Fish, Noa and Giryes, Raja and Fleishman, Shachar and Cohen-Or, Daniel},
  journal={arXiv preprint arXiv:1809.05910},

Questions / Issues

If you have questions or issues running this code, please open an issue so we can know to fix it.


This code design was adopted from pytorch-CycleGAN-and-pix2pix.

You can’t perform that action at this time.