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

Trick between uint8 and uint16 of labels #161

Open ecustWallace opened 4 years ago

ecustWallace commented 4 years ago

During my testing, I found that there was always 100% for 0 class and 0% for 1 class in binary case. Actually it's not the problem of code but the label files. If the label files are uint16, the 1 pixels will be regarded as 0 so that the model can't be trained. I tried to transform them into uint8 by Matlab then it works.

Hope this helps for other guys and thanks for this outstanding code.