numpy bgr

This commit is contained in:
Sefik Ilkin Serengil 2022-05-01 09:26:49 +01:00 committed by GitHub
parent e4c3883f59
commit fb68d4a8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ def verify(img1_path, img2_path = '', model_name = 'VGG-Face', distance_metric =
This function verifies an image pair is same person or different persons. This function verifies an image pair is same person or different persons.
Parameters: Parameters:
img1_path, img2_path: exact image path, numpy array or based64 encoded images could be passed. If you are going to call verify function for a list of image pairs, then you should pass an array instead of calling the function in for loops. img1_path, img2_path: exact image path, numpy array (BGR) or based64 encoded images could be passed. If you are going to call verify function for a list of image pairs, then you should pass an array instead of calling the function in for loops.
e.g. img1_path = [ e.g. img1_path = [
['img1.jpg', 'img2.jpg'], ['img1.jpg', 'img2.jpg'],
@ -270,7 +270,7 @@ def analyze(img_path, actions = ('emotion', 'age', 'gender', 'race') , models =
This function analyzes facial attributes including age, gender, emotion and race This function analyzes facial attributes including age, gender, emotion and race
Parameters: Parameters:
img_path: exact image path, numpy array or base64 encoded image could be passed. If you are going to analyze lots of images, then set this to list. e.g. img_path = ['img1.jpg', 'img2.jpg'] img_path: exact image path, numpy array (BGR) or base64 encoded image could be passed. If you are going to analyze lots of images, then set this to list. e.g. img_path = ['img1.jpg', 'img2.jpg']
actions (tuple): The default is ('age', 'gender', 'emotion', 'race'). You can drop some of those attributes. actions (tuple): The default is ('age', 'gender', 'emotion', 'race'). You can drop some of those attributes.
@ -472,7 +472,7 @@ def find(img_path, db_path, model_name ='VGG-Face', distance_metric = 'cosine',
This function applies verification several times and find an identity in a database This function applies verification several times and find an identity in a database
Parameters: Parameters:
img_path: exact image path, numpy array or based64 encoded image. If you are going to find several identities, then you should pass img_path as array instead of calling find function in a for loop. e.g. img_path = ["img1.jpg", "img2.jpg"] img_path: exact image path, numpy array (BGR) or based64 encoded image. If you are going to find several identities, then you should pass img_path as array instead of calling find function in a for loop. e.g. img_path = ["img1.jpg", "img2.jpg"]
db_path (string): You should store some .jpg files in a folder and pass the exact folder path to this. db_path (string): You should store some .jpg files in a folder and pass the exact folder path to this.
@ -722,7 +722,7 @@ def represent(img_path, model_name = 'VGG-Face', model = None, enforce_detection
This function represents facial images as vectors. This function represents facial images as vectors.
Parameters: Parameters:
img_path: exact image path, numpy array or based64 encoded images could be passed. img_path: exact image path, numpy array (BGR) or based64 encoded images could be passed.
model_name (string): VGG-Face, Facenet, OpenFace, DeepFace, DeepID, Dlib, ArcFace. model_name (string): VGG-Face, Facenet, OpenFace, DeepFace, DeepID, Dlib, ArcFace.
@ -806,7 +806,7 @@ def detectFace(img_path, target_size = (224, 224), detector_backend = 'opencv',
This function applies pre-processing stages of a face recognition pipeline including detection and alignment This function applies pre-processing stages of a face recognition pipeline including detection and alignment
Parameters: Parameters:
img_path: exact image path, numpy array or base64 encoded image img_path: exact image path, numpy array (BGR) or base64 encoded image
detector_backend (string): face detection backends are retinaface, mtcnn, opencv, ssd or dlib detector_backend (string): face detection backends are retinaface, mtcnn, opencv, ssd or dlib