From 90949a23b844e3280b4d9a85477fbc8d0f93dee0 Mon Sep 17 00:00:00 2001 From: Derrick Schultz Date: Mon, 1 Mar 2021 00:24:37 -0500 Subject: [PATCH] cover use case of .jpeg files --- lpips/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lpips/__init__.py b/lpips/__init__.py index 62b9a079..a3d19013 100755 --- a/lpips/__init__.py +++ b/lpips/__init__.py @@ -105,7 +105,7 @@ def load_image(path): import rawpy with rawpy.imread(path) as raw: img = raw.postprocess() - elif(path[-3:]=='bmp' or path[-3:]=='jpg' or path[-3:]=='png'): + elif(path[-3:]=='bmp' or path[-3:]=='jpg' or path[-3:]=='png' or path[-4:]=='jpeg'): import cv2 return cv2.imread(path)[:,:,::-1] else: