edwardzhou130 / PolarSeg

Implementation for PolarNet: An Improved Grid Representation for Online LiDAR Point Clouds Semantic Segmentation (CVPR 2020)
BSD 3-Clause "New" or "Revised" License
369 stars 80 forks source link

Training on custom dataset #38

Closed resha1417 closed 3 years ago

resha1417 commented 3 years ago

Hello Team,

Thank you so much for great work.

I am trying to use this code base for custom dataset. For example I have two classes road and car. In one file I have ground truth labels(points) for these two classes are: road: 895735 and car: 157860. After calling function named spherical_dataset in processed_label variable I am getting a very few point labels for example: road: 274 and car: 09. Q1 :Will these much points enough for training?

In the code base, for SemKitti there is fixed_volume_space. At the time of calling function I made that argument False, and now I am calculating volume_space from the data after converting it into Cartesian to Polar.

Q2: Is this the proper way? or can you please let me know how do you fixed that volume space? I am not getting it. and also could that be the reason for less number of points per class(after calling spherical_dataset).

As you mentioned in the paper, you tried different grid sizes for Semkitti and then you fixed the grid size. Q3: How it will affect on custom dataset? How we can choose grid size ? If I am increasing grid size my gpu(32 gb capacity, with 1 batch size) is not able to handle it for custom dataset.

Can you please help me out with my questions. It would be great help.

Thanks and Regards, Resha Thacker

edwardzhou130 commented 3 years ago

Q1: I don't think it's enough.

Q2: The range I used for the fixed volume space is based on the statistic of all training points. Basically, I want to cover >99% of the points in this range. And the points that exceeded the range will be move to the closest edge. If the fixed_volume_space is set to False, it will count the range separately for each scan.

Q3: Larger grid size will potentially have better segmentation results, but needs more GPU memory and inference time. You also need to have a relatively low discretization error (points from different classes are assigned to the same grid).

The single scan size ( road: 895735 and car: 157860) of your dataset looks very big to me. SemanticKITTI only has 10k points. Maybe it's because your dataset is big and you didn't use the fixed_volume_space. The size of each grid becomes very large so that only a small portion of the grids have points in them.

resha1417 commented 3 years ago

Thank you @edwardzhou130 for your quick reply, It indeed helped me to resolve my issue. You can closed this issue now. Thank you again.