pointnet2 icon indicating copy to clipboard operation
pointnet2 copied to clipboard

missing data for part segmentation test.py

Open ilya0ics opened this issue 6 years ago • 15 comments

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'

ilya0ics avatar Mar 23 '18 12:03 ilya0ics

I also faced the very same error.. where are points and points_label folders in the dataset ''shapenetcore_partnno_segmentation_benchmark_v0_normal". I downloaded the dataset from "https://1drv.ms/u/s!ApbTjxa06z9CgQnl-Qm6KI3Ywbe1" provided in readme file. Waiting for your kind response.

saira05 avatar Apr 26 '18 15:04 saira05

same here, missing points and points_label for test.py. If you could update the dataset would be great!

rbruga avatar Jun 04 '18 17:06 rbruga

Hi! Same error here. What's the solution? Waiting for help!!! Thanks! Traceback (most recent call last): File "test.py", line 38, in <module> TEST_DATASET = part_dataset.PartDataset(root=DATA_PATH, npoints=NUM_POINT, classification=False, class_choice=FLAGS.category, split='test') File "/home/kx/project/3D/pointnet2-master/part_seg/part_dataset.py", line 50, in __init__ fns = sorted(os.listdir(dir_point)) FileNotFoundError: [Errno 2] No such file or directory: '/home/kx/project/3D/pointnet2-master/data/shapenetcore_partanno_segmentation_benchmark_v0_normal/02691156/points'

kxhit avatar Oct 10 '18 04:10 kxhit

+1

pyni avatar Oct 12 '18 12:10 pyni

Same problem here, Waiting for help...

Jhonve avatar Oct 16 '18 02:10 Jhonve

I also face the same problem,and don't know how to solve it. @ilya0ics ,did you solve it?

wangxiaochu avatar Oct 17 '18 07:10 wangxiaochu

I make the test dataset myself with the sample of trainning dataset, but it show the pointcloud with the wrong prediction. And in the test.py, I found that there're not take the point normal in test dataset, isn't it?

YongLD avatar Oct 26 '18 12:10 YongLD

Hi,I had the same problem.I am looking forward to your answers. If you had solved this problem. Traceback (most recent call last): File "/home/sheng/PycharmProjects/pointnet2-master/part_seg/test.py", line 41, in TEST_DATASET = part_dataset.PartDataset(root=DATA_PATH, npoints=NUM_POINT, classification=False, class_choice=FLAGS.category, split='test') ('/home/sheng/PycharmProjects/pointnet2-master/data/shapenetcore_partanno_segmentation_benchmark_v0_normal/02691156/points', '/home/sheng/PycharmProjects/pointnet2-master/data/shapenetcore_partanno_segmentation_benchmark_v0_normal/02691156/points_label') File "/home/sheng/PycharmProjects/pointnet2-master/part_seg/part_dataset.py", line 50, in init fns = sorted(os.listdir(dir_point)) OSError: [Errno 2]No file or directory : '/home/sheng/PycharmProjects/pointnet2-master/data/shapenetcore_partanno_segmentation_benchmark_v0_normal/02691156/points'

shengrongjin avatar Nov 22 '18 03:11 shengrongjin

You can read the readme of pointNet1... https://github.com/charlesq34/pointnet there is the correct download link: http://web.stanford.edu/~ericyi/project_page/part_annotation/index.html

dogod621 avatar Nov 27 '18 09:11 dogod621

@dogod621 First of all, thank you very much for your kind help and reply! As you said, I try to download datasets that mimic pointnet/part_seg/download_data.sh. wget https://shapenet.cs.stanford.edu/ericyi/shapenetcore_partanno_v0.zip. So I downloaded the dataset shapenetcore_partanno_segmentation_benchmark_v0 to replace shapenetcore_partanno_segmentation_benchmark_v0_normal. However I don't know if thy are different . Because one without _normal and one with the _normal at the end of the name. After all , I have trained pointnet2/part_set/train.py with the dataset as the coding writed DATA_PATH = os.path.join(ROOT_DIR, 'data', 'shapenetcore_partanno_segmentation_benchmark_v0_normal') . I can only assume that they are the same and used it to replace . Howerve ,When I executed test.py again , It has the following error: Traceback (most recent call last): File "test.py", line 95, in sess, ops = get_model(batch_size=1, num_point=ps.shape[0]) File "test.py", line 55, in get_model loss = MODEL.get_loss(pred, labels_pl, end_points) TypeError: get_loss() takes exactly 2 arguments (3 given)

shengrongjin avatar Nov 27 '18 11:11 shengrongjin

@dogod621 To solve the above error, I changed test.py by use loss = MODEL.get_loss(pred, labels_pl) to replace loss = MODEL.get_loss(pred, labels_pl, end_points) , amazing the error is solved. I executed test.py again, however, it occurred the following error : Traceback (most recent call last): File "test.py", line 97, in segp = inference(sess, ops, np.expand_dims(ps,0), batch_size=1) File "test.py", line 81, in inference batch_logits = sess.run(ops['pred'], feed_dict=feed_dict) File "/home/sheng/anaconda2/envs/tf/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run run_metadata_ptr) File "/home/sheng/anaconda2/envs/tf/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1111, in _run str(subfeed_t.get_shape()))) ValueError: Cannot feed value of shape (1, 2048, 3) for Tensor u'Placeholder:0', which has shape '(1, 2048, 6)' To solve this error , I changed the test.py's coding of num_batches = pc.shape[0]/batch_size by num_batches = pc.shape[0]/batch_size/2 . After that, the test.py can run normal and point cloud model appears. Although it works normally, I don't know whether my modification is correct or not, and whether your modification method is the same. I really hope to have more in-depth discussions and exchanges with you. You can send an email to me at [email protected] . Or through QQ to add my friends, if you have a QQ as me . Thank you again!

shengrongjin avatar Nov 27 '18 11:11 shengrongjin

Hi, I guess that test.py is abandoned function.

leejiajun avatar Mar 04 '19 03:03 leejiajun

@shengrongjin @leejiajun , I meet the same problem! Could you mind sharing the method of solving this problem? Thanks a lot!

ZJU-PLP avatar Sep 15 '19 01:09 ZJU-PLP

I make the test dataset myself with the sample of trainning dataset, but it show the pointcloud with the wrong prediction. And in the test.py, I found that there're not take the point normal in test dataset, isn't it?

Did you use your data to test? If so, can you sharing the method of making the dataset for the network? Thanks.

wx0205 avatar Mar 07 '20 08:03 wx0205

This is because the default train.py trains the model on the Shapenet dataset with normals (meaning 6 pts inputs instead of 3 pts). I have a working test.py for the dataset with normals on my fork. It will create obj files just like pointnet and print the final accuracy.

Pangoraw avatar Mar 19 '20 10:03 Pangoraw