mlcommons / tiny

MLPerf™ Tiny is an ML benchmark suite for extremely low-power systems such as microcontrollers
https://mlcommons.org/en/groups/inference-tiny/
Apache License 2.0
331 stars 81 forks source link

Environment setup for Streaming WakeWord #148

Closed AlexMontgomerie closed 5 months ago

AlexMontgomerie commented 5 months ago

I'm having issues setting up the environment for running the new streaming wakeword demo, and I was wondering if you would mind sending some instructions @jeremy-syn please? Even just something like pip freeze > requirements.txt would be great.

Also, thanks for all the work on the benchmark currently!

jeremy-syn commented 5 months ago

I use conda/mamba to manage my environment on my laptop (M1 Mac). Here's my environment dump from that. I'll try to put together a proper environment shortly.


name: jh_main
channels:
  - pytorch
  - defaults
  - conda-forge
dependencies:
  - aiohttp=3.9.1=py311h05b510d_0
  - aiosignal=1.3.1=pyhd8ed1ab_0
  - anyio=4.2.0=pyhd8ed1ab_0
  - aom=3.7.1=h463b476_0
  - appnope=0.1.3=pyhd8ed1ab_0
  - argon2-cffi=23.1.0=pyhd8ed1ab_0
  - argon2-cffi-bindings=21.2.0=py311heffc1b2_4
  - arrow=1.3.0=pyhd8ed1ab_0
  - asttokens=2.4.1=pyhd8ed1ab_0
  - async-lru=2.0.4=pyhd8ed1ab_0
  - atk-1.0=2.38.0=hcb7b3dd_1
  - attrs=23.2.0=pyh71513ae_0
  - audioread=3.0.1=py311h267d04e_1
  - babel=2.14.0=pyhd8ed1ab_0
  - beautifulsoup4=4.12.3=pyha770c72_0
  - bleach=6.1.0=pyhd8ed1ab_0
  - blinker=1.7.0=pyhd8ed1ab_0
  - bokeh=3.3.3=pyhd8ed1ab_0
  - brotli=1.1.0=hb547adb_1
  - brotli-bin=1.1.0=hb547adb_1
  - brotli-python=1.1.0=py311ha891d26_1
  - bzip2=1.0.8=h93a5062_5
  - c-ares=1.25.0=h93a5062_0
  - ca-certificates=2023.11.17=hf0a4a13_0
  - cached-property=1.5.2=hd8ed1ab_1
  - cached_property=1.5.2=pyha770c72_1
  - cachetools=5.3.2=pyhd8ed1ab_0
  - cairo=1.18.0=hd1e100b_0
  - certifi=2023.11.17=pyhd8ed1ab_0
  - cffi=1.16.0=py311h4a08483_0
  - charset-normalizer=3.3.2=pyhd8ed1ab_0
  - click=8.1.7=unix_pyh707e725_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - comm=0.2.1=pyhd8ed1ab_0
  - contourpy=1.2.0=py311hd03642b_0
  - cryptography=41.0.7=py311h08c85a6_1
  - cycler=0.12.1=pyhd8ed1ab_0
  - dav1d=1.2.1=hb547adb_0
  - debugpy=1.8.0=py311ha891d26_1
  - decorator=5.1.1=pyhd8ed1ab_0
  - defusedxml=0.7.1=pyhd8ed1ab_0
  - entrypoints=0.4=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - executing=2.0.1=pyhd8ed1ab_0
  - expat=2.5.0=hb7217d7_1
  - ffmpeg=6.1.1=gpl_ha63e52a_101
  - filelock=3.13.1=pyhd8ed1ab_0
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=h77eed37_1
  - fontconfig=2.14.2=h82840c6_0
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - fonttools=4.47.2=py311h05b510d_0
  - fqdn=1.5.1=pyhd8ed1ab_0
  - freetype=2.12.1=hadb7bae_2
  - fribidi=1.0.10=h27ca646_0
  - frozenlist=1.4.1=py311h05b510d_0
  - fsspec=2023.12.2=pyhca7485f_0
  - gdk-pixbuf=2.42.10=h15fa40c_4
  - gdown=4.7.3=pyhd8ed1ab_0
  - gettext=0.21.1=h0186832_0
  - giflib=5.2.1=h1a8c8d9_3
  - gmp=6.3.0=h965bd2d_0
  - gmpy2=2.1.2=py311h2ba9262_1
  - gnutls=3.7.9=hd26332c_0
  - google-api-core=2.15.0=pyhd8ed1ab_0
  - google-api-python-client=2.114.0=pyhd8ed1ab_0
  - google-auth=2.26.2=pyhca7485f_0
  - google-auth-httplib2=0.2.0=pyhd8ed1ab_0
  - google-auth-oauthlib=1.2.0=pyhd8ed1ab_0
  - googleapis-common-protos=1.62.0=pyhd8ed1ab_0
  - graphite2=1.3.13=h9f76cd9_1001
  - graphviz=9.0.0=h3face73_1
  - gtk2=2.24.33=h7895bb2_3
  - gts=0.7.6=he42f4ea_4
  - harfbuzz=8.3.0=h8f0ba13_0
  - hdf5=1.14.3=nompi_h5bb55e9_100
  - httplib2=0.22.0=pyhd8ed1ab_0
  - icu=73.2=hc8870d7_0
  - idna=3.6=pyhd8ed1ab_0
  - imageio=2.33.1=pyh8c1a49c_0
  - importlib-metadata=7.0.1=pyha770c72_0
  - importlib_metadata=7.0.1=hd8ed1ab_0
  - importlib_resources=6.1.1=pyhd8ed1ab_0
  - ipykernel=6.29.0=pyh3cd1d5f_0
  - ipython=8.20.0=pyh707e725_0
  - isoduration=20.11.0=pyhd8ed1ab_0
  - jasper=4.1.2=h7c0e182_0
  - jedi=0.19.1=pyhd8ed1ab_0
  - jinja2=3.1.3=pyhd8ed1ab_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - json5=0.9.14=pyhd8ed1ab_0
  - jsonpointer=2.4=py311h267d04e_3
  - jsonschema=4.21.0=pyhd8ed1ab_0
  - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
  - jsonschema-with-format-nongpl=4.21.0=pyhd8ed1ab_0
  - jupyter-lsp=2.2.2=pyhd8ed1ab_0
  - jupyter_client=8.6.0=pyhd8ed1ab_0
  - jupyter_core=5.7.1=py311h267d04e_0
  - jupyter_events=0.9.0=pyhd8ed1ab_0
  - jupyter_server=2.12.5=pyhd8ed1ab_0
  - jupyter_server_terminals=0.5.1=pyhd8ed1ab_0
  - jupyterlab=4.0.10=pyhd8ed1ab_0
  - jupyterlab_pygments=0.3.0=pyhd8ed1ab_0
  - jupyterlab_server=2.25.2=pyhd8ed1ab_0
  - kiwisolver=1.4.5=py311he4fd1f5_1
  - krb5=1.21.2=h92f50d5_0
  - lame=3.100=h1a8c8d9_1003
  - lazy_loader=0.3=pyhd8ed1ab_0
  - lcms2=2.16=ha0e7c42_0
  - lerc=4.0.0=h9a09cb3_0
  - libabseil=20230802.1=cxx17_h13dd4ca_0
  - libaec=1.1.2=h13dd4ca_1
  - libass=0.17.1=hf7da4fe_1
  - libblas=3.9.0=20_osxarm64_openblas
  - libbrotlicommon=1.1.0=hb547adb_1
  - libbrotlidec=1.1.0=hb547adb_1
  - libbrotlienc=1.1.0=hb547adb_1
  - libcblas=3.9.0=20_osxarm64_openblas
  - libcurl=8.5.0=h2d989ff_0
  - libcxx=16.0.6=h4653b0c_0
  - libdeflate=1.19=hb547adb_0
  - libedit=3.1.20191231=hc8eb9b7_2
  - libev=4.33=h93a5062_2
  - libexpat=2.5.0=hb7217d7_1
  - libffi=3.4.2=h3422bc3_5
  - libflac=1.4.3=hb765f3a_0
  - libgd=2.3.3=hfdf3952_9
  - libgfortran=5.0.0=13_2_0_hd922786_1
  - libgfortran5=13.2.0=hf226fd6_1
  - libglib=2.78.3=hb438215_0
  - libhwloc=2.9.3=default_h4394839_1009
  - libiconv=1.17=h0d3ecfb_2
  - libidn2=2.3.4=h1a8c8d9_0
  - libjpeg-turbo=3.0.0=hb547adb_1
  - liblapack=3.9.0=20_osxarm64_openblas
  - liblapacke=3.9.0=20_osxarm64_openblas
  - libllvm14=14.0.6=hd1a9a77_4
  - libnghttp2=1.58.0=ha4dd798_1
  - libogg=1.3.4=h27ca646_1
  - libopenblas=0.3.25=openmp_h6c19121_0
  - libopencv=4.9.0=py311h22734c1_5
  - libopenvino=2023.2.0=he6dadac_3
  - libopenvino-arm-cpu-plugin=2023.2.0=he6dadac_3
  - libopenvino-auto-batch-plugin=2023.2.0=hc9f00d9_3
  - libopenvino-auto-plugin=2023.2.0=hc9f00d9_3
  - libopenvino-hetero-plugin=2023.2.0=hf483cef_3
  - libopenvino-ir-frontend=2023.2.0=hf483cef_3
  - libopenvino-onnx-frontend=2023.2.0=h7939876_3
  - libopenvino-paddle-frontend=2023.2.0=h7939876_3
  - libopenvino-pytorch-frontend=2023.2.0=hebf3989_3
  - libopenvino-tensorflow-frontend=2023.2.0=he0d35a2_3
  - libopenvino-tensorflow-lite-frontend=2023.2.0=hebf3989_3
  - libopus=1.3.1=h27ca646_1
  - libpng=1.6.39=h76d750c_0
  - libprotobuf=4.24.4=hc9861d8_0
  - librosa=0.10.1=pyhd8ed1ab_0
  - librsvg=2.56.3=h55a2576_1
  - libsndfile=1.2.2=h9739721_1
  - libsodium=1.0.18=h27ca646_1
  - libsqlite=3.44.2=h091b4b1_0
  - libssh2=1.11.0=h7a5bd25_0
  - libtasn1=4.19.0=h1a8c8d9_0
  - libtiff=4.6.0=ha8a6c65_2
  - libtorch=2.1.0=cpu_generic_h51f0bcf_2
  - libunistring=0.9.10=h3422bc3_0
  - libuv=1.46.0=hb547adb_0
  - libvorbis=1.3.7=h9f76cd9_0
  - libvpx=1.13.1=hb765f3a_0
  - libwebp=1.3.2=hf30222e_1
  - libwebp-base=1.3.2=hb547adb_0
  - libxcb=1.15=hf346824_0
  - libxml2=2.12.4=h0d0cfa8_1
  - libzlib=1.2.13=h53f4e23_5
  - lightning-utilities=0.10.0=pyhd8ed1ab_0
  - llvm-openmp=17.0.6=hcd81f8e_0
  - llvmlite=0.41.1=py311hf5d242d_0
  - markupsafe=2.1.3=py311heffc1b2_1
  - matplotlib=3.8.2=py311ha1ab1f8_0
  - matplotlib-base=3.8.2=py311hfdba5f6_0
  - matplotlib-inline=0.1.6=pyhd8ed1ab_0
  - mistune=3.0.2=pyhd8ed1ab_0
  - mpc=1.3.1=h91ba8db_0
  - mpfr=4.2.1=h9546428_0
  - mpg123=1.32.4=hebf3989_0
  - mpmath=1.3.0=pyhd8ed1ab_0
  - msgpack-python=1.0.7=py311hd03642b_0
  - multidict=6.0.4=py311he2be06e_1
  - munkres=1.1.4=pyh9f0ad1d_0
  - nbclient=0.8.0=pyhd8ed1ab_0
  - nbconvert-core=7.14.2=pyhd8ed1ab_0
  - nbformat=5.9.2=pyhd8ed1ab_0
  - ncurses=6.4=h463b476_2
  - nest-asyncio=1.5.9=pyhd8ed1ab_0
  - nettle=3.9.1=h40ed0f5_0
  - networkx=3.2.1=pyhd8ed1ab_0
  - nomkl=1.0=h5ca1d4c_0
  - notebook-shim=0.2.3=pyhd8ed1ab_0
  - numba=0.58.1=py311h9ec4793_0
  - numpy=1.26.3=py311h7125741_0
  - oauthlib=3.2.2=pyhd8ed1ab_0
  - opencv=4.9.0=py311h24019a2_5
  - openh264=2.4.0=h965bd2d_0
  - openjpeg=2.5.0=h4c1507b_3
  - openssl=3.2.0=h0d3ecfb_1
  - overrides=7.4.0=pyhd8ed1ab_0
  - p11-kit=0.24.1=h29577a5_0
  - packaging=23.2=pyhd8ed1ab_0
  - pandas=2.1.4=py311h6e08293_0
  - pandocfilters=1.5.0=pyhd8ed1ab_0
  - pango=1.50.14=hcf40dda_2
  - parso=0.8.3=pyhd8ed1ab_0
  - patsy=0.5.6=pyhd8ed1ab_0
  - pcre2=10.42=h26f9a81_0
  - pexpect=4.8.0=pyh1a96a4e_2
  - pickleshare=0.7.5=py_1003
  - pillow=10.2.0=py311hb9c5795_0
  - pip=23.3.2=pyhd8ed1ab_0
  - pixman=0.43.0=hebf3989_0
  - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
  - platformdirs=4.1.0=pyhd8ed1ab_0
  - pooch=1.8.0=pyhd8ed1ab_0
  - portaudio=19.6.0=h13dd4ca_9
  - prometheus_client=0.19.0=pyhd8ed1ab_0
  - prompt-toolkit=3.0.42=pyha770c72_0
  - psutil=5.9.7=py311h05b510d_0
  - pthread-stubs=0.4=h27ca646_1001
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pugixml=1.14=h13dd4ca_0
  - pure_eval=0.2.2=pyhd8ed1ab_0
  - py-opencv=4.9.0=py311hee96954_5
  - pyasn1=0.5.1=pyhd8ed1ab_0
  - pyasn1-modules=0.3.0=pyhd8ed1ab_0
  - pycparser=2.21=pyhd8ed1ab_0
  - pydot=2.0.0=py311h267d04e_0
  - pygments=2.17.2=pyhd8ed1ab_0
  - pyjwt=2.8.0=pyhd8ed1ab_0
  - pyobjc-core=10.1=py311h665608e_0
  - pyobjc-framework-cocoa=10.1=py311h665608e_0
  - pyopenssl=23.3.0=pyhd8ed1ab_0
  - pyparsing=3.1.1=pyhd8ed1ab_0
  - pysocks=1.7.1=pyha2e5f31_6
  - pysoundfile=0.12.1=pyhd8ed1ab_0
  - python=3.11.7=hdf0ec26_1_cpython
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python-fastjsonschema=2.19.1=pyhd8ed1ab_0
  - python-json-logger=2.0.7=pyhd8ed1ab_0
  - python-sounddevice=0.4.6=pyhd8ed1ab_0
  - python-tzdata=2023.4=pyhd8ed1ab_0
  - python_abi=3.11=4_cp311
  - pytorch=2.1.0=cpu_generic_py311hf9c669c_2
  - pytorch-lightning=2.1.3=pyhd8ed1ab_0
  - pytz=2023.3.post1=pyhd8ed1ab_0
  - pyu2f=0.1.5=pyhd8ed1ab_0
  - pyyaml=6.0.1=py311heffc1b2_1
  - pyzmq=25.1.2=py311h6727e71_0
  - readline=8.2=h92ec313_1
  - referencing=0.32.1=pyhd8ed1ab_0
  - requests=2.31.0=pyhd8ed1ab_0
  - requests-oauthlib=1.3.1=pyhd8ed1ab_0
  - rfc3339-validator=0.1.4=pyhd8ed1ab_0
  - rfc3986-validator=0.1.1=pyh9f0ad1d_0
  - rpds-py=0.17.1=py311h94f323b_0
  - rsa=4.9=pyhd8ed1ab_0
  - scikit-learn=1.3.2=py311ha25ca4d_2
  - scipy=1.11.4=py311h2b215a9_0
  - seaborn=0.13.1=hd8ed1ab_0
  - seaborn-base=0.13.1=pyhd8ed1ab_0
  - send2trash=1.8.2=pyhd1c38e8_0
  - setuptools=69.0.3=pyhd8ed1ab_0
  - six=1.16.0=pyh6c4a22f_0
  - sleef=3.5.1=h156473d_2
  - snappy=1.1.10=h17c5cce_0
  - sniffio=1.3.0=pyhd8ed1ab_0
  - soupsieve=2.5=pyhd8ed1ab_1
  - soxr=0.1.3=h5008568_3
  - soxr-python=0.3.7=py311h9ea6feb_0
  - stack_data=0.6.2=pyhd8ed1ab_0
  - statsmodels=0.14.1=py311h9ea6feb_0
  - svt-av1=1.8.0=h463b476_0
  - sympy=1.12=pypyh9d50eac_103
  - tbb=2021.11.0=h6aa02a4_0
  - terminado=0.18.0=pyh31c8845_0
  - threadpoolctl=3.2.0=pyha21a80b_0
  - tinycss2=1.2.1=pyhd8ed1ab_0
  - tk=8.6.13=h5083fa2_1
  - tomli=2.0.1=pyhd8ed1ab_0
  - torchaudio=2.1.0=py311_cpu
  - torchmetrics=1.2.1=pyhd8ed1ab_0
  - torchvision=0.16.1=cpu_py311h92b70d4_2
  - tornado=6.3.3=py311heffc1b2_1
  - tqdm=4.66.1=pyhd8ed1ab_0
  - traitlets=5.14.1=pyhd8ed1ab_0
  - types-python-dateutil=2.8.19.20240106=pyhd8ed1ab_0
  - typing-extensions=4.9.0=hd8ed1ab_0
  - typing_extensions=4.9.0=pyha770c72_0
  - typing_utils=0.1.0=pyhd8ed1ab_0
  - tzdata=2023d=h0c530f3_0
  - uri-template=1.3.0=pyhd8ed1ab_0
  - uritemplate=4.1.1=pyhd8ed1ab_0
  - urllib3=2.1.0=pyhd8ed1ab_0
  - wcwidth=0.2.13=pyhd8ed1ab_0
  - webcolors=1.13=pyhd8ed1ab_0
  - webencodings=0.5.1=pyhd8ed1ab_2
  - websocket-client=1.7.0=pyhd8ed1ab_0
  - wheel=0.42.0=pyhd8ed1ab_0
  - x264=1!164.3095=h57fd34a_2
  - x265=3.5=hbc6ce65_3
  - xorg-libxau=1.0.11=hb547adb_0
  - xorg-libxdmcp=1.1.3=h27ca646_0
  - xyzservices=2023.10.1=pyhd8ed1ab_0
  - xz=5.2.6=h57fd34a_0
  - yaml=0.2.5=h3422bc3_2
  - yarl=1.9.4=py311h05b510d_0
  - zeromq=4.3.5=h965bd2d_0
  - zipp=3.17.0=pyhd8ed1ab_0
  - zlib=1.2.13=h53f4e23_5
  - zstd=1.5.5=h4f39d0f_0
  - pip:
    - absl-py==1.4.0
    - astor==0.8.1
    - astunparse==1.6.3
    - cleanlab==2.5.0
    - dm-tree==0.1.8
    - etils==1.6.0
    - flatbuffers==23.5.26
    - gast==0.5.4
    - gitdb==4.0.11
    - gitpython==3.1.41
    - google-pasta==0.2.0
    - grpcio==1.49.1
    - h5py==3.10.0
    - iniconfig==2.0.0
    - jupyter-server-mathjax==0.2.6
    - kagglehub==0.1.5
    - keras==2.15.0
    - keras-core==0.1.7
    - keras-cv==0.8.1
    - keras-tuner==1.4.6
    - kt-legacy==1.0.5
    - latexcodec==2.0.1
    - libclang==16.0.6
    - markdown==3.5.2
    - markdown-it-py==3.0.0
    - mdurl==0.1.2
    - ml-dtypes==0.2.0
    - namex==0.0.7
    - nbdime==4.0.1
    - opt-einsum==3.3.0
    - pluggy==1.3.0
    - promise==2.3
    - protobuf==3.20.3
    - pyaudio==0.2.14
    - pybtex==0.24.0
    - pydub==0.25.1
    - pytest==7.4.4
    - regex==2023.12.25
    - rich==13.7.0
    - scikeras==0.11.0
    - smmap==5.0.1
    - tensorboard==2.15.1
    - tensorboard-data-server==0.7.2
    - tensorflow==2.15.0
    - tensorflow-addons==0.23.0
    - tensorflow-datasets==4.9.4
    - tensorflow-docs==2024.1.17.4828
    - tensorflow-estimator==2.15.0
    - tensorflow-io-gcs-filesystem==0.34.0
    - tensorflow-macos==2.15.0
    - tensorflow-metadata==1.14.0
    - tensorflow-metal==1.1.0
    - tensorflow-model-optimization==0.7.5
    - termcolor==2.4.0
    - toml==0.10.2
    - torch==2.1.0.post2
    - typeguard==2.13.3
    - werkzeug==3.0.1
    - wrapt==1.14.1
prefix: /Users/jeremy/miniforge3/envs/jh_main
AlexMontgomerie commented 5 months ago

Thanks for sharing! I think I was having issues with the tensorflow-model-optimization library, all sorted now. For reference, I've found the following packages are required:

matplotlib==3.8.2
tensorflow==2.15.0
tensorflow-model-optimization==0.7.5
notebook
seaborn==0.13.1
scipy==1.11.4