Skip to content

Commit

Permalink
Merge pull request #65 from dvschultz/master
Browse files Browse the repository at this point in the history
cover use case of .jpeg files
  • Loading branch information
richzhang authored Mar 1, 2021
2 parents 05f4ec2 + 90949a2 commit cbbf945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lpips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cbbf945

Please sign in to comment.