habom2310 / People-tracking-with-Age-and-Gender-detection

A combination between people tracking and age and gender detection
88 stars 45 forks source link

error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize' #2

Open yensan0512 opened 5 years ago

yensan0512 commented 5 years ago

This is the error

Traceback (most recent call last): File "object_tracker.py", line 87, in blob2 = cv2.dnn.blobFromImage(face_img, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False) cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

[ WARN:0] terminating async callback

esmacolak commented 5 years ago

blob2 = cv2.dnn.blobFromImage(face_img, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False) replace this with blob2 = cv2.dnn.blobFromImage(frame, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False)

gaitanignacio commented 4 years ago

Hi yensan0512,

Try to uncomment line 58 at object_tracker.py frame = imutils.resize(frame, width=400).

BR.