mirror of
https://github.com/serengil/deepface.git
synced 2025-06-09 04:55:24 +00:00
.jpg .JPG problem
This commit is contained in:
parent
e2fde9157b
commit
7f8186278d
@ -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 r, d, f in os.walk(db_path): # r=root, d=directories, f = files
|
||||||
for file in f:
|
for file in f:
|
||||||
if ('.jpg' in file):
|
if ('.jpg' in file.lower()) or ('.png' in file.lower()):
|
||||||
exact_path = r + "/" + file
|
exact_path = r + "/" + file
|
||||||
employees.append(exact_path)
|
employees.append(exact_path)
|
||||||
|
|
||||||
if len(employees) == 0:
|
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
|
#find representations for db images
|
||||||
|
Loading…
x
Reference in New Issue
Block a user