harryhan618 / SCNN_Pytorch

Pytorch implementation of "Spatial As Deep: Spatial CNN for Traffic Scene Understanding"
MIT License
250 stars 68 forks source link

Update lane.py #48

Closed BaoWentz closed 3 years ago

BaoWentz commented 4 years ago

由于test_label.json里面的"raw_file": "clips/0530/1492626760788443246_0/20.jpg"跟windows下生成的predict_test.json里面"raw_file": "clips\\0530\\1492626760788443246_0\\20.jpg"无法匹配,导致if raw_file not in gts:raise Exception('Some raw_file from your predictions do not exist in the test tasks.')。所以加入代码判断是否为win平台,如果是的话就对“\\”进行替换,这样就不会报错,也能得到输出结果。

harryhan618 commented 4 years ago

那你可以在文本编辑器里把predict_test.json中的"\\"替换成“/”,并不需要加多余的代码。