ambitious-octopus / MI-EEG-1D-CNN

A new approach based on a 10-layer one-dimensional convolution neural network (1D-CNN) to classify five brain states (four MI classes plus a 'baseline' class) using a data augmentation algorithm and a limited number of EEG channels. Paper: https://doi.org/10.1088/1741-2552/ac4430
GNU General Public License v3.0
160 stars 18 forks source link

Installing the packages with the environment YML #20

Closed lopezjuanma96 closed 2 years ago

lopezjuanma96 commented 2 years ago

Hi! I'm trying to replicate your results to also test & compare the model with some data I personally recorded.

I have a windows PC so I choose the second solution of cloning the repo and creating the environment through the YML file. But I run into some problems:

Firstly, most of the packages put into the YML file raise a PackageNotFound Error, this is strange bc for example one of those packages is matplotlib, this is the full Error:

ResolvePackageNotFound:                                                                                                   - sip==4.19.13=py38he6710b0_0                                                                                           - matplotlib==3.4.2=py38h06a4308_0                                                                                      - zstd==1.4.9=haebb681_0                                                                                                - libgfortran4==7.5.0=ha8ba4b0_17                                                                                       - lz4-c==1.9.3=h295c915_1                                                                                               - libxml2==2.9.12=h03d6c58_0                                                                                            - intel-openmp==2021.3.0=h06a4308_3350                                                                                  - libstdcxx-ng==9.3.0=hd4cf53a_17                                                                                       - mkl==2021.3.0=h06a4308_520                                                                                            - qt==5.9.7=h5867ecd_1                                                                                                  - gst-plugins-base==1.14.0=h8213a91_2                                                                                   - libpng==1.6.37=hbc83047_0                                                                                             - ca-certificates==2021.5.30=ha878542_0                                                                                 - pip==21.2.2=py38h06a4308_0                                                                                            - setuptools==58.0.4=py38h06a4308_0                                                                                     - fontconfig==2.13.1=h6c09931_0                                                                                         - ld_impl_linux-64==2.35.1=h7274673_9                                                                                   - libgomp==9.3.0=h5101ec6_17                                                                                            - xz==5.2.5=h7b6447c_0                                                                                                  - glib==2.69.1=h5202010_0                                                                                               - libgfortran-ng==7.5.0=ha8ba4b0_17                                                                                     - openssl==1.1.1l=h7f8727e_0                                                                                            - gstreamer==1.14.0=h28cd5cc_2                                                                                          - libuuid==1.0.3=h1bed415_2                                                                                             - libgcc-ng==9.3.0=h5101ec6_17                                                                                          - libtiff==4.2.0=h85742a9_0                                                                                             - readline==8.1=h27cfd23_0                                                                                              - brotli==1.0.9=he6710b0_2                                                                                              - mkl-service==2.4.0=py38h7f8727e_0                                                                                     - pyqt==5.9.2=py38h05f1152_4                                                                                            - dbus==1.13.18=hb2f20db_0                                                                                              - libwebp-base==1.2.0=h27cfd23_0                                                                                        - sqlite==3.36.0=hc218d9a_0                                                                                             - tornado==6.1=py38h27cfd23_0                                                                                           - pcre==8.45=h295c915_0                                                                                                 - libopenblas==0.3.13=h4367d64_0                                                                                        - matplotlib-base==3.4.2=py38hab158f2_0                                                                                 - freetype==2.10.4=h5ab3b9f_0                                                                                           - icu==58.2=he6710b0_3                                                                                                  - openjpeg==2.4.0=h3ad879b_0                                                                                            - zlib==1.2.11=h7b6447c_3                                                                                               - lcms2==2.12=h3be6417_0                                                                                                - certifi==2021.5.30=py38h578d9bd_0                                                                                     - libffi==3.3=he6710b0_2                                                                                                - ncurses==6.2=he6710b0_1                                                                                               - numpy-base==1.19.2=py38h75fe3a5_0                                                                                     - pillow==8.3.1=py38h2c7a002_0                                                                                          - kiwisolver==1.3.1=py38h2531618_0                                                                                      - _openmp_mutex==4.5=1_gnu                                                                                              - python==3.8.3=hcff3b4d_2                                                                                              - jpeg==9d=h7f8727e_0                                                                                                   - tk==8.6.11=h1ccaba5_0                                                                                                 - libxcb==1.14=h7b6447c_0                                                                                               - expat==2.4.1=h2531618_2                                                                                               - cudatoolkit==10.1.243=h6bb024c_0

