Skip to content

Commit

Permalink
Convert all loaded images to RGB.
Browse files Browse the repository at this point in the history
This makes the code compatible with greyscale data. Addresses comment in #8.
  • Loading branch information
MarvinTeichmann committed Feb 17, 2017
1 parent 3167a4f commit efabd4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions evals/kitti_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def evaluate(hypes, sess, image_pl, inf_out):
image_file = os.path.join(image_dir, image_file)
gt_file = os.path.join(image_dir, gt_file)

image = scp.misc.imread(image_file)
gt_image = scp.misc.imread(gt_file)
image = scp.misc.imread(image_file, mode='RGB')
gt_image = scp.misc.imread(gt_file, mode='RGB')

if hypes['jitter']['fix_shape']:
shape = image.shape
Expand Down
2 changes: 1 addition & 1 deletion inputs/kitti_seg_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _load_gt_file(hypes, data_file=None):
gt_image_file = os.path.join(base_path, gt_image_file)
assert os.path.exists(gt_image_file), \
"File does not exist: %s" % gt_image_file
image = scipy.misc.imread(image_file)
image = scipy.misc.imread(image_file, mode='RGB')
# Please update Scipy, if mode='RGB' is not avaible
gt_image = scp.misc.imread(gt_image_file, mode='RGB')

Expand Down

0 comments on commit efabd4a

Please sign in to comment.