feat: any change

This commit is contained in:
Shivam Singhal 2024-08-27 21:56:34 +05:30
parent 654b5a2c97
commit e9d980fdd4
2 changed files with 4 additions and 6 deletions

View File

@ -84,9 +84,7 @@ class FaceNet512dONNXClient(FacialRecognition):
input_name = self.model.get_inputs()[0].name
output_name = self.model.get_outputs()[0].name
result = self.model.run([output_name], {input_name: img})
if isinstance(result[0][0], np.ndarray):
return result[0][0].tolist()
return list(result[0][0])
return result[0][0].tolist()
def scaling(x, scale):
@ -1741,7 +1739,7 @@ def load_facenet512d_onnx_model(
"""
Download Facenet512d ONNX model weights and load
Returns:
model (Model)
model (Any)
"""
try:
import onnxruntime as ort

View File

@ -8,9 +8,9 @@ from deepface.commons.logger import Logger
logger = Logger()
models = ["VGG-Face", "Facenet", "Facenet512", "ArcFace", "GhostFaceNet"]
models = ["Facenet512ONNX"]
metrics = ["cosine", "euclidean", "euclidean_l2"]
detectors = ["opencv", "mtcnn"]
detectors = ["opencv"]
def test_different_facial_recognition_models():