loicmarie / sign-language-alphabet-recognizer

Simple sign language alphabet recognizer using Python, openCV and tensorflow for training Inception model (CNN classifier).
MIT License
286 stars 144 forks source link

cvWaitKey not Supported on Mac (classify_webcam.py) #18

Open DennisFaucher opened 5 years ago

DennisFaucher commented 5 years ago

Traceback (most recent call last): File "classify_webcam.py", line 68, in a = cv2.waitKey(1) # waits to see if esc is pressed cv2.error: /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp:654: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvWaitKey

Going to try "brew install opencv3 --with-python" to fix

[Edit: "brew install opencv3" did not solve the issue, but also running "pip3 uninstall opencv-python; pip3 install opencv-python" did solve the problem]

saugaatallabadi commented 3 years ago

import tensorflow.compat.v1 as tf tf.disable_v2_behavior()