I don't know what term I should use for the window I am getting so I am attaching a screenshot of the window for reference.
I am getting this window about 7 of the 10 times I am running this code:
import cv2
import numpy as np
import face_recognition
imgElon = face_recognition.load_image_file("BasicFaceRecImg/ElonMusk2.jpg")
imgElon = cv2.cvtColor(imgElon, cv2.COLOR_BGR2RGB)
imgElon_face_loc = face_recognition.face_locations(imgElon)[0]
print(imgElon_face_loc)
imgElon_encode = face_recognition.face_encodings(imgElon)[0]
cv2.rectangle(imgElon, (imgElon_face_loc[0], imgElon_face_loc[3]), (imgElon_face_loc[1], imgElon_face_loc[2]),(255, 0, 255), 2)
cv2.imshow('Elon Musk', imgElon)
cv2.waitKey(0)
And the funny thing is that I am not getting this problem every time. It runs perfectly sometimes.
