karolpiczak / EARS

EARS: Environmental Audio Recognition System
MIT License
110 stars 28 forks source link

ERROR: module 'keras.backend' has no attribute 'set_image_dim_ordering' #14

Closed manhoosbilli1 closed 4 years ago

manhoosbilli1 commented 4 years ago

everything else runs fine.. the setup is also successful except for this one error when i do ./run.sh

using rpi 3b rasbian buster desktop latest version using blue yeti as mic i can access web server as well but no data/stream being generated

ERROR:

Using Theano backend. Exception in thread Thread-1: Traceback (most recent call last): File "/home/pi/.conda/envs/ears/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/pi/.conda/envs/ears/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/home/pi/ears/ears/audio.py", line 72, in start keras.backend.set_image_dim_ordering('th') AttributeError: module 'keras.backend' has no attribute 'set_image_dim_ordering'

do you know why this is?

karolpiczak commented 4 years ago

With Keras 2.x you would have to change:

keras.backend.set_image_dim_ordering('th')

to

keras.backend.set_image_data_format('channels_first')

I'm not sure if EARS will run with Keras 2.0 though, there might be some other breaking changes. You can either try fixing them one-by-one or using some older version of Keras (1.x).

manhoosbilli1 commented 4 years ago

thanks for your reply. i have since fixed the issue..i had to downgrade all the dependencies to the ones you were using. i have the complete dependencies list which worked for me...ill post it in here soon. again thanks for great project like this.. learned lots from it. keep posting. good day.

manhoosbilli1 commented 4 years ago

Here's the environment dependencies that worked for me. using rpi 3b

`#currently working env dependencies Package Version


absl-py 0.9.0 astor 0.8.1 audioread 2.1.8 bokeh 0.12.5 certifi 2018.8.24 cffi 1.11.5 chardet 3.0.4 cycler 0.10.0 Cython 0.28.5 decorator 4.4.2 gast 0.3.3 google-pasta 0.2.0 grpcio 1.27.2 h5py 2.8.0 idna 2.9 Jinja2 2.11.1 joblib 0.11 Keras 2.0.0 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 kiwisolver 1.1.0 librosa 0.4.2 Markdown 3.2.1 MarkupSafe 1.1.1 matplotlib 3.2.1 numpy 1.14.5 pandas 0.23.4 pip 18.0 protobuf 3.11.3 PyAudio 0.2.11 pycparser 2.20 pydub 0.23.1 pyparsing 2.4.6 python-dateutil 2.8.1 pytz 2019.3 PyYAML 5.3.1 requests 2.23.0 scikit-learn 0.19.0 scipy 0.19.1 setuptools 46.1.1 six 1.11.0 sklearn 0.0 sounddevice 0.3.15 tensorboard 1.14.0 tensorflow 1.14.0 tensorflow-estimator 1.14.0 termcolor 1.1.0 Theano 0.9.0 tornado 4.3 tqdm 4.43.0 urllib3 1.25.8 Werkzeug 1.0.0 wheel 0.31.1 wrapt 1.12.1 `

karolpiczak commented 4 years ago

Great, thanks for the information.

On Wed, Apr 8, 2020, 13:06 Shoaib Mustafa notifications@github.com wrote:

Here's the environment dependencies that worked for me. using rpi 3b

`#currently working env dependencies Package Version

absl-py 0.9.0 astor 0.8.1 audioread 2.1.8 bokeh 0.12.5 certifi 2018.8.24 cffi 1.11.5 chardet 3.0.4 cycler 0.10.0 Cython 0.28.5 decorator 4.4.2 gast 0.3.3 google-pasta 0.2.0 grpcio 1.27.2 h5py 2.8.0 idna 2.9 Jinja2 2.11.1 joblib 0.11 Keras 2.0.0 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 kiwisolver 1.1.0 librosa 0.4.2 Markdown 3.2.1 MarkupSafe 1.1.1 matplotlib 3.2.1 numpy 1.14.5 pandas 0.23.4 pip 18.0 protobuf 3.11.3 PyAudio 0.2.11 pycparser 2.20 pydub 0.23.1 pyparsing 2.4.6 python-dateutil 2.8.1 pytz 2019.3 PyYAML 5.3.1 requests 2.23.0 scikit-learn 0.19.0 scipy 0.19.1 setuptools 46.1.1 six 1.11.0 sklearn 0.0 sounddevice 0.3.15 tensorboard 1.14.0 tensorflow 1.14.0 tensorflow-estimator 1.14.0 termcolor 1.1.0 Theano 0.9.0 tornado 4.3 tqdm 4.43.0 urllib3 1.25.8 Werkzeug 1.0.0 wheel 0.31.1 wrapt 1.12.1 `

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/karolpiczak/EARS/issues/14#issuecomment-610894923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUUQWLARDJ77AVBYTIFELRLRLCXANCNFSM4LRMGVPQ .

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, but feel free to re-open a closed issue if needed.