File size: 1,422 Bytes
b50f432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

# from deepface import DeepFace
# import os
# models = [
#     "VGG-Face",
#     "Facenet",
#     "Facenet512",
#     "OpenFace",
#     "DeepFace",
#     "DeepID",
#     "ArcFace",
#     "Dlib",
#     "SFace",
# ]

# metrics = ["cosine", "euclidean", "euclidean_l2"]

# backends = [
#     'opencv',
#     'ssd',
#     'dlib',
#     'mtcnn',
#     'retinaface',
#     'mediapipe',
#     'yolov8',
#     'yunet',
#     'fastmtcnn',
# ]

# # df = DeepFace.find(img_path='F:/projects/python/mafqoud/dataset/missing_people/m0.jpg'
# #                     , db_path='F:/projects/python/mafqoud/dataset/founded_people'
# #                     , enforce_detection = True
# #                     , model_name = models[2]
# #                     , distance_metric = metrics[2]
# #                     , detector_backend = backends[3])

# DeepFace.stream(db_path = "F:/deepface")

# base_dir = os.path.abspath(os.path.dirname(__file__))
# # base_dir = "f:\\"
# founded_dir = os.path.join(base_dir, 'mafqoud', 'images', 'founded_people')
# def get_main_directory():
#     path = os.path.abspath(__file__)
#     drive, _ = os.path.splitdrive(path)
#     if not drive.endswith(os.path.sep):
#         drive += os.path.sep
#     return drive

# base_dir = get_main_directory()
# missing_dir = os.path.join(base_dir, 'mafqoud', 'images', 'missing_people')
# print(missing_dir)

# print(base_dir)
# print(missing_dir)
# print(founded_dir)