amineHorseman / facial-expression-recognition-using-cnn

Deep facial expressions recognition using Opencv and Tensorflow. Recognizing facial expressions from images or camera stream
GNU General Public License v3.0
445 stars 141 forks source link

TypeError: __call__(): incompatible function arguments. The following argument types are supported: #12

Open adriangondek opened 5 years ago

adriangondek commented 5 years ago

Mac-Pro:facial-expression-recognition-using-cnn morewayshealthcareserver$ python3 predict.py --image img/adrian.jpg loading pretrained model... WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/tflearn/initializations.py:119: UniformUnitScaling.init (from tensorflow.python.ops.init_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.initializers.variance_scaling instead with distribution=uniform to get equivalent behavior. WARNING:tensorflow:From /usr/local/lib/python3.6/site-packages/tflearn/objectives.py:66: calling reduce_sum (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead Traceback (most recent call last): File "predict.py", line 93, in emotion, confidence = predict(image, model, shape_predictor) File "predict.py", line 54, in predict face_landmarks = np.array([get_landmarks(image, face_rects, shape_predictor)]) File "predict.py", line 39, in get_landmarks return np.matrix([[p.x, p.y] for p in predictor(image, rects[0]).parts()]) TypeError: call(): incompatible function arguments. The following argument types are supported:

  1. (self: dlib.shape_predictor, image: array, box: dlib.rectangle) -> dlib.full_object_detection

Invoked with: <dlib.shape_predictor object at 0x13da5b378>, None, rectangle(0,0,48,48)