dariopavllo/road-segmentation

Error while running testing

Opened this issue · 0 comments

Traceback (most recent call last): File "run.py", line 29, in <module> generate_submission(model, submission_filename, *image_filenames) File "F:\honours-vis\segmentation\road-segmentation\helpers.py", line 100, in generate_submission f.writelines('{}\n'.format(s) for s in mask_to_submission_strings(model, fn)) File "F:\honours-vis\segmentation\road-segmentation\helpers.py", line 100, in <genexpr> f.writelines('{}\n'.format(s) for s in mask_to_submission_strings(model, fn)) File "F:\honours-vis\segmentation\road-segmentation\helpers.py", line 83, in mask_to_submission_strings Zi = model.classify(Xi) File "F:\honours-vis\segmentation\road-segmentation\cnn_model.py", line 207, in classify img_patches = create_patches(X, self.patch_size, 16, self.padding) File "F:\honours-vis\segmentation\road-segmentation\helpers.py", line 56, in create_patches img_patches = np.asarray([img_crop(X[i], patch_size, patch_size, stride, padding) for i in range(X.shape[0])]) File "C:\Users\user\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\core\numeric.py", line 531, in asarray return array(a, dtype, copy=False, order=order) ValueError: could not broadcast input array from shape (72,72,4) into shape (72)

Can i please know .on how to solve this,i am giving an input RGB imge