pytorch-yolo-v3
pytorch-yolo-v3 copied to clipboard
Fix a bug on Windows when saving an output img.
The separator in Windows is "\" and in Linux is "/", so this line will be invalid on Win system
det_names = pd.Series(imlist).apply(lambda x: "{}/det_{}".format(args.det,x.split("/")[-1]))
and I modified it to
if platform.system() == 'Windows':
det_names = pd.Series(imlist).apply(lambda x: "{}\\det_{}".format(args.det,x.split("\\")[-1]))
else:
det_names = pd.Series(imlist).apply(lambda x: "{}/det_{}".format(args.det,x.split("/")[-1]))