Giter Site home page Giter Site logo

charlesq34 / pointnet2 Goto Github PK

View Code? Open in Web Editor NEW
2.9K 71.0 886.0 650 KB

PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space

License: Other

Python 75.64% C++ 13.95% Shell 0.93% Cuda 9.47%
point-cloud deep-learning classification segmentation 3d-shape

pointnet2's Introduction

PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space

Created by Charles R. Qi, Li (Eric) Yi, Hao Su, Leonidas J. Guibas from Stanford University.

prediction example

Citation

If you find our work useful in your research, please consider citing:

    @article{qi2017pointnetplusplus,
      title={PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space},
      author={Qi, Charles R and Yi, Li and Su, Hao and Guibas, Leonidas J},
      journal={arXiv preprint arXiv:1706.02413},
      year={2017}
    }

Introduction

This work is based on our NIPS'17 paper. You can find arXiv version of the paper here or check project webpage for a quick overview. PointNet++ is a follow-up project that builds on and extends PointNet. It is version 2.0 of the PointNet architecture.

PointNet (the v1 model) either transforms features of individual points independently or process global features of the entire point set. However, in many cases there are well defined distance metrics such as Euclidean distance for 3D point clouds collected by 3D sensors or geodesic distance for manifolds like isometric shape surfaces. In PointNet++ we want to respect spatial localities of those point sets. PointNet++ learns hierarchical features with increasing scales of contexts, just like that in convolutional neural networks. Besides, we also observe one challenge that is not present in convnets (with images) -- non-uniform densities in natural point clouds. To deal with those non-uniform densities, we further propose special layers that are able to intelligently aggregate information from different scales.

In this repository we release code and data for our PointNet++ classification and segmentation networks as well as a few utility scripts for training, testing and data processing and visualization.

Installation

Install TensorFlow. The code is tested under TF1.2 GPU version and Python 2.7 (version 3 should also work) on Ubuntu 14.04. There are also some dependencies for a few Python libraries for data processing and visualizations like cv2, h5py etc. It's highly recommended that you have access to GPUs.

Compile Customized TF Operators

The TF operators are included under tf_ops, you need to compile them (check tf_xxx_compile.sh under each ops subfolder) first. Update nvcc and python path if necessary. The code is tested under TF1.2.0. If you are using earlier version it's possible that you need to remove the -D_GLIBCXX_USE_CXX11_ABI=0 flag in g++ command in order to compile correctly.

To compile the operators in TF version >=1.4, you need to modify the compile scripts slightly.

First, find Tensorflow include and library paths.

    TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
    TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')

Then, add flags of -I$TF_INC/external/nsync/public -L$TF_LIB -ltensorflow_framework to the g++ commands.

Usage

Shape Classification

To train a PointNet++ model to classify ModelNet40 shapes (using point clouds with XYZ coordinates):

    python train.py

To see all optional arguments for training:

    python train.py -h

If you have multiple GPUs on your machine, you can also run the multi-GPU version training (our implementation is similar to the tensorflow cifar10 tutorial):

    CUDA_VISIBLE_DEVICES=0,1 python train_multi_gpu.py --num_gpus 2

After training, to evaluate the classification accuracies (with optional multi-angle voting):

    python evaluate.py --num_votes 12 

