Skip to content

Commit

Permalink
Merge pull request brade31919#36 from omegacoleman/master
Browse files Browse the repository at this point in the history
Fix ValueError while using non 3-channeled PNG
  • Loading branch information
brade31919 authored Jun 15, 2018
2 parents 2e3766a + c5ab3f6 commit feb5a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_data_loader(FLAGS):

# Read in and preprocess the images
def preprocess_test(name, mode):
im = sic.imread(name).astype(np.float32)
im = sic.imread(name, mode="RGB").astype(np.float32)
# check grayscale image
if im.shape[-1] != 3:
h, w = im.shape
Expand Down Expand Up @@ -196,7 +196,7 @@ def inference_data_loader(FLAGS):

# Read in and preprocess the images
def preprocess_test(name):
im = sic.imread(name).astype(np.float32)
im = sic.imread(name, mode="RGB").astype(np.float32)
# check grayscale image
if im.shape[-1] != 3:
h, w = im.shape
Expand Down

0 comments on commit feb5a1d

Please sign in to comment.