From 35c99507a645963b64e528c698d54b88ab1ab70a Mon Sep 17 00:00:00 2001 From: Ullallulloo Date: Tue, 20 Sep 2016 07:36:43 -0500 Subject: [PATCH] Added further extension variation acceptance and made extensions properly case insensitive (#188) --- openface/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openface/data.py b/openface/data.py index 7a8ae7c..71530f9 100644 --- a/openface/data.py +++ b/openface/data.py @@ -104,11 +104,11 @@ def iterImgs(directory): """ assert directory is not None - exts = [".jpg", ".png", ".JPG", ".PNG"] + exts = [".jpg", ".jpeg", ".png"] for subdir, dirs, files in os.walk(directory): for path in files: (imageClass, fName) = (os.path.basename(subdir), path) (imageName, ext) = os.path.splitext(fName) - if ext in exts: + if ext.lower() in exts: yield Image(imageClass, imageName, os.path.join(subdir, fName))