BichenWuUCB / SqueezeSeg

Implementation of SqueezeSeg, convolutional neural networks for LiDAR point clout segmentation
BSD 2-Clause "Simplified" License
566 stars 239 forks source link

Class loss weight #10

Open stratomaster31 opened 6 years ago

stratomaster31 commented 6 years ago

Hello again, Which criterion have you followed in order to balance the dataset? You have manually set the CLASS_LOSS_WEIGH, i'm guessing how. I'm thinking in taking the ratios of number of points per class among all labeled points, but this weights will sum up to 1. For example, if there are 100 labeled points and 33 belong to 'car', the weight for 'car' is 0.33. Thank you very much!

stratomaster31 commented 6 years ago

I think that the correct weighting follows : if there are 3 classes, and num(class=1) == 3num(class=2) == 2num(class=3), then a possible solution is, weights = [1/3 1 2/3]

stratomaster31 commented 6 years ago

@BichenWuUCB computing the statistics of your dataset, the inverse ratio of number of pixel's labels I get is 1/15, 1, 59, 62 for 'unknown', 'car', 'pedestrian' an 'cyclist'. I can't figure out how you get: 1/15, 1, 10, 10

deeplearning666 commented 6 years ago

I have the same question with you. Have you solved the question? Thank you very much!@stratomaster31

stratomaster31 commented 6 years ago

Well, I didn't dig deeper into it... sorry