Skip to content

Commit

Permalink
Update im2rec.py (apache#6473)
Browse files Browse the repository at this point in the history
Updated Line 107 of 'im2rec.py'. Read an image as binary.
  • Loading branch information
wenxuanxie authored and Olivier committed May 30, 2017
1 parent 10cca47 commit 803b00c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/im2rec.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def image_encode(args, i, item, q_out):

if args.pass_through:
try:
with open(fullpath) as fin:
with open(fullpath, 'rb') as fin:
img = fin.read()
s = mx.recordio.pack(header, img)
q_out.put((i, s, item))
Expand Down

0 comments on commit 803b00c

Please sign in to comment.