Skip to content

Commit

Permalink
Windows picture duplicates fix by arnoegw
Browse files Browse the repository at this point in the history
for #154

PiperOrigin-RevId: 213233024
  • Loading branch information
Andreas Seiderer authored and arnoegw committed Sep 17, 2018
1 parent 022eb2a commit 1fa48fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/image_retraining/retrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ def create_image_lists(image_dir, testing_percentage, validation_percentage):
if is_root_dir:
is_root_dir = False
continue
extensions = ['jpg', 'jpeg', 'JPG', 'JPEG']
extensions = sorted(set(os.path.normcase(ext) # Smash case on Windows.
for ext in ['JPEG', 'JPG', 'jpeg', 'jpg']))
file_list = []
dir_name = os.path.basename(sub_dir)
if dir_name == image_dir:
Expand Down

0 comments on commit 1fa48fe

Please sign in to comment.