(sorry, copying it from the command line must have breaking it into colums, but it was a print of each package under the next one)

Then I tried putting all packages under the pip line (I know this could raise some trouble in the future, but I was trying to al least make it run once, if that worked then I could have done it again but only putting under pip the ones Anaconda couldn't find -they are a lot though) but I got another Error:

Pip subprocess error:
ERROR: Invalid requirement: '_libgcc_mutex=0.1=main' (from line 1 of C:\Users\ottaaproject\Desktop\Lixi\MI GPU\MI-EEG-1D-CNN\docs\condaenv.amrlke0r.requirements.txt)
Hint: = is not a valid operator. Did you mean == ?
failed
CondaEnvException: Pip failed

On first glance I feel like I might be handling a different Anaconda version, I just updated to the latest release of anaconda but no changes happened. Hope you can help me solve this, I believe I could get a lot out of this comparison (and of course I can send you my results too!)

Thanks in advance. Greetings from Argentina!

ambitious-octopus commented 2 years ago

Thank you for reporting this issue! Try replacing the contents of the environment.yml file with this:

name: eeg
channels:
  - conda-forge
  - defaults
dependencies:
  - appdirs=1.4.4=pyh9f0ad1d_0
  - apptools=5.1.0=pyh44b312d_0
  - argon2-cffi=20.1.0=py38h294d835_2
  - async_generator=1.10=py_0
  - attrs=20.3.0=pyhd3deb0d_0
  - backcall=0.2.0=pyh9f0ad1d_0
  - backports=1.0=py_2
  - backports.functools_lru_cache=1.6.1=py_0
  - bleach=3.3.0=pyh44b312d_0
  - blosc=1.21.0=h0e60522_0
  - brotli=1.0.9=h0e60522_4
  - brotlipy=0.7.0=py38h294d835_1001
  - bzip2=1.0.8=h8ffe710_4
  - ca-certificates=2020.12.5=h5b45459_0
  - cached-property=1.5.1=py_0
  - certifi=2020.12.5=py38haa244fe_1
  - cffi=1.14.5=py38hd8c33c5_0
  - cftime=1.4.1=py38h347fdf6_0
  - chardet=4.0.0=py38haa244fe_1
  - charls=2.2.0=h39d44d4_0
  - cloudpickle=1.6.0=py_0
  - colorama=0.4.4=pyh9f0ad1d_0
  - configobj=5.0.6=py_0
  - cryptography=3.4.4=py38hb7941b4_0
  - curl=7.71.1=h4b64cdc_8
  - cvxpy=1.1.10=py38haa244fe_0
  - cvxpy-base=1.1.10=py38h4c96930_0
  - cycler=0.10.0=py_2
  - cytoolz=0.11.0=py38h294d835_3
  - dask-core=2021.2.0=pyhd8ed1ab_0
  - decorator=4.4.2=py_0
  - defusedxml=0.6.0=py_0
  - dipy=1.3.0=py38hbc2243c_1
  - double-conversion=3.1.5=h6538335_2
  - ecos=2.0.7.post1=py38h347fdf6_4
  - eigen=3.3.9=h2d74725_1
  - entrypoints=0.3=pyhd8ed1ab_1003
  - envisage=4.9.2=pyh9f0ad1d_1
  - expat=2.2.10=h39d44d4_0
  - ffmpeg=4.3.1=ha925a31_0
  - freetype=2.10.4=h546665d_1
  - giflib=5.2.1=h8d14728_2
  - gl2ps=1.4.2=h0597ee9_0
  - glew=2.1.0=h39d44d4_2
  - hdf4=4.2.13=h0e5069d_1004
  - hdf5=1.10.6=nompi_h5268f04_1114
  - icu=68.1=h0e60522_0
  - idna=2.10=pyh9f0ad1d_0
  - imagecodecs=2021.1.28=py38hb9201fa_0
  - imageio=2.9.0=py_0
  - imageio-ffmpeg=0.4.3=pyhd8ed1ab_0
  - importlib-metadata=3.7.0=py38haa244fe_0
  - importlib_metadata=3.7.0=hd8ed1ab_0
  - intel-openmp=2020.3=h57928b3_311
  - ipykernel=5.5.0=py38hc5df569_1
  - ipython=7.20.0=py38hc5df569_2
  - ipython_genutils=0.2.0=py_1
  - ipywidgets=7.6.3=pyhd3deb0d_0
  - jedi=0.18.0=py38haa244fe_2
  - joblib=1.0.1=pyhd8ed1ab_0
  - jpeg=9d=h8ffe710_0
  - jsoncpp=1.9.4=h2d74725_1
  - jsonschema=3.2.0=py_2
  - jupyter=1.0.0=py38haa244fe_6
  - jupyter_client=6.1.11=pyhd8ed1ab_1
  - jupyter_console=6.2.0=py_0
  - jupyter_core=4.7.1=py38haa244fe_0
  - jupyterlab_pygments=0.1.2=pyh9f0ad1d_0
  - jupyterlab_widgets=1.0.0=pyhd8ed1ab_1
  - jxrlib=1.1=h8ffe710_2
  - kiwisolver=1.3.1=py38hbd9d945_1
  - krb5=1.17.2=hbae68bd_0
  - lcms2=2.12=h2a16943_0
  - lerc=2.2.1=h0e60522_0
  - libaec=1.0.4=h39d44d4_1
  - libblas=3.9.0=8_mkl
  - libcblas=3.9.0=8_mkl
  - libclang=11.0.1=default_h5c34c98_1
  - libcurl=7.71.1=h4b64cdc_8
  - libdeflate=1.7=h8ffe710_5
  - libflang=5.0.0=h6538335_20180525
  - libiconv=1.16=he774522_0
  - liblapack=3.9.0=8_mkl
  - libnetcdf=4.7.4=nompi_h3a9aa94_107
  - libogg=1.3.4=h8ffe710_1
  - libpng=1.6.37=h1d00b33_2
  - libsodium=1.0.18=h8d14728_1
  - libssh2=1.9.0=hb06d900_5
  - libtheora=1.1.1=h62dcd97_1004
  - libtiff=4.2.0=hc10be44_0
  - libwebp-base=1.2.0=h8ffe710_0
  - libxml2=2.9.10=hf5bbc77_3
  - libzopfli=1.0.3=h0e60522_0
  - llvm-meta=5.0.0=0
  - llvmlite=0.35.0=py38h57a6900_1
  - loguru=0.5.3=py38h32f6830_2
  - lz4-c=1.9.3=h8ffe710_0
  - m2w64-gcc-libgfortran=5.3.0=6
  - m2w64-gcc-libs=5.3.0=7
  - m2w64-gcc-libs-core=5.3.0=7
  - m2w64-gmp=6.1.0=2
  - m2w64-libwinpthread-git=5.0.0.4634.697f757=2
  - matplotlib=3.3.4=py38haa244fe_0
  - matplotlib-base=3.3.4=py38h34ddff4_0
  - mayavi=4.7.2=py38h8d3ad35_4
  - meshio=4.3.8=pyhd8ed1ab_0
  - mffpy=0.6.2=pyhd8ed1ab_0
  - mistune=0.8.4=py38h294d835_1003
  - mkl=2020.4=hb70f87d_311
  - mne=0.22.0=pyhd8ed1ab_2
  - mock=4.0.3=py38haa244fe_1
  - msys2-conda-epoch=20160418=1
  - nbclient=0.5.2=pyhd8ed1ab_0
  - nbconvert=6.0.7=py38haa244fe_3
  - nbformat=5.1.2=pyhd8ed1ab_1
  - nest-asyncio=1.4.3=pyhd8ed1ab_0
  - netcdf4=1.5.6=nompi_py38h5338a22_100
  - networkx=2.5=py_0
  - nibabel=3.2.1=pyhd8ed1ab_0
  - nilearn=0.7.0=pyhd8ed1ab_0
  - notebook=6.2.0=py38haa244fe_0
  - numba=0.52.0=py38h4c96930_0
  - numexpr=2.7.2=py38h4c96930_0
  - olefile=0.46=pyh9f0ad1d_1
  - openjpeg=2.4.0=h48faf41_0
  - openmp=5.0.0=vc14_1
  - openssl=1.1.1j=h8ffe710_0
  - osqp=0.6.2=py38h4c96930_1
  - packaging=20.9=pyh44b312d_0
  - pandas=1.2.2=py38h4c96930_0
  - pandoc=2.11.4=h8ffe710_0
  - pandocfilters=1.4.2=py_1
  - parso=0.8.1=pyhd8ed1ab_0
  - patsy=0.5.1=py_0
  - pickleshare=0.7.5=py_1003
  - pillow=8.1.0=py38h9273828_2
  - pip=21.0.1=pyhd8ed1ab_0
  - pooch=1.3.0=pyhd8ed1ab_0
  - proj=7.2.0=h1cfcee9_2
  - prometheus_client=0.9.0=pyhd3deb0d_0
  - prompt-toolkit=3.0.16=pyha770c72_0
  - prompt_toolkit=3.0.16=hd8ed1ab_0
  - psutil=5.8.0=py38h294d835_1
  - pugixml=1.11.4=h0e60522_0
  - pycparser=2.20=pyh9f0ad1d_2
  - pydicom=2.1.2=pyhd3deb0d_0
  - pyface=7.1.0=pyh9f0ad1d_0
  - pygments=2.8.0=pyhd8ed1ab_0
  - pyopenssl=20.0.1=pyhd8ed1ab_0
  - pyparsing=2.4.7=pyh9f0ad1d_0
  - pyqt=5.12.3=py38haa244fe_7
  - pyqt-impl=5.12.3=py38h885f38d_7
  - pyqt5-sip=4.19.18=py38h885f38d_7
  - pyqtchart=5.12=py38h885f38d_7
  - pyqtwebengine=5.12.1=py38h885f38d_7
  - pyreadline=2.1=py38haa244fe_1003
  - pyrsistent=0.17.3=py38h294d835_2
  - pysocks=1.7.1=py38haa244fe_3
  - pysurfer=0.11.0=py_0
  - pytables=3.6.1=py38h153c448_3
  - python=3.8.8=h7840368_0_cpython
  - python-dateutil=2.8.1=py_0
  - python-picard=0.4=pyh5ca1d4c_1
  - python_abi=3.8=1_cp38
  - pytz=2021.1=pyhd8ed1ab_0
  - pyvista=0.28.1=pyhd8ed1ab_1
  - pyvistaqt=0.3.0=pyhd8ed1ab_0
  - pywavelets=1.1.1=py38h347fdf6_3
  - pywin32=300=py38h294d835_0
  - pywinpty=0.5.7=py38h32f6830_1
  - pyyaml=5.4.1=py38h294d835_0
  - pyzmq=22.0.3=py38h7a0e47e_0
  - qdldl-python=0.1.5=py38h4c96930_0
  - qt=5.12.9=h5909a2a_4
  - qtconsole=5.0.2=pyhd8ed1ab_0
  - qtpy=1.9.0=py_0
  - requests=2.25.1=pyhd3deb0d_0
  - scikit-image=0.18.1=py38h4c96930_0
  - scikit-learn=0.24.1=py38ha09990b_0
  - scooby=0.5.6=pyh9f0ad1d_0
  - scs=2.1.2=py38h7465cd0_2
  - send2trash=1.5.0=py_0
  - setuptools=49.6.0=py38haa244fe_3
  - six=1.15.0=pyh9f0ad1d_0
  - snappy=1.1.8=ha925a31_3
  - spyder-kernels=1.10.2=py38haa244fe_0
  - sqlite=3.34.0=h8ffe710_0
  - statsmodels=0.12.2=py38h347fdf6_0
  - tbb=2020.2=h2d74725_3
  - tbb-devel=2020.2=h2d74725_3
  - terminado=0.9.2=py38haa244fe_0
  - testpath=0.4.4=py_0
  - threadpoolctl=2.1.0=pyh5ca1d4c_0
  - tifffile=2021.2.1=pyhd8ed1ab_0
  - tk=8.6.10=h8ffe710_1
  - toolz=0.11.1=py_0
  - tornado=6.1=py38h294d835_1
  - tqdm=4.57.0=pyhd8ed1ab_0
  - traitlets=5.0.5=py_0
  - traits=6.2.0=py38h294d835_0
  - traitsui=7.1.0=pyh9f0ad1d_0
  - transforms3d=0.3.1=py_0
  - urllib3=1.26.3=pyhd8ed1ab_0
  - utfcpp=3.1.2=0
  - vc=14.2=hb210afc_3
  - vs2015_runtime=14.28.29325=h5e1d092_3
  - vtk=9.0.1=no_osmesa_py38h3499093_104
  - wcwidth=0.2.5=pyh9f0ad1d_2
  - webencodings=0.5.1=py_1
  - wheel=0.36.2=pyhd3deb0d_0
  - widgetsnbextension=3.5.1=py38haa244fe_4
  - win32_setctime=1.0.3=py_0
  - win_inet_pton=1.1.0=py38haa244fe_2
  - wincertstore=0.2=py38haa244fe_1006
  - winpty=0.4.3=4
  - xlrd=2.0.1=pyhd8ed1ab_3
  - xz=5.2.5=h62dcd97_1
  - yaml=0.2.5=he774522_0
  - zeromq=4.3.3=h0e60522_3
  - zfp=0.5.5=h0e60522_4
  - zipp=3.4.0=py_0
  - zlib=1.2.11=h62dcd97_1010
  - zstd=1.4.8=h4e2f164_1
  - pip:
    - absl-py==0.11.0
    - aggdraw==1.3.12
    - aniso8601==9.0.1
    - astunparse==1.6.3
    - bidict==0.21.2
    - bioread==2.1.2
    - biosppy==0.6.1
    - cachetools==4.2.1
    - click==8.0.1
    - cvxopt==1.2.6
    - docopt==0.6.2
    - fasttext==0.9.2
    - flask==2.0.1
    - flask-restful==0.3.9
    - future==0.18.2
    - gast==0.3.3
    - google-auth==1.27.0
    - google-auth-oauthlib==0.4.2
    - google-pasta==0.2.0
    - grpcio==1.35.0
    - h5py==2.10.0
    - imbalanced-learn==0.8.0
    - itsdangerous==2.0.1
    - jinja2==3.0.1
    - keras-preprocessing==1.1.2
    - keyboard==0.13.5
    - markdown==3.3.4
    - markupsafe==2.0.1
    - mouseinfo==0.1.3
    - neurokit==0.2.0
    - nltk==3.6.2
    - nolds==0.5.2
    - numpy==1.18.5
    - oauthlib==3.1.0
    - opt-einsum==3.3.0
    - protobuf==3.15.2
    - pyasn1==0.4.8
    - pyasn1-modules==0.2.8
    - pyautogui==0.9.52
    - pybind11==2.6.2
    - pydot==1.4.2
    - pygetwindow==0.0.9
    - pymsgbox==1.0.9
    - pynput==1.7.3
    - pyperclip==1.8.2
    - pyrect==0.1.4
    - pyscreeze==0.1.27
    - python-graphviz==0.16
    - pytweening==1.0.3
    - regex==2021.7.6
    - requests-oauthlib==1.3.0
    - rsa==4.7.2
    - scipy==1.4.1
    - seaborn==0.11.1
    - shortuuid==1.0.1
    - sklearn==0.0
    - tensorboard==2.4.1
    - tensorboard-plugin-wit==1.8.0
    - tensorflow==2.3.0
    - tensorflow-estimator==2.3.0
    - termcolor==1.1.0
    - visualkeras==0.0.2
    - werkzeug==2.0.1
    - wget==3.2
    - wrapt==1.12.1

In case this does not solve the problem please write to me (francesco.mattioli@istc.cnr.it), I will be happy to help you.

lopezjuanma96 commented 2 years ago

Cool! Thanks for such a fast response, I'll try it out today and contact you in any case

lopezjuanma96 commented 2 years ago

Hello Fran! I believe I managed to run a training correctly. I had to erase some lines from the environment.yml that you send me, they were

changed python-graphviz to graphviz deleted libwebp-base (couldn't find any variant

but i still believe those packages were not that important for the training itself but rather for graphs, logs and prints (please tell me if that's not the case and how we can work it out. I'll take a break for the weekend but I'll come back to it on monday and review any changes you suggest and then start comparing it to our data and model. I'll comment you on the results as soon as I get it.

Thanks for your help man!