Giter Site home page Giter Site logo

dgcnn's Introduction

DGCNN

a pytorch implimentation of Dynamic Graph CNN(EdgeConv)

Training

I impliment the classfication network in the paper, and only the vanilla version. DGCNN(Dynamic Graph CNN) is based on the architecture of PointNet to do a point cloud classification task or a segmentation task.

To train the model, just set the path of you ModelNet40 dataset(you can download it from here) in dataset.py.

Run: python dataset.py, without any error printed. If does, please check the path of your dataset.

If you want to change the hyper-parameters of the model, you can modify params.py yourserf.

Then, just simply runing: python train.py, and it will start training. The training procedure would be saved in a directory called summary , and the model weights would be saved in a directory called weights.

Results

The classification accuracy on test set is 91.2% on ModelNet40 dataset. And my training result is here:

hyper-parameters accuracy
Dynamic Graph CNN(base, K=10) 89.47%
Dynamic Graph CNN(base, K=20) 89.55%
Dynamic Graph CNN(base, K=30) 91.00%
Dynamic Graph CNN(base, K=40) 91.13%
Dynamic Graph CNN(base, K=50) 89.99%

Links

dgcnn's People

Contributors

toughstonex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dgcnn's Issues

Bug while running

Since I run train.py, something wrong happened
loss.backward(retain_graph=True)
File "/home/zhang/miniconda3/lib/python3.6/site-packages/torch/tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/zhang/miniconda3/lib/python3.6/site-packages/torch/autograd/init.py", line 89, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: merge_sort: failed to synchronize: an illegal memory access was encountered
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1525909934016/work/aten/src/THC/generic/THCTensorCopy.c line=70 error=77 : an illegal memory access was encountered

environment: pytorch 0.4.0 cuda 9.0 cudnn 7.4 python 3.6

Question about the order of maxpool and conv

Hi, Thanks for you sharing. Recently I am also using the EdgeConv in my model but I have some question about the implementation.

In your implementation and the offical implemtation. You both do convolution on tensor with size [B, N, K, 2*F] and then max pooling to get the output with size [B, N, an].

        # reshape, x_in: [B, 2*F, N*K]
        x_in = x_in.reshape([B, 2 * F, N * self.K])

        # out: [B, an, N*K]
        out = self.mlp(x_in)
        _, an, _ = out.shape
        # print(out.shape)

        out = out.reshape([B, an, N, self.K])
        # print(out.shape)
        # reshape, out: [B, an, N, K]
        out = out.reshape([B, an*N, self.K])
        # print(out.shape)
        # reshape, out: [B, an*N, K]
        out = nn.MaxPool1d(self.K)(out)
        # print(out.shape)
        out = out.reshape([B, an, N])
        # print(out.shape)
        out = out.permute(0, 2, 1)
        # print(out.shape)

But I wonder why first do the max pooling then convolution ? something Like this:

# [B, N, K, 2*F] 
Maxpool
# [B, N, 2*F]
MLP
# [B, N, an]

I think it is the same and many reshape operation can be removed. But also in the origin implementation, the author first do convolution and then max pool. Do you have any idea on why this order ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.