thoughtworksarts / EmoPy

A deep neural net toolkit for emotion analysis via Facial Expression Recognition (FER)
https://thoughtworksarts.io/blog/emopy-emotional-expression-toolkit/
GNU Affero General Public License v3.0
919 stars 264 forks source link

error when run python fermodel_example.py #48

Closed Francis621 closed 4 years ago

Francis621 commented 4 years ago

As the title. When run the command "python fermodel_example.py" the system output the following error: Traceback (most recent call last): File "fermodel_example.py", line 1, in from EmoPy.src.fermodel import FERModel File "/Users/ryan/Documents/Pyproject/venv/lib/python3.6/site-packages/EmoPy/init.py", line 1, in from .src.fermodel import FERModel ModuleNotFoundError: No module named 'EmoPy.src' How to solve this problem?

satishdash commented 4 years ago

Hi @Francis621 Could you check if the issue persists? I get a different error here as below:

$ python fermodel_example_webcam.py 
Using TensorFlow backend.
/Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Initializing FER model parameters for target emotions: ['calm', 'anger', 'happiness']
WARNING:tensorflow:From /Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
2019-12-13 17:50:58.222506: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING:tensorflow:From /Users/satish_dash/.pyenv/versions/3.6.6/lib/python3.6/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Traceback (most recent call last):
  File "fermodel_example_webcam.py", line 29, in <module>
    cv2.imwrite(file, frame)
cv2.error: OpenCV(4.1.2) /Users/travis/build/skvark/opencv-python/opencv/modules/imgcodecs/src/loadsave.cpp:715: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'
Aronja commented 4 years ago

Hi @Francis621, Looks like the issue looks quite similar as a newer one. #59 Please check out my comment and see if that works for you.

Aronja commented 4 years ago

As there hasn't been a reply for a month, I'm closing this issue.