@@ -0,0 +1,1289 @@
+#!/usr/bin/env python%0A%0A%22%22%22Create filelists to use for training and testing.%22%22%22%0A%0Aimport os%0Aimport json%0Afrom sklearn.cross_validation import train_test_split%0A%0A%0Apath_data = os.path.join(os.environ%5B'DATA_PATH'%5D,%0A                         'data_road/roadC621/',%0A                         %22image_2/%22)%0Afiles_data = %5Bos.path.join(path_data, f)%0A              for f in sorted(os.listdir(path_data))%0A              if f.endswith('.png')%5D%0A%0Apath_gt = os.path.join(os.environ%5B'DATA_PATH'%5D,%0A                       'data_road/roadC621/',%0A                       %22gt_image_2/%22)%0Afiles_gt = %5Bos.path.join(path_gt, f)%0A            for f in sorted(os.listdir(path_gt))%0A            if f.endswith('.png')%5D%0A%0Azipped = list(zip(files_data, files_gt))%0Atrain, test = train_test_split(zipped, random_state=0)%0A%0Atrain_data = %5B%5D%0Afor el in train:%0A    train_data.append(%7B'raw': os.path.abspath(el%5B0%5D),%0A                       'mask': os.path.abspath(el%5B1%5D)%7D)%0A%0Atest_data = %5B%5D%0Afor el in test:%0A    test_data.append(%7B'raw': os.path.abspath(el%5B0%5D),%0A                      'mask': os.path.abspath(el%5B1%5D)%7D)%0A%0Awith open('trainfiles.json', 'w') as outfile:%0A    json.dump(train_data, outfile, indent=4, separators=(',', ': '))%0A%0Awith open('testfiles.json', 'w') as outfile:%0A    json.dump(test_data, outfile, indent=4, separators=(',', ': '))%0A

Add utility function to create file list