Skip to content

Commit

Permalink
.jpg .JPG problem
Browse files Browse the repository at this point in the history
  • Loading branch information
serengil committed Dec 4, 2020
1 parent e2fde91 commit 7f81862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepface/DeepFace.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,12 @@ def find(img_path, db_path, model_name ='VGG-Face', distance_metric = 'cosine',

for r, d, f in os.walk(db_path): # r=root, d=directories, f = files
for file in f:
if ('.jpg' in file):
if ('.jpg' in file.lower()) or ('.png' in file.lower()):
exact_path = r + "/" + file
employees.append(exact_path)

if len(employees) == 0:
raise ValueError("There is no image in ", db_path," folder!")
raise ValueError("There is no image in ", db_path," folder! Validate .jpg or .png files exist in this path.")

#------------------------
#find representations for db images
Expand Down

0 comments on commit 7f81862

Please sign in to comment.