google-research / maxim

[CVPR 2022 Oral] Official repository for "MAXIM: Multi-Axis MLP for Image Processing". SOTA for denoising, deblurring, deraining, dehazing, and enhancement.

Home Page:https://arxiv.org/abs/2201.02973

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'maxim.models'

AIisCool opened this issue · comments

Not sure how to fix this.

Not sure how to fix this.

After requirements.txt install, run pip install . # setup project (**what you missed**)
You should run python setup.py install . Authors have missed it. I had the same problem. Look for my Closed issue. You'll know.

@deshwalmahesh tried that, but still getting that not found error for maxim.models.

Also if I run pip install . # setup project (**what you missed**) I get:

C:\maxim>pip install . # setup project (**what you missed**)
ERROR: Invalid requirement: '#'

Full log of running setup.py:

C:\maxim>python setup.py install
running install
running bdist_egg
running egg_info
writing maxim.egg-info\PKG-INFO
writing dependency_links to maxim.egg-info\dependency_links.txt
writing requirements to maxim.egg-info\requires.txt
writing top-level names to maxim.egg-info\top_level.txt
reading manifest file 'maxim.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'maxim.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\maxim
creating build\bdist.win-amd64\egg\maxim\models
copying build\lib\maxim\models\maxim.py -> build\bdist.win-amd64\egg\maxim\models
copying build\lib\maxim\models\__init__.py -> build\bdist.win-amd64\egg\maxim\models
copying build\lib\maxim\run_eval.py -> build\bdist.win-amd64\egg\maxim
copying build\lib\maxim\test_maxim.py -> build\bdist.win-amd64\egg\maxim
copying build\lib\maxim\__init__.py -> build\bdist.win-amd64\egg\maxim
byte-compiling build\bdist.win-amd64\egg\maxim\models\maxim.py to maxim.cpython-39.pyc
byte-compiling build\bdist.win-amd64\egg\maxim\models\__init__.py to __init__.cpython-39.pyc
byte-compiling build\bdist.win-amd64\egg\maxim\run_eval.py to run_eval.cpython-39.pyc
byte-compiling build\bdist.win-amd64\egg\maxim\test_maxim.py to test_maxim.cpython-39.pyc
byte-compiling build\bdist.win-amd64\egg\maxim\__init__.py to __init__.cpython-39.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying maxim.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying maxim.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying maxim.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying maxim.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying maxim.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\maxim-1.0.0-py3.9.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing maxim-1.0.0-py3.9.egg
Removing c:\python39\lib\site-packages\maxim-1.0.0-py3.9.egg
Copying maxim-1.0.0-py3.9.egg to c:\python39\lib\site-packages
maxim 1.0.0 is already the active version in easy-install.pth

