GithubHelp home page GithubHelp logo

hkust-vgd / shellnet Goto Github PK

View Code? Open in Web Editor NEW
83.0 7.0 23.0 81 KB

ShellNet: Efficient Point Cloud Convolutional Neural Networks using Concentric Shells Statistics

Home Page: https://hkust-vgd.github.io/shellnet/

License: Other

Python 91.76% Shell 2.05% C++ 3.48% Cuda 2.70%
convolution point-clouds neural-networks classification segmentation

shellnet's Issues

the variable names of qrs, pts are so misleading!

In the paper, the authors use q to denote query points and p to denote representation points. But in the code, qrs is used to represent representation points and pts for query points. The mess makes the code very hard for comprehension for a newer like me. Hope you can change the names or give some notation in README at least. Thanks, on the behalf of the possible dazed people. I worked it out for a whole day.....

Issues with semantic3d_merge.py

I am trying to visualize the labels returned in the "results/*.txt" from the semantic3d_merge.py. However, it seems that the labels do not correspond to the original order of the txt files used as the input to "data_conversions/prepare_semantic3d_data.py" . Can you give me some information about how to pair the final labels with their original x,y,z coordinates?

question about preprocessing the dataset

Hello, respected author, May I ask you a question,
"We then downsample the data using this script. Finally, we follow PointCNN's script to split the data into training and validation set."
is there corresponding code in Shellnet scripts with that two steps? Thanks advance.

can your code visualize the whole room segmentation results?

hello,I find a problem in pointcnn that after runing segmentation on s3dis dataset and scannet dataset,we only capture .ply files from part of whole room.We can not visualize the whole room segmentation results.can your code visualize the whole room segmentation results?looking forward your reply.

FLOPs Problems

Thanks for your sharing great work about efficient point cloud processing. I am curious about the way of computing FLOPs, especially for inference FLOPs. Looking forward to your reply.

Code optimization for dropout operation

Thanks for your nice work. I just read through the code and find a small problem in dropout operation:

layer_fts = tf.layers.dropout(layer_fts, rate=dropout_rate, name='fc{:d}_dropout'.format(layer_idx))

Actually this dropout operation has no effect if you don't pass training=is_training to it. The default value for training parameter is False so it will return the input untouched.

But it's ok, it doesn’t influence the experiment. Maybe you can fix it in your spare time, or just remove dropout to make code clearer.

Issues about the function "knn_indices_general" ( in ./shellnet/utils/pointfly.py Line 159)

Appreciate for your nice work, I just read through the code and find some problems in your function "knn_indices_general(( in ./shellnet/utils/pointfly.py Line 159))":

def knn_indices_general(queries, points, k, sort=True, unique=True):

    queries_shape = tf.shape(queries)

    batch_size = queries_shape[0]

    point_num = queries_shape[1]

    tmp_k = 0

    D = batch_distance_matrix_general(queries, points)

    if unique:

        prepare_for_unique_top_k(D, points)

    _, point_indices = tf.nn.top_k(-D, k=k+tmp_k, sorted=sort)  # (N, P, K)

    # point_indices = tf.contrib.framework.argsort(D)

    # point_indices = point_indices[:,:,:k]

    batch_indices = tf.tile(tf.reshape(tf.range(batch_size), (-1, 1, 1, 1)), (1, point_num, k, 1))

    indices = tf.concat([batch_indices, tf.expand_dims(point_indices[:,:,tmp_k:], axis=3)], axis=3)

    return indices

Here the function "prepare_for_unique_top_k" actually didn't change the value of D.Here is the code:

# A shape is (N, P, C)

def find_duplicate_columns(A):

    N = A.shape[0]

    P = A.shape[1]

    indices_duplicated = np.fill((N, 1, P), 1, dtype=np.int32)

    #x = np.fucksadkj()

    for idx in range(N):

        _, indices = np.unique(A[idx], return_index=True, axis=0)

        indices_duplicated[idx, :, indices] = 0

    return indices_duplicated

