@@ -58,6 +58,7 @@ def verify(
58
58
distance_metric : str = "cosine" ,
59
59
enforce_detection : bool = True ,
60
60
align : bool = True ,
61
+ expand_percentage : int = 0 ,
61
62
normalization : str = "base" ,
62
63
) -> Dict [str , Any ]:
63
64
"""
@@ -83,6 +84,8 @@ def verify(
83
84
84
85
align (bool): Flag to enable face alignment (default is True).
85
86
87
+ expand_percentage (int): expand detected facial area with a percentage (default is 0).
88
+
86
89
normalization (string): Normalize the input image before feeding it to the model.
87
90
Options: base, raw, Facenet, Facenet2018, VGGFace, VGGFace2, ArcFace (default is base)
88
91
@@ -119,6 +122,7 @@ def verify(
119
122
distance_metric = distance_metric ,
120
123
enforce_detection = enforce_detection ,
121
124
align = align ,
125
+ expand_percentage = expand_percentage ,
122
126
normalization = normalization ,
123
127
)
124
128
@@ -129,6 +133,7 @@ def analyze(
129
133
enforce_detection : bool = True ,
130
134
detector_backend : str = "opencv" ,
131
135
align : bool = True ,
136
+ expand_percentage : int = 0 ,
132
137
silent : bool = False ,
133
138
) -> List [Dict [str , Any ]]:
134
139
"""
@@ -152,6 +157,8 @@ def analyze(
152
157
153
158
align (boolean): Perform alignment based on the eye positions (default is True).
154
159
160
+ expand_percentage (int): expand detected facial area with a percentage (default is 0).
161
+
155
162
silent (boolean): Suppress or allow some log messages for a quieter analysis process
156
163
(default is False).
157
164
@@ -209,6 +216,7 @@ def analyze(
209
216
enforce_detection = enforce_detection ,
210
217
detector_backend = detector_backend ,
211
218
align = align ,
219
+ expand_percentage = expand_percentage ,
212
220
silent = silent ,
213
221
)
214
222
@@ -221,6 +229,7 @@ def find(
221
229
enforce_detection : bool = True ,
222
230
detector_backend : str = "opencv" ,
223
231
align : bool = True ,
232
+ expand_percentage : int = 0 ,
224
233
threshold : Optional [float ] = None ,
225
234
normalization : str = "base" ,
226
235
silent : bool = False ,
@@ -249,6 +258,8 @@ def find(
249
258
250
259
align (boolean): Perform alignment based on the eye positions (default is True).
251
260
261
+ expand_percentage (int): expand detected facial area with a percentage (default is 0).
262
+
252
263
threshold (float): Specify a threshold to determine whether a pair represents the same
253
264
person or different individuals. This threshold is used for comparing distances.
254
265
If left unset, default pre-tuned threshold values will be applied based on the specified
@@ -286,6 +297,7 @@ def find(
286
297
enforce_detection = enforce_detection ,
287
298
detector_backend = detector_backend ,
288
299
align = align ,
300
+ expand_percentage = expand_percentage ,
289
301
threshold = threshold ,
290
302
normalization = normalization ,
291
303
silent = silent ,
@@ -298,6 +310,7 @@ def represent(
298
310
enforce_detection : bool = True ,
299
311
detector_backend : str = "opencv" ,
300
312
align : bool = True ,
313
+ expand_percentage : int = 0 ,
301
314
normalization : str = "base" ,
302
315
) -> List [Dict [str , Any ]]:
303
316
"""
@@ -320,6 +333,8 @@ def represent(
320
333
321
334
align (boolean): Perform alignment based on the eye positions (default is True).
322
335
336
+ expand_percentage (int): expand detected facial area with a percentage (default is 0).
337
+
323
338
normalization (string): Normalize the input image before feeding it to the model.
324
339
Default is base. Options: base, raw, Facenet, Facenet2018, VGGFace, VGGFace2, ArcFace
325
340
(default is base).
@@ -346,6 +361,7 @@ def represent(
346
361
enforce_detection = enforce_detection ,
347
362
detector_backend = detector_backend ,
348
363
align = align ,
364
+ expand_percentage = expand_percentage ,
349
365
normalization = normalization ,
350
366
)
351
367
@@ -409,6 +425,7 @@ def extract_faces(
409
425
detector_backend : str = "opencv" ,
410
426
enforce_detection : bool = True ,
411
427
align : bool = True ,
428
+ expand_percentage : int = 0 ,
412
429
grayscale : bool = False ,
413
430
) -> List [Dict [str , Any ]]:
414
431
"""
@@ -429,6 +446,8 @@ def extract_faces(
429
446
430
447
align (bool): Flag to enable face alignment (default is True).
431
448
449
+ expand_percentage (int): expand detected facial area with a percentage (default is 0).
450
+
432
451
grayscale (boolean): Flag to convert the image to grayscale before
433
452
processing (default is False).
434
453
@@ -448,6 +467,7 @@ def extract_faces(
448
467
detector_backend = detector_backend ,
449
468
enforce_detection = enforce_detection ,
450
469
align = align ,
470
+ expand_percentage = expand_percentage ,
451
471
grayscale = grayscale ,
452
472
human_readable = True ,
453
473
)
0 commit comments