charlesq34 / pointnet

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

Problems in predicting own data in sem seg #182

Closed RollingIsland closed 5 years ago

RollingIsland commented 5 years ago

Please check the edit history for the modified script, they have been deleted for the reading convenience. Please DO NOT reply to this topic again!

-0.00650059 49.97880156 -125.81439983 254 254 254
-0.02650009 49.97840101 -125.81430065 251 251 251
-0.01760040 49.99639875 -125.81469738 246 246 246
0.00240005 49.99739820 -125.81400311 248 248 248
-0.01719986 49.96049864 -125.81439983 252 252 252
0.01370014 49.98089964 -125.81479656 255 255 255
0.00600018 49.96239836 -125.81449902 251 251 251

The previous 3 columns are XYZ, the rest are RGB (not true color but grey value).

0.559700 47.716499 -126.147400 139 139 139 1.000000 0
0.592000 47.458698 -127.404404 67 67 67 1.000000 0
0.013400 47.426899 -126.498901 148 148 148 1.000000 0
0.274700 47.592098 -125.803002 200 200 200 1.000000 0
0.966400 47.919499 -126.439301 157 157 157 1.000000 0
0.876899 47.995201 -128.726700 132 132 132 1.000000 0
0.422400 47.648601 -126.555298 85 85 85 1.000000 0
0.152500 47.502899 -126.407097 155 155 155 1.000000 0

All points were classified as class 0, and the probabilities given were 1. Can't figure out the reason.

RollingIsland commented 5 years ago

Solved. The data need to be moved to the coordinate origin.

thirdlastletter commented 5 years ago

Hi, how did you get to the sem seg results? Or more specifically how do you display them with all the files that are created after training? Thank you!

RollingIsland commented 5 years ago

@thirdlastletter

167

I followed the step in issue 167 to display the .obj files. Hope it will be help.

thirdlastletter commented 5 years ago

@thirdlastletter

167

I followed the step in issue 167 to display the .obj files. Hope it will be help.

Thank you! I get it now.

I am yet unsure how to predict data after training. Training on my dataset works, but how do I use PointNet to predict segmentation on new data?

RollingIsland commented 5 years ago

@thirdlastletter Well, function "evaluate" and "eval_one_epoch" in "batch_inference.py" are the main part of predicting. You need to change the file path to your own and make sure the coordinates in your data starting from (0, 0, 0) (and remember to remove isolated points). I have already shown the modification need be done in this issue.

thirdlastletter commented 5 years ago

@thirdlastletter Well, function "evaluate" and "eval_one_epoch" in "batch_inference.py" are the main part of predicting. You need to change the file path to your own and make sure the coordinates in your data starting from (0, 0, 0) (and remember to remove isolated points). I have already shown the modification need be done in this issue.

ok thank you! That part I understand now. What I am still unsure is what you mean with "move the data to coordinate origin". I can't just use my data?

RollingIsland commented 5 years ago

@thirdlastletter Of course you can use your own data directly! But the coordinates in training data start from 0, so if the minimum of coordinates is far from 0, the prediction will be bad, such as all points were predicted as floor or ceiling.

RollingIsland commented 5 years ago

@thirdlastletter And hope you can delete the quote in your first reply, the long code makes it hard to pull to the bottom. :-)

thirdlastletter commented 5 years ago

@RollingIsland I deleted it :)

So basically if I use a whole set of data that is different from the sample data anyway for training I can just use similar data for the testing too right? without needing to shift anything?

RollingIsland commented 5 years ago

@thirdlastletter Theoretically you are right. But I have never tried because lack of labeled data. You can have a try.

thirdlastletter commented 5 years ago

@RollingIsland ok thanks for the help :) I will try this

sachin-n-AI commented 5 years ago

@thirdlastletter

@RollingIsland I deleted it :)

So basically if I use a whole set of data that is different from the sample data anyway for training I can just use similar data for the testing too right? without needing to shift anything?

Is it successful using own data?

euzer commented 4 years ago

Hi there, I need to apply PointNet on my own data, but i don't know how to do it. I mean how to annotate my data in order to produce some txt, npy files. Thanks !

Naor92 commented 4 years ago

@RollingIsland

Hi, I know this thread was a while ago but was hoping you could help me figure this issue ive been having with PointNet. Can you explain in a little more detail how you moved your pointclouds to the coordinate origin? Did you use MeshLab somehow?

I am using .txt files like you but I'm having issues with the bounding box of the point cloud being read incorrectly, leading points of the cloud to be erased when outside the calculated max dimensions. Wondering if this has something to do with the coordinate origin.

RollingIsland commented 4 years ago

@Naor92 I suppose your problem is because some of your point coordinates are negative. I'm not so sure for I've been away from this project a while. And I suggest you to check your pointclouds to make sure there is no single point which is far away from your point set. I use Matlab to modify the file. It's easy to find if there any single point by drawing charts of coordinates.

Naor92 commented 4 years ago

@RollingIsland

Thanks for the response! I’m going to look into how I can solve the issue with the negative points, will give Matlab a try.

Tojens commented 4 years ago

I am having the same problems as posted by you. Could you perhaps create a repo showing some of the changes you did? I'd be interested in seeing them :)

Thanks in advance!

HollowHeartNet commented 3 years ago

@RollingIsland I would also appreciate if you could share your edited script with us. I don't understand how to change the script in order to use my own dataset for the segmenation process.

RollingIsland commented 3 years ago

Well, function "evaluate" and "eval_one_epoch" in "batch_inference.py" are the main part of predicting. You need to change the file path to your own and make sure the coordinates in your data starting from (0, 0, 0) (and remember to remove isolated points). I have already shown the modification need be done in this issue.

@AmarR91 The changes I made to the script are as mentioned above. The model can be directly used for segmentation if the coordinates of your data are positive and near the origin (0,0,0), just as the sample data. Sorry I have no copy of the modified script, since I've been away from this project too long.

fahome10bd commented 2 years ago
  • I modified the script as follow to process my own data:

    1. I use text file as input, not npy file. But the data forms are same in .txt and .npy.
    2. There is no label for my own data, so those relevant lines in the scripts were deleted. I think these changes should not affect the function of the model, however the result was totally wrong.
  • The form of data like:

-0.00650059 49.97880156 -125.81439983 254 254 254
-0.02650009 49.97840101 -125.81430065 251 251 251
-0.01760040 49.99639875 -125.81469738 246 246 246
0.00240005 49.99739820 -125.81400311 248 248 248
-0.01719986 49.96049864 -125.81439983 252 252 252
0.01370014 49.98089964 -125.81479656 255 255 255
0.00600018 49.96239836 -125.81449902 251 251 251

The previous 3 columns are XYZ, the rest are RGB (not true color but grey value).

  • The seg result is totally wrong:

0.559700 47.716499 -126.147400 139 139 139 1.000000 0
0.592000 47.458698 -127.404404 67 67 67 1.000000 0
0.013400 47.426899 -126.498901 148 148 148 1.000000 0
0.274700 47.592098 -125.803002 200 200 200 1.000000 0
0.966400 47.919499 -126.439301 157 157 157 1.000000 0
0.876899 47.995201 -128.726700 132 132 132 1.000000 0
0.422400 47.648601 -126.555298 85 85 85 1.000000 0
0.152500 47.502899 -126.407097 155 155 155 1.000000 0

All points were classified as class 0, and the probabilities given were 1. Can't figure out the reason.

Can you share your modified code for predicting your own dataset? I have my model ready to predict and my data as .txt file but this repo has no code for detect the dataset using model.

RollingIsland commented 2 years ago

@fahome10bd Please check the edit history. Maybe you can find things you need there. I do not have the code now.