charlesq34 / pointnet2

PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space
Other
3.08k stars 896 forks source link

missing data for part segmentation test.py #27

Open ilya0ics opened 6 years ago

ilya0ics commented 6 years ago

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'

saira05 commented 6 years ago

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.

rbruga commented 6 years ago

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

kxhit commented 5 years ago

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'

pyni commented 5 years ago

+1

Jhonve commented 5 years ago

Same problem here, Waiting for help...

wangxiaochu commented 5 years ago

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

YongLD commented 5 years ago

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?

shengrongjin commented 5 years ago

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'

dogod621 commented 5 years ago

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

shengrongjin commented 5 years ago

@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 commented 5 years ago

@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 934857682@qq.com . Or through QQ to add my friends, if you have a QQ as me . Thank you again!

leejiajun commented 5 years ago

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

ZJU-PLP commented 5 years ago

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

wx0205 commented 4 years ago

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.

Pangoraw commented 4 years ago

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.