Huang-ShiRui / Semi-UIR

Official code for "Contrastive Semi-supervised Learning for Underwater Image Restoration via Reliable Bank" (2023 CVPR)
113 stars 10 forks source link

Running with already trained model #12

Open sumitanilkshirsagar opened 1 year ago

sumitanilkshirsagar commented 1 year ago

Hi, I wanted to run your image enhancement model on some underwater images.I was not sure of the steps to follow. So what I did was: 1) clone this repo. 2) store images in data/test/unlabeled/input/ 3) python estimate_illumination.py data/test/unlabeled/LA/ got same number of images 4) python test.py

But Step 4 gave error sayng : File "test.py", line 28, in <module> model.load_state_dict(checkpoint['state_dict']) File "/home/eyerov/anaconda3/envs/huang-shirui/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1223, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for AIMnet: Missing key(s) in state_dict:

error.txt Full error is attached as error.txt

xioatian1 commented 1 month ago

Hi, I wanted to run your image enhancement model on some underwater images.I was not sure of the steps to follow. So what I did was:

  1. clone this repo.
  2. store images in data/test/unlabeled/input/
  3. python estimate_illumination.py data/test/unlabeled/LA/ got same number of images
  4. python test.py

But Step 4 gave error sayng : File "test.py", line 28, in <module> model.load_state_dict(checkpoint['state_dict']) File "/home/eyerov/anaconda3/envs/huang-shirui/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1223, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for AIMnet: Missing key(s) in state_dict:

error.txt Full error is attached as error.txt

I have the same error. How did you solve it?