Tony607 / Keras_age_gender

Easy Real time gender age prediction from webcam video with Keras
153 stars 72 forks source link

cv2 error when running realtime.py #4

Closed Dyex719 closed 6 years ago

Dyex719 commented 6 years ago

When I run python realtime_demo.py

I get an error: cv2.error: OpenCV(3.4.1) /io/opencv/modules/objdetect/src/cascadedetect.cpp:1698: error: (-215) !empty() in function detectMultiScale

Dyex719 commented 6 years ago

This can be rectified by changing CASE_PATH in the realtime.py file to be the absolute path to the file haarcascade_frontalface_alt.xml.

Set: CASE_PATH = "/home/user/path_to_dir/Keras_age_gender/pretrained_models/haarcascade_frontalface_alt.xml"

Tony607 commented 6 years ago

Thanks for sharing!