def prepare_for_unique_top_k(D, A):

    indices_duplicated = tf.py_function(find_duplicate_columns, [A], tf.int32)

    D += tf.reduce_max(D)*tf.cast(indices_duplicated, tf.float32)

Firstly,module 'numpy' has no attribute 'fill', I guess you mean "np.full" here,and secondly,just pass D into the function would not change its value(actually your program will not run the function"prepare_for_unique_top_k").Maybe you can write the code as follows:

def find_duplicate_columns(A):
   N = A.shape[0]
   P = A.shape[1]
   indices_duplicated = np.full((N, 1, P), 1, dtype=np.int32)
   for idx in range(N):
       _, indices = np.unique(A[idx], return_index=True, axis=0)
       indices_duplicated[idx, :, indices] = 0
   return indices_duplicated

def prepare_for_unique_top_k(D, A):
   indices_duplicated = tf.py_function(find_duplicate_columns, [A], tf.int32)
   D += tf.reduce_max(D)*tf.cast(indices_duplicated, tf.float32)
   return D

def knn_indices_general(queries, points, k, sort=True, unique=True):
   queries_shape = tf.shape(queries)
   batch_size = queries_shape[0]
   point_num = queries_shape[1]
   tmp_k = 0
   D = batch_distance_matrix_general(queries, points)
   if unique:
       D = prepare_for_unique_top_k(D, points)
   _, point_indices = tf.nn.top_k(-D, k=k+tmp_k, sorted=sort)  # (N, P, K)
   batch_indices = tf.tile(tf.reshape(tf.range(batch_size), (-1, 1, 1, 1)), (1, point_num, k, 1))
   indices = tf.concat([batch_indices, tf.expand_dims(point_indices[:,:,tmp_k:], axis=3)], axis=3)
   return indices

can not run the file "train_val_seg.py"

Hello, thanks for your sharing of the code firstly.
When I want to try the outdoor dataset and run the file "train_val_seg.py", I encountered this error :
ModuleNotFoundError: No module named 'transforms3d'
Can you help me solve the problem or give me some tips? Thanks very much!

The performance of OA of ModelNet40

I'm doing a comparative experiment about different Pointcloud framework recently. I only get the oa of 92.1% by Shellnet ,but it's 93.1% in the paper.

eval acc (oa): 0.920989 ---- eval acc (mean class): 0.879494 ---- time cost: 9.074277

used default setting with ss=16,bacth_size=32,and with multi=True

So,I wonder which results should I choose to report.... looking for your reply

Training model of S3DIS dataset

Hello, thank you very much for your work, do you have a training model on the S3DIS dataset? Is it convenient to share? Thank you!

cudnn PoolFoward launch failed

when I try to train the net ,an error occurred: cudnn PoolFoward launch failed in tf.layers.max_pooling2d in shellconv.py, it's related to my tensorflow version or not? can you please tell me how to resolve?
my environment information are:
tensorflow-gpu=1.10
cuda 9.0

Problem with semantic3d merge

I found half of .label file are label '1'. And the total number of label does not match the point number in h5 file
I don't know if I understand correctly. You down-sampled with intel's script but PointCNN didn't. Therefore in the merge script, the point number should not be the same.

FileNotFoundError: [Errno 2] No such file or directory: '../data/modelnet/train_files.txt'

2020-01-08 16:18:11.355997-Preparing datasets...
Traceback (most recent call last):
File "train_val_cls.py", line 232, in
main()
File "train_val_cls.py", line 52, in main
[data_train, label_train] = provider.load_cls_files(setting.filelist)
File "/home/gnss/桌面/shellnet-master/utils/provider.py", line 76, in load_cls_files
for line in open(filelist):
FileNotFoundError: [Errno 2] No such file or directory: '../data/modelnet/train_files.txt'

about online test on semanti3d

What is the file format of the prediction results that need to be uploaded when testing the semantic3D dataset online?Can you show it in detail?The website description is very unclear. looking forward to your reply.

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.