pointnet2 icon indicating copy to clipboard operation
pointnet2 copied to clipboard

run XYZ+normal

Open wyjkiki opened this issue 7 years ago • 25 comments

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

wyjkiki avatar May 27 '18 09:05 wyjkiki

+1 for doing so. I'm also trying to run the net with normals but it crashes in sample_and_group_all. Trying to fix it if possible.

ghost avatar Jul 06 '18 07:07 ghost

I am very happy that someone is doing the same thing. What changes have you made on the basis of the source code? @lokalmatador

programmerkiki avatar Jul 06 '18 07:07 programmerkiki

So far I only used the cls_ssg model to build upon. Looking at the model implementation, especially placeholder inputs, one can see that the channel size is hardcoded as 3 and does not depend on either choosing to use normals or not:

pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 3))

Hence, the model can only work with 3 channels; I changed that to reflect the user's choice of using normals or not.

After fixing that, the next error I got was from inside pointnet_utils.py, more specifically in line 78 of sample_and_group_all which contained another hardcoded 3; changing that to 6 resolved that issue and now I'm looking at tf_sampling.py (line 56) as the underlying TF operator throws the error that it only can handle 3 channels and not 6.

All this is done under the assumption that if selecting normals, the channel size should increase to 6.

Anyways, it'd be great if the developers of pointnet++ could help in this discussion, as in the paper they mention to also use normal information, which the code however does not seem to support properly which is kinda disappointing (yet, being a researcher myself I know how difficult it is to keep everything up to date...).

Cheers!

ghost avatar Jul 06 '18 11:07 ghost

Yes, I have also modified the values you mentioned before, as well as the parameters in the file pointnet_util.py.

grouped_xyz = tf.reshape(xyz, (batch_size, 1, nsample, 3))

But these changes also did not work.

It is expected that the author will be able to update the detailed steps into the README.

programmerkiki avatar Jul 06 '18 13:07 programmerkiki

It kind of all boils down to the tf operators they added which - depending on how you change them (3 or 6 channels) partly work or not. Let's hope they find the time.

Have a nice week-end!

ghost avatar Jul 06 '18 14:07 ghost

Look forward to it together.

Have a nice week-end!

programmerkiki avatar Jul 06 '18 14:07 programmerkiki

Look forward +1

xuyongzhi avatar Jul 10 '18 11:07 xuyongzhi

I did exactly the same thing. Hope the authors have some time to revise the code.

qw245 avatar Aug 02 '18 01:08 qw245

Has anyone gotten the normals and 6 channels to work on this?

isakdiaz avatar Sep 03 '18 00:09 isakdiaz

@lokalmatador , I tried to run XYZ+normal dataset, the open source code here is in default using XYZ only. And if you want to run the XYZ+normal dataset, you may need to modify several positions including the channel issues, for which the author did not deal with it in this open source code.

ljjyxz123 avatar Sep 18 '18 01:09 ljjyxz123

@ljjyxz123 did you succeed in running the net with xyz+normal information? I tried to modify the code, but unfortunately (see above) did not succeed. Similar attempts by other people also seemed to fail.

ghost avatar Sep 18 '18 06:09 ghost

@lokalmatador , I didn't try to run with xyz+normal datasets. I am modifying the code to apply to my own dataset now, after that, I will try that. :)

ljjyxz123 avatar Sep 18 '18 11:09 ljjyxz123

@ljjyxz123 thanks for letting me know. In case, we could join our efforts.

ghost avatar Sep 18 '18 11:09 ghost

@lokalmatador , Hi, what kind of instant messager do you use, maybe we can contact using that tool for much faster communication. :)

ljjyxz123 avatar Sep 18 '18 14:09 ljjyxz123

Skype

ghost avatar Sep 19 '18 07:09 ghost

@lokalmatador , what's your ID there? If it is not convinient to publish that publicly, you can send me message, or you can email me through [email protected] Thanks!

ljjyxz123 avatar Sep 19 '18 07:09 ljjyxz123

@ljjyxz123 thanks for letting me know. In case, we could join our efforts.

Hi, Do you have any progress about the issue? Look forward.

programmerkiki avatar Oct 24 '18 06:10 programmerkiki

@ljjyxz123 Hi,can you post your code that apply your dataset?

zmzhouXJTU avatar Dec 06 '18 13:12 zmzhouXJTU

OK,well, maybe we face the same problem, my own data only include the x,y,z,intensity, and I don't know how to use with the author's pointnet?

chunhuaqiushi1989 avatar Jan 07 '19 01:01 chunhuaqiushi1989

Look forward +1

wusuoweima avatar Mar 11 '19 03:03 wusuoweima

Look forward +1

zaiweizhang avatar Mar 20 '19 00:03 zaiweizhang

  1. Set FLAGS.normal = True in train files.

  2. Replace l0_xyz = point_cloud l0_points = None

by l0_xyz = tf.slice(point_cloud, [0,0,0], [-1,-1,3]) l0_points = tf.slice(point_cloud, [0,0,3], [-1,-1,3])

in model files.

  1. Replace pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 3))

with pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 6))

in model files

sheshap avatar Feb 06 '20 02:02 sheshap

  1. Set FLAGS.normal = True in train files.
  2. Replace l0_xyz = point_cloud l0_points = None

by l0_xyz = tf.slice(point_cloud, [0,0,0], [-1,-1,3]) l0_points = tf.slice(point_cloud, [0,0,3], [-1,-1,3])

in model files.

  1. Replace pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 3))

with pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 6))

in model files

thanks!!!!!!!I succeeded!!!!!I love u!!!!

lyy-1997-hub avatar Sep 15 '20 08:09 lyy-1997-hub

  1. Set FLAGS.normal = True in train files.
  2. Replace l0_xyz = point_cloud l0_points = None

by l0_xyz = tf.slice(point_cloud, [0,0,0], [-1,-1,3]) l0_points = tf.slice(point_cloud, [0,0,3], [-1,-1,3])

in model files.

  1. Replace pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 3))

with pointclouds_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, 6))

in model files

This is very useful!! But there is no need to Set FLAGS.normal = True in train files. Just use --normal and that will make it True.

Rui-K avatar Dec 08 '21 09:12 Rui-K

I have a question: How to use rgb data along with xyz?

Please help me out.

Thanks.

pratibhashinde avatar Jun 29 '22 15:06 pratibhashinde