charlesq34 / pointnet

PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Other
4.76k stars 1.45k forks source link

Cannot feed value of shape (1,) for Tensor 'Placeholder_1:0', which has shape '(1, 9000)' #228

Open fah2020 opened 4 years ago

fah2020 commented 4 years ago

Hi everybody,

when I run "batch_inference.py" on a pointnet model that was trained on my own data, I occasionally get the following error:

Error Message: ValueError: Cannot feed value of shape (1,) for Tensor 'Placeholder_1:0', which has shape '(1, 9000)'

Error occurs when: The error occurs when I run "batch_inference.py" on test-pointclouds whose paths are located in "meta/custom_data_label.txt". The error does only occur for some files while others work perfectly fine.

More information: I encountered this error already earlier when I trained the network. The reason for this error were files that did not match the expected formatting, e.g. columns were missing and so on. In this particular case, I double checked that the formatting and content of the files that worked and of those that did not worked are the same.

Exemplary content of a .npy file that is not working: 7 colums: x, y, z, R, G, B, label 0.42188, 0.21596, 013986, 105.00000, 105.00000, 105.00000, 1.00000 -0.27895, 0.06813, 0.80303, 105.00000, 105.00000, 105.00000, 1.00000 0.46304, 0.06814, 0.80305, 105.00000, 105.00000, 105.00000, 1.00000 ...

So the only difference between the different files should be the x,y,z coordinates and the number of rows in each file.

Any ideas to solve this issue are highly appreciated.

fah2020 commented 4 years ago

PS: It very much looks like the error occurs depending on the number of points I have in a particular .npy-file. However, I only see possible argument "--num_point" in "batch_inference.py" that is related to the number of points but setting it to the exact number of points which I have in the broken file (or even to extreme values such as 1 or 1000000) does not resolve the issue.