pclucas14 / lidar_generation

Code for "Deep Generative Models for LiDAR Data"
79 stars 20 forks source link

Getting data back from preprocessed form to original form #6

Closed prashkmr closed 5 years ago

prashkmr commented 5 years ago

Hi Lucas,

After all the preprocessing and the generation of new point clouds, I suppose the data needs to be converted back to the original form. Can you shed some light on how do you do that, or how to go about it? I tried reversing the steps in the preprocess() code, but some thing is breaking.

Request to help out here. -Prashant

pclucas14 commented 5 years ago

I actually never reverse the code in preprocess. I take what the model outputs, convert it to xyz if it's in polar coordinates, and I plot the results. All the images in the paper are actually normalized between [-1, 1]

prashkmr commented 5 years ago

Got it, Thanks for the reply, Lucas.

Still, do you have any idea what the exact steps would be for reversing back based on the preprocess code? I am asking this because in any real-world application of lidar eg. SLAM I would need the original point cloud back once I have done the reconstruction. For the normalized point, most SLAM algorithms have difficulty in creating even a rough map of the environment because of the form factor of the point cloud.

pclucas14 commented 5 years ago

Yes. the only step you would need to undo is this one:

which is dataset /= np.absolute(dataset).max() So if you store the valud of the division, you can just rescale back when you're done.

If you end up doing SLAM with this work please let me know! I would really like to see that

-Lucas

prashkmr commented 5 years ago

Sure, I am working on using your solution for some challenging problems in SLAM and will let u know as well when there are consolidated good enough results.

By the way, I had some more questions regarding the pre-processing steps in the preprocess function.

  1. dist When you calculate dist(line 158), you do not take a square root. Is it correct or should there be a root?

  2. What is the calculation behind taking the cutoff distance as 7 in the same line above? KITTI uses 64 beam lidar so the polar 'r' should be bigger than 7 is what I am thinking, correct me if I am wrong.

  3. I am trying SLAM with a different configuration lidar so could you help me know that how do you calculate the min_a, max_a, min_b, max_b, min_c, max_c ?

  4. Final question: When you normalize at dataset /= np.absolute(dataset).max() you normalize all the values with the maximum overall (x's,y's,z's) Was just wondering why aren't you normalizing for x,y,z separately. normalizing x,y,z separately using min, max normalization should be better compared to the current one, given that x,y,z have differnt ranges? What do you think.

pclucas14 commented 5 years ago

Hi,

1) Yes it should be squared root. However ...

2) ... it's only used for the line right after (159). This line filters out the points that are "too close" to the car. This is 100% KITTI data specific, so you don't need to worry about that if you are using another dataset. Note that the value 7 was handpicked to match the values in dist.

3) the values are exactly what you get from running lines 144-145-146 on the training set (I hardcoded them so that they were the same for training and test sets)

4) 100% agreed. That's what you should do if you are starting from scratch.

prashkmr commented 3 years ago

Yes. the only step you would need to undo is this one:

which is dataset /= np.absolute(dataset).max() So if you store the valud of the division, you can just rescale back when you're done.

If you end up doing SLAM with this work please let me know! I would really like to see that

-Lucas

Hi Lucas,

We used your work and performed a dynamic to static translation for LiDAR frames and used SLAM over the reconstruction. As you asked this is our work on SLAM: https://arxiv.org/abs/2105.12774 which we presented in AAAI-2021. Our website for the paper is here: https://dslrproject.github.io/dslr/. Your work helped us a lot. Thanks for that. Please feel free to comment on our work and any specific things you liked/improvements. Would love to hear.

-Prashant