Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Other way to store data than arrays for face encodings

I'm working a face recognition system where you input the folder of known faces, and it finds pictures of them in another folder. I'm using the face_recognition as fr, library, os, and copy from shutil as c. Here's the code.

if results[0] == True:
    c(file_name, "/home/deeplearning/Pictures" + end_name)

I get the error : ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

How can I store them so the truth value is different for each encoding?

like image 399
Julia Fasick Avatar asked Dec 11 '25 11:12

Julia Fasick


1 Answers

Ok, I changed if results[0] == True: to if results[0] is True.

As @roganjosh pointed out, it was a logic error. Sorry for the stupid question.

like image 174
Julia Fasick Avatar answered Dec 14 '25 08:12

Julia Fasick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!