Open IAmMarvel opened 5 years ago
Seems your test_img is not loaded properly. Try to => print(test_img.shape) and check if you get any valid dimensions or you receive an error stating "'NoneType' object has no attribute 'shape'"
PS C:\python39\try> & C:/Users/User/AppData/Local/Programs/Python/Python39/python.exe c:/python39/try/Face-Recognition-master/train_model.py
<module 'faceRecognition' from 'c:\python39\try\Face-Recognition-master\faceRecognition.py'>
Traceback (most recent call last):
File "c:\python39\try\Face-Recognition-master\train_model.py", line 9, in
hi, please help me why i'm getting this error and it cannot read it
File "tester.py", line 9, in
faces_detected,gray_img=fr.faceDetection(test_img)
File "C:\Users\sunil\Desktop\ml_project\me\face_recognition.py", line 6, in faceDetection
gray_img=cv2.cvtColor(test_img,cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
this is the error i m getting.Can you tell me what to do in that