img=cv2.imread(face.jpg)
predictions= DeepFace.analyze(img)
Error: Face could not be detected. Please confirm that the picture is a face photo or consider to set enforce_detection param to False.
setting enforce_detection
to False
is causing it to read emotions even if there is no face in the image
how do we handle this error so that it tells us that there is no face?