Skip to content

Commit

Permalink
Clarify re-save reason
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Aug 26, 2021
1 parent c5d13d3 commit 6624fe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,8 @@ def verify_image_label(args):
with open(im_file, 'rb') as f:
f.seek(-2, 2)
if f.read() != b'\xff\xd9': # corrupt JPEG
msg = f'{prefix}WARNING: Re-saving corrupted JPEG {im_file}'
im.save(im_file, format='JPEG', subsampling=0, quality=100) # re-save image
msg = f'{prefix}WARNING: corrupt JPEG restored and saved {im_file}'

# verify labels
if os.path.isfile(lb_file):
Expand Down

0 comments on commit 6624fe1

Please sign in to comment.