alexgkendall / SegNet-Tutorial

Files for a tutorial to train SegNet for road scenes using the CamVid dataset
http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html
847 stars 517 forks source link

class_weighting #101

Open luciaL opened 7 years ago

luciaL commented 7 years ago

Hello,Could you tell me how to calculate the number of the class_weighting at the loss layer in the train.prototxt file???

TimoSaemann commented 7 years ago

I have uploaded a script that calculates the class_weighting. You can find it here.

mitalbert commented 7 years ago

@TimoSaemann thanks for sharing. I compared the output of your script and my script and found a tiny difference. Probably not important, just wanted to let you know.

My script output and results here https://github.com/alexgkendall/caffe-segnet/issues/37 are the same: class_weighting: 0.2565 class_weighting: 0.1853 class_weighting: 4.3963 class_weighting: 0.1369 class_weighting: 0.9185 class_weighting: 0.3873 class_weighting: 3.5331 class_weighting: 1.8127 class_weighting: 0.7246 class_weighting: 5.8550 class_weighting: 8.1365 class_weighting: 1.0974

And here is the output of your script for the same data(SegNet tutorial). class_weighting: 0.2557 class_weighting: 0.1847 class_weighting: 4.3815 class_weighting: 0.1364 class_weighting: 0.9154 class_weighting: 0.3860 class_weighting: 3.5212 class_weighting: 1.8066 class_weighting: 0.7222 class_weighting: 5.8353 class_weighting: 8.1092 class_weighting: 1.0937