Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python inference_image.py error #20

Open
biter0088 opened this issue Aug 3, 2024 · 1 comment
Open

python inference_image.py error #20

biter0088 opened this issue Aug 3, 2024 · 1 comment

Comments

@biter0088
Copy link

(simdeblur) xiu@xiu:~/Learning/SimDeblur$ python inference_image.py /home/xiu/Learning/SimDeblur/configs/dbn/dbn_dvd.yaml  /home/xiu/Learning/SimDeblur/downloads_my/CKPT_PATH/dbn_ckpt.pth  --img=/home/xiu/Learning/datasets/video/videos/1/0001/input/0001.jpg  --save_path=/home/xiu/Learning/datasets/video/videos/1/0001/input/0001_deblur 
Cannot inport EDVR modules!!!
Cannot import STFAN modules!!!
Using checkpoint loaded from /home/xiu/Learning/SimDeblur/downloads_my/CKPT_PATH/dbn_ckpt.pth for testing.
Traceback (most recent call last):
  File "inference_image.py", line 81, in <module>
    inference()
  File "inference_image.py", line 70, in inference
    outputs = arch.postprocess(arch.model(arch.preprocess(input_image)))
  File "/home/xiu/anaconda3/envs/simdeblur/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/xiu/Learning/SimDeblur/simdeblur/model/backbone/dbn/dbn.py", line 135, in forward
    central_frame = x[:, self.num_frames // 2]
IndexError: index 2 is out of bounds for dimension 1 with size 1

And I download the dbn_ckpt.pth from your link.

@ljzycmd
Copy link
Owner

ljzycmd commented Aug 13, 2024

Hi @biter0088, note that inference_image.py is only for image models like SRN, yet DBN is a video deblurring model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants