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 piiswrong committed May 27, 2017
1 parent 4f27d23 commit b35dc56
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 b35dc56

Please sign in to comment.