SqueezeSeg icon indicating copy to clipboard operation
SqueezeSeg copied to clipboard

Class loss weight

Open stratomaster31 opened this issue 6 years ago • 4 comments

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 avatar Apr 16 '18 15:04 stratomaster31

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 avatar Apr 20 '18 16:04 stratomaster31

@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

stratomaster31 avatar Apr 23 '18 16:04 stratomaster31

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

deeplearning666 avatar Oct 17 '18 02:10 deeplearning666

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

stratomaster31 avatar Oct 17 '18 11:10 stratomaster31