Skip to content

Commit a80f463

Browse files
committed
fix other filenames
1 parent 30f1430 commit a80f463

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

SwissKnife/dataprep.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,11 @@ def prepareData(
163163
if cv_folds == 0:
164164

165165
if not os.path.exists(os.path.join(frames_path, "train")):
166-
# get all frames from folder
167-
frames = glob(frames_path + "/*.png")
166+
filetypes = ["*.png", "*.jpg", "*.jpeg", "*.bmp", "*.tif", "*.tiff"]
167+
for filetype in filetypes:
168+
frames = glob(frames_path + "/" + filetype)
169+
if frames:
170+
break
168171
# number of frames
169172
num_imgs = len(frames)
170173
# split into train and val (0.8/0.2) randomly

0 commit comments

Comments
 (0)