vardanagarwal / Proctoring-AI

Creating a software for automatic monitoring in online proctoring
MIT License
544 stars 329 forks source link

Assertion error when head near frame ends #24

Closed vardanagarwal closed 3 years ago

vardanagarwal commented 3 years ago

The face landmark code returns an error: OpenCV(4.4.0) ..\modules\imgproc\src\resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

Full Traceback:

Traceback (most recent call last):

  File "C:\Users\hp\Desktop\minor project\new\untitled0.py", line 79, in <module>
    marks = detect_marks(frame, landmark_model, face)

  File "C:\Users\hp\Desktop\minor project\new\face_landmarks.py", line 99, in detect_marks
    face_img = cv2.resize(face_img, (128, 128))

This must be due to the face that the face coordinates passed has exceeded the limits of the original image.

vardanagarwal commented 3 years ago

Updated face_landmarks.py