Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies in inferencing results #23

Closed
JaydencoolCC opened this issue Jun 23, 2022 · 17 comments
Closed

Inconsistencies in inferencing results #23

JaydencoolCC opened this issue Jun 23, 2022 · 17 comments

Comments

@JaydencoolCC
Copy link

The same frame point cloud is inputed into the model, but the result is different each time. For example. for the same frame point cloud, two cars are detected by the model for the first time, but three cars are detected by the model for the second time.The results are very erratic. Can you explain that, please?

@JaydencoolCC
Copy link
Author

Can anyone answer my question? Whether the network is any random layer?

@Tongjiaxun
Copy link

Do you know the reason ? I meet this question too.

@JaydencoolCC
Copy link
Author

Do you know the reason ? I meet this question too.

I do not know the reason? I want to contact the author, but I don't know how to contact the author.Hope the author can give a reply.

@Tongjiaxun
Copy link

Maybe the reason is the sampling of the points.

@JaydencoolCC
Copy link
Author

I've read the code of sampling method,there is no randomness. For fps, each time sampling starts from the first point(index 0) , so the points sampled by the same frame point cloud are fixed each time.

@JaydencoolCC
Copy link
Author

Maybe the reason is the sampling of the points.

Looking forward to your new discovery.

@Tongjiaxun
Copy link

The first point of FPS is random. I have tried the model provided by Openpcdet like pointrcnn and the result is incosistent either. But I run pointpillar which donnot use FPS the result is consistent . You can try is again.

@JaydencoolCC
Copy link
Author

JaydencoolCC commented Jul 25, 2022

The first point of FPS is random. I have tried the model provided by Openpcdet like pointrcnn and the result is incosistent either. But I run pointpillar which donnot use FPS the result is consistent . You can try is again.

I don't agree with you.I don't know whether you tried to understand the code.In my experience, each time sampling starts from the first point(index 0).The first point of FPS is no randomness. Here are my experimental results. Hope to your new discovery.
Best regards!

@JaydencoolCC
Copy link
Author

image
image

@JaydencoolCC
Copy link
Author

The first point of FPS is random. I have tried the model provided by Openpcdet like pointrcnn and the result is incosistent either. But I run pointpillar which donnot use FPS the result is consistent . You can try is again.

Each time you run the code, you will get the same sample points.I konw what you mean, but sampling starts from the first point(index 0) in Openpcdet. You can try to read the code written by cuda. Thanks!

@JaydencoolCC
Copy link
Author

@yifanzhang713
I really want to konw why.
Hope you can answer this question, thanks!

@yifanzhang713
Copy link
Owner

I think the reason is about the common property of point-based detection techniques. We are committed to improve it in the next version.

Due to the inherently stochastic in our framework (different random sampling initializations in pre-processing, different initiation point in FPS, maximum number in query group, etc. ) Hence, even if we provide the trained weights, it is possible that the results that you obtain differ slightly from the ones presented in the paper.

Hope these can help you!

@JaydencoolCC
Copy link
Author

@yifanzhang713 Thank you for your prompt reply.
I see what you mean. But my question is that when the point cloud of the same frame was tested twice(each time only input the one same sample), the detection results are different each time. For example. when input sample A, the model detects two boxes. But then the same operation detects three boxes.Here are some of my opinions and experience.
Firstly, The sampling results do not change in pre-processing(mask_points_and_boxes_outside_range) because the same sample has fixed number of points, Secondly, sampling always starts from the first point(index 0) in FPS written by openPCDet. The first point of FPS is no randomness, so we will get the same sample points. Thirdly, I think maximum number in query group don't cause the inconsistency of two inferences for the same sample.
Hope you can show more details about the question.
Best regards!

@yifanzhang713
Copy link
Owner

Yeah, I agree to what you mean. But what cannot be ignored is that the sample_points and shuffle_points operation in the data prepossessing, which may affect all the results of processes mentioned above.

@JaydencoolCC
Copy link
Author

JaydencoolCC commented Aug 6, 2022

@yifanzhang713
As shown in the code, shuffle_points operation do not be implemented in the testing. And sample_points operation(mask_points_and_boxes_outside_range) also do not change result of sampling for the point cloud of the same frame. There is no randomness for the same sample in the code writted by you.
I hope you can give more constructive reasons and new discovery.
Loking forward to your reply!
Best regards!
image

@Birdylx
Copy link

Birdylx commented Sep 20, 2022

@JaydencoolCC Hi, here is my discovery about the randomness. It seems like the shuffle operation in sample_points method over here:

np.random.shuffle(choice)

if you set numpy with fixed seed, you might get a consistent results

@JaydencoolCC
Copy link
Author

@JaydencoolCC Hi, here is my discovery about the randomness. It seems like the shuffle operation in sample_points method over here:

np.random.shuffle(choice)

if you set numpy with fixed seed, you might get a consistent results

I think so. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants