verify function could be passed with numpy array ?
See original GitHub issueI want to use DeepFace.verify() on a numpy array representing an image `img1 = img1[:,:,::-1]; img2 = img2[:,:,::-1]
obj = DeepFace.verify(img1, img2 , model_name = ‘Dlib’, distance_metric = ‘euclidean’)`
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Are numpy arrays passed by reference? - Stack Overflow
In Python, all variable names are references to values. When Python evaluates an assignment, the right-hand side is evaluated before the ...
Read more >Passing numpy array to shared library - Alban Siffer
Here we explain how we can pass numpy arrays to C (C++ and Go) shared libraries. ... Just let us imagine that we...
Read more >Test whether the elements of a given NumPy array is zero or ...
In numpy, we can check that whether none of the elements of given array is zero or not with the help of numpy.all()...
Read more >numpy.array — NumPy v1.24 Manual
In this case, it ensures the creation of an array object compatible with that passed in via this argument. New in version 1.20.0....
Read more >numpy.any — NumPy v1.24 Manual
Test whether any array element along a given axis evaluates to True. ... then keepdims will not be passed through to the any...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also share the my testing code
This returns the following message
(tensorflow) C:\Users\IS96273\Desktop>python dummy.py <class ‘numpy.ndarray’> <class ‘numpy.ndarray’> Using TensorFlow backend. {‘verified’: True, ‘model’: ‘VGG-Face’, ‘similarity_metric’: ‘cosine’, ‘distance’: 0.2709779739379883, ‘max_threshold_to_verify’: 0.4}
I also add a control for numpy inputs in the unit tests. Thank you very much.
Thank you very much for your help