tdurbor commited on
Commit
fda4281
·
1 Parent(s): 93f6376

Make sure we use .webp

Browse files
Files changed (1) hide show
  1. utils/upload_to_dataset.py +2 -2
utils/upload_to_dataset.py CHANGED
@@ -36,7 +36,7 @@ def upload_to_dataset(original_images_dir, processed_images_dir, dataset_name, d
36
  # Walk into the original images folder
37
  for root, _, files in os.walk(original_images_dir):
38
  for f in files:
39
- if f.endswith(('.png', '.jpg', '.jpeg')):
40
  original_image_path = os.path.join(root, f)
41
  data[f]["original_image"] = original_image_path
42
  data[f]["original_filename"] = f
@@ -50,7 +50,7 @@ def upload_to_dataset(original_images_dir, processed_images_dir, dataset_name, d
50
  if os.path.exists(source_image_path):
51
  data[f][f"{source}_image"] = source_image_path
52
  break
53
-
54
  # Convert the data to a dictionary of lists
55
  dataset_dict = {
56
  "original_image": [],
 
36
  # Walk into the original images folder
37
  for root, _, files in os.walk(original_images_dir):
38
  for f in files:
39
+ if f.endswith(('.png', '.jpg', '.jpeg', '.webp')):
40
  original_image_path = os.path.join(root, f)
41
  data[f]["original_image"] = original_image_path
42
  data[f]["original_filename"] = f
 
50
  if os.path.exists(source_image_path):
51
  data[f][f"{source}_image"] = source_image_path
52
  break
53
+
54
  # Convert the data to a dictionary of lists
55
  dataset_dict = {
56
  "original_image": [],