Imported from https://github.com/alexgkendall/SegNet-Tutorial