Installed c:\python39\lib\site-packages\maxim-1.0.0-py3.9.egg
Processing dependencies for maxim==1.0.0
Searching for jaxlib==0.1.72
Best match: jaxlib 0.1.72
Adding jaxlib 0.1.72 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for jax==0.2.22
Best match: jax 0.2.22
Adding jax 0.2.22 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for tensorflow==2.8.0
Best match: tensorflow 2.8.0
Adding tensorflow 2.8.0 to easy-install.pth file
Installing estimator_ckpt_converter-script.py script to C:\Python39\Scripts
Installing estimator_ckpt_converter.exe script to C:\Python39\Scripts
Installing import_pb_to_tensorboard-script.py script to C:\Python39\Scripts
Installing import_pb_to_tensorboard.exe script to C:\Python39\Scripts
Installing saved_model_cli-script.py script to C:\Python39\Scripts
Installing saved_model_cli.exe script to C:\Python39\Scripts
Installing tensorboard-script.py script to C:\Python39\Scripts
Installing tensorboard.exe script to C:\Python39\Scripts
Installing tf_upgrade_v2-script.py script to C:\Python39\Scripts
Installing tf_upgrade_v2.exe script to C:\Python39\Scripts
Installing tflite_convert-script.py script to C:\Python39\Scripts
Installing tflite_convert.exe script to C:\Python39\Scripts
Installing toco-script.py script to C:\Python39\Scripts
Installing toco.exe script to C:\Python39\Scripts
Installing toco_from_protos-script.py script to C:\Python39\Scripts
Installing toco_from_protos.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for pandas==1.4.1
Best match: pandas 1.4.1
Adding pandas 1.4.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for numpy==1.22.3
Best match: numpy 1.22.3
Adding numpy 1.22.3 to easy-install.pth file
Installing f2py-script.py script to C:\Python39\Scripts
Installing f2py.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for ml-collections==0.1.0
Best match: ml-collections 0.1.0
Adding ml-collections 0.1.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for flax==0.3.3
Best match: flax 0.3.3
Adding flax 0.3.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for einops==0.4.0
Best match: einops 0.4.0
Adding einops 0.4.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for clu==0.0.6
Best match: clu 0.0.6
Adding clu 0.0.6 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for chex==0.1.2
Best match: chex 0.1.2
Adding chex 0.1.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for absl-py==1.0.0
Best match: absl-py 1.0.0
Adding absl-py 1.0.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for scipy==1.5.4
Best match: scipy 1.5.4
Adding scipy 1.5.4 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for flatbuffers==2.0
Best match: flatbuffers 2.0
Adding flatbuffers 2.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for opt-einsum==3.3.0
Best match: opt-einsum 3.3.0
Adding opt-einsum 3.3.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for tensorboard==2.8.0
Best match: tensorboard 2.8.0
Adding tensorboard 2.8.0 to easy-install.pth file
Installing tensorboard-script.py script to C:\Python39\Scripts
Installing tensorboard.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for tf-estimator-nightly==2.8.0.dev2021122109
Best match: tf-estimator-nightly 2.8.0.dev2021122109
Adding tf-estimator-nightly 2.8.0.dev2021122109 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for grpcio==1.41.1
Best match: grpcio 1.41.1
Adding grpcio 1.41.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for tensorflow-io-gcs-filesystem==0.24.0
Best match: tensorflow-io-gcs-filesystem 0.24.0
Adding tensorflow-io-gcs-filesystem 0.24.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for astunparse==1.6.3
Best match: astunparse 1.6.3
Adding astunparse 1.6.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for Keras-Preprocessing==1.1.2
Best match: Keras-Preprocessing 1.1.2
Adding Keras-Preprocessing 1.1.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for typing-extensions==3.10.0.2
Best match: typing-extensions 3.10.0.2
Adding typing-extensions 3.10.0.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for h5py==3.6.0
Best match: h5py 3.6.0
Adding h5py 3.6.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for keras==2.8.0
Best match: keras 2.8.0
Adding keras 2.8.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for google-pasta==0.2.0
Best match: google-pasta 0.2.0
Adding google-pasta 0.2.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for protobuf==3.19.4
Best match: protobuf 3.19.4
Adding protobuf 3.19.4 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for gast==0.5.3
Best match: gast 0.5.3
Adding gast 0.5.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for wrapt==1.14.0
Best match: wrapt 1.14.0
Adding wrapt 1.14.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for setuptools==58.5.3
Best match: setuptools 58.5.3
Adding setuptools 58.5.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for libclang==13.0.0
Best match: libclang 13.0.0
Adding libclang 13.0.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for termcolor==1.1.0
Best match: termcolor 1.1.0
Adding termcolor 1.1.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for six==1.16.0
Best match: six 1.16.0
Adding six 1.16.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for python-dateutil==2.8.2
Best match: python-dateutil 2.8.2
Adding python-dateutil 2.8.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for pytz==2021.1
Best match: pytz 2021.1
Adding pytz 2021.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for contextlib2==21.6.0
Best match: contextlib2 21.6.0
Adding contextlib2 21.6.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for PyYAML==5.4.1
Best match: PyYAML 5.4.1
Adding PyYAML 5.4.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for matplotlib==3.3.4
Best match: matplotlib 3.3.4
Adding matplotlib 3.3.4 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for msgpack==1.0.3
Best match: msgpack 1.0.3
Adding msgpack 1.0.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for tensorflow-datasets==4.5.2
Best match: tensorflow-datasets 4.5.2
Adding tensorflow-datasets 4.5.2 to easy-install.pth file
Installing tfds-script.py script to C:\Python39\Scripts
Installing tfds.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for packaging==21.0
Best match: packaging 21.0
Adding packaging 21.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for toolz==0.11.2
Best match: toolz 0.11.2
Adding toolz 0.11.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for dm-tree==0.1.6
Best match: dm-tree 0.1.6
Adding dm-tree 0.1.6 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for requests==2.27.1
Best match: requests 2.27.1
Adding requests 2.27.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for wheel==0.37.0
Best match: wheel 0.37.0
Adding wheel 0.37.0 to easy-install.pth file
Installing wheel-script.py script to C:\Python39\Scripts
Installing wheel.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for tensorboard-plugin-wit==1.8.0
Best match: tensorboard-plugin-wit 1.8.0
Adding tensorboard-plugin-wit 1.8.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for google-auth==2.3.3
Best match: google-auth 2.3.3
Adding google-auth 2.3.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for google-auth-oauthlib==0.4.6
Best match: google-auth-oauthlib 0.4.6
Adding google-auth-oauthlib 0.4.6 to easy-install.pth file
Installing google-oauthlib-tool-script.py script to C:\Python39\Scripts
Installing google-oauthlib-tool.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for tensorboard-data-server==0.6.1
Best match: tensorboard-data-server 0.6.1
Adding tensorboard-data-server 0.6.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for Werkzeug==2.0.2
Best match: Werkzeug 2.0.2
Adding Werkzeug 2.0.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for Markdown==3.3.4
Best match: Markdown 3.3.4
Adding Markdown 3.3.4 to easy-install.pth file
Installing markdown_py-script.py script to C:\Python39\Scripts
Installing markdown_py.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for Pillow==9.0.1
Best match: Pillow 9.0.1
Adding Pillow 9.0.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for cycler==0.11.0
Best match: cycler 0.11.0
Adding cycler 0.11.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for kiwisolver==1.3.2
Best match: kiwisolver 1.3.2
Adding kiwisolver 1.3.2 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for pyparsing==3.0.7
Best match: pyparsing 3.0.7
Adding pyparsing 3.0.7 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for promise==2.3
Best match: promise 2.3
Adding promise 2.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for tqdm==4.59.0
Best match: tqdm 4.59.0
Adding tqdm 4.59.0 to easy-install.pth file
Installing tqdm-script.py script to C:\Python39\Scripts
Installing tqdm.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for tensorflow-metadata==1.7.0
Best match: tensorflow-metadata 1.7.0
Adding tensorflow-metadata 1.7.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for dill==0.3.4
Best match: dill 0.3.4
Adding dill 0.3.4 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for certifi==2021.10.8
Best match: certifi 2021.10.8
Adding certifi 2021.10.8 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for charset-normalizer==2.0.7
Best match: charset-normalizer 2.0.7
Adding charset-normalizer 2.0.7 to easy-install.pth file
Installing normalizer-script.py script to C:\Python39\Scripts
Installing normalizer.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for idna==3.3
Best match: idna 3.3
Adding idna 3.3 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for urllib3==1.26.7
Best match: urllib3 1.26.7
Adding urllib3 1.26.7 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for cachetools==4.2.4
Best match: cachetools 4.2.4
Adding cachetools 4.2.4 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for rsa==4.7.2
Best match: rsa 4.7.2
Adding rsa 4.7.2 to easy-install.pth file
Installing pyrsa-decrypt-script.py script to C:\Python39\Scripts
Installing pyrsa-decrypt.exe script to C:\Python39\Scripts
Installing pyrsa-encrypt-script.py script to C:\Python39\Scripts
Installing pyrsa-encrypt.exe script to C:\Python39\Scripts
Installing pyrsa-keygen-script.py script to C:\Python39\Scripts
Installing pyrsa-keygen.exe script to C:\Python39\Scripts
Installing pyrsa-priv2pub-script.py script to C:\Python39\Scripts
Installing pyrsa-priv2pub.exe script to C:\Python39\Scripts
Installing pyrsa-sign-script.py script to C:\Python39\Scripts
Installing pyrsa-sign.exe script to C:\Python39\Scripts
Installing pyrsa-verify-script.py script to C:\Python39\Scripts
Installing pyrsa-verify.exe script to C:\Python39\Scripts

