This .zip file includes source code of the paper DiffGCN.
In this file we describe what each file indluces as well as commands to run the experiments as shown in the paper.


Code dependencies:
pytorch
torch-scatter
torch-sparse
torch-cluster
pytorch-geometric 
numpy


Method implementation:
DiffGCN.py - includes the proposed convolution
mgpool.py - includes the pooling and upooling methods we propose
message_passing2 - to allow message passing without aggregation for the first step of messages as explained in the paper (code is based on pytorch geometric message_passing.py)

Data files:
shapenet2.py - shapenet part segmentation loader code
s3dis.py -  stanford indoor scene segmentation (s3dis) data loader code 
(based on Pytorch Geometric codebase. ModelNet loader is imported  from pytorch-geometric package)


Experiments files and results:
classification_train_test.py - experiment of classification on modelnet40
                          MCA    OA
   Ours (K=20)  	 90.4  	93.5 
   Ours (K=20, pooling)  90.7  93.9 

MCA=mean class accuracy, OA= overall accuracy
--------------------------------------------------------------------------------------------------------------------------------------------

partsegmentation_train_test.py - experiment of part segmentation on shapenet
 		 Aero  Bag   Cap   Car  Chair Ear   Guit Knife  Lamp  Lapt  Motor  Mug  Pistol Rocket Skat  Table       Mean
 Ours   	 85.1  83.1  87.2  80.9 90.9  79.8  92.1  87.8  85.2  96.3   76.6  95.8  84.2  61.1   77.5  83.6  	86.4   
 Ours (pooling)  85.1  83.7  88.0  80.3  91.1  80.0  92.0  87.5  85.3  95.8  76.0  95.9  83.8  65.6   77.3  83.7  	86.4 

metric is mean intersection over union
-------------------------------------------------------------------------------------------------------------------------------------------
semseg_s3dis_train_test.py - experiment of semantic segmentation on s3dis
		miou	OA
Ours  		57.2  84.9 
Ours (pooling)  56.9  84.5  

miou = mean intersection over union, OA= overall accuracy

-------------------------------------------------------------------------------------------------------------------------------------------
The code includes both training and evaluation code.

How to run experiments:
simply type python x.py where x is one of the experiment files.