Side Note: For the XYZ+normal experiment reported in our paper: (1) 5000 points are used and (2) a further random data dropout augmentation is used during training (see commented line after augment_batch_data in train.py and (3) the model architecture is updated such that the nsample=128 in the first two set abstraction levels, which is suited for the larger point density in 5000-point samplings.

To use normal features for classification: You can get our sampled point clouds of ModelNet40 (XYZ and normal from mesh, 10k points per shape) here (1.6GB). Move the uncompressed data folder to data/modelnet40_normal_resampled

Object Part Segmentation

To train a model to segment object parts for ShapeNet models:

    cd part_seg
    python train.py

Preprocessed ShapeNetPart dataset (XYZ, normal and part labels) can be found here (674MB). Move the uncompressed data folder to data/shapenetcore_partanno_segmentation_benchmark_v0_normal

Semantic Scene Parsing

See scannet/README and scannet/train.py for details.

Visualization Tools

We have provided a handy point cloud visualization tool under utils. Run sh compile_render_balls_so.sh to compile it and then you can try the demo with python show3d_balls.py The original code is from here.

Prepare Your Own Data

You can refer to here on how to prepare your own HDF5 files for either classification or segmentation. Or you can refer to modelnet_dataset.py on how to read raw data files and prepare mini-batches from them. A more advanced way is to use TensorFlow's dataset APIs, for which you can find more documentations here.

License

Our code is released under MIT License (see LICENSE file for details).

Updates

  • 02/23/2018: Added support for multi-gpu training for the classification task.
  • 02/23/2018: Adopted a new way for data loading. No longer require manual data downloading to train a classification network.
  • 02/06/2018: Added sample training code for ScanNet semantic segmentation.

Related Projects

pointnet2's People

Contributors

charlesq34 avatar ericyi avatar rqi-nuro 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  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  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

pointnet2's Issues

Which model is for Scannet?

I have tried all the models of segmentation, but it seems that there is no avaliable model for running Scannet. Please help me. Thanks.

The part segmentation code under 'pointnet2/model' cannot reproduce your experiment result.

Hi, thanks for sharing your code. I am working on part segmentation task using Model40 dataset, but using the model defined under 'pointnet2_part_seg.py' and the training pipeline defined for pointnet part segmentation, I can only achieve less than 70% IoU. I guess something may go wrong, would you like to share your training code for pointnet++ part segmentation as well?

The performance of semantic segmentation on S3DIS dataset

Hi, @charlesq34 , I trained the PointNet++ model by using the dataset S3DIS and the training code from pointnet , with the model "PointNet++", namely, the Pointnet2_sem_seg.py, however, I found no better performance than the original PointNet, so could you offer me the result (mean IoU and Accuracy) for comparison? thanks a lot!

classification accuracy on modelnet40?

I test the performance using the default parameters on modelnet40 classification task, and got an overall accuracy of 90.4%, but the reported is 90.7%. (with msg model)

missing data for part segmentation test.py

Hello. I have been trying part segmentation code on the shapenetcore_partanno_segmentation_benchmark_v0_normal dataset and both training and evaluation works fine. However, when I try to test the trained network using test.py script from part_seg folder it fails to execute due to missing folders "points" and "points_label" which are required by part_dataset.py. Here is the error I am getting
Traceback (most recent call last):
File "test.py", line 36, in
TEST_DATASET = part_dataset.PartDataset(root=DATA_PATH, npoints=NUM_POINT, classification=False, class_choice=FLAGS.category, split='test')
File "/home/user1/gits/pointnet2/part_seg/part_dataset.py", line 50, in init
fns = sorted(os.listdir(dir_point))
OSError: [Errno 2] No such file or directory: '/home/ilya/gits/pointnet2/data/shapenetcore_partanno_segmentation_benchmark_v0_normal/02691156/points'

scannet_dataset.py

In the data preparation stage, what does the bold area do and where are those parameter values come from (1.5, 0.2, etc) ?

Thank you very much for the help!

class ScannetDatasetWholeScene():
def init(self, root, npoints=8192, split='train'):
self.npoints = npoints
self.root = root
self.split = split
self.data_filename = os.path.join(self.root, 'scannet_%s.pickle'%(split))
with open(self.data_filename,'rb') as fp:
self.scene_points_list = pickle.load(fp)
self.semantic_labels_list = pickle.load(fp)
if split=='train':
labelweights = np.zeros(21)
for seg in self.semantic_labels_list:
tmp,_ = np.histogram(seg,range(22))
labelweights += tmp
labelweights = labelweights.astype(np.float32)
labelweights = labelweights/np.sum(labelweights)
self.labelweights = 1/np.log(1.2+labelweights)
elif split=='test':
self.labelweights = np.ones(21)
def getitem(self, index):
point_set_ini = self.scene_points_list[index]
semantic_seg_ini = self.semantic_labels_list[index].astype(np.int32)
coordmax = np.max(point_set_ini,axis=0)
coordmin = np.min(point_set_ini,axis=0)
*nsubvolume_x = np.ceil((coordmax[0]-coordmin[0])/1.5).astype(np.int32)
nsubvolume_y = np.ceil((coordmax[1]-coordmin[1])/1.5).astype(np.int32)
point_sets = list()
semantic_segs = list()
sample_weights = list()
isvalid = False
for i in range(nsubvolume_x):
for j in range(nsubvolume_y):
curmin = coordmin+[i1.5,j1.5,0]
curmax = coordmin+[(i+1)1.5,(j+1)1.5,coordmax[2]-coordmin[2]]
curchoice = np.sum((point_set_ini>=(curmin-0.2))
(point_set_ini<=(curmax+0.2)),axis=1)==3
cur_point_set = point_set_ini[curchoice,:]
cur_semantic_seg = semantic_seg_ini[curchoice]
if len(cur_semantic_seg)==0:
continue
mask = np.sum((cur_point_set>=(curmin-0.001))
(cur_point_set<=(curmax+0.001)),axis=1)==3
choice = np.random.choice(len(cur_semantic_seg), self.npoints, replace=True)
point_set = cur_point_set[choice,:] # Nx3
semantic_seg = cur_semantic_seg[choice] # N
mask = mask[choice]
if sum(mask)/float(len(mask))<0.01:
continue
sample_weight = self.labelweights[semantic_seg]
sample_weight = mask # N
point_sets.append(np.expand_dims(point_set,0)) # 1xNx3
semantic_segs.append(np.expand_dims(semantic_seg,0)) # 1xN
sample_weights.append(np.expand_dims(sample_weight,0)) # 1xN
point_sets = np.concatenate(tuple(point_sets),axis=0)

Neighborhood Query:kNN

Hi, thank you for your sharing.
In your paper, you mention that you compare two options to select a local neighborhood, kNN V.S. Ball Query.I tried to reproduce the kNN experimental results, but failed. May I refer to your kNN code please, or could you please give me some advice? Thank you very much.

Parameters for data augmentation

Hi Charles,

We are working on adapting pointnet and pointnet++ to our own data. I know you share the utils for data augmentation. But can you also share the parameters for doing data augmentation?

Thanks!

The per-voxel accuracy of Scannet on semantic segmentation

Hi, @charlesq34 , I notice that in your paper in Fig.5 , you present the accuracy of comparison results on Scannet dataset, however, you mentioned that it it the per-voxel accuracy, I wonder if your could offer the transformation code between per-point accuracy and the per-voxel accuracy. Do you assign the points within a voxel with the same label?
Thanks a lot!

run XYZ+normal

Hello, can you update the README.md for running XYZ+normal?
Thank you so much!

Hi ,thank you for your sharing.

Hi, thank you for your sharing.
In your paper, you mention that you compare two options to select a local neighborhood, kNN V.S. Ball Query, May I have your kNN code please? Thanks.

tensorflow.python.framework.errors_impl.NotFoundError

Hi,when i try to run classification code,there is a problem:"tf_ops/grouping/tf_grouping_so.so: undefined symbol: _ZN10tensorflow16KernelDefBuilderD2Ev".
my environment works on PointNet , gcc=5.40 tensorflow=1.2.0. I have tried to delete "-O2 -D_GLIBCXX_USE_CXX11_ABI=0", however, it does not work. do you have some advance?

run error

when i run python part_seg/train.py, then take this error:

2018-03-08 13:39:33.715566: W tensorflow/core/common_runtime/bfc_allocator.cc:277] ****************************************************************************************************
2018-03-08 13:39:33.715579: W tensorflow/core/framework/op_kernel.cc:1158] Resource exhausted: OOM when allocating tensor with shape[32,2048,128]
Traceback (most recent call last):
File "/home/lc/Downloads/pointnet2/part_seg/train.py", line 322, in
train()
File "/home/lc/Downloads/pointnet2/part_seg/train.py", line 160, in train
train_one_epoch(sess, ops, train_writer)
File "/home/lc/Downloads/pointnet2/part_seg/train.py", line 205, in train_one_epoch
ops['train_op'], ops['loss'], ops['pred']], feed_dict=feed_dict)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 789, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[32,2048,128]
[[Node: dp1/cond/dropout/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"](dp1/cond/dropout/div, dp1/cond/dropout/Floor)]]
[[Node: gradients/fa_layer3/conv_1/Conv2D_grad/tuple/control_dependency_1/_547 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_3391_gradients/fa_layer3/conv_1/Conv2D_grad/tuple/control_dependency_1", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"]]

Caused by op u'dp1/cond/dropout/mul', defined at:
File "/home/lc/Downloads/pointnet2/part_seg/train.py", line 322, in
train()
File "/home/lc/Downloads/pointnet2/part_seg/train.py", line 108, in train
pred, end_points = MODEL.get_model(pointclouds_pl, is_training_pl, bn_decay=bn_decay)
File "/home/lc/Downloads/pointnet2/models/pointnet2_part_seg.py", line 38, in get_model
net = tf_util.dropout(net, keep_prob=0.5, is_training=is_training, scope='dp1')
File "/home/lc/Downloads/pointnet2/utils/tf_util.py", line 614, in dropout
lambda: inputs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 289, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 1814, in cond
orig_res_t, res_t = context_t.BuildCondBranch(true_fn)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/control_flow_ops.py", line 1689, in BuildCondBranch
original_result = fn()
File "/home/lc/Downloads/pointnet2/utils/tf_util.py", line 613, in
lambda: tf.nn.dropout(inputs, keep_prob, noise_shape),
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/nn_ops.py", line 1915, in dropout
ret = math_ops.div(x, keep_prob) * binary_tensor
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 838, in binary_op_wrapper
return func(x, y, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 1061, in _mul_dispatch
return gen_math_ops._mul(x, y, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 1377, in _mul
result = _op_def_lib.apply_op("Mul", x=x, y=y, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1269, in init
self._traceback = _extract_stack()

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[32,2048,128]
[[Node: dp1/cond/dropout/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"](dp1/cond/dropout/div, dp1/cond/dropout/Floor)]]
[[Node: gradients/fa_layer3/conv_1/Conv2D_grad/tuple/control_dependency_1/_547 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_3391_gradients/fa_layer3/conv_1/Conv2D_grad/tuple/control_dependency_1", tensor_type=DT_FLOAT, _device="/

can you help me?

Using the code from models/pointnet2_sem_seg.py cannot reproduce the accuracy result on the scannet dataset.

Hi, @charlesq34@rqi-nuro  , using the code from models/pointnet2_sem_seg.py, I trained on the scannet dataset, using your provided code, however, I only achieve an accuracy of 0.73 on the testing split while achieving an accuracy of 0.82 on the training split. I use the random sampling for 8192 points for each room., which is different from your accuracy results in Fig. 5. Could you please help me explain Fig. 5 in your paper?

Incomplete semantic segmentation code

@charlesq34 Hi, thank you for sharing your pointnet2 code.
Is the semantic segmentation code incomplete? According to your paper, I want to try the point set segmentation for semantic scene labeling. What should I do? I am not sure whether I should combine the pointnet2 with semantic segmentation code in pointnet1 under sem_seg folder together. Would you mind taking some time to give me some advise? Thank you!

Best,
Rui

Undefined symbol:

Hello, I am trying to run: python train.py. I get the the following error

-workstation:~/pointnet2$ python train.py
/usr/local/lib/python2.7/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "train.py", line 52, in
MODEL = importlib.import_module(FLAGS.model) # import network module
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/baxter/pointnet2/models/pointnet2_cls_ssg.py", line 13, in
from pointnet_util import pointnet_sa_module
File "/home/baxter/pointnet2/utils/pointnet_util.py", line 15, in
from tf_sampling import farthest_point_sample, gather_point
File "/home/baxter/pointnet2/tf_ops/sampling/tf_sampling.py", line 12, in
sampling_module=tf.load_op_library(os.path.join(BASE_DIR, 'tf_sampling_so.so'))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/baxter/pointnet2/tf_ops/sampling/tf_sampling_so.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

Broken data download link

Hi,
First of all thank you for all the great work however, The download links In the data folder are no longer working. Could you possibly update them.

Running pointnet++ on tf 1.5

I use cuda 9 and can not install tf 1.2 for running pointnet++. I also disn't understand the solution in readme for tf>1.4. Can anybody help me?

Undefined name 'tnet' in utils/pointnet_util.py

https://github.com/charlesq34/pointnet2/blob/master/utils/pointnet_util.py#L49

flake8 testing of https://github.com/charlesq34/pointnet2 on Python 2.7.14

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./utils/pointnet_util.py:49:23: F821 undefined name 'tnet'
        grouped_xyz = tnet(grouped_xyz, tnet_spec)
                      ^
1     F821 undefined name 'tnet'

flake8 is saying is that if sample_and_group() is called with a tnet_spec parameter that is not None then NameError might be raised at runtime which would halt the script.

Problems with object part segmentation

Thanks for sharing your great work!

I am a beginner of deep learning models used on point clouds. I am very interested about your achievement. I can successfully conducted classification operation using your codes. However, I have one question when conducting object part segmentation operation on ShapeNetPart dataset.

After running "cd part_seg", and "python train.py", it output an Error message as following:

Traceback (most recent call last):
File "train.py", line 47, in
MODEL = importlib.import_module(FLAGS.model) # import network module
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named model

My operating environment is Ubuntu16.04 + python2.7, can you help me address this issue?

Thank you for your kind assistance.

No OpKernel issue on FarthestPointSample

Hi Charlers,
When I tried to run your train.py code, I got some error. It seems FarthestPointSample is running on CPU not GPU, but I did not change anything about your codes. I am wondering if you have any suggestion about it? I looked at the cuda code, but I can not find any issue (I am pretty new about CUDA). I listed the error below.

Thank you.

Traceback (most recent call last):
File "train.py", line 284, in
train()
File "train.py", line 160, in train
sess.run(init)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1124, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1321, in _do_run
options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1340, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'FarthestPointSample' with these attrs. Registered devices: [CPU], Registered kernels:
device='GPU'

 [[Node: layer1/FarthestPointSample = FarthestPointSample[npoint=512, _device="/device:GPU:0"](Placeholder)]]

Caused by op u'layer1/FarthestPointSample', defined at:
File "train.py", line 284, in
train()
File "train.py", line 121, in train
pred, end_points = MODEL.get_model(pointclouds_pl, is_training_pl, bn_decay=bn_decay)
File "/home/kai/Documents/PointCloudsProcessing/pointnet2/models/pointnet2_cls_ssg.py", line 32, in get_model
l1_xyz, l1_points, l1_indices = pointnet_sa_module(l0_xyz, l0_points, npoint=512, radius=0.2, nsample=32, mlp=[64,64,128], mlp2=None, group_all=False, is_training=is_training, bn_decay=bn_decay, scope='layer1', use_nchw=True)
File "/home/kai/Documents/PointCloudsProcessing/pointnet2/utils/pointnet_util.py", line 113, in pointnet_sa_module
new_xyz, new_points, idx, grouped_xyz = sample_and_group(npoint, radius, nsample, xyz, points, knn, use_xyz)
File "/home/kai/Documents/PointCloudsProcessing/pointnet2/utils/pointnet_util.py", line 40, in sample_and_group
new_xyz = gather_point(xyz, farthest_point_sample(npoint, xyz)) # (batch_size, npoint, 3)
File "/home/kai/Documents/PointCloudsProcessing/pointnet2/tf_ops/sampling/tf_sampling.py", line 56, in farthest_point_sample
return sampling_module.farthest_point_sample(inp, npoint)
File "", line 46, in farthest_point_sample
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1204, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'FarthestPointSample' with these attrs. Registered devices: [CPU], Registered kernels:
device='GPU'

 [[Node: layer1/FarthestPointSample = FarthestPointSample[npoint=512, _device="/device:GPU:0"](Placeholder)]]

eulerangles.py missing

eulerangles is referenced in pc_util but is not included in utils directory. ..it is in pointnet utils in the original project.

Where can I find T-net module

Hello,

It seems that there is no T-net module in function "pointnet_sa_module" in utils/pointnet_util.py,
Is there no T-net module in this code? or am I missing something?
Please let me know where I can find it.

the problem of the implementation of the farthestpointsamplingKernel

was there any problem with the implementation of the farthest point sampling algorithm in the file th_ops/sampling/tf_sampling_g.cu ?
we should sort the rest of points by the sum of the distances between the candidate point and ALL the points that have already been selected, and then choose the farthest one.
in the code, as I see, it might sort the rest points by the distance between the candidate point and the latest point. is there any problem?

weights for computing the loss in semantic segmentation task

Hi, @charlesq34,
Thanks for your nice work, I have two questions as follows:

  1. I modified the train.py in your old "pointnet" version and use it to train the newly-updated sem_seg model, however, I notice that the input data is changed from B x N x 9 to B x N x 3, does that mean you didn't use the RGB information any more ?

  2. What about the 'smpws' ? I guess it is the weights of each point when computing the training loss, but how can I set the weight for each point ? I am still using the "indoor3d_sem_seg_hdf5_data".

Thanks a lot !

Part Segmentation with HDF5 files

Hey Guys,

thanks for your great work on Pointnet2!

I used Pointnet in in the first version with HDF5 files for part segmentation and I am wondering why this is not possible in Pointnet2 anymore. Has anyone successfully run the part segmentation with HDF5 files instead of the standard folder based structure with pts and seg files from ShapeNet?

Thank you so much :)
BG R.

Where is the tf_sampling_so.so?

I am trying to reproduce semantic segmentation results on scannet using pointnet++.However, I faced with an NotFoundError when I am running the code from scannet/train.py on the scannet dataset. It seems that there is no file named tf_sampling_so.so. But in the tf_sampling.py the tf_sampling_so.so need to be the sampling_module.How can I find it? Would you mind taking some time to give me a hint? Thank you!

compile error on running tf_sampling_compile.sh

Hi, authors,

I got error when I compile the fps code by commands:
sh tf_sampling_compile.sh

Here is the error log:

tf_sampling.cpp:6:42: fatal error: tensorflow/core/framework/op.h: No such file or directory
compilation terminated.

My system is ubuntu 16.04, with tf1.4 (python 2.7.14)

Any suggestion to fix it? THX!

Failed to run scannet

@charlesq34 Hi,thank you very much for sharing your pointnet2 code.
I am trying to reproduce semantic segmentation results on scannet using pointnet++. However, I faced with an importerror when I am running the code from scannet/train.py on the scannet dataset. It seems that there is no module named unit_test. What's the unit_test? How can I find it? Would you mind taking some time to give me a hint? Thank you!

MSG model and non-uniform points for scannet

Dear Charles,

Hi! Happy new year!
I have several simple questions about the semantic segmentation model.

  1. In your experiments on scannet, you have used two models: SSG and MSG pointnet++. In your current implementation, I think I can only find the SSG model.
  2. The data augmentation method "rotate_point_cloud_z" has not been released.
  3. In the implementation, you have reported many different types of evaluation forms, so which one is as reported in the paper? The "accuracy vox" or "calibrated average acc vox"?

Best,
Yuanhao

scannet no provider with attr rotate_point_cloud_z

**** EPOCH 000 ****
2018-08-12 21:10:32.686332
Traceback (most recent call last):
  File "train.py", line 440, in <module>
    train()
  File "train.py", line 175, in train
    train_one_epoch(sess, ops, train_writer)
  File "train.py", line 238, in train_one_epoch
    aug_data = provider.rotate_point_cloud_z(batch_data)
AttributeError: 'module' object has no attribute 'rotate_point_cloud_z'

using: what model should be used?

parser.add_argument('--model', default='pointnet2_sem_seg', help='Model name [default: pointnet2_sem_seg]')

About furthest point sampling

I want to learn about the algorithm furthest point sampling which is used in your paper. Do you have any recommended reference?

problem with tf_interpolate

I have tensorflow v1.3 and nvcc v7.5.17.
I tested
python pointnet2_cls_msg.py
and get the following error:
tensorflow.python.framework.errors_impl.NotFoundError: ../tf_ops/3d_interpolation/tf_interpolate_so.so: undefined symbol: _ZN10tensorflow11TensorShapeC1ENS_3gtl10ArraySliceIxEE

MNIST dataset

Hey Charles, I am working with Prof Hao now. Hardly any object has more than 100 points with intensity>0.5 so there is just a lot of augmented points. I am unable to reproduce the said results in the paper. Can you let me know if you did any additional processing?
thanks

estimated release date

Hi, thank you for sharing your awesome work.
I see that the code is not complete yet, do you have an estimation of the release date?

compilation errors in tf_ops folders

I am using Tensorflow 1.2.1( virtual environment) and cuda 8.0.
While running the compile scripts in op folders , I get the following errors:


fatal error: tensorflow/core/framework/op.h: No such file or directory
#include "tensorflow/core/framework/op.h"
tf_sampling.cpp:6:42: fatal error: tensorflow/core/framework/op.h: No such file or directory
#include "tensorflow/core/framework/op.h"


Have you any idea how to solve those errors.
Thanks in advance.

CPU evaluation

Hello,
I would like to run the evaluation script on a computer without a GPU.
The only thing getting in my way is the fact that I do not have cuda on this computer and so I am not able to compile the provided tf ops.

Could anyone tell me if there is anyway of complaining these ops to run a CPU?
Any help is appreciated

Tensorflow >= 1.4, eager execution

I recently upgraded to tensorflow 1.4 and wanted to try the eager execution, since it makes what I'm trying to do much easier.
Trying to use the utilities in tf_ops (grouping, sampling, interpolation) raises this error:

AttributeError: op not supported for Eager Tensors.

Is it possible to circumvent this issue without significant effort?

data processing for ScanNet

Hi Charles,

Thanks for open sourcing the amazing work! I am currently trying to reproduce the results for ScanNet dataset. But I am not sure what is right data processing pipeline you used in the paper. Would you mind taking a look at the questions below if you have time? Thank you!

  1. It's mentioned in the paper that 1.5mX1.5mX3m cubes are generated and rotated on the fly during training. Is there any further normalizations for these cubes like shifting them to the range of [-0.75,0.75] in x/y-axis and [-1.5,1.5] in z-axis? By rotation, did you randomly select an angle in the range of [0, 2*pi] or a smaller range?

  2. In testing, you mentioned in the paper that the scene is divided into smaller cubes. Are these cubes also of size 1.5mX1.5mX3m? What is the splitting stride?

  3. I noticed that the input to the model is of size BxNx3. Just wanted to confirm that 3 is the xyz coordinates for each point, right? The relative position is used in Pointnet on Stanford3D dataset. Do you have any insights about why there are discarded for ScanNet dataset here?

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.