Using c:\python39\lib\site-packages
Searching for pyasn1-modules==0.2.8
Best match: pyasn1-modules 0.2.8
Adding pyasn1-modules 0.2.8 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for requests-oauthlib==1.3.0
Best match: requests-oauthlib 1.3.0
Adding requests-oauthlib 1.3.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for googleapis-common-protos==1.56.0
Best match: googleapis-common-protos 1.56.0
Adding googleapis-common-protos 1.56.0 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for pyasn1==0.4.8
Best match: pyasn1 0.4.8
Adding pyasn1 0.4.8 to easy-install.pth file

Using c:\python39\lib\site-packages
Searching for oauthlib==3.1.1
Best match: oauthlib 3.1.1
Adding oauthlib 3.1.1 to easy-install.pth file

Using c:\python39\lib\site-packages
Finished processing dependencies for maxim==1.0.0

And still I get the error:

C:\maxim>python maxim/run_eval.py --task Denoising --ckpt_path C:/maxim/Denoising_SIDD.npz \ --input_dir C:/maxim/images/Denoising --output_dir C:/maxim/images/Results --has_target=False
C:\Python39\lib\site-packages\numpy\_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
C:\Python39\lib\site-packages\numpy\.libs\libopenblas.EL2C6PLE4ZYW3ECEVIV3OXXGRN2NRFM2.gfortran-win_amd64.dll
C:\Python39\lib\site-packages\numpy\.libs\libopenblas.QVLO2T66WEPI7JZ63PS3HMOHFEY472BC.gfortran-win_amd64.dll
  warnings.warn("loaded more than 1 DLL from .libs:"
Traceback (most recent call last):
  File "C:\maxim\maxim\run_eval.py", line 419, in <module>
    app.run(main)
  File "C:\Python39\lib\site-packages\absl\app.py", line 312, in run
    _run_main(main, args)
  File "C:\Python39\lib\site-packages\absl\app.py", line 258, in _run_main
    sys.exit(main(argv))
  File "C:\maxim\maxim\run_eval.py", line 341, in main
    model_mod = importlib.import_module(f'maxim.models.{_MODEL_FILENAME}')
  File "C:\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'maxim.models'

Hi @AIisCool, please run:

$ pip install .

I have updated README with the complete install instruction.