Skip to content

Commit

Permalink
Merge pull request #1185 from serengil/feat-task-1204-data-source-in-…
Browse files Browse the repository at this point in the history
…find

consider arguments have impact on embeddings
  • Loading branch information
serengil authored Apr 12, 2024
2 parents b2ed849 + a30dd82 commit c75ee24
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion deepface/modules/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,22 @@ def find(
if os.path.isdir(db_path) is not True:
raise ValueError("Passed db_path does not exist!")

file_name = f"ds_{model_name}_{detector_backend}_v2.pkl"
file_parts = [
"ds",
"model",
model_name,
"detector",
detector_backend,
"aligned" if align else "unaligned",
"normalization",
normalization,
"expand",
str(expand_percentage),
]

file_name = "_".join(file_parts) + ".pkl"
file_name = file_name.replace("-", "").lower()

datastore_path = os.path.join(db_path, file_name)
representations = []

Expand Down Expand Up @@ -176,6 +190,7 @@ def find(
detector_backend=detector_backend,
enforce_detection=enforce_detection,
align=align,
expand_percentage=expand_percentage,
normalization=normalization,
silent=silent,
) # add new images
Expand Down

0 comments on commit c75ee24

Please sign in to comment.