add folder to origin

This commit is contained in:
DiaosWang 2024-07-31 15:56:59 +08:00
parent e915412ab5
commit 4892d78b8e
3 changed files with 6 additions and 5 deletions

3
.gitignore vendored
View File

@ -4,4 +4,5 @@
!/proj_deepface/ !/proj_deepface/
!/.gitignore !/.gitignore
!/readme.md !/readme.md
!/componentdevelopment/ !/componentdevelopment/
!/FaceRegWeb/

View File

@ -80,7 +80,7 @@ GLOBAL_DICT = {
class FaceHelper: class FaceHelper:
def __init__(self, db_path: str, detector_backend: str, distance_metric: str, model_name: str): def __init__(self, db_path: str, detector_backend: str, distance_metric: str, model_name: str):
self.db_path = "C:/Users/JIALE/Desktop/bns_proj/proj_deepface/face" self.db_path = db_path
self.detector_backend = detector_backend self.detector_backend = detector_backend
self.distance_metric = distance_metric self.distance_metric = distance_metric
self.model_name = model_name self.model_name = model_name
@ -93,7 +93,7 @@ class FaceHelper:
"aligned", "aligned",
"normalization_base", "normalization_base",
"expand_0"] "expand_0"]
self.pkl_name = "_".join(file_parts)+".pkl".replace("-", "").lower() self.pkl_name = ("_".join(file_parts)+".pkl").replace("-", "").lower()
self.dirty = True self.dirty = True
self.db_representations = None self.db_representations = None
self.keepDBLive() self.keepDBLive()
@ -111,7 +111,7 @@ class FaceHelper:
detected_face detected_face
descriptions descriptions
""" """
logger.debug("Detecting faces using backend: %s", self.detector_backend) # @@@@ logger.info("Detecting faces using backend: %s", self.detector_backend) # @@@@
try: try:
face_objs = detection.extract_faces( face_objs = detection.extract_faces(
img_path = img, img_path = img,
@ -364,7 +364,7 @@ class item(BaseModel):
img: str img: str
img_name: str img_name: str
default_db_path = "C:/Users/JIALE/Desktop/bns_proj/proj_deepface/face" default_db_path = "./face"
default_detector_backend = "retinaface" default_detector_backend = "retinaface"
default_distance_metric = "euclidean_l2" default_distance_metric = "euclidean_l2"
default_model_name = "GhostFaceNet" default_model_name = "GhostFaceNet"