diff --git a/deepface/commons/functions.py b/deepface/commons/functions.py index 42351aa..81b431e 100644 --- a/deepface/commons/functions.py +++ b/deepface/commons/functions.py @@ -20,19 +20,6 @@ def initializeFolder(): os.mkdir(home+"/.deepface/weights") print("Directory ",home,"/.deepface/weights created") -def validateInputs(model_name, distance_metric): - - distance_metrics = ['cosine', 'euclidean', 'euclidean_l2'] - if distance_metric not in distance_metrics: - raise ValueError("Distance metric must be in ",distance_metrics," but you passed ", distance_metric) - - #-------------------------- - - model_names = ['VGG-Face', 'Facenet', 'OpenFace'] - - if model_name not in model_names: - raise ValueError("Model name metric must be in ",model_names," but you passed ", model_name) - def findThreshold(model_name, distance_metric): threshold = 0.40 @@ -109,4 +96,4 @@ def detectFace(image_path, target_size=(224, 224), grayscale = False): return img_pixels else: - raise ValueError("Face could not be detected in ", image_path,". Please confirm that the picture is a face photo.") \ No newline at end of file + raise ValueError("Face could not be detected in ", image_path,". Please confirm that the picture is a face